AgentAdministrationClient.DownloadAgentVersionCode Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Download the code zip for a specific version of a code-based hosted agent and unpacks it to the user directory; returns the zip content as a binary data.
Returns the previously-uploaded zip (application/zip).
The SHA-256 digest of the returned bytes matches the content_hash on the agent version's code_configuration.
public virtual BinaryData DownloadAgentVersionCode(string agentName, string agentVersion, string path, System.Threading.CancellationToken cancellationToken = default);
abstract member DownloadAgentVersionCode : string * string * string * System.Threading.CancellationToken -> BinaryData
override this.DownloadAgentVersionCode : string * string * string * System.Threading.CancellationToken -> BinaryData
Public Overridable Function DownloadAgentVersionCode (agentName As String, agentVersion As String, path As String, Optional cancellationToken As CancellationToken = Nothing) As BinaryData
Parameters
- agentName
- String
The name of the agent.
- agentVersion
- String
The version of the agent whose code zip should be downloaded.
- path
- String
The path to save the agent code.
- cancellationToken
- CancellationToken
The cancellation token that can be used to cancel the operation.
Returns
Exceptions
agentName, agentVersion or path is null.
agentName, agentVersion or path is an empty string, and was expected to be non-empty.
Service returned a non-success status code.