Retrieves the path to the log file for a single High Performance Computing (HPC)
Activity, based on a specific template.
If the Activity has completed or failed, this method returns the path to the log file. If the Activity has not yet completed, then no log file is available. In this case, the software returns a Token ID that you can pass into this method in a subsequent method call to retrieve the relevant log file.
Parameters
- request
- Contains a GetFileRequest that identifies the software-generated Activity Sequential Identifier (SID) of the HPC Activity for which you want to retrieve a log file, along with the desired file template, as well as the associated Business Unit SID and SQL Instance SID.
You can find the ActivitySid
by looking at the response that the software returns for asynchronous web service calls, such as for the SubmitCreateDatabase() or SubmitDeleteProject() method.
Return Value
A
GetFileResponse containing the
path to the requested log file if the associated Activity has completed or failed or a
Token ID to identify the requested log file for subsequent
GetFile()
method calls if the associated Activity has not yet completed.
The following example shows how to retrieve the path to the log file for an HPC Activity, based on a specific file template, using the
GetFile()
method:
using System;
using AIR.Services.ActivityManagement.Api;
using AIR.Services.Common.Data;
class SnippetGetActivityLogFile
{
private static void GetActivityLogFile(int businessUnitSid, int sqlInstanceSid, int activitySid, int tokenId, string templateName)
{
ActivityManagementServiceClient client = new ActivityManagementServiceClient();
GetFileRequest request = new GetFileRequest();
request.BusinessUnitSid = businessUnitSid;
request.SqlInstanceSid = sqlInstanceSid;
request.ActivitySid = activitySid;
request.Template = templateName;
request.TokenID = tokenId;
GetFileResponse response = client.GetFile(request);
if (response.Status.Code == StatusCode.Success)
{
Console.WriteLine("Log File Path: " + response.FilePath);
Console.WriteLine("Log Token ID: " + response.TokenID);
}
}
}
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2