Share via


AgentReservationWebService4.ReserveAgent Method

Reserves an agent for use by a build that matches the input name specification and required tags.

Namespace:  Microsoft.TeamFoundation.Build.Server
Assembly:  Microsoft.TeamFoundation.Build.Server (in Microsoft.TeamFoundation.Build.Server.dll)

Syntax

'Declaration
<ClientServiceMethodAttribute(AsyncPattern := True, SyncPattern := True)> _
<WebMethodAttribute> _
Public Function ReserveAgent ( _
    buildUri As String, _
    name As String, _
    requiredTags As List(Of String), _
    tagComparison As TagComparison _
) As AgentReservation
[ClientServiceMethodAttribute(AsyncPattern = true, SyncPattern = true)]
[WebMethodAttribute]
public AgentReservation ReserveAgent(
    string buildUri,
    string name,
    List<string> requiredTags,
    TagComparison tagComparison
)
[ClientServiceMethodAttribute(AsyncPattern = true, SyncPattern = true)]
[WebMethodAttribute]
public:
AgentReservation^ ReserveAgent(
    String^ buildUri, 
    String^ name, 
    List<String^>^ requiredTags, 
    TagComparison tagComparison
)
[<ClientServiceMethodAttribute(AsyncPattern = true, SyncPattern = true)>]
[<WebMethodAttribute>]
member ReserveAgent : 
        buildUri:string * 
        name:string * 
        requiredTags:List<string> * 
        tagComparison:TagComparison -> AgentReservation
public function ReserveAgent(
    buildUri : String, 
    name : String, 
    requiredTags : List<String>, 
    tagComparison : TagComparison
) : AgentReservation

Parameters

  • buildUri
    Type: System.String

    The build that is making the reservation.

  • name
    Type: System.String

    The name of the agent to reserve (wildcard character supported).

Return Value

Type: Microsoft.TeamFoundation.Build.Server.AgentReservation
An agent reservation that represents the agent request.

.NET Framework Security

See Also

Reference

AgentReservationWebService4 Class

Microsoft.TeamFoundation.Build.Server Namespace