| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. |
| | 3 | |
|
| | 4 | | // <auto-generated/> |
| | 5 | |
|
| | 6 | | #nullable disable |
| | 7 | |
|
| | 8 | | using System; |
| | 9 | | using System.Threading; |
| | 10 | | using System.Threading.Tasks; |
| | 11 | | using Azure; |
| | 12 | | using Azure.Core; |
| | 13 | | using Azure.Core.Pipeline; |
| | 14 | | using Azure.ResourceManager.EventHubs.Models; |
| | 15 | |
|
| | 16 | | namespace Azure.ResourceManager.EventHubs |
| | 17 | | { |
| | 18 | | /// <summary> The Namespaces service client. </summary> |
| | 19 | | public partial class NamespacesOperations |
| | 20 | | { |
| | 21 | | private readonly ClientDiagnostics _clientDiagnostics; |
| | 22 | | private readonly HttpPipeline _pipeline; |
| 368 | 23 | | internal NamespacesRestOperations RestClient { get; } |
| | 24 | | /// <summary> Initializes a new instance of NamespacesOperations for mocking. </summary> |
| 48 | 25 | | protected NamespacesOperations() |
| | 26 | | { |
| 48 | 27 | | } |
| | 28 | | /// <summary> Initializes a new instance of NamespacesOperations. </summary> |
| | 29 | | /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param> |
| | 30 | | /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param> |
| | 31 | | /// <param name="subscriptionId"> Subscription credentials that uniquely identify a Microsoft Azure subscription |
| | 32 | | /// <param name="endpoint"> server parameter. </param> |
| 48 | 33 | | internal NamespacesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, |
| | 34 | | { |
| 48 | 35 | | RestClient = new NamespacesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint); |
| 48 | 36 | | _clientDiagnostics = clientDiagnostics; |
| 48 | 37 | | _pipeline = pipeline; |
| 48 | 38 | | } |
| | 39 | |
|
| | 40 | | /// <summary> Creates or updates an IpFilterRule for a Namespace. </summary> |
| | 41 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 42 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 43 | | /// <param name="ipFilterRuleName"> The IP Filter Rule name. </param> |
| | 44 | | /// <param name="parameters"> The Namespace IpFilterRule. </param> |
| | 45 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 46 | | public virtual async Task<Response<IpFilterRule>> CreateOrUpdateIpFilterRuleAsync(string resourceGroupName, stri |
| | 47 | | { |
| 0 | 48 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CreateOrUpdateIpFilterRule"); |
| 0 | 49 | | scope.Start(); |
| | 50 | | try |
| | 51 | | { |
| 0 | 52 | | return await RestClient.CreateOrUpdateIpFilterRuleAsync(resourceGroupName, namespaceName, ipFilterRuleNa |
| | 53 | | } |
| 0 | 54 | | catch (Exception e) |
| | 55 | | { |
| 0 | 56 | | scope.Failed(e); |
| 0 | 57 | | throw; |
| | 58 | | } |
| 0 | 59 | | } |
| | 60 | |
|
| | 61 | | /// <summary> Creates or updates an IpFilterRule for a Namespace. </summary> |
| | 62 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 63 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 64 | | /// <param name="ipFilterRuleName"> The IP Filter Rule name. </param> |
| | 65 | | /// <param name="parameters"> The Namespace IpFilterRule. </param> |
| | 66 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 67 | | public virtual Response<IpFilterRule> CreateOrUpdateIpFilterRule(string resourceGroupName, string namespaceName, |
| | 68 | | { |
| 0 | 69 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CreateOrUpdateIpFilterRule"); |
| 0 | 70 | | scope.Start(); |
| | 71 | | try |
| | 72 | | { |
| 0 | 73 | | return RestClient.CreateOrUpdateIpFilterRule(resourceGroupName, namespaceName, ipFilterRuleName, paramet |
| | 74 | | } |
| 0 | 75 | | catch (Exception e) |
| | 76 | | { |
| 0 | 77 | | scope.Failed(e); |
| 0 | 78 | | throw; |
| | 79 | | } |
| 0 | 80 | | } |
| | 81 | |
|
| | 82 | | /// <summary> Deletes an IpFilterRule for a Namespace. </summary> |
| | 83 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 84 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 85 | | /// <param name="ipFilterRuleName"> The IP Filter Rule name. </param> |
| | 86 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 87 | | public virtual async Task<Response> DeleteIpFilterRuleAsync(string resourceGroupName, string namespaceName, stri |
| | 88 | | { |
| 0 | 89 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.DeleteIpFilterRule"); |
| 0 | 90 | | scope.Start(); |
| | 91 | | try |
| | 92 | | { |
| 0 | 93 | | return await RestClient.DeleteIpFilterRuleAsync(resourceGroupName, namespaceName, ipFilterRuleName, canc |
| | 94 | | } |
| 0 | 95 | | catch (Exception e) |
| | 96 | | { |
| 0 | 97 | | scope.Failed(e); |
| 0 | 98 | | throw; |
| | 99 | | } |
| 0 | 100 | | } |
| | 101 | |
|
| | 102 | | /// <summary> Deletes an IpFilterRule for a Namespace. </summary> |
| | 103 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 104 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 105 | | /// <param name="ipFilterRuleName"> The IP Filter Rule name. </param> |
| | 106 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 107 | | public virtual Response DeleteIpFilterRule(string resourceGroupName, string namespaceName, string ipFilterRuleNa |
| | 108 | | { |
| 0 | 109 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.DeleteIpFilterRule"); |
| 0 | 110 | | scope.Start(); |
| | 111 | | try |
| | 112 | | { |
| 0 | 113 | | return RestClient.DeleteIpFilterRule(resourceGroupName, namespaceName, ipFilterRuleName, cancellationTok |
| | 114 | | } |
| 0 | 115 | | catch (Exception e) |
| | 116 | | { |
| 0 | 117 | | scope.Failed(e); |
| 0 | 118 | | throw; |
| | 119 | | } |
| 0 | 120 | | } |
| | 121 | |
|
| | 122 | | /// <summary> Gets an IpFilterRule for a Namespace by rule name. </summary> |
| | 123 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 124 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 125 | | /// <param name="ipFilterRuleName"> The IP Filter Rule name. </param> |
| | 126 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 127 | | public virtual async Task<Response<IpFilterRule>> GetIpFilterRuleAsync(string resourceGroupName, string namespac |
| | 128 | | { |
| 0 | 129 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.GetIpFilterRule"); |
| 0 | 130 | | scope.Start(); |
| | 131 | | try |
| | 132 | | { |
| 0 | 133 | | return await RestClient.GetIpFilterRuleAsync(resourceGroupName, namespaceName, ipFilterRuleName, cancell |
| | 134 | | } |
| 0 | 135 | | catch (Exception e) |
| | 136 | | { |
| 0 | 137 | | scope.Failed(e); |
| 0 | 138 | | throw; |
| | 139 | | } |
| 0 | 140 | | } |
| | 141 | |
|
| | 142 | | /// <summary> Gets an IpFilterRule for a Namespace by rule name. </summary> |
| | 143 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 144 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 145 | | /// <param name="ipFilterRuleName"> The IP Filter Rule name. </param> |
| | 146 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 147 | | public virtual Response<IpFilterRule> GetIpFilterRule(string resourceGroupName, string namespaceName, string ipF |
| | 148 | | { |
| 0 | 149 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.GetIpFilterRule"); |
| 0 | 150 | | scope.Start(); |
| | 151 | | try |
| | 152 | | { |
| 0 | 153 | | return RestClient.GetIpFilterRule(resourceGroupName, namespaceName, ipFilterRuleName, cancellationToken) |
| | 154 | | } |
| 0 | 155 | | catch (Exception e) |
| | 156 | | { |
| 0 | 157 | | scope.Failed(e); |
| 0 | 158 | | throw; |
| | 159 | | } |
| 0 | 160 | | } |
| | 161 | |
|
| | 162 | | /// <summary> Gets the description of the specified namespace. </summary> |
| | 163 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 164 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 165 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 166 | | public virtual async Task<Response<EHNamespace>> GetAsync(string resourceGroupName, string namespaceName, Cancel |
| | 167 | | { |
| 28 | 168 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.Get"); |
| 28 | 169 | | scope.Start(); |
| | 170 | | try |
| | 171 | | { |
| 28 | 172 | | return await RestClient.GetAsync(resourceGroupName, namespaceName, cancellationToken).ConfigureAwait(fal |
| | 173 | | } |
| 0 | 174 | | catch (Exception e) |
| | 175 | | { |
| 0 | 176 | | scope.Failed(e); |
| 0 | 177 | | throw; |
| | 178 | | } |
| 28 | 179 | | } |
| | 180 | |
|
| | 181 | | /// <summary> Gets the description of the specified namespace. </summary> |
| | 182 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 183 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 184 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 185 | | public virtual Response<EHNamespace> Get(string resourceGroupName, string namespaceName, CancellationToken cance |
| | 186 | | { |
| 28 | 187 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.Get"); |
| 28 | 188 | | scope.Start(); |
| | 189 | | try |
| | 190 | | { |
| 28 | 191 | | return RestClient.Get(resourceGroupName, namespaceName, cancellationToken); |
| | 192 | | } |
| 0 | 193 | | catch (Exception e) |
| | 194 | | { |
| 0 | 195 | | scope.Failed(e); |
| 0 | 196 | | throw; |
| | 197 | | } |
| 28 | 198 | | } |
| | 199 | |
|
| | 200 | | /// <summary> Creates or updates a namespace. Once created, this namespace's resource manifest is immutable |
| | 201 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 202 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 203 | | /// <param name="parameters"> Parameters for updating a namespace resource. </param> |
| | 204 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 205 | | public virtual async Task<Response<EHNamespace>> UpdateAsync(string resourceGroupName, string namespaceName, EHN |
| | 206 | | { |
| 4 | 207 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.Update"); |
| 4 | 208 | | scope.Start(); |
| | 209 | | try |
| | 210 | | { |
| 4 | 211 | | return await RestClient.UpdateAsync(resourceGroupName, namespaceName, parameters, cancellationToken).Con |
| | 212 | | } |
| 0 | 213 | | catch (Exception e) |
| | 214 | | { |
| 0 | 215 | | scope.Failed(e); |
| 0 | 216 | | throw; |
| | 217 | | } |
| 4 | 218 | | } |
| | 219 | |
|
| | 220 | | /// <summary> Creates or updates a namespace. Once created, this namespace's resource manifest is immutable |
| | 221 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 222 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 223 | | /// <param name="parameters"> Parameters for updating a namespace resource. </param> |
| | 224 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 225 | | public virtual Response<EHNamespace> Update(string resourceGroupName, string namespaceName, EHNamespace paramete |
| | 226 | | { |
| 4 | 227 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.Update"); |
| 4 | 228 | | scope.Start(); |
| | 229 | | try |
| | 230 | | { |
| 4 | 231 | | return RestClient.Update(resourceGroupName, namespaceName, parameters, cancellationToken); |
| | 232 | | } |
| 0 | 233 | | catch (Exception e) |
| | 234 | | { |
| 0 | 235 | | scope.Failed(e); |
| 0 | 236 | | throw; |
| | 237 | | } |
| 4 | 238 | | } |
| | 239 | |
|
| | 240 | | /// <summary> Creates or updates an VirtualNetworkRule for a Namespace. </summary> |
| | 241 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 242 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 243 | | /// <param name="virtualNetworkRuleName"> The Virtual Network Rule name. </param> |
| | 244 | | /// <param name="parameters"> The Namespace VirtualNetworkRule. </param> |
| | 245 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 246 | | public virtual async Task<Response<VirtualNetworkRule>> CreateOrUpdateVirtualNetworkRuleAsync(string resourceGro |
| | 247 | | { |
| 0 | 248 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CreateOrUpdateVirtualNetworkRule"); |
| 0 | 249 | | scope.Start(); |
| | 250 | | try |
| | 251 | | { |
| 0 | 252 | | return await RestClient.CreateOrUpdateVirtualNetworkRuleAsync(resourceGroupName, namespaceName, virtualN |
| | 253 | | } |
| 0 | 254 | | catch (Exception e) |
| | 255 | | { |
| 0 | 256 | | scope.Failed(e); |
| 0 | 257 | | throw; |
| | 258 | | } |
| 0 | 259 | | } |
| | 260 | |
|
| | 261 | | /// <summary> Creates or updates an VirtualNetworkRule for a Namespace. </summary> |
| | 262 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 263 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 264 | | /// <param name="virtualNetworkRuleName"> The Virtual Network Rule name. </param> |
| | 265 | | /// <param name="parameters"> The Namespace VirtualNetworkRule. </param> |
| | 266 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 267 | | public virtual Response<VirtualNetworkRule> CreateOrUpdateVirtualNetworkRule(string resourceGroupName, string na |
| | 268 | | { |
| 0 | 269 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CreateOrUpdateVirtualNetworkRule"); |
| 0 | 270 | | scope.Start(); |
| | 271 | | try |
| | 272 | | { |
| 0 | 273 | | return RestClient.CreateOrUpdateVirtualNetworkRule(resourceGroupName, namespaceName, virtualNetworkRuleN |
| | 274 | | } |
| 0 | 275 | | catch (Exception e) |
| | 276 | | { |
| 0 | 277 | | scope.Failed(e); |
| 0 | 278 | | throw; |
| | 279 | | } |
| 0 | 280 | | } |
| | 281 | |
|
| | 282 | | /// <summary> Deletes an VirtualNetworkRule for a Namespace. </summary> |
| | 283 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 284 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 285 | | /// <param name="virtualNetworkRuleName"> The Virtual Network Rule name. </param> |
| | 286 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 287 | | public virtual async Task<Response> DeleteVirtualNetworkRuleAsync(string resourceGroupName, string namespaceName |
| | 288 | | { |
| 0 | 289 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.DeleteVirtualNetworkRule"); |
| 0 | 290 | | scope.Start(); |
| | 291 | | try |
| | 292 | | { |
| 0 | 293 | | return await RestClient.DeleteVirtualNetworkRuleAsync(resourceGroupName, namespaceName, virtualNetworkRu |
| | 294 | | } |
| 0 | 295 | | catch (Exception e) |
| | 296 | | { |
| 0 | 297 | | scope.Failed(e); |
| 0 | 298 | | throw; |
| | 299 | | } |
| 0 | 300 | | } |
| | 301 | |
|
| | 302 | | /// <summary> Deletes an VirtualNetworkRule for a Namespace. </summary> |
| | 303 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 304 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 305 | | /// <param name="virtualNetworkRuleName"> The Virtual Network Rule name. </param> |
| | 306 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 307 | | public virtual Response DeleteVirtualNetworkRule(string resourceGroupName, string namespaceName, string virtualN |
| | 308 | | { |
| 0 | 309 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.DeleteVirtualNetworkRule"); |
| 0 | 310 | | scope.Start(); |
| | 311 | | try |
| | 312 | | { |
| 0 | 313 | | return RestClient.DeleteVirtualNetworkRule(resourceGroupName, namespaceName, virtualNetworkRuleName, can |
| | 314 | | } |
| 0 | 315 | | catch (Exception e) |
| | 316 | | { |
| 0 | 317 | | scope.Failed(e); |
| 0 | 318 | | throw; |
| | 319 | | } |
| 0 | 320 | | } |
| | 321 | |
|
| | 322 | | /// <summary> Gets an VirtualNetworkRule for a Namespace by rule name. </summary> |
| | 323 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 324 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 325 | | /// <param name="virtualNetworkRuleName"> The Virtual Network Rule name. </param> |
| | 326 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 327 | | public virtual async Task<Response<VirtualNetworkRule>> GetVirtualNetworkRuleAsync(string resourceGroupName, str |
| | 328 | | { |
| 0 | 329 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.GetVirtualNetworkRule"); |
| 0 | 330 | | scope.Start(); |
| | 331 | | try |
| | 332 | | { |
| 0 | 333 | | return await RestClient.GetVirtualNetworkRuleAsync(resourceGroupName, namespaceName, virtualNetworkRuleN |
| | 334 | | } |
| 0 | 335 | | catch (Exception e) |
| | 336 | | { |
| 0 | 337 | | scope.Failed(e); |
| 0 | 338 | | throw; |
| | 339 | | } |
| 0 | 340 | | } |
| | 341 | |
|
| | 342 | | /// <summary> Gets an VirtualNetworkRule for a Namespace by rule name. </summary> |
| | 343 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 344 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 345 | | /// <param name="virtualNetworkRuleName"> The Virtual Network Rule name. </param> |
| | 346 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 347 | | public virtual Response<VirtualNetworkRule> GetVirtualNetworkRule(string resourceGroupName, string namespaceName |
| | 348 | | { |
| 0 | 349 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.GetVirtualNetworkRule"); |
| 0 | 350 | | scope.Start(); |
| | 351 | | try |
| | 352 | | { |
| 0 | 353 | | return RestClient.GetVirtualNetworkRule(resourceGroupName, namespaceName, virtualNetworkRuleName, cancel |
| | 354 | | } |
| 0 | 355 | | catch (Exception e) |
| | 356 | | { |
| 0 | 357 | | scope.Failed(e); |
| 0 | 358 | | throw; |
| | 359 | | } |
| 0 | 360 | | } |
| | 361 | |
|
| | 362 | | /// <summary> Create or update NetworkRuleSet for a Namespace. </summary> |
| | 363 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 364 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 365 | | /// <param name="parameters"> The Namespace IpFilterRule. </param> |
| | 366 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 367 | | public virtual async Task<Response<NetworkRuleSet>> CreateOrUpdateNetworkRuleSetAsync(string resourceGroupName, |
| | 368 | | { |
| 4 | 369 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CreateOrUpdateNetworkRuleSet"); |
| 4 | 370 | | scope.Start(); |
| | 371 | | try |
| | 372 | | { |
| 4 | 373 | | return await RestClient.CreateOrUpdateNetworkRuleSetAsync(resourceGroupName, namespaceName, parameters, |
| | 374 | | } |
| 0 | 375 | | catch (Exception e) |
| | 376 | | { |
| 0 | 377 | | scope.Failed(e); |
| 0 | 378 | | throw; |
| | 379 | | } |
| 4 | 380 | | } |
| | 381 | |
|
| | 382 | | /// <summary> Create or update NetworkRuleSet for a Namespace. </summary> |
| | 383 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 384 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 385 | | /// <param name="parameters"> The Namespace IpFilterRule. </param> |
| | 386 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 387 | | public virtual Response<NetworkRuleSet> CreateOrUpdateNetworkRuleSet(string resourceGroupName, string namespaceN |
| | 388 | | { |
| 4 | 389 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CreateOrUpdateNetworkRuleSet"); |
| 4 | 390 | | scope.Start(); |
| | 391 | | try |
| | 392 | | { |
| 4 | 393 | | return RestClient.CreateOrUpdateNetworkRuleSet(resourceGroupName, namespaceName, parameters, cancellatio |
| | 394 | | } |
| 0 | 395 | | catch (Exception e) |
| | 396 | | { |
| 0 | 397 | | scope.Failed(e); |
| 0 | 398 | | throw; |
| | 399 | | } |
| 4 | 400 | | } |
| | 401 | |
|
| | 402 | | /// <summary> Gets NetworkRuleSet for a Namespace. </summary> |
| | 403 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 404 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 405 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 406 | | public virtual async Task<Response<NetworkRuleSet>> GetNetworkRuleSetAsync(string resourceGroupName, string name |
| | 407 | | { |
| 4 | 408 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.GetNetworkRuleSet"); |
| 4 | 409 | | scope.Start(); |
| | 410 | | try |
| | 411 | | { |
| 4 | 412 | | return await RestClient.GetNetworkRuleSetAsync(resourceGroupName, namespaceName, cancellationToken).Conf |
| | 413 | | } |
| 0 | 414 | | catch (Exception e) |
| | 415 | | { |
| 0 | 416 | | scope.Failed(e); |
| 0 | 417 | | throw; |
| | 418 | | } |
| 4 | 419 | | } |
| | 420 | |
|
| | 421 | | /// <summary> Gets NetworkRuleSet for a Namespace. </summary> |
| | 422 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 423 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 424 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 425 | | public virtual Response<NetworkRuleSet> GetNetworkRuleSet(string resourceGroupName, string namespaceName, Cancel |
| | 426 | | { |
| 4 | 427 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.GetNetworkRuleSet"); |
| 4 | 428 | | scope.Start(); |
| | 429 | | try |
| | 430 | | { |
| 4 | 431 | | return RestClient.GetNetworkRuleSet(resourceGroupName, namespaceName, cancellationToken); |
| | 432 | | } |
| 0 | 433 | | catch (Exception e) |
| | 434 | | { |
| 0 | 435 | | scope.Failed(e); |
| 0 | 436 | | throw; |
| | 437 | | } |
| 4 | 438 | | } |
| | 439 | |
|
| | 440 | | /// <summary> Creates or updates an AuthorizationRule for a Namespace. </summary> |
| | 441 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 442 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 443 | | /// <param name="authorizationRuleName"> The authorization rule name. </param> |
| | 444 | | /// <param name="parameters"> The shared access AuthorizationRule. </param> |
| | 445 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 446 | | public virtual async Task<Response<AuthorizationRule>> CreateOrUpdateAuthorizationRuleAsync(string resourceGroup |
| | 447 | | { |
| 8 | 448 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CreateOrUpdateAuthorizationRule"); |
| 8 | 449 | | scope.Start(); |
| | 450 | | try |
| | 451 | | { |
| 8 | 452 | | return await RestClient.CreateOrUpdateAuthorizationRuleAsync(resourceGroupName, namespaceName, authoriza |
| | 453 | | } |
| 0 | 454 | | catch (Exception e) |
| | 455 | | { |
| 0 | 456 | | scope.Failed(e); |
| 0 | 457 | | throw; |
| | 458 | | } |
| 8 | 459 | | } |
| | 460 | |
|
| | 461 | | /// <summary> Creates or updates an AuthorizationRule for a Namespace. </summary> |
| | 462 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 463 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 464 | | /// <param name="authorizationRuleName"> The authorization rule name. </param> |
| | 465 | | /// <param name="parameters"> The shared access AuthorizationRule. </param> |
| | 466 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 467 | | public virtual Response<AuthorizationRule> CreateOrUpdateAuthorizationRule(string resourceGroupName, string name |
| | 468 | | { |
| 8 | 469 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CreateOrUpdateAuthorizationRule"); |
| 8 | 470 | | scope.Start(); |
| | 471 | | try |
| | 472 | | { |
| 8 | 473 | | return RestClient.CreateOrUpdateAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleNam |
| | 474 | | } |
| 0 | 475 | | catch (Exception e) |
| | 476 | | { |
| 0 | 477 | | scope.Failed(e); |
| 0 | 478 | | throw; |
| | 479 | | } |
| 8 | 480 | | } |
| | 481 | |
|
| | 482 | | /// <summary> Deletes an AuthorizationRule for a Namespace. </summary> |
| | 483 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 484 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 485 | | /// <param name="authorizationRuleName"> The authorization rule name. </param> |
| | 486 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 487 | | public virtual async Task<Response> DeleteAuthorizationRuleAsync(string resourceGroupName, string namespaceName, |
| | 488 | | { |
| 2 | 489 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.DeleteAuthorizationRule"); |
| 2 | 490 | | scope.Start(); |
| | 491 | | try |
| | 492 | | { |
| 2 | 493 | | return await RestClient.DeleteAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRule |
| | 494 | | } |
| 0 | 495 | | catch (Exception e) |
| | 496 | | { |
| 0 | 497 | | scope.Failed(e); |
| 0 | 498 | | throw; |
| | 499 | | } |
| 2 | 500 | | } |
| | 501 | |
|
| | 502 | | /// <summary> Deletes an AuthorizationRule for a Namespace. </summary> |
| | 503 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 504 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 505 | | /// <param name="authorizationRuleName"> The authorization rule name. </param> |
| | 506 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 507 | | public virtual Response DeleteAuthorizationRule(string resourceGroupName, string namespaceName, string authoriza |
| | 508 | | { |
| 2 | 509 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.DeleteAuthorizationRule"); |
| 2 | 510 | | scope.Start(); |
| | 511 | | try |
| | 512 | | { |
| 2 | 513 | | return RestClient.DeleteAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, cance |
| | 514 | | } |
| 0 | 515 | | catch (Exception e) |
| | 516 | | { |
| 0 | 517 | | scope.Failed(e); |
| 0 | 518 | | throw; |
| | 519 | | } |
| 2 | 520 | | } |
| | 521 | |
|
| | 522 | | /// <summary> Gets an AuthorizationRule for a Namespace by rule name. </summary> |
| | 523 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 524 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 525 | | /// <param name="authorizationRuleName"> The authorization rule name. </param> |
| | 526 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 527 | | public virtual async Task<Response<AuthorizationRule>> GetAuthorizationRuleAsync(string resourceGroupName, strin |
| | 528 | | { |
| 10 | 529 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.GetAuthorizationRule"); |
| 10 | 530 | | scope.Start(); |
| | 531 | | try |
| | 532 | | { |
| 10 | 533 | | return await RestClient.GetAuthorizationRuleAsync(resourceGroupName, namespaceName, authorizationRuleNam |
| | 534 | | } |
| 0 | 535 | | catch (Exception e) |
| | 536 | | { |
| 0 | 537 | | scope.Failed(e); |
| 0 | 538 | | throw; |
| | 539 | | } |
| 10 | 540 | | } |
| | 541 | |
|
| | 542 | | /// <summary> Gets an AuthorizationRule for a Namespace by rule name. </summary> |
| | 543 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 544 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 545 | | /// <param name="authorizationRuleName"> The authorization rule name. </param> |
| | 546 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 547 | | public virtual Response<AuthorizationRule> GetAuthorizationRule(string resourceGroupName, string namespaceName, |
| | 548 | | { |
| 10 | 549 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.GetAuthorizationRule"); |
| 10 | 550 | | scope.Start(); |
| | 551 | | try |
| | 552 | | { |
| 10 | 553 | | return RestClient.GetAuthorizationRule(resourceGroupName, namespaceName, authorizationRuleName, cancella |
| | 554 | | } |
| 0 | 555 | | catch (Exception e) |
| | 556 | | { |
| 0 | 557 | | scope.Failed(e); |
| 0 | 558 | | throw; |
| | 559 | | } |
| 10 | 560 | | } |
| | 561 | |
|
| | 562 | | /// <summary> Gets the primary and secondary connection strings for the Namespace. </summary> |
| | 563 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 564 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 565 | | /// <param name="authorizationRuleName"> The authorization rule name. </param> |
| | 566 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 567 | | public virtual async Task<Response<AccessKeys>> ListKeysAsync(string resourceGroupName, string namespaceName, st |
| | 568 | | { |
| 6 | 569 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListKeys"); |
| 6 | 570 | | scope.Start(); |
| | 571 | | try |
| | 572 | | { |
| 6 | 573 | | return await RestClient.ListKeysAsync(resourceGroupName, namespaceName, authorizationRuleName, cancellat |
| | 574 | | } |
| 0 | 575 | | catch (Exception e) |
| | 576 | | { |
| 0 | 577 | | scope.Failed(e); |
| 0 | 578 | | throw; |
| | 579 | | } |
| 6 | 580 | | } |
| | 581 | |
|
| | 582 | | /// <summary> Gets the primary and secondary connection strings for the Namespace. </summary> |
| | 583 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 584 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 585 | | /// <param name="authorizationRuleName"> The authorization rule name. </param> |
| | 586 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 587 | | public virtual Response<AccessKeys> ListKeys(string resourceGroupName, string namespaceName, string authorizatio |
| | 588 | | { |
| 6 | 589 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListKeys"); |
| 6 | 590 | | scope.Start(); |
| | 591 | | try |
| | 592 | | { |
| 6 | 593 | | return RestClient.ListKeys(resourceGroupName, namespaceName, authorizationRuleName, cancellationToken); |
| | 594 | | } |
| 0 | 595 | | catch (Exception e) |
| | 596 | | { |
| 0 | 597 | | scope.Failed(e); |
| 0 | 598 | | throw; |
| | 599 | | } |
| 6 | 600 | | } |
| | 601 | |
|
| | 602 | | /// <summary> Regenerates the primary or secondary connection strings for the specified Namespace. </summary> |
| | 603 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 604 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 605 | | /// <param name="authorizationRuleName"> The authorization rule name. </param> |
| | 606 | | /// <param name="parameters"> Parameters required to regenerate the connection string. </param> |
| | 607 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 608 | | public virtual async Task<Response<AccessKeys>> RegenerateKeysAsync(string resourceGroupName, string namespaceNa |
| | 609 | | { |
| 4 | 610 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.RegenerateKeys"); |
| 4 | 611 | | scope.Start(); |
| | 612 | | try |
| | 613 | | { |
| 4 | 614 | | return await RestClient.RegenerateKeysAsync(resourceGroupName, namespaceName, authorizationRuleName, par |
| | 615 | | } |
| 0 | 616 | | catch (Exception e) |
| | 617 | | { |
| 0 | 618 | | scope.Failed(e); |
| 0 | 619 | | throw; |
| | 620 | | } |
| 4 | 621 | | } |
| | 622 | |
|
| | 623 | | /// <summary> Regenerates the primary or secondary connection strings for the specified Namespace. </summary> |
| | 624 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 625 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 626 | | /// <param name="authorizationRuleName"> The authorization rule name. </param> |
| | 627 | | /// <param name="parameters"> Parameters required to regenerate the connection string. </param> |
| | 628 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 629 | | public virtual Response<AccessKeys> RegenerateKeys(string resourceGroupName, string namespaceName, string author |
| | 630 | | { |
| 4 | 631 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.RegenerateKeys"); |
| 4 | 632 | | scope.Start(); |
| | 633 | | try |
| | 634 | | { |
| 4 | 635 | | return RestClient.RegenerateKeys(resourceGroupName, namespaceName, authorizationRuleName, parameters, ca |
| | 636 | | } |
| 0 | 637 | | catch (Exception e) |
| | 638 | | { |
| 0 | 639 | | scope.Failed(e); |
| 0 | 640 | | throw; |
| | 641 | | } |
| 4 | 642 | | } |
| | 643 | |
|
| | 644 | | /// <summary> Check the give Namespace name availability. </summary> |
| | 645 | | /// <param name="parameters"> Parameters to check availability of the given Namespace name. </param> |
| | 646 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 647 | | public virtual async Task<Response<CheckNameAvailabilityResult>> CheckNameAvailabilityAsync(CheckNameAvailabilit |
| | 648 | | { |
| 2 | 649 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CheckNameAvailability"); |
| 2 | 650 | | scope.Start(); |
| | 651 | | try |
| | 652 | | { |
| 2 | 653 | | return await RestClient.CheckNameAvailabilityAsync(parameters, cancellationToken).ConfigureAwait(false); |
| | 654 | | } |
| 0 | 655 | | catch (Exception e) |
| | 656 | | { |
| 0 | 657 | | scope.Failed(e); |
| 0 | 658 | | throw; |
| | 659 | | } |
| 2 | 660 | | } |
| | 661 | |
|
| | 662 | | /// <summary> Check the give Namespace name availability. </summary> |
| | 663 | | /// <param name="parameters"> Parameters to check availability of the given Namespace name. </param> |
| | 664 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 665 | | public virtual Response<CheckNameAvailabilityResult> CheckNameAvailability(CheckNameAvailabilityParameter parame |
| | 666 | | { |
| 2 | 667 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.CheckNameAvailability"); |
| 2 | 668 | | scope.Start(); |
| | 669 | | try |
| | 670 | | { |
| 2 | 671 | | return RestClient.CheckNameAvailability(parameters, cancellationToken); |
| | 672 | | } |
| 0 | 673 | | catch (Exception e) |
| | 674 | | { |
| 0 | 675 | | scope.Failed(e); |
| 0 | 676 | | throw; |
| | 677 | | } |
| 2 | 678 | | } |
| | 679 | |
|
| | 680 | | /// <summary> Gets a list of IP Filter rules for a Namespace. </summary> |
| | 681 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 682 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 683 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 684 | | public virtual AsyncPageable<IpFilterRule> ListIPFilterRulesAsync(string resourceGroupName, string namespaceName |
| | 685 | | { |
| 0 | 686 | | if (resourceGroupName == null) |
| | 687 | | { |
| 0 | 688 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 689 | | } |
| 0 | 690 | | if (namespaceName == null) |
| | 691 | | { |
| 0 | 692 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 693 | | } |
| | 694 | |
|
| | 695 | | async Task<Page<IpFilterRule>> FirstPageFunc(int? pageSizeHint) |
| | 696 | | { |
| 0 | 697 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListIPFilterRules"); |
| 0 | 698 | | scope.Start(); |
| | 699 | | try |
| | 700 | | { |
| 0 | 701 | | var response = await RestClient.ListIPFilterRulesAsync(resourceGroupName, namespaceName, cancellatio |
| 0 | 702 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 703 | | } |
| 0 | 704 | | catch (Exception e) |
| | 705 | | { |
| 0 | 706 | | scope.Failed(e); |
| 0 | 707 | | throw; |
| | 708 | | } |
| 0 | 709 | | } |
| | 710 | | async Task<Page<IpFilterRule>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 711 | | { |
| 0 | 712 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListIPFilterRules"); |
| 0 | 713 | | scope.Start(); |
| | 714 | | try |
| | 715 | | { |
| 0 | 716 | | var response = await RestClient.ListIPFilterRulesNextPageAsync(nextLink, resourceGroupName, namespac |
| 0 | 717 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 718 | | } |
| 0 | 719 | | catch (Exception e) |
| | 720 | | { |
| 0 | 721 | | scope.Failed(e); |
| 0 | 722 | | throw; |
| | 723 | | } |
| 0 | 724 | | } |
| 0 | 725 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 726 | | } |
| | 727 | |
|
| | 728 | | /// <summary> Gets a list of IP Filter rules for a Namespace. </summary> |
| | 729 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 730 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 731 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 732 | | public virtual Pageable<IpFilterRule> ListIPFilterRules(string resourceGroupName, string namespaceName, Cancella |
| | 733 | | { |
| 0 | 734 | | if (resourceGroupName == null) |
| | 735 | | { |
| 0 | 736 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 737 | | } |
| 0 | 738 | | if (namespaceName == null) |
| | 739 | | { |
| 0 | 740 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 741 | | } |
| | 742 | |
|
| | 743 | | Page<IpFilterRule> FirstPageFunc(int? pageSizeHint) |
| | 744 | | { |
| 0 | 745 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListIPFilterRules"); |
| 0 | 746 | | scope.Start(); |
| | 747 | | try |
| | 748 | | { |
| 0 | 749 | | var response = RestClient.ListIPFilterRules(resourceGroupName, namespaceName, cancellationToken); |
| 0 | 750 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 751 | | } |
| 0 | 752 | | catch (Exception e) |
| | 753 | | { |
| 0 | 754 | | scope.Failed(e); |
| 0 | 755 | | throw; |
| | 756 | | } |
| 0 | 757 | | } |
| | 758 | | Page<IpFilterRule> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 759 | | { |
| 0 | 760 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListIPFilterRules"); |
| 0 | 761 | | scope.Start(); |
| | 762 | | try |
| | 763 | | { |
| 0 | 764 | | var response = RestClient.ListIPFilterRulesNextPage(nextLink, resourceGroupName, namespaceName, canc |
| 0 | 765 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 766 | | } |
| 0 | 767 | | catch (Exception e) |
| | 768 | | { |
| 0 | 769 | | scope.Failed(e); |
| 0 | 770 | | throw; |
| | 771 | | } |
| 0 | 772 | | } |
| 0 | 773 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 774 | | } |
| | 775 | |
|
| | 776 | | /// <summary> Lists all the available Namespaces within a subscription, irrespective of the resource groups. </s |
| | 777 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 778 | | public virtual AsyncPageable<EHNamespace> ListAsync(CancellationToken cancellationToken = default) |
| | 779 | | { |
| | 780 | | async Task<Page<EHNamespace>> FirstPageFunc(int? pageSizeHint) |
| | 781 | | { |
| 2 | 782 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.List"); |
| 2 | 783 | | scope.Start(); |
| | 784 | | try |
| | 785 | | { |
| 2 | 786 | | var response = await RestClient.ListAsync(cancellationToken).ConfigureAwait(false); |
| 2 | 787 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 788 | | } |
| 0 | 789 | | catch (Exception e) |
| | 790 | | { |
| 0 | 791 | | scope.Failed(e); |
| 0 | 792 | | throw; |
| | 793 | | } |
| 2 | 794 | | } |
| | 795 | | async Task<Page<EHNamespace>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 796 | | { |
| 0 | 797 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.List"); |
| 0 | 798 | | scope.Start(); |
| | 799 | | try |
| | 800 | | { |
| 0 | 801 | | var response = await RestClient.ListNextPageAsync(nextLink, cancellationToken).ConfigureAwait(false) |
| 0 | 802 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 803 | | } |
| 0 | 804 | | catch (Exception e) |
| | 805 | | { |
| 0 | 806 | | scope.Failed(e); |
| 0 | 807 | | throw; |
| | 808 | | } |
| 0 | 809 | | } |
| 4 | 810 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 811 | | } |
| | 812 | |
|
| | 813 | | /// <summary> Lists all the available Namespaces within a subscription, irrespective of the resource groups. </s |
| | 814 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 815 | | public virtual Pageable<EHNamespace> List(CancellationToken cancellationToken = default) |
| | 816 | | { |
| | 817 | | Page<EHNamespace> FirstPageFunc(int? pageSizeHint) |
| | 818 | | { |
| 2 | 819 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.List"); |
| 2 | 820 | | scope.Start(); |
| | 821 | | try |
| | 822 | | { |
| 2 | 823 | | var response = RestClient.List(cancellationToken); |
| 2 | 824 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 825 | | } |
| 0 | 826 | | catch (Exception e) |
| | 827 | | { |
| 0 | 828 | | scope.Failed(e); |
| 0 | 829 | | throw; |
| | 830 | | } |
| 2 | 831 | | } |
| | 832 | | Page<EHNamespace> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 833 | | { |
| 0 | 834 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.List"); |
| 0 | 835 | | scope.Start(); |
| | 836 | | try |
| | 837 | | { |
| 0 | 838 | | var response = RestClient.ListNextPage(nextLink, cancellationToken); |
| 0 | 839 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 840 | | } |
| 0 | 841 | | catch (Exception e) |
| | 842 | | { |
| 0 | 843 | | scope.Failed(e); |
| 0 | 844 | | throw; |
| | 845 | | } |
| 0 | 846 | | } |
| 4 | 847 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 848 | | } |
| | 849 | |
|
| | 850 | | /// <summary> Lists the available Namespaces within a resource group. </summary> |
| | 851 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 852 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 853 | | public virtual AsyncPageable<EHNamespace> ListByResourceGroupAsync(string resourceGroupName, CancellationToken c |
| | 854 | | { |
| 4 | 855 | | if (resourceGroupName == null) |
| | 856 | | { |
| 0 | 857 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 858 | | } |
| | 859 | |
|
| | 860 | | async Task<Page<EHNamespace>> FirstPageFunc(int? pageSizeHint) |
| | 861 | | { |
| 4 | 862 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListByResourceGroup"); |
| 4 | 863 | | scope.Start(); |
| | 864 | | try |
| | 865 | | { |
| 4 | 866 | | var response = await RestClient.ListByResourceGroupAsync(resourceGroupName, cancellationToken).Confi |
| 4 | 867 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 868 | | } |
| 0 | 869 | | catch (Exception e) |
| | 870 | | { |
| 0 | 871 | | scope.Failed(e); |
| 0 | 872 | | throw; |
| | 873 | | } |
| 4 | 874 | | } |
| | 875 | | async Task<Page<EHNamespace>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 876 | | { |
| 0 | 877 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListByResourceGroup"); |
| 0 | 878 | | scope.Start(); |
| | 879 | | try |
| | 880 | | { |
| 0 | 881 | | var response = await RestClient.ListByResourceGroupNextPageAsync(nextLink, resourceGroupName, cancel |
| 0 | 882 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 883 | | } |
| 0 | 884 | | catch (Exception e) |
| | 885 | | { |
| 0 | 886 | | scope.Failed(e); |
| 0 | 887 | | throw; |
| | 888 | | } |
| 0 | 889 | | } |
| 4 | 890 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 891 | | } |
| | 892 | |
|
| | 893 | | /// <summary> Lists the available Namespaces within a resource group. </summary> |
| | 894 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 895 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 896 | | public virtual Pageable<EHNamespace> ListByResourceGroup(string resourceGroupName, CancellationToken cancellatio |
| | 897 | | { |
| 4 | 898 | | if (resourceGroupName == null) |
| | 899 | | { |
| 0 | 900 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 901 | | } |
| | 902 | |
|
| | 903 | | Page<EHNamespace> FirstPageFunc(int? pageSizeHint) |
| | 904 | | { |
| 4 | 905 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListByResourceGroup"); |
| 4 | 906 | | scope.Start(); |
| | 907 | | try |
| | 908 | | { |
| 4 | 909 | | var response = RestClient.ListByResourceGroup(resourceGroupName, cancellationToken); |
| 4 | 910 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 911 | | } |
| 0 | 912 | | catch (Exception e) |
| | 913 | | { |
| 0 | 914 | | scope.Failed(e); |
| 0 | 915 | | throw; |
| | 916 | | } |
| 4 | 917 | | } |
| | 918 | | Page<EHNamespace> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 919 | | { |
| 0 | 920 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListByResourceGroup"); |
| 0 | 921 | | scope.Start(); |
| | 922 | | try |
| | 923 | | { |
| 0 | 924 | | var response = RestClient.ListByResourceGroupNextPage(nextLink, resourceGroupName, cancellationToken |
| 0 | 925 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 926 | | } |
| 0 | 927 | | catch (Exception e) |
| | 928 | | { |
| 0 | 929 | | scope.Failed(e); |
| 0 | 930 | | throw; |
| | 931 | | } |
| 0 | 932 | | } |
| 4 | 933 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 934 | | } |
| | 935 | |
|
| | 936 | | /// <summary> Gets a list of VirtualNetwork rules for a Namespace. </summary> |
| | 937 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 938 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 939 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 940 | | public virtual AsyncPageable<VirtualNetworkRule> ListVirtualNetworkRulesAsync(string resourceGroupName, string n |
| | 941 | | { |
| 0 | 942 | | if (resourceGroupName == null) |
| | 943 | | { |
| 0 | 944 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 945 | | } |
| 0 | 946 | | if (namespaceName == null) |
| | 947 | | { |
| 0 | 948 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 949 | | } |
| | 950 | |
|
| | 951 | | async Task<Page<VirtualNetworkRule>> FirstPageFunc(int? pageSizeHint) |
| | 952 | | { |
| 0 | 953 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListVirtualNetworkRules"); |
| 0 | 954 | | scope.Start(); |
| | 955 | | try |
| | 956 | | { |
| 0 | 957 | | var response = await RestClient.ListVirtualNetworkRulesAsync(resourceGroupName, namespaceName, cance |
| 0 | 958 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 959 | | } |
| 0 | 960 | | catch (Exception e) |
| | 961 | | { |
| 0 | 962 | | scope.Failed(e); |
| 0 | 963 | | throw; |
| | 964 | | } |
| 0 | 965 | | } |
| | 966 | | async Task<Page<VirtualNetworkRule>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 967 | | { |
| 0 | 968 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListVirtualNetworkRules"); |
| 0 | 969 | | scope.Start(); |
| | 970 | | try |
| | 971 | | { |
| 0 | 972 | | var response = await RestClient.ListVirtualNetworkRulesNextPageAsync(nextLink, resourceGroupName, na |
| 0 | 973 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 974 | | } |
| 0 | 975 | | catch (Exception e) |
| | 976 | | { |
| 0 | 977 | | scope.Failed(e); |
| 0 | 978 | | throw; |
| | 979 | | } |
| 0 | 980 | | } |
| 0 | 981 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 982 | | } |
| | 983 | |
|
| | 984 | | /// <summary> Gets a list of VirtualNetwork rules for a Namespace. </summary> |
| | 985 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 986 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 987 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 988 | | public virtual Pageable<VirtualNetworkRule> ListVirtualNetworkRules(string resourceGroupName, string namespaceNa |
| | 989 | | { |
| 0 | 990 | | if (resourceGroupName == null) |
| | 991 | | { |
| 0 | 992 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 993 | | } |
| 0 | 994 | | if (namespaceName == null) |
| | 995 | | { |
| 0 | 996 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 997 | | } |
| | 998 | |
|
| | 999 | | Page<VirtualNetworkRule> FirstPageFunc(int? pageSizeHint) |
| | 1000 | | { |
| 0 | 1001 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListVirtualNetworkRules"); |
| 0 | 1002 | | scope.Start(); |
| | 1003 | | try |
| | 1004 | | { |
| 0 | 1005 | | var response = RestClient.ListVirtualNetworkRules(resourceGroupName, namespaceName, cancellationToke |
| 0 | 1006 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 1007 | | } |
| 0 | 1008 | | catch (Exception e) |
| | 1009 | | { |
| 0 | 1010 | | scope.Failed(e); |
| 0 | 1011 | | throw; |
| | 1012 | | } |
| 0 | 1013 | | } |
| | 1014 | | Page<VirtualNetworkRule> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 1015 | | { |
| 0 | 1016 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListVirtualNetworkRules"); |
| 0 | 1017 | | scope.Start(); |
| | 1018 | | try |
| | 1019 | | { |
| 0 | 1020 | | var response = RestClient.ListVirtualNetworkRulesNextPage(nextLink, resourceGroupName, namespaceName |
| 0 | 1021 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 1022 | | } |
| 0 | 1023 | | catch (Exception e) |
| | 1024 | | { |
| 0 | 1025 | | scope.Failed(e); |
| 0 | 1026 | | throw; |
| | 1027 | | } |
| 0 | 1028 | | } |
| 0 | 1029 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 1030 | | } |
| | 1031 | |
|
| | 1032 | | /// <summary> Gets a list of authorization rules for a Namespace. </summary> |
| | 1033 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 1034 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 1035 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 1036 | | public virtual AsyncPageable<AuthorizationRule> ListAuthorizationRulesAsync(string resourceGroupName, string nam |
| | 1037 | | { |
| 2 | 1038 | | if (resourceGroupName == null) |
| | 1039 | | { |
| 0 | 1040 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 1041 | | } |
| 2 | 1042 | | if (namespaceName == null) |
| | 1043 | | { |
| 0 | 1044 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 1045 | | } |
| | 1046 | |
|
| | 1047 | | async Task<Page<AuthorizationRule>> FirstPageFunc(int? pageSizeHint) |
| | 1048 | | { |
| 2 | 1049 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListAuthorizationRules"); |
| 2 | 1050 | | scope.Start(); |
| | 1051 | | try |
| | 1052 | | { |
| 2 | 1053 | | var response = await RestClient.ListAuthorizationRulesAsync(resourceGroupName, namespaceName, cancel |
| 2 | 1054 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 1055 | | } |
| 0 | 1056 | | catch (Exception e) |
| | 1057 | | { |
| 0 | 1058 | | scope.Failed(e); |
| 0 | 1059 | | throw; |
| | 1060 | | } |
| 2 | 1061 | | } |
| | 1062 | | async Task<Page<AuthorizationRule>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 1063 | | { |
| 0 | 1064 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListAuthorizationRules"); |
| 0 | 1065 | | scope.Start(); |
| | 1066 | | try |
| | 1067 | | { |
| 0 | 1068 | | var response = await RestClient.ListAuthorizationRulesNextPageAsync(nextLink, resourceGroupName, nam |
| 0 | 1069 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 1070 | | } |
| 0 | 1071 | | catch (Exception e) |
| | 1072 | | { |
| 0 | 1073 | | scope.Failed(e); |
| 0 | 1074 | | throw; |
| | 1075 | | } |
| 0 | 1076 | | } |
| 2 | 1077 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | 1078 | | } |
| | 1079 | |
|
| | 1080 | | /// <summary> Gets a list of authorization rules for a Namespace. </summary> |
| | 1081 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 1082 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 1083 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 1084 | | public virtual Pageable<AuthorizationRule> ListAuthorizationRules(string resourceGroupName, string namespaceName |
| | 1085 | | { |
| 2 | 1086 | | if (resourceGroupName == null) |
| | 1087 | | { |
| 0 | 1088 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 1089 | | } |
| 2 | 1090 | | if (namespaceName == null) |
| | 1091 | | { |
| 0 | 1092 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 1093 | | } |
| | 1094 | |
|
| | 1095 | | Page<AuthorizationRule> FirstPageFunc(int? pageSizeHint) |
| | 1096 | | { |
| 2 | 1097 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListAuthorizationRules"); |
| 2 | 1098 | | scope.Start(); |
| | 1099 | | try |
| | 1100 | | { |
| 2 | 1101 | | var response = RestClient.ListAuthorizationRules(resourceGroupName, namespaceName, cancellationToken |
| 2 | 1102 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 1103 | | } |
| 0 | 1104 | | catch (Exception e) |
| | 1105 | | { |
| 0 | 1106 | | scope.Failed(e); |
| 0 | 1107 | | throw; |
| | 1108 | | } |
| 2 | 1109 | | } |
| | 1110 | | Page<AuthorizationRule> NextPageFunc(string nextLink, int? pageSizeHint) |
| | 1111 | | { |
| 0 | 1112 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.ListAuthorizationRules"); |
| 0 | 1113 | | scope.Start(); |
| | 1114 | | try |
| | 1115 | | { |
| 0 | 1116 | | var response = RestClient.ListAuthorizationRulesNextPage(nextLink, resourceGroupName, namespaceName, |
| 0 | 1117 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | 1118 | | } |
| 0 | 1119 | | catch (Exception e) |
| | 1120 | | { |
| 0 | 1121 | | scope.Failed(e); |
| 0 | 1122 | | throw; |
| | 1123 | | } |
| 0 | 1124 | | } |
| 2 | 1125 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | 1126 | | } |
| | 1127 | |
|
| | 1128 | | /// <summary> Creates or updates a namespace. Once created, this namespace's resource manifest is immutable |
| | 1129 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 1130 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 1131 | | /// <param name="parameters"> Parameters for creating a namespace resource. </param> |
| | 1132 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 1133 | | public virtual async Task<NamespacesCreateOrUpdateOperation> StartCreateOrUpdateAsync(string resourceGroupName, |
| | 1134 | | { |
| 28 | 1135 | | if (resourceGroupName == null) |
| | 1136 | | { |
| 0 | 1137 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 1138 | | } |
| 28 | 1139 | | if (namespaceName == null) |
| | 1140 | | { |
| 0 | 1141 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 1142 | | } |
| 28 | 1143 | | if (parameters == null) |
| | 1144 | | { |
| 0 | 1145 | | throw new ArgumentNullException(nameof(parameters)); |
| | 1146 | | } |
| | 1147 | |
|
| 28 | 1148 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.StartCreateOrUpdate"); |
| 28 | 1149 | | scope.Start(); |
| | 1150 | | try |
| | 1151 | | { |
| 28 | 1152 | | var originalResponse = await RestClient.CreateOrUpdateAsync(resourceGroupName, namespaceName, parameters |
| 28 | 1153 | | return new NamespacesCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUpd |
| | 1154 | | } |
| 0 | 1155 | | catch (Exception e) |
| | 1156 | | { |
| 0 | 1157 | | scope.Failed(e); |
| 0 | 1158 | | throw; |
| | 1159 | | } |
| 28 | 1160 | | } |
| | 1161 | |
|
| | 1162 | | /// <summary> Creates or updates a namespace. Once created, this namespace's resource manifest is immutable |
| | 1163 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 1164 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 1165 | | /// <param name="parameters"> Parameters for creating a namespace resource. </param> |
| | 1166 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 1167 | | public virtual NamespacesCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string namespaceN |
| | 1168 | | { |
| 28 | 1169 | | if (resourceGroupName == null) |
| | 1170 | | { |
| 0 | 1171 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 1172 | | } |
| 28 | 1173 | | if (namespaceName == null) |
| | 1174 | | { |
| 0 | 1175 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 1176 | | } |
| 28 | 1177 | | if (parameters == null) |
| | 1178 | | { |
| 0 | 1179 | | throw new ArgumentNullException(nameof(parameters)); |
| | 1180 | | } |
| | 1181 | |
|
| 28 | 1182 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.StartCreateOrUpdate"); |
| 28 | 1183 | | scope.Start(); |
| | 1184 | | try |
| | 1185 | | { |
| 28 | 1186 | | var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, namespaceName, parameters, cancellat |
| 28 | 1187 | | return new NamespacesCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCreateOrUpd |
| | 1188 | | } |
| 0 | 1189 | | catch (Exception e) |
| | 1190 | | { |
| 0 | 1191 | | scope.Failed(e); |
| 0 | 1192 | | throw; |
| | 1193 | | } |
| 28 | 1194 | | } |
| | 1195 | |
|
| | 1196 | | /// <summary> Deletes an existing namespace. This operation also removes all associated resources under the name |
| | 1197 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 1198 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 1199 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 1200 | | public virtual async Task<NamespacesDeleteOperation> StartDeleteAsync(string resourceGroupName, string namespace |
| | 1201 | | { |
| 24 | 1202 | | if (resourceGroupName == null) |
| | 1203 | | { |
| 0 | 1204 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 1205 | | } |
| 24 | 1206 | | if (namespaceName == null) |
| | 1207 | | { |
| 0 | 1208 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 1209 | | } |
| | 1210 | |
|
| 24 | 1211 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.StartDelete"); |
| 24 | 1212 | | scope.Start(); |
| | 1213 | | try |
| | 1214 | | { |
| 24 | 1215 | | var originalResponse = await RestClient.DeleteAsync(resourceGroupName, namespaceName, cancellationToken) |
| 24 | 1216 | | return new NamespacesDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(resou |
| | 1217 | | } |
| 0 | 1218 | | catch (Exception e) |
| | 1219 | | { |
| 0 | 1220 | | scope.Failed(e); |
| 0 | 1221 | | throw; |
| | 1222 | | } |
| 24 | 1223 | | } |
| | 1224 | |
|
| | 1225 | | /// <summary> Deletes an existing namespace. This operation also removes all associated resources under the name |
| | 1226 | | /// <param name="resourceGroupName"> Name of the resource group within the azure subscription. </param> |
| | 1227 | | /// <param name="namespaceName"> The Namespace name. </param> |
| | 1228 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | 1229 | | public virtual NamespacesDeleteOperation StartDelete(string resourceGroupName, string namespaceName, Cancellatio |
| | 1230 | | { |
| 24 | 1231 | | if (resourceGroupName == null) |
| | 1232 | | { |
| 0 | 1233 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | 1234 | | } |
| 24 | 1235 | | if (namespaceName == null) |
| | 1236 | | { |
| 0 | 1237 | | throw new ArgumentNullException(nameof(namespaceName)); |
| | 1238 | | } |
| | 1239 | |
|
| 24 | 1240 | | using var scope = _clientDiagnostics.CreateScope("NamespacesOperations.StartDelete"); |
| 24 | 1241 | | scope.Start(); |
| | 1242 | | try |
| | 1243 | | { |
| 24 | 1244 | | var originalResponse = RestClient.Delete(resourceGroupName, namespaceName, cancellationToken); |
| 24 | 1245 | | return new NamespacesDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(resou |
| | 1246 | | } |
| 0 | 1247 | | catch (Exception e) |
| | 1248 | | { |
| 0 | 1249 | | scope.Failed(e); |
| 0 | 1250 | | throw; |
| | 1251 | | } |
| 24 | 1252 | | } |
| | 1253 | | } |
| | 1254 | | } |