共用方式為


SqlExtensions.GetSqlServers Method

Definition

Overloads

GetSqlServers(ResourceGroupResource)

Gets a collection of SqlServerResources in the ResourceGroupResource. MockingTo mock this method, please mock GetSqlServers() instead.

GetSqlServers(SubscriptionResource, String, CancellationToken)

Gets a list of all servers in the subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers
  • Operation Id: Servers_List
  • Default Api Version: 2023-05-01-preview
  • Resource: SqlServerResource

GetSqlServers(ResourceGroupResource)

Source:
SqlExtensions.cs
Source:
SqlExtensions.cs

Gets a collection of SqlServerResources in the ResourceGroupResource. MockingTo mock this method, please mock GetSqlServers() instead.

public static Azure.ResourceManager.Sql.SqlServerCollection GetSqlServers (this Azure.ResourceManager.Resources.ResourceGroupResource resourceGroupResource);
static member GetSqlServers : Azure.ResourceManager.Resources.ResourceGroupResource -> Azure.ResourceManager.Sql.SqlServerCollection
<Extension()>
Public Function GetSqlServers (resourceGroupResource As ResourceGroupResource) As SqlServerCollection

Parameters

resourceGroupResource
ResourceGroupResource

The ResourceGroupResource instance the method will execute against.

Returns

An object representing collection of SqlServerResources and their operations over a SqlServerResource.

Exceptions

resourceGroupResource is null.

Applies to

GetSqlServers(SubscriptionResource, String, CancellationToken)

Source:
SqlExtensions.cs
Source:
SqlExtensions.cs

Gets a list of all servers in the subscription.

  • Request Path: /subscriptions/{subscriptionId}/providers/Microsoft.Sql/servers
  • Operation Id: Servers_List
  • Default Api Version: 2023-05-01-preview
  • Resource: SqlServerResource
public static Azure.Pageable<Azure.ResourceManager.Sql.SqlServerResource> GetSqlServers (this Azure.ResourceManager.Resources.SubscriptionResource subscriptionResource, string expand = default, System.Threading.CancellationToken cancellationToken = default);
static member GetSqlServers : Azure.ResourceManager.Resources.SubscriptionResource * string * System.Threading.CancellationToken -> Azure.Pageable<Azure.ResourceManager.Sql.SqlServerResource>
<Extension()>
Public Function GetSqlServers (subscriptionResource As SubscriptionResource, Optional expand As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Pageable(Of SqlServerResource)

Parameters

subscriptionResource
SubscriptionResource

The SubscriptionResource instance the method will execute against.

expand
String

The child resources to include in the response.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

A collection of SqlServerResource that may take multiple service requests to iterate over.

Exceptions

subscriptionResource is null.

Applies to