Share via


Update (PUT) a Job [SPFSDK][VMMREF]

 

Applies To: Windows Azure Pack

Update a Job [SPFSDK][VMMREF] entity by using the HTTP PUT operation.

Here is a list of examples related to this collection operation.

  • Example: Clear a job failure

Request

Method

Request URI

HTTP Version

PUT

https://{server-name}:{auth-port}/{subscription-id}/services/systemcenter/vmm/Jobs(ID=Guid'[value]',StampId=Guid'[value]')

HTTP/1.1

Request URI Parameters

URI Parameter

Description

ID

Required [Edm.Guid] The type identifier of the entity. You require a value for this parameter to update a specific entity.

StampId

Required [Edm.Guid] The type identifier of the stamp that restricts the query. You require a value for this parameter to update a specific entity.

Request Headers

This operation does not use any non-standard request headers.

For more information about the common request headers used by this operation, see Common HTTP request information.

Request Body

The request body should contain the single Job [SPFSDK][VMMREF] entity, encoded in XML or JSON, which is to be updated.

Response

Response Codes

This operation does not return any non-standard OData response codes. If successful, it will return code 204 No Content.

Response Headers

This operation does not use any non-standard response headers.

For more information about the common response headers used by this operation, see Common HTTP response information.

Response Body

None

Example: Clear a job failure

This example clears the last failure of a job.

For more information about how to get started with using the code examples provided in this programming guide, see Program in Visual Studio with the Windows Azure Pack IaaS Resource Provider [SPFSDK].

Guid stampId = new Guid("d70c1a9b-c241-48f5-880a-b6c36071e653");
Guid jobId = new Guid("cd16c6ee-874c-4fba-89b5-ce3a030a0e83");

var job = vmmService.Jobs.Where(j => j.StampId == stampId && j.ID == jobId).First();

job.SkipLastFailedStep = true;

vmmService.UpdateObject(job);
vmmService.SaveChanges();

See Also

Jobs Collection [SPFSDK][VMMREF]
Job [SPFSDK][VMMREF]