| | | 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.Network.Models; |
| | | 15 | | |
| | | 16 | | namespace Azure.ResourceManager.Network |
| | | 17 | | { |
| | | 18 | | /// <summary> The PrivateLinkServices service client. </summary> |
| | | 19 | | public partial class PrivateLinkServicesOperations |
| | | 20 | | { |
| | | 21 | | private readonly ClientDiagnostics _clientDiagnostics; |
| | | 22 | | private readonly HttpPipeline _pipeline; |
| | 8 | 23 | | internal PrivateLinkServicesRestOperations RestClient { get; } |
| | | 24 | | /// <summary> Initializes a new instance of PrivateLinkServicesOperations for mocking. </summary> |
| | 204 | 25 | | protected PrivateLinkServicesOperations() |
| | | 26 | | { |
| | 204 | 27 | | } |
| | | 28 | | /// <summary> Initializes a new instance of PrivateLinkServicesOperations. </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"> The subscription credentials which uniquely identify the Microsoft Azure subsc |
| | | 32 | | /// <param name="endpoint"> server parameter. </param> |
| | 204 | 33 | | internal PrivateLinkServicesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscr |
| | | 34 | | { |
| | 204 | 35 | | RestClient = new PrivateLinkServicesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint); |
| | 204 | 36 | | _clientDiagnostics = clientDiagnostics; |
| | 204 | 37 | | _pipeline = pipeline; |
| | 204 | 38 | | } |
| | | 39 | | |
| | | 40 | | /// <summary> Gets the specified private link service by resource group. </summary> |
| | | 41 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 42 | | /// <param name="serviceName"> The name of the private link service. </param> |
| | | 43 | | /// <param name="expand"> Expands referenced resources. </param> |
| | | 44 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 45 | | public virtual async Task<Response<PrivateLinkService>> GetAsync(string resourceGroupName, string serviceName, s |
| | | 46 | | { |
| | 0 | 47 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.Get"); |
| | 0 | 48 | | scope.Start(); |
| | | 49 | | try |
| | | 50 | | { |
| | 0 | 51 | | return await RestClient.GetAsync(resourceGroupName, serviceName, expand, cancellationToken).ConfigureAwa |
| | | 52 | | } |
| | 0 | 53 | | catch (Exception e) |
| | | 54 | | { |
| | 0 | 55 | | scope.Failed(e); |
| | 0 | 56 | | throw; |
| | | 57 | | } |
| | 0 | 58 | | } |
| | | 59 | | |
| | | 60 | | /// <summary> Gets the specified private link service by resource group. </summary> |
| | | 61 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 62 | | /// <param name="serviceName"> The name of the private link service. </param> |
| | | 63 | | /// <param name="expand"> Expands referenced resources. </param> |
| | | 64 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 65 | | public virtual Response<PrivateLinkService> Get(string resourceGroupName, string serviceName, string expand = nu |
| | | 66 | | { |
| | 0 | 67 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.Get"); |
| | 0 | 68 | | scope.Start(); |
| | | 69 | | try |
| | | 70 | | { |
| | 0 | 71 | | return RestClient.Get(resourceGroupName, serviceName, expand, cancellationToken); |
| | | 72 | | } |
| | 0 | 73 | | catch (Exception e) |
| | | 74 | | { |
| | 0 | 75 | | scope.Failed(e); |
| | 0 | 76 | | throw; |
| | | 77 | | } |
| | 0 | 78 | | } |
| | | 79 | | |
| | | 80 | | /// <summary> Get the specific private end point connection by specific private link service in the resource gro |
| | | 81 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 82 | | /// <param name="serviceName"> The name of the private link service. </param> |
| | | 83 | | /// <param name="peConnectionName"> The name of the private end point connection. </param> |
| | | 84 | | /// <param name="expand"> Expands referenced resources. </param> |
| | | 85 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 86 | | public virtual async Task<Response<PrivateEndpointConnection>> GetPrivateEndpointConnectionAsync(string resource |
| | | 87 | | { |
| | 0 | 88 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.GetPrivateEndpointConnection |
| | 0 | 89 | | scope.Start(); |
| | | 90 | | try |
| | | 91 | | { |
| | 0 | 92 | | return await RestClient.GetPrivateEndpointConnectionAsync(resourceGroupName, serviceName, peConnectionNa |
| | | 93 | | } |
| | 0 | 94 | | catch (Exception e) |
| | | 95 | | { |
| | 0 | 96 | | scope.Failed(e); |
| | 0 | 97 | | throw; |
| | | 98 | | } |
| | 0 | 99 | | } |
| | | 100 | | |
| | | 101 | | /// <summary> Get the specific private end point connection by specific private link service in the resource gro |
| | | 102 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 103 | | /// <param name="serviceName"> The name of the private link service. </param> |
| | | 104 | | /// <param name="peConnectionName"> The name of the private end point connection. </param> |
| | | 105 | | /// <param name="expand"> Expands referenced resources. </param> |
| | | 106 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 107 | | public virtual Response<PrivateEndpointConnection> GetPrivateEndpointConnection(string resourceGroupName, string |
| | | 108 | | { |
| | 0 | 109 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.GetPrivateEndpointConnection |
| | 0 | 110 | | scope.Start(); |
| | | 111 | | try |
| | | 112 | | { |
| | 0 | 113 | | return RestClient.GetPrivateEndpointConnection(resourceGroupName, serviceName, peConnectionName, expand, |
| | | 114 | | } |
| | 0 | 115 | | catch (Exception e) |
| | | 116 | | { |
| | 0 | 117 | | scope.Failed(e); |
| | 0 | 118 | | throw; |
| | | 119 | | } |
| | 0 | 120 | | } |
| | | 121 | | |
| | | 122 | | /// <summary> Approve or reject private end point connection for a private link service in a subscription. </sum |
| | | 123 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 124 | | /// <param name="serviceName"> The name of the private link service. </param> |
| | | 125 | | /// <param name="peConnectionName"> The name of the private end point connection. </param> |
| | | 126 | | /// <param name="parameters"> Parameters supplied to approve or reject the private end point connection. </param |
| | | 127 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 128 | | public virtual async Task<Response<PrivateEndpointConnection>> UpdatePrivateEndpointConnectionAsync(string resou |
| | | 129 | | { |
| | 0 | 130 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.UpdatePrivateEndpointConnect |
| | 0 | 131 | | scope.Start(); |
| | | 132 | | try |
| | | 133 | | { |
| | 0 | 134 | | return await RestClient.UpdatePrivateEndpointConnectionAsync(resourceGroupName, serviceName, peConnectio |
| | | 135 | | } |
| | 0 | 136 | | catch (Exception e) |
| | | 137 | | { |
| | 0 | 138 | | scope.Failed(e); |
| | 0 | 139 | | throw; |
| | | 140 | | } |
| | 0 | 141 | | } |
| | | 142 | | |
| | | 143 | | /// <summary> Approve or reject private end point connection for a private link service in a subscription. </sum |
| | | 144 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 145 | | /// <param name="serviceName"> The name of the private link service. </param> |
| | | 146 | | /// <param name="peConnectionName"> The name of the private end point connection. </param> |
| | | 147 | | /// <param name="parameters"> Parameters supplied to approve or reject the private end point connection. </param |
| | | 148 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 149 | | public virtual Response<PrivateEndpointConnection> UpdatePrivateEndpointConnection(string resourceGroupName, str |
| | | 150 | | { |
| | 0 | 151 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.UpdatePrivateEndpointConnect |
| | 0 | 152 | | scope.Start(); |
| | | 153 | | try |
| | | 154 | | { |
| | 0 | 155 | | return RestClient.UpdatePrivateEndpointConnection(resourceGroupName, serviceName, peConnectionName, para |
| | | 156 | | } |
| | 0 | 157 | | catch (Exception e) |
| | | 158 | | { |
| | 0 | 159 | | scope.Failed(e); |
| | 0 | 160 | | throw; |
| | | 161 | | } |
| | 0 | 162 | | } |
| | | 163 | | |
| | | 164 | | /// <summary> Gets all private link services in a resource group. </summary> |
| | | 165 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 166 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 167 | | public virtual AsyncPageable<PrivateLinkService> ListAsync(string resourceGroupName, CancellationToken cancellat |
| | | 168 | | { |
| | 0 | 169 | | if (resourceGroupName == null) |
| | | 170 | | { |
| | 0 | 171 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 172 | | } |
| | | 173 | | |
| | | 174 | | async Task<Page<PrivateLinkService>> FirstPageFunc(int? pageSizeHint) |
| | | 175 | | { |
| | 0 | 176 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.List"); |
| | 0 | 177 | | scope.Start(); |
| | | 178 | | try |
| | | 179 | | { |
| | 0 | 180 | | var response = await RestClient.ListAsync(resourceGroupName, cancellationToken).ConfigureAwait(false |
| | 0 | 181 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 182 | | } |
| | 0 | 183 | | catch (Exception e) |
| | | 184 | | { |
| | 0 | 185 | | scope.Failed(e); |
| | 0 | 186 | | throw; |
| | | 187 | | } |
| | 0 | 188 | | } |
| | | 189 | | async Task<Page<PrivateLinkService>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 190 | | { |
| | 0 | 191 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.List"); |
| | 0 | 192 | | scope.Start(); |
| | | 193 | | try |
| | | 194 | | { |
| | 0 | 195 | | var response = await RestClient.ListNextPageAsync(nextLink, resourceGroupName, cancellationToken).Co |
| | 0 | 196 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 197 | | } |
| | 0 | 198 | | catch (Exception e) |
| | | 199 | | { |
| | 0 | 200 | | scope.Failed(e); |
| | 0 | 201 | | throw; |
| | | 202 | | } |
| | 0 | 203 | | } |
| | 0 | 204 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | | 205 | | } |
| | | 206 | | |
| | | 207 | | /// <summary> Gets all private link services in a resource group. </summary> |
| | | 208 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 209 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 210 | | public virtual Pageable<PrivateLinkService> List(string resourceGroupName, CancellationToken cancellationToken = |
| | | 211 | | { |
| | 0 | 212 | | if (resourceGroupName == null) |
| | | 213 | | { |
| | 0 | 214 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 215 | | } |
| | | 216 | | |
| | | 217 | | Page<PrivateLinkService> FirstPageFunc(int? pageSizeHint) |
| | | 218 | | { |
| | 0 | 219 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.List"); |
| | 0 | 220 | | scope.Start(); |
| | | 221 | | try |
| | | 222 | | { |
| | 0 | 223 | | var response = RestClient.List(resourceGroupName, cancellationToken); |
| | 0 | 224 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 225 | | } |
| | 0 | 226 | | catch (Exception e) |
| | | 227 | | { |
| | 0 | 228 | | scope.Failed(e); |
| | 0 | 229 | | throw; |
| | | 230 | | } |
| | 0 | 231 | | } |
| | | 232 | | Page<PrivateLinkService> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 233 | | { |
| | 0 | 234 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.List"); |
| | 0 | 235 | | scope.Start(); |
| | | 236 | | try |
| | | 237 | | { |
| | 0 | 238 | | var response = RestClient.ListNextPage(nextLink, resourceGroupName, cancellationToken); |
| | 0 | 239 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 240 | | } |
| | 0 | 241 | | catch (Exception e) |
| | | 242 | | { |
| | 0 | 243 | | scope.Failed(e); |
| | 0 | 244 | | throw; |
| | | 245 | | } |
| | 0 | 246 | | } |
| | 0 | 247 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | | 248 | | } |
| | | 249 | | |
| | | 250 | | /// <summary> Gets all private link service in a subscription. </summary> |
| | | 251 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 252 | | public virtual AsyncPageable<PrivateLinkService> ListBySubscriptionAsync(CancellationToken cancellationToken = d |
| | | 253 | | { |
| | | 254 | | async Task<Page<PrivateLinkService>> FirstPageFunc(int? pageSizeHint) |
| | | 255 | | { |
| | 0 | 256 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.ListBySubscription"); |
| | 0 | 257 | | scope.Start(); |
| | | 258 | | try |
| | | 259 | | { |
| | 0 | 260 | | var response = await RestClient.ListBySubscriptionAsync(cancellationToken).ConfigureAwait(false); |
| | 0 | 261 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 262 | | } |
| | 0 | 263 | | catch (Exception e) |
| | | 264 | | { |
| | 0 | 265 | | scope.Failed(e); |
| | 0 | 266 | | throw; |
| | | 267 | | } |
| | 0 | 268 | | } |
| | | 269 | | async Task<Page<PrivateLinkService>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 270 | | { |
| | 0 | 271 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.ListBySubscription"); |
| | 0 | 272 | | scope.Start(); |
| | | 273 | | try |
| | | 274 | | { |
| | 0 | 275 | | var response = await RestClient.ListBySubscriptionNextPageAsync(nextLink, cancellationToken).Configu |
| | 0 | 276 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 277 | | } |
| | 0 | 278 | | catch (Exception e) |
| | | 279 | | { |
| | 0 | 280 | | scope.Failed(e); |
| | 0 | 281 | | throw; |
| | | 282 | | } |
| | 0 | 283 | | } |
| | 0 | 284 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | | 285 | | } |
| | | 286 | | |
| | | 287 | | /// <summary> Gets all private link service in a subscription. </summary> |
| | | 288 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 289 | | public virtual Pageable<PrivateLinkService> ListBySubscription(CancellationToken cancellationToken = default) |
| | | 290 | | { |
| | | 291 | | Page<PrivateLinkService> FirstPageFunc(int? pageSizeHint) |
| | | 292 | | { |
| | 0 | 293 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.ListBySubscription"); |
| | 0 | 294 | | scope.Start(); |
| | | 295 | | try |
| | | 296 | | { |
| | 0 | 297 | | var response = RestClient.ListBySubscription(cancellationToken); |
| | 0 | 298 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 299 | | } |
| | 0 | 300 | | catch (Exception e) |
| | | 301 | | { |
| | 0 | 302 | | scope.Failed(e); |
| | 0 | 303 | | throw; |
| | | 304 | | } |
| | 0 | 305 | | } |
| | | 306 | | Page<PrivateLinkService> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 307 | | { |
| | 0 | 308 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.ListBySubscription"); |
| | 0 | 309 | | scope.Start(); |
| | | 310 | | try |
| | | 311 | | { |
| | 0 | 312 | | var response = RestClient.ListBySubscriptionNextPage(nextLink, cancellationToken); |
| | 0 | 313 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 314 | | } |
| | 0 | 315 | | catch (Exception e) |
| | | 316 | | { |
| | 0 | 317 | | scope.Failed(e); |
| | 0 | 318 | | throw; |
| | | 319 | | } |
| | 0 | 320 | | } |
| | 0 | 321 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | | 322 | | } |
| | | 323 | | |
| | | 324 | | /// <summary> Gets all private end point connections for a specific private link service. </summary> |
| | | 325 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 326 | | /// <param name="serviceName"> The name of the private link service. </param> |
| | | 327 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 328 | | public virtual AsyncPageable<PrivateEndpointConnection> ListPrivateEndpointConnectionsAsync(string resourceGroup |
| | | 329 | | { |
| | 0 | 330 | | if (resourceGroupName == null) |
| | | 331 | | { |
| | 0 | 332 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 333 | | } |
| | 0 | 334 | | if (serviceName == null) |
| | | 335 | | { |
| | 0 | 336 | | throw new ArgumentNullException(nameof(serviceName)); |
| | | 337 | | } |
| | | 338 | | |
| | | 339 | | async Task<Page<PrivateEndpointConnection>> FirstPageFunc(int? pageSizeHint) |
| | | 340 | | { |
| | 0 | 341 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.ListPrivateEndpointConne |
| | 0 | 342 | | scope.Start(); |
| | | 343 | | try |
| | | 344 | | { |
| | 0 | 345 | | var response = await RestClient.ListPrivateEndpointConnectionsAsync(resourceGroupName, serviceName, |
| | 0 | 346 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 347 | | } |
| | 0 | 348 | | catch (Exception e) |
| | | 349 | | { |
| | 0 | 350 | | scope.Failed(e); |
| | 0 | 351 | | throw; |
| | | 352 | | } |
| | 0 | 353 | | } |
| | | 354 | | async Task<Page<PrivateEndpointConnection>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 355 | | { |
| | 0 | 356 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.ListPrivateEndpointConne |
| | 0 | 357 | | scope.Start(); |
| | | 358 | | try |
| | | 359 | | { |
| | 0 | 360 | | var response = await RestClient.ListPrivateEndpointConnectionsNextPageAsync(nextLink, resourceGroupN |
| | 0 | 361 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 362 | | } |
| | 0 | 363 | | catch (Exception e) |
| | | 364 | | { |
| | 0 | 365 | | scope.Failed(e); |
| | 0 | 366 | | throw; |
| | | 367 | | } |
| | 0 | 368 | | } |
| | 0 | 369 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | | 370 | | } |
| | | 371 | | |
| | | 372 | | /// <summary> Gets all private end point connections for a specific private link service. </summary> |
| | | 373 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 374 | | /// <param name="serviceName"> The name of the private link service. </param> |
| | | 375 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 376 | | public virtual Pageable<PrivateEndpointConnection> ListPrivateEndpointConnections(string resourceGroupName, stri |
| | | 377 | | { |
| | 0 | 378 | | if (resourceGroupName == null) |
| | | 379 | | { |
| | 0 | 380 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 381 | | } |
| | 0 | 382 | | if (serviceName == null) |
| | | 383 | | { |
| | 0 | 384 | | throw new ArgumentNullException(nameof(serviceName)); |
| | | 385 | | } |
| | | 386 | | |
| | | 387 | | Page<PrivateEndpointConnection> FirstPageFunc(int? pageSizeHint) |
| | | 388 | | { |
| | 0 | 389 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.ListPrivateEndpointConne |
| | 0 | 390 | | scope.Start(); |
| | | 391 | | try |
| | | 392 | | { |
| | 0 | 393 | | var response = RestClient.ListPrivateEndpointConnections(resourceGroupName, serviceName, cancellatio |
| | 0 | 394 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 395 | | } |
| | 0 | 396 | | catch (Exception e) |
| | | 397 | | { |
| | 0 | 398 | | scope.Failed(e); |
| | 0 | 399 | | throw; |
| | | 400 | | } |
| | 0 | 401 | | } |
| | | 402 | | Page<PrivateEndpointConnection> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 403 | | { |
| | 0 | 404 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.ListPrivateEndpointConne |
| | 0 | 405 | | scope.Start(); |
| | | 406 | | try |
| | | 407 | | { |
| | 0 | 408 | | var response = RestClient.ListPrivateEndpointConnectionsNextPage(nextLink, resourceGroupName, servic |
| | 0 | 409 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 410 | | } |
| | 0 | 411 | | catch (Exception e) |
| | | 412 | | { |
| | 0 | 413 | | scope.Failed(e); |
| | 0 | 414 | | throw; |
| | | 415 | | } |
| | 0 | 416 | | } |
| | 0 | 417 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | | 418 | | } |
| | | 419 | | |
| | | 420 | | /// <summary> Returns all of the private link service ids that can be linked to a Private Endpoint with auto app |
| | | 421 | | /// <param name="location"> The location of the domain name. </param> |
| | | 422 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 423 | | public virtual AsyncPageable<AutoApprovedPrivateLinkService> ListAutoApprovedPrivateLinkServicesAsync(string loc |
| | | 424 | | { |
| | 0 | 425 | | if (location == null) |
| | | 426 | | { |
| | 0 | 427 | | throw new ArgumentNullException(nameof(location)); |
| | | 428 | | } |
| | | 429 | | |
| | | 430 | | async Task<Page<AutoApprovedPrivateLinkService>> FirstPageFunc(int? pageSizeHint) |
| | | 431 | | { |
| | 0 | 432 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.ListAutoApprovedPrivateL |
| | 0 | 433 | | scope.Start(); |
| | | 434 | | try |
| | | 435 | | { |
| | 0 | 436 | | var response = await RestClient.ListAutoApprovedPrivateLinkServicesAsync(location, cancellationToken |
| | 0 | 437 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 438 | | } |
| | 0 | 439 | | catch (Exception e) |
| | | 440 | | { |
| | 0 | 441 | | scope.Failed(e); |
| | 0 | 442 | | throw; |
| | | 443 | | } |
| | 0 | 444 | | } |
| | | 445 | | async Task<Page<AutoApprovedPrivateLinkService>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 446 | | { |
| | 0 | 447 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.ListAutoApprovedPrivateL |
| | 0 | 448 | | scope.Start(); |
| | | 449 | | try |
| | | 450 | | { |
| | 0 | 451 | | var response = await RestClient.ListAutoApprovedPrivateLinkServicesNextPageAsync(nextLink, location, |
| | 0 | 452 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 453 | | } |
| | 0 | 454 | | catch (Exception e) |
| | | 455 | | { |
| | 0 | 456 | | scope.Failed(e); |
| | 0 | 457 | | throw; |
| | | 458 | | } |
| | 0 | 459 | | } |
| | 0 | 460 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | | 461 | | } |
| | | 462 | | |
| | | 463 | | /// <summary> Returns all of the private link service ids that can be linked to a Private Endpoint with auto app |
| | | 464 | | /// <param name="location"> The location of the domain name. </param> |
| | | 465 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 466 | | public virtual Pageable<AutoApprovedPrivateLinkService> ListAutoApprovedPrivateLinkServices(string location, Can |
| | | 467 | | { |
| | 0 | 468 | | if (location == null) |
| | | 469 | | { |
| | 0 | 470 | | throw new ArgumentNullException(nameof(location)); |
| | | 471 | | } |
| | | 472 | | |
| | | 473 | | Page<AutoApprovedPrivateLinkService> FirstPageFunc(int? pageSizeHint) |
| | | 474 | | { |
| | 0 | 475 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.ListAutoApprovedPrivateL |
| | 0 | 476 | | scope.Start(); |
| | | 477 | | try |
| | | 478 | | { |
| | 0 | 479 | | var response = RestClient.ListAutoApprovedPrivateLinkServices(location, cancellationToken); |
| | 0 | 480 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 481 | | } |
| | 0 | 482 | | catch (Exception e) |
| | | 483 | | { |
| | 0 | 484 | | scope.Failed(e); |
| | 0 | 485 | | throw; |
| | | 486 | | } |
| | 0 | 487 | | } |
| | | 488 | | Page<AutoApprovedPrivateLinkService> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 489 | | { |
| | 0 | 490 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.ListAutoApprovedPrivateL |
| | 0 | 491 | | scope.Start(); |
| | | 492 | | try |
| | | 493 | | { |
| | 0 | 494 | | var response = RestClient.ListAutoApprovedPrivateLinkServicesNextPage(nextLink, location, cancellati |
| | 0 | 495 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 496 | | } |
| | 0 | 497 | | catch (Exception e) |
| | | 498 | | { |
| | 0 | 499 | | scope.Failed(e); |
| | 0 | 500 | | throw; |
| | | 501 | | } |
| | 0 | 502 | | } |
| | 0 | 503 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | | 504 | | } |
| | | 505 | | |
| | | 506 | | /// <summary> Returns all of the private link service ids that can be linked to a Private Endpoint with auto app |
| | | 507 | | /// <param name="location"> The location of the domain name. </param> |
| | | 508 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 509 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 510 | | public virtual AsyncPageable<AutoApprovedPrivateLinkService> ListAutoApprovedPrivateLinkServicesByResourceGroupA |
| | | 511 | | { |
| | 0 | 512 | | if (location == null) |
| | | 513 | | { |
| | 0 | 514 | | throw new ArgumentNullException(nameof(location)); |
| | | 515 | | } |
| | 0 | 516 | | if (resourceGroupName == null) |
| | | 517 | | { |
| | 0 | 518 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 519 | | } |
| | | 520 | | |
| | | 521 | | async Task<Page<AutoApprovedPrivateLinkService>> FirstPageFunc(int? pageSizeHint) |
| | | 522 | | { |
| | 0 | 523 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.ListAutoApprovedPrivateL |
| | 0 | 524 | | scope.Start(); |
| | | 525 | | try |
| | | 526 | | { |
| | 0 | 527 | | var response = await RestClient.ListAutoApprovedPrivateLinkServicesByResourceGroupAsync(location, re |
| | 0 | 528 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 529 | | } |
| | 0 | 530 | | catch (Exception e) |
| | | 531 | | { |
| | 0 | 532 | | scope.Failed(e); |
| | 0 | 533 | | throw; |
| | | 534 | | } |
| | 0 | 535 | | } |
| | | 536 | | async Task<Page<AutoApprovedPrivateLinkService>> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 537 | | { |
| | 0 | 538 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.ListAutoApprovedPrivateL |
| | 0 | 539 | | scope.Start(); |
| | | 540 | | try |
| | | 541 | | { |
| | 0 | 542 | | var response = await RestClient.ListAutoApprovedPrivateLinkServicesByResourceGroupNextPageAsync(next |
| | 0 | 543 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 544 | | } |
| | 0 | 545 | | catch (Exception e) |
| | | 546 | | { |
| | 0 | 547 | | scope.Failed(e); |
| | 0 | 548 | | throw; |
| | | 549 | | } |
| | 0 | 550 | | } |
| | 0 | 551 | | return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc); |
| | | 552 | | } |
| | | 553 | | |
| | | 554 | | /// <summary> Returns all of the private link service ids that can be linked to a Private Endpoint with auto app |
| | | 555 | | /// <param name="location"> The location of the domain name. </param> |
| | | 556 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 557 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 558 | | public virtual Pageable<AutoApprovedPrivateLinkService> ListAutoApprovedPrivateLinkServicesByResourceGroup(strin |
| | | 559 | | { |
| | 0 | 560 | | if (location == null) |
| | | 561 | | { |
| | 0 | 562 | | throw new ArgumentNullException(nameof(location)); |
| | | 563 | | } |
| | 0 | 564 | | if (resourceGroupName == null) |
| | | 565 | | { |
| | 0 | 566 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 567 | | } |
| | | 568 | | |
| | | 569 | | Page<AutoApprovedPrivateLinkService> FirstPageFunc(int? pageSizeHint) |
| | | 570 | | { |
| | 0 | 571 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.ListAutoApprovedPrivateL |
| | 0 | 572 | | scope.Start(); |
| | | 573 | | try |
| | | 574 | | { |
| | 0 | 575 | | var response = RestClient.ListAutoApprovedPrivateLinkServicesByResourceGroup(location, resourceGroup |
| | 0 | 576 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 577 | | } |
| | 0 | 578 | | catch (Exception e) |
| | | 579 | | { |
| | 0 | 580 | | scope.Failed(e); |
| | 0 | 581 | | throw; |
| | | 582 | | } |
| | 0 | 583 | | } |
| | | 584 | | Page<AutoApprovedPrivateLinkService> NextPageFunc(string nextLink, int? pageSizeHint) |
| | | 585 | | { |
| | 0 | 586 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.ListAutoApprovedPrivateL |
| | 0 | 587 | | scope.Start(); |
| | | 588 | | try |
| | | 589 | | { |
| | 0 | 590 | | var response = RestClient.ListAutoApprovedPrivateLinkServicesByResourceGroupNextPage(nextLink, locat |
| | 0 | 591 | | return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse()); |
| | | 592 | | } |
| | 0 | 593 | | catch (Exception e) |
| | | 594 | | { |
| | 0 | 595 | | scope.Failed(e); |
| | 0 | 596 | | throw; |
| | | 597 | | } |
| | 0 | 598 | | } |
| | 0 | 599 | | return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc); |
| | | 600 | | } |
| | | 601 | | |
| | | 602 | | /// <summary> Deletes the specified private link service. </summary> |
| | | 603 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 604 | | /// <param name="serviceName"> The name of the private link service. </param> |
| | | 605 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 606 | | public virtual async Task<PrivateLinkServicesDeleteOperation> StartDeleteAsync(string resourceGroupName, string |
| | | 607 | | { |
| | 0 | 608 | | if (resourceGroupName == null) |
| | | 609 | | { |
| | 0 | 610 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 611 | | } |
| | 0 | 612 | | if (serviceName == null) |
| | | 613 | | { |
| | 0 | 614 | | throw new ArgumentNullException(nameof(serviceName)); |
| | | 615 | | } |
| | | 616 | | |
| | 0 | 617 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.StartDelete"); |
| | 0 | 618 | | scope.Start(); |
| | | 619 | | try |
| | | 620 | | { |
| | 0 | 621 | | var originalResponse = await RestClient.DeleteAsync(resourceGroupName, serviceName, cancellationToken).C |
| | 0 | 622 | | return new PrivateLinkServicesDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequ |
| | | 623 | | } |
| | 0 | 624 | | catch (Exception e) |
| | | 625 | | { |
| | 0 | 626 | | scope.Failed(e); |
| | 0 | 627 | | throw; |
| | | 628 | | } |
| | 0 | 629 | | } |
| | | 630 | | |
| | | 631 | | /// <summary> Deletes the specified private link service. </summary> |
| | | 632 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 633 | | /// <param name="serviceName"> The name of the private link service. </param> |
| | | 634 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 635 | | public virtual PrivateLinkServicesDeleteOperation StartDelete(string resourceGroupName, string serviceName, Canc |
| | | 636 | | { |
| | 0 | 637 | | if (resourceGroupName == null) |
| | | 638 | | { |
| | 0 | 639 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 640 | | } |
| | 0 | 641 | | if (serviceName == null) |
| | | 642 | | { |
| | 0 | 643 | | throw new ArgumentNullException(nameof(serviceName)); |
| | | 644 | | } |
| | | 645 | | |
| | 0 | 646 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.StartDelete"); |
| | 0 | 647 | | scope.Start(); |
| | | 648 | | try |
| | | 649 | | { |
| | 0 | 650 | | var originalResponse = RestClient.Delete(resourceGroupName, serviceName, cancellationToken); |
| | 0 | 651 | | return new PrivateLinkServicesDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequ |
| | | 652 | | } |
| | 0 | 653 | | catch (Exception e) |
| | | 654 | | { |
| | 0 | 655 | | scope.Failed(e); |
| | 0 | 656 | | throw; |
| | | 657 | | } |
| | 0 | 658 | | } |
| | | 659 | | |
| | | 660 | | /// <summary> Creates or updates an private link service in the specified resource group. </summary> |
| | | 661 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 662 | | /// <param name="serviceName"> The name of the private link service. </param> |
| | | 663 | | /// <param name="parameters"> Parameters supplied to the create or update private link service operation. </para |
| | | 664 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 665 | | public virtual async Task<PrivateLinkServicesCreateOrUpdateOperation> StartCreateOrUpdateAsync(string resourceGr |
| | | 666 | | { |
| | 0 | 667 | | if (resourceGroupName == null) |
| | | 668 | | { |
| | 0 | 669 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 670 | | } |
| | 0 | 671 | | if (serviceName == null) |
| | | 672 | | { |
| | 0 | 673 | | throw new ArgumentNullException(nameof(serviceName)); |
| | | 674 | | } |
| | 0 | 675 | | if (parameters == null) |
| | | 676 | | { |
| | 0 | 677 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 678 | | } |
| | | 679 | | |
| | 0 | 680 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.StartCreateOrUpdate"); |
| | 0 | 681 | | scope.Start(); |
| | | 682 | | try |
| | | 683 | | { |
| | 0 | 684 | | var originalResponse = await RestClient.CreateOrUpdateAsync(resourceGroupName, serviceName, parameters, |
| | 0 | 685 | | return new PrivateLinkServicesCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCr |
| | | 686 | | } |
| | 0 | 687 | | catch (Exception e) |
| | | 688 | | { |
| | 0 | 689 | | scope.Failed(e); |
| | 0 | 690 | | throw; |
| | | 691 | | } |
| | 0 | 692 | | } |
| | | 693 | | |
| | | 694 | | /// <summary> Creates or updates an private link service in the specified resource group. </summary> |
| | | 695 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 696 | | /// <param name="serviceName"> The name of the private link service. </param> |
| | | 697 | | /// <param name="parameters"> Parameters supplied to the create or update private link service operation. </para |
| | | 698 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 699 | | public virtual PrivateLinkServicesCreateOrUpdateOperation StartCreateOrUpdate(string resourceGroupName, string s |
| | | 700 | | { |
| | 0 | 701 | | if (resourceGroupName == null) |
| | | 702 | | { |
| | 0 | 703 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 704 | | } |
| | 0 | 705 | | if (serviceName == null) |
| | | 706 | | { |
| | 0 | 707 | | throw new ArgumentNullException(nameof(serviceName)); |
| | | 708 | | } |
| | 0 | 709 | | if (parameters == null) |
| | | 710 | | { |
| | 0 | 711 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 712 | | } |
| | | 713 | | |
| | 0 | 714 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.StartCreateOrUpdate"); |
| | 0 | 715 | | scope.Start(); |
| | | 716 | | try |
| | | 717 | | { |
| | 0 | 718 | | var originalResponse = RestClient.CreateOrUpdate(resourceGroupName, serviceName, parameters, cancellatio |
| | 0 | 719 | | return new PrivateLinkServicesCreateOrUpdateOperation(_clientDiagnostics, _pipeline, RestClient.CreateCr |
| | | 720 | | } |
| | 0 | 721 | | catch (Exception e) |
| | | 722 | | { |
| | 0 | 723 | | scope.Failed(e); |
| | 0 | 724 | | throw; |
| | | 725 | | } |
| | 0 | 726 | | } |
| | | 727 | | |
| | | 728 | | /// <summary> Delete private end point connection for a private link service in a subscription. </summary> |
| | | 729 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 730 | | /// <param name="serviceName"> The name of the private link service. </param> |
| | | 731 | | /// <param name="peConnectionName"> The name of the private end point connection. </param> |
| | | 732 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 733 | | public virtual async Task<PrivateLinkServicesDeletePrivateEndpointConnectionOperation> StartDeletePrivateEndpoin |
| | | 734 | | { |
| | 0 | 735 | | if (resourceGroupName == null) |
| | | 736 | | { |
| | 0 | 737 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 738 | | } |
| | 0 | 739 | | if (serviceName == null) |
| | | 740 | | { |
| | 0 | 741 | | throw new ArgumentNullException(nameof(serviceName)); |
| | | 742 | | } |
| | 0 | 743 | | if (peConnectionName == null) |
| | | 744 | | { |
| | 0 | 745 | | throw new ArgumentNullException(nameof(peConnectionName)); |
| | | 746 | | } |
| | | 747 | | |
| | 0 | 748 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.StartDeletePrivateEndpointCo |
| | 0 | 749 | | scope.Start(); |
| | | 750 | | try |
| | | 751 | | { |
| | 0 | 752 | | var originalResponse = await RestClient.DeletePrivateEndpointConnectionAsync(resourceGroupName, serviceN |
| | 0 | 753 | | return new PrivateLinkServicesDeletePrivateEndpointConnectionOperation(_clientDiagnostics, _pipeline, Re |
| | | 754 | | } |
| | 0 | 755 | | catch (Exception e) |
| | | 756 | | { |
| | 0 | 757 | | scope.Failed(e); |
| | 0 | 758 | | throw; |
| | | 759 | | } |
| | 0 | 760 | | } |
| | | 761 | | |
| | | 762 | | /// <summary> Delete private end point connection for a private link service in a subscription. </summary> |
| | | 763 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 764 | | /// <param name="serviceName"> The name of the private link service. </param> |
| | | 765 | | /// <param name="peConnectionName"> The name of the private end point connection. </param> |
| | | 766 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 767 | | public virtual PrivateLinkServicesDeletePrivateEndpointConnectionOperation StartDeletePrivateEndpointConnection( |
| | | 768 | | { |
| | 0 | 769 | | if (resourceGroupName == null) |
| | | 770 | | { |
| | 0 | 771 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 772 | | } |
| | 0 | 773 | | if (serviceName == null) |
| | | 774 | | { |
| | 0 | 775 | | throw new ArgumentNullException(nameof(serviceName)); |
| | | 776 | | } |
| | 0 | 777 | | if (peConnectionName == null) |
| | | 778 | | { |
| | 0 | 779 | | throw new ArgumentNullException(nameof(peConnectionName)); |
| | | 780 | | } |
| | | 781 | | |
| | 0 | 782 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.StartDeletePrivateEndpointCo |
| | 0 | 783 | | scope.Start(); |
| | | 784 | | try |
| | | 785 | | { |
| | 0 | 786 | | var originalResponse = RestClient.DeletePrivateEndpointConnection(resourceGroupName, serviceName, peConn |
| | 0 | 787 | | return new PrivateLinkServicesDeletePrivateEndpointConnectionOperation(_clientDiagnostics, _pipeline, Re |
| | | 788 | | } |
| | 0 | 789 | | catch (Exception e) |
| | | 790 | | { |
| | 0 | 791 | | scope.Failed(e); |
| | 0 | 792 | | throw; |
| | | 793 | | } |
| | 0 | 794 | | } |
| | | 795 | | |
| | | 796 | | /// <summary> Checks whether the subscription is visible to private link service. </summary> |
| | | 797 | | /// <param name="location"> The location of the domain name. </param> |
| | | 798 | | /// <param name="parameters"> The request body of CheckPrivateLinkService API call. </param> |
| | | 799 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 800 | | public virtual async Task<PrivateLinkServicesCheckPrivateLinkServiceVisibilityOperation> StartCheckPrivateLinkSe |
| | | 801 | | { |
| | 0 | 802 | | if (location == null) |
| | | 803 | | { |
| | 0 | 804 | | throw new ArgumentNullException(nameof(location)); |
| | | 805 | | } |
| | 0 | 806 | | if (parameters == null) |
| | | 807 | | { |
| | 0 | 808 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 809 | | } |
| | | 810 | | |
| | 0 | 811 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.StartCheckPrivateLinkService |
| | 0 | 812 | | scope.Start(); |
| | | 813 | | try |
| | | 814 | | { |
| | 0 | 815 | | var originalResponse = await RestClient.CheckPrivateLinkServiceVisibilityAsync(location, parameters, can |
| | 0 | 816 | | return new PrivateLinkServicesCheckPrivateLinkServiceVisibilityOperation(_clientDiagnostics, _pipeline, |
| | | 817 | | } |
| | 0 | 818 | | catch (Exception e) |
| | | 819 | | { |
| | 0 | 820 | | scope.Failed(e); |
| | 0 | 821 | | throw; |
| | | 822 | | } |
| | 0 | 823 | | } |
| | | 824 | | |
| | | 825 | | /// <summary> Checks whether the subscription is visible to private link service. </summary> |
| | | 826 | | /// <param name="location"> The location of the domain name. </param> |
| | | 827 | | /// <param name="parameters"> The request body of CheckPrivateLinkService API call. </param> |
| | | 828 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 829 | | public virtual PrivateLinkServicesCheckPrivateLinkServiceVisibilityOperation StartCheckPrivateLinkServiceVisibil |
| | | 830 | | { |
| | 0 | 831 | | if (location == null) |
| | | 832 | | { |
| | 0 | 833 | | throw new ArgumentNullException(nameof(location)); |
| | | 834 | | } |
| | 0 | 835 | | if (parameters == null) |
| | | 836 | | { |
| | 0 | 837 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 838 | | } |
| | | 839 | | |
| | 0 | 840 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.StartCheckPrivateLinkService |
| | 0 | 841 | | scope.Start(); |
| | | 842 | | try |
| | | 843 | | { |
| | 0 | 844 | | var originalResponse = RestClient.CheckPrivateLinkServiceVisibility(location, parameters, cancellationTo |
| | 0 | 845 | | return new PrivateLinkServicesCheckPrivateLinkServiceVisibilityOperation(_clientDiagnostics, _pipeline, |
| | | 846 | | } |
| | 0 | 847 | | catch (Exception e) |
| | | 848 | | { |
| | 0 | 849 | | scope.Failed(e); |
| | 0 | 850 | | throw; |
| | | 851 | | } |
| | 0 | 852 | | } |
| | | 853 | | |
| | | 854 | | /// <summary> Checks whether the subscription is visible to private link service in the specified resource group |
| | | 855 | | /// <param name="location"> The location of the domain name. </param> |
| | | 856 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 857 | | /// <param name="parameters"> The request body of CheckPrivateLinkService API call. </param> |
| | | 858 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 859 | | public virtual async Task<PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOperation> StartChe |
| | | 860 | | { |
| | 2 | 861 | | if (location == null) |
| | | 862 | | { |
| | 0 | 863 | | throw new ArgumentNullException(nameof(location)); |
| | | 864 | | } |
| | 2 | 865 | | if (resourceGroupName == null) |
| | | 866 | | { |
| | 0 | 867 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 868 | | } |
| | 2 | 869 | | if (parameters == null) |
| | | 870 | | { |
| | 0 | 871 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 872 | | } |
| | | 873 | | |
| | 2 | 874 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.StartCheckPrivateLinkService |
| | 2 | 875 | | scope.Start(); |
| | | 876 | | try |
| | | 877 | | { |
| | 2 | 878 | | var originalResponse = await RestClient.CheckPrivateLinkServiceVisibilityByResourceGroupAsync(location, |
| | 2 | 879 | | return new PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOperation(_clientDiagnosti |
| | | 880 | | } |
| | 0 | 881 | | catch (Exception e) |
| | | 882 | | { |
| | 0 | 883 | | scope.Failed(e); |
| | 0 | 884 | | throw; |
| | | 885 | | } |
| | 2 | 886 | | } |
| | | 887 | | |
| | | 888 | | /// <summary> Checks whether the subscription is visible to private link service in the specified resource group |
| | | 889 | | /// <param name="location"> The location of the domain name. </param> |
| | | 890 | | /// <param name="resourceGroupName"> The name of the resource group. </param> |
| | | 891 | | /// <param name="parameters"> The request body of CheckPrivateLinkService API call. </param> |
| | | 892 | | /// <param name="cancellationToken"> The cancellation token to use. </param> |
| | | 893 | | public virtual PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOperation StartCheckPrivateLin |
| | | 894 | | { |
| | 2 | 895 | | if (location == null) |
| | | 896 | | { |
| | 0 | 897 | | throw new ArgumentNullException(nameof(location)); |
| | | 898 | | } |
| | 2 | 899 | | if (resourceGroupName == null) |
| | | 900 | | { |
| | 0 | 901 | | throw new ArgumentNullException(nameof(resourceGroupName)); |
| | | 902 | | } |
| | 2 | 903 | | if (parameters == null) |
| | | 904 | | { |
| | 0 | 905 | | throw new ArgumentNullException(nameof(parameters)); |
| | | 906 | | } |
| | | 907 | | |
| | 2 | 908 | | using var scope = _clientDiagnostics.CreateScope("PrivateLinkServicesOperations.StartCheckPrivateLinkService |
| | 2 | 909 | | scope.Start(); |
| | | 910 | | try |
| | | 911 | | { |
| | 2 | 912 | | var originalResponse = RestClient.CheckPrivateLinkServiceVisibilityByResourceGroup(location, resourceGro |
| | 2 | 913 | | return new PrivateLinkServicesCheckPrivateLinkServiceVisibilityByResourceGroupOperation(_clientDiagnosti |
| | | 914 | | } |
| | 0 | 915 | | catch (Exception e) |
| | | 916 | | { |
| | 0 | 917 | | scope.Failed(e); |
| | 0 | 918 | | throw; |
| | | 919 | | } |
| | 2 | 920 | | } |
| | | 921 | | } |
| | | 922 | | } |