public virtual Pageable <WebPubSubResource> GetWebPubSubs(CancellationToken cancellationToken = default) { Page <WebPubSubResource> FirstPageFunc(int?pageSizeHint) { using var scope = WebPubSubClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetWebPubSubs"); scope.Start(); try { var response = WebPubSubRestClient.ListBySubscription(Id.SubscriptionId, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new WebPubSubResource(Client, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <WebPubSubResource> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = WebPubSubClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetWebPubSubs"); scope.Start(); try { var response = WebPubSubRestClient.ListBySubscriptionNextPage(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new WebPubSubResource(Client, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <GenericResource> GetGenericResources(string filter = null, string expand = null, int?top = null, CancellationToken cancellationToken = default) { Page <GenericResource> FirstPageFunc(int?pageSizeHint) { using var scope = _resourceGroupResourcesClientDiagnostics.CreateScope("ResourceGroupResource.GetGenericResources"); scope.Start(); try { var response = _resourceGroupResourcesRestClient.ListByResourceGroup(Id.SubscriptionId, Id.ResourceGroupName, filter, expand, top, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new GenericResource(Client, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <GenericResource> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _resourceGroupClientDiagnostics.CreateScope("ResourceGroupResource.GetGenericResources"); scope.Start(); try { var response = _resourceGroupResourcesRestClient.ListByResourceGroupNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, expand, top, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new GenericResource(Client, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <LoadBalancingRule> GetAll(CancellationToken cancellationToken = default) { Page <LoadBalancingRule> FirstPageFunc(int?pageSizeHint) { using var scope = _loadBalancingRuleLoadBalancerLoadBalancingRulesClientDiagnostics.CreateScope("LoadBalancingRuleCollection.GetAll"); scope.Start(); try { var response = _loadBalancingRuleLoadBalancerLoadBalancingRulesRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new LoadBalancingRule(Client, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <LoadBalancingRule> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _loadBalancingRuleLoadBalancerLoadBalancingRulesClientDiagnostics.CreateScope("LoadBalancingRuleCollection.GetAll"); scope.Start(); try { var response = _loadBalancingRuleLoadBalancerLoadBalancingRulesRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new LoadBalancingRule(Client, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <VpnConnection> GetAll(CancellationToken cancellationToken = default) { Page <VpnConnection> FirstPageFunc(int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("VpnConnectionContainer.GetAll"); scope.Start(); try { var response = _restClient.GetAllByVpnGateway(Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new VpnConnection(Parent, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <VpnConnection> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("VpnConnectionContainer.GetAll"); scope.Start(); try { var response = _restClient.GetAllByVpnGatewayNextPage(nextLink, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new VpnConnection(Parent, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <AvailabilitySet> ListBySubscription(string expand = null, CancellationToken cancellationToken = default) { Page <AvailabilitySet> FirstPageFunc(int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("AvailabilitySetsOperations.ListBySubscription"); scope.Start(); try { var response = RestClient.ListBySubscription(expand, cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <AvailabilitySet> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("AvailabilitySetsOperations.ListBySubscription"); scope.Start(); try { var response = RestClient.ListBySubscriptionNextPage(nextLink, expand, cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <VirtualMachineRunCommand> GetAll(string expand = null, CancellationToken cancellationToken = default) { Page <VirtualMachineRunCommand> FirstPageFunc(int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("VirtualMachineRunCommandCollection.GetAll"); scope.Start(); try { var response = _virtualMachineRunCommandsRestClient.ListByVirtualMachine(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new VirtualMachineRunCommand(this, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <VirtualMachineRunCommand> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("VirtualMachineRunCommandCollection.GetAll"); scope.Start(); try { var response = _virtualMachineRunCommandsRestClient.ListByVirtualMachineNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, expand, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new VirtualMachineRunCommand(this, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <ManagedInstancePrivateLink> GetAll(CancellationToken cancellationToken = default) { Page <ManagedInstancePrivateLink> FirstPageFunc(int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("ManagedInstancePrivateLinkCollection.GetAll"); scope.Start(); try { var response = _managedInstancePrivateLinkResourcesRestClient.ListByManagedInstance(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new ManagedInstancePrivateLink(Parent, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <ManagedInstancePrivateLink> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("ManagedInstancePrivateLinkCollection.GetAll"); scope.Start(); try { var response = _managedInstancePrivateLinkResourcesRestClient.ListByManagedInstanceNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new ManagedInstancePrivateLink(Parent, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <ManagedInstanceDatabaseSchemaTableColumn> GetAll(string filter = null, CancellationToken cancellationToken = default) { Page <ManagedInstanceDatabaseSchemaTableColumn> FirstPageFunc(int?pageSizeHint) { using var scope = _managedInstanceDatabaseSchemaTableColumnManagedDatabaseColumnsClientDiagnostics.CreateScope("ManagedInstanceDatabaseSchemaTableColumnCollection.GetAll"); scope.Start(); try { var response = _managedInstanceDatabaseSchemaTableColumnManagedDatabaseColumnsRestClient.ListByTable(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new ManagedInstanceDatabaseSchemaTableColumn(ArmClient, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <ManagedInstanceDatabaseSchemaTableColumn> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _managedInstanceDatabaseSchemaTableColumnManagedDatabaseColumnsClientDiagnostics.CreateScope("ManagedInstanceDatabaseSchemaTableColumnCollection.GetAll"); scope.Start(); try { var response = _managedInstanceDatabaseSchemaTableColumnManagedDatabaseColumnsRestClient.ListByTableNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Parent.Name, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, filter, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new ManagedInstanceDatabaseSchemaTableColumn(ArmClient, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
/// <summary> Gets the list of all purchased phone numbers. </summary> /// <param name="cancellationToken"> The cancellation token to use. </param> public virtual Pageable <PurchasedPhoneNumber> GetPurchasedPhoneNumbers(CancellationToken cancellationToken = default) { Page <PurchasedPhoneNumber> FirstPageFunc(int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope($"{nameof(PhoneNumbersClient)}.{nameof(GetPurchasedPhoneNumbers)}"); scope.Start(); try { var response = RestClient.ListPhoneNumbers(skip: null, top: null, cancellationToken); return(Page.FromValues(response.Value.PhoneNumbers, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <PurchasedPhoneNumber> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope($"{nameof(PhoneNumbersClient)}.{nameof(GetPurchasedPhoneNumbers)}"); scope.Start(); try { var response = RestClient.ListPhoneNumbersNextPage(nextLink, skip: null, top: null, cancellationToken); return(Page.FromValues(response.Value.PhoneNumbers, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <AddressResource> GetAll(string filter = null, string skipToken = null, CancellationToken cancellationToken = default) { Page <AddressResource> FirstPageFunc(int?pageSizeHint) { using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResourceCollection.GetAll"); scope.Start(); try { var response = _addressResourceRestClient.ListAddressesAtResourceGroupLevel(Id.SubscriptionId, Id.ResourceGroupName, filter, skipToken, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new AddressResource(Client, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <AddressResource> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _addressResourceClientDiagnostics.CreateScope("AddressResourceCollection.GetAll"); scope.Start(); try { var response = _addressResourceRestClient.ListAddressesAtResourceGroupLevelNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, filter, skipToken, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new AddressResource(Client, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <DataPolicyManifest> GetAll(string filter = null, CancellationToken cancellationToken = default) { Page <DataPolicyManifest> FirstPageFunc(int?pageSizeHint) { using var scope = _dataPolicyManifestClientDiagnostics.CreateScope("DataPolicyManifestCollection.GetAll"); scope.Start(); try { var response = _dataPolicyManifestRestClient.List(filter, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new DataPolicyManifest(Client, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <DataPolicyManifest> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _dataPolicyManifestClientDiagnostics.CreateScope("DataPolicyManifestCollection.GetAll"); scope.Start(); try { var response = _dataPolicyManifestRestClient.ListNextPage(nextLink, filter, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new DataPolicyManifest(Client, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <CsmUsageQuota> GetUsages(string filter = null, CancellationToken cancellationToken = default) { Page <CsmUsageQuota> FirstPageFunc(int?pageSizeHint) { using var scope = _appServicePlanClientDiagnostics.CreateScope("AppServicePlan.GetUsages"); scope.Start(); try { var response = _appServicePlanRestClient.ListUsages(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <CsmUsageQuota> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _appServicePlanClientDiagnostics.CreateScope("AppServicePlan.GetUsages"); scope.Start(); try { var response = _appServicePlanRestClient.ListUsagesNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, filter, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <ManagedRuleSetDefinition> GetManagedRuleSets(CancellationToken cancellationToken = default) { Page <ManagedRuleSetDefinition> FirstPageFunc(int?pageSizeHint) { using var scope = ManagedRuleSetsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetManagedRuleSets"); scope.Start(); try { var response = ManagedRuleSetsRestClient.List(Id.SubscriptionId, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <ManagedRuleSetDefinition> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = ManagedRuleSetsClientDiagnostics.CreateScope("SubscriptionExtensionClient.GetManagedRuleSets"); scope.Start(); try { var response = ManagedRuleSetsRestClient.ListNextPage(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <SignalRServiceUsage> GetUsages(string location, CancellationToken cancellationToken = default) { Page <SignalRServiceUsage> FirstPageFunc(int?pageSizeHint) { using var scope = UsagesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetUsages"); scope.Start(); try { var response = UsagesRestClient.List(Id.SubscriptionId, location, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <SignalRServiceUsage> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = UsagesClientDiagnostics.CreateScope("SubscriptionResourceExtensionClient.GetUsages"); scope.Start(); try { var response = UsagesRestClient.ListNextPage(nextLink, Id.SubscriptionId, location, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <DatabaseSecurityAlertPolicy> GetAll(CancellationToken cancellationToken = default) { Page <DatabaseSecurityAlertPolicy> FirstPageFunc(int?pageSizeHint) { using var scope = _databaseSecurityAlertPolicyClientDiagnostics.CreateScope("DatabaseSecurityAlertPolicyCollection.GetAll"); scope.Start(); try { var response = _databaseSecurityAlertPolicyRestClient.ListByDatabase(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new DatabaseSecurityAlertPolicy(ArmClient, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <DatabaseSecurityAlertPolicy> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _databaseSecurityAlertPolicyClientDiagnostics.CreateScope("DatabaseSecurityAlertPolicyCollection.GetAll"); scope.Start(); try { var response = _databaseSecurityAlertPolicyRestClient.ListByDatabaseNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new DatabaseSecurityAlertPolicy(ArmClient, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <PeerExpressRouteCircuitConnection> GetPeerExpressRouteCircuitConnections(CancellationToken cancellationToken = default) { Page <PeerExpressRouteCircuitConnection> FirstPageFunc(int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitPeering.GetPeerExpressRouteCircuitConnections"); scope.Start(); try { var response = _peerExpressRouteCircuitConnectionsRestClient.GetAll(Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <PeerExpressRouteCircuitConnection> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("ExpressRouteCircuitPeering.GetPeerExpressRouteCircuitConnections"); scope.Start(); try { var response = _peerExpressRouteCircuitConnectionsRestClient.GetAllNextPage(nextLink, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <HostingEnvironmentPrivateEndpointConnection> GetAll(CancellationToken cancellationToken = default) { Page <HostingEnvironmentPrivateEndpointConnection> FirstPageFunc(int?pageSizeHint) { using var scope = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics.CreateScope("HostingEnvironmentPrivateEndpointConnectionCollection.GetAll"); scope.Start(); try { var response = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.GetPrivateEndpointConnectionList(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new HostingEnvironmentPrivateEndpointConnection(Client, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <HostingEnvironmentPrivateEndpointConnection> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsClientDiagnostics.CreateScope("HostingEnvironmentPrivateEndpointConnectionCollection.GetAll"); scope.Start(); try { var response = _hostingEnvironmentPrivateEndpointConnectionAppServiceEnvironmentsRestClient.GetPrivateEndpointConnectionListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new HostingEnvironmentPrivateEndpointConnection(Client, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <SiteSlotDiagnosticAnalysis> GetAll(CancellationToken cancellationToken = default) { Page <SiteSlotDiagnosticAnalysis> FirstPageFunc(int?pageSizeHint) { using var scope = _siteSlotDiagnosticAnalysisDiagnosticsClientDiagnostics.CreateScope("SiteSlotDiagnosticAnalysisCollection.GetAll"); scope.Start(); try { var response = _siteSlotDiagnosticAnalysisDiagnosticsRestClient.ListSiteAnalysesSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new SiteSlotDiagnosticAnalysis(ArmClient, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <SiteSlotDiagnosticAnalysis> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _siteSlotDiagnosticAnalysisDiagnosticsClientDiagnostics.CreateScope("SiteSlotDiagnosticAnalysisCollection.GetAll"); scope.Start(); try { var response = _siteSlotDiagnosticAnalysisDiagnosticsRestClient.ListSiteAnalysesSlotNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new SiteSlotDiagnosticAnalysis(ArmClient, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <ApplicationGatewayPrivateLinkResource> GetApplicationGatewayPrivateLinkResources(CancellationToken cancellationToken = default) { Page <ApplicationGatewayPrivateLinkResource> FirstPageFunc(int?pageSizeHint) { using var scope = _applicationGatewayPrivateLinkResourcesClientDiagnostics.CreateScope("ApplicationGateway.GetApplicationGatewayPrivateLinkResources"); scope.Start(); try { var response = _applicationGatewayPrivateLinkResourcesRestClient.List(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <ApplicationGatewayPrivateLinkResource> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _applicationGatewayPrivateLinkResourcesClientDiagnostics.CreateScope("ApplicationGateway.GetApplicationGatewayPrivateLinkResources"); scope.Start(); try { var response = _applicationGatewayPrivateLinkResourcesRestClient.ListNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <ProcessThreadInfo> GetProcessThreadsSlot(CancellationToken cancellationToken = default) { Page <ProcessThreadInfo> FirstPageFunc(int?pageSizeHint) { using var scope = _siteSlotProcessWebAppsClientDiagnostics.CreateScope("SiteSlotProcessResource.GetProcessThreadsSlot"); scope.Start(); try { var response = _siteSlotProcessWebAppsRestClient.ListProcessThreadsSlot(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <ProcessThreadInfo> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _siteSlotProcessWebAppsClientDiagnostics.CreateScope("SiteSlotProcessResource.GetProcessThreadsSlot"); scope.Start(); try { var response = _siteSlotProcessWebAppsRestClient.ListProcessThreadsSlotNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <StaticSiteFunctionOverviewARMResource> GetStaticSiteBuildFunctions(CancellationToken cancellationToken = default) { Page <StaticSiteFunctionOverviewARMResource> FirstPageFunc(int?pageSizeHint) { using var scope = _staticSiteBuildARMResourceStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildARMResource.GetStaticSiteBuildFunctions"); scope.Start(); try { var response = _staticSiteBuildARMResourceStaticSitesRestClient.ListStaticSiteBuildFunctions(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <StaticSiteFunctionOverviewARMResource> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _staticSiteBuildARMResourceStaticSitesClientDiagnostics.CreateScope("StaticSiteBuildARMResource.GetStaticSiteBuildFunctions"); scope.Start(); try { var response = _staticSiteBuildARMResourceStaticSitesRestClient.ListStaticSiteBuildFunctionsNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Name, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <ProviderInfo> GetTenantProviders(int?top = null, string expand = null, CancellationToken cancellationToken = default) { Page <ProviderInfo> FirstPageFunc(int?pageSizeHint) { using var scope = ProvidersClientDiagnostics.CreateScope("TenantExtensionClient.GetTenantProviders"); scope.Start(); try { var response = ProvidersRestClient.ListAtTenantScope(top, expand, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <ProviderInfo> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = ProvidersClientDiagnostics.CreateScope("TenantExtensionClient.GetTenantProviders"); scope.Start(); try { var response = ProvidersRestClient.ListAtTenantScopeNextPage(nextLink, top, expand, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <NetworkVirtualAppliance> List(CancellationToken cancellationToken = default) { Page <NetworkVirtualAppliance> FirstPageFunc(int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("NetworkVirtualAppliancesClient.List"); scope.Start(); try { var response = RestClient.List(cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <NetworkVirtualAppliance> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("NetworkVirtualAppliancesClient.List"); scope.Start(); try { var response = RestClient.ListNextPage(nextLink, cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <Tenant> GetTenants(CancellationToken cancellationToken = default) { Page <Tenant> FirstPageFunc(int?pageSizeHint) { using var scope = TenantClientDiagnostics.CreateScope("TenantExtensionClient.GetTenants"); scope.Start(); try { var response = TenantRestClient.List(cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new Tenant(ArmClient, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <Tenant> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = TenantClientDiagnostics.CreateScope("TenantExtensionClient.GetTenants"); scope.Start(); try { var response = TenantRestClient.ListNextPage(nextLink, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new Tenant(ArmClient, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <RunCommandDocumentBase> GetAll(CancellationToken cancellationToken = default) { Page <RunCommandDocumentBase> FirstPageFunc(int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("VirtualMachineVirtualMachineRunCommand.GetAll"); scope.Start(); try { var response = _restClient.GetAll(Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <RunCommandDocumentBase> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("VirtualMachineVirtualMachineRunCommand.GetAll"); scope.Start(); try { var response = _restClient.GetAllNextPage(nextLink, Id.Name, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <SubscriptionPolicySetDefinitionResource> GetAll(string filter = null, int?top = null, CancellationToken cancellationToken = default) { Page <SubscriptionPolicySetDefinitionResource> FirstPageFunc(int?pageSizeHint) { using var scope = _subscriptionPolicySetDefinitionPolicySetDefinitionsClientDiagnostics.CreateScope("SubscriptionPolicySetDefinitionCollection.GetAll"); scope.Start(); try { var response = _subscriptionPolicySetDefinitionPolicySetDefinitionsRestClient.List(Id.SubscriptionId, filter, top, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new SubscriptionPolicySetDefinitionResource(Client, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <SubscriptionPolicySetDefinitionResource> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _subscriptionPolicySetDefinitionPolicySetDefinitionsClientDiagnostics.CreateScope("SubscriptionPolicySetDefinitionCollection.GetAll"); scope.Start(); try { var response = _subscriptionPolicySetDefinitionPolicySetDefinitionsRestClient.ListNextPage(nextLink, Id.SubscriptionId, filter, top, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new SubscriptionPolicySetDefinitionResource(Client, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <SchemaGroupResource> GetAll(int?skip = null, int?top = null, CancellationToken cancellationToken = default) { Page <SchemaGroupResource> FirstPageFunc(int?pageSizeHint) { using var scope = _schemaGroupSchemaRegistryClientDiagnostics.CreateScope("SchemaGroupCollection.GetAll"); scope.Start(); try { var response = _schemaGroupSchemaRegistryRestClient.ListByNamespace(Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, top, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new SchemaGroupResource(Client, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <SchemaGroupResource> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _schemaGroupSchemaRegistryClientDiagnostics.CreateScope("SchemaGroupCollection.GetAll"); scope.Start(); try { var response = _schemaGroupSchemaRegistryRestClient.ListByNamespaceNextPage(nextLink, Id.SubscriptionId, Id.ResourceGroupName, Id.Name, skip, top, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new SchemaGroupResource(Client, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <ResourceLink> ListAtSubscription(string filter = null, CancellationToken cancellationToken = default) { Page <ResourceLink> FirstPageFunc(int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("ResourceLinksClient.ListAtSubscription"); scope.Start(); try { var response = RestClient.ListAtSubscription(filter, cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <ResourceLink> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("ResourceLinksClient.ListAtSubscription"); scope.Start(); try { var response = RestClient.ListAtSubscriptionNextPage(nextLink, filter, cancellationToken); return(Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
public virtual Pageable <ApplicationGatewaySslPredefinedPolicy> GetAll(CancellationToken cancellationToken = default) { Page <ApplicationGatewaySslPredefinedPolicy> FirstPageFunc(int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaySslPredefinedPolicyCollection.GetAll"); scope.Start(); try { var response = _applicationGatewaysRestClient.ListAvailableSslPredefinedPolicies(Id.SubscriptionId, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new ApplicationGatewaySslPredefinedPolicy(Parent, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <ApplicationGatewaySslPredefinedPolicy> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("ApplicationGatewaySslPredefinedPolicyCollection.GetAll"); scope.Start(); try { var response = _applicationGatewaysRestClient.ListAvailableSslPredefinedPoliciesNextPage(nextLink, Id.SubscriptionId, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Value.Select(value => new ApplicationGatewaySslPredefinedPolicy(Parent, value)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }
/// <summary> Gets all the preview features in a provider namespace that are available through AFEC for the subscription. </summary> /// <param name="cancellationToken"> The cancellation token to use. </param> public virtual Pageable <Feature> GetAll(CancellationToken cancellationToken = default) { Page <Feature> FirstPageFunc(int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("FeatureContainer.GetAll"); scope.Start(); try { var response = _restClient.List(Id.Provider, cancellationToken); return(Page.FromValues(response.Value.Value.Select(d => new Feature(Parent, d)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <Feature> NextPageFunc(string nextLink, int?pageSizeHint) { using var scope = _clientDiagnostics.CreateScope("FeatureContainer.GetAll"); scope.Start(); try { var response = _restClient.ListNextPage(nextLink, Id.Provider, cancellationToken); return(Page.FromValues(response.Value.Value.Select(d => new Feature(Parent, d)), response.Value.NextLink, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }