Пример #1
0
        public async virtual Task <PrivateLinkServiceCheckPrivateLinkServiceVisibilityByResourceGroupOperation> CheckPrivateLinkServiceVisibilityByResourceGroupAsync(CheckPrivateLinkServiceVisibilityRequest parameters, bool waitForCompletion = true, CancellationToken cancellationToken = default)
        {
            if (parameters == null)
            {
                throw new ArgumentNullException(nameof(parameters));
            }

            using var scope = _clientDiagnostics.CreateScope("PrivateLinkService.CheckPrivateLinkServiceVisibilityByResourceGroup");
            scope.Start();
            try
            {
                var response = await _restClient.CheckPrivateLinkServiceVisibilityByResourceGroupAsync(Id.ResourceGroupName, Id.Name, parameters, cancellationToken).ConfigureAwait(false);

                var operation = new PrivateLinkServiceCheckPrivateLinkServiceVisibilityByResourceGroupOperation(_clientDiagnostics, Pipeline, _restClient.CreateCheckPrivateLinkServiceVisibilityByResourceGroupRequest(Id.ResourceGroupName, Id.Name, parameters).Request, response);
                if (waitForCompletion)
                {
                    await operation.WaitForCompletionAsync(cancellationToken).ConfigureAwait(false);
                }
                return(operation);
            }
            catch (Exception e)
            {
                scope.Failed(e);
                throw;
            }
        }