Freigeben über


ICluster::SetJobCredentials method

Sets the RunAs credentials for the specified job.

Syntax

HRESULT SetJobCredentials(
  [in] long jobId,
  [in] BSTR userName,
  [in] BSTR password
);

Parameters

  • jobId [in]
    The job identifier. The ICluster::AddJob method returns this value. If you have an instance of the job that has already been added to the cluster, you can call the IJob::get_Id method to get the identifier.

  • userName [in]
    The name of the RunAs user, in the form domain\user. The user name is limited to 80 Unicode characters.

  • password [in]
    The user password. The password is limited to 127 Unicode characters. Can be empty.

Return value

If the method succeeds, the return value is S_OK. Otherwise, the return value is an error code. To get a description of the error, call the ICluster::get_ErrorMessage method.

Remarks

You would call this method after submitting a job to change the credentials that the job uses.

Requirements

Product

Compute Cluster Pack Client Utilities

Type library

Ccpapi.tlb

See also

ICluster

ICluster::SetCachedCredentials

ICluster::SetJobCredentialsFromCache