AvailabilityGroupCollection.ItemById Method

Extracts a member from the availability group collection using a system-defined, unique identifier.

Namespace:  Microsoft.SqlServer.Management.Smo
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
Public Function ItemById ( _
    id As Integer _
) As AvailabilityGroup
'Usage
Dim instance As AvailabilityGroupCollection 
Dim id As Integer 
Dim returnValue As AvailabilityGroup 

returnValue = instance.ItemById(id)
public AvailabilityGroup ItemById(
    int id
)
public:
AvailabilityGroup^ ItemById(
    int id
)
member ItemById : 
        id:int -> AvailabilityGroup
public function ItemById(
    id : int
) : AvailabilityGroup

Parameters

  • id
    Type: System.Int32
    The identifier of the availability group that is a member of the availability group collection.

Return Value

Type: Microsoft.SqlServer.Management.Smo.AvailabilityGroup
The availability group that has the specified ID value.

See Also

Reference

AvailabilityGroupCollection Class

Microsoft.SqlServer.Management.Smo Namespace