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.

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

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.

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.

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

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

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.

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();
Show: