Update or replace an existing job
Updates or replaces the specified job. Note: Only execution providers can use this operation.
1{2 "creationTimeStamp": "2022-04-07T20:00:02.338Z",3 "modifiedTimeStamp": "2022-04-07T20:00:03.977Z",4 "createdBy": "sas.audit",5 "modifiedBy": "sas.audit",6 "version": 4,7 "id": "859ad72d-5fa2-470c-9d43-f7a65829ae5f",8 "jobRequest": {9 "version": 3,10 "name": "Update CAS Audit data",11 "jobDefinitionUri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",12 "jobDefinition": {13 "creationTimeStamp": "2022-04-06T22:08:06.127Z",14 "modifiedTimeStamp": "2022-04-06T22:08:06.131Z",15 "createdBy": "sas.audit",16 "modifiedBy": "sas.audit",17 "version": 2,18 "id": "7b5ef82d-19e3-46e1-ebeb-cf15b8675309",19 "name": "CAS Audit table update",20 "description": "After upload of new Audit data into a temporary CAS table, this job appends the new data to the existing Audit data.",21 "type": "casl",22 "parameters": [23 {24 "version": 1,25 "name": "%VAR-expireDate",26 "type": "CHARACTER",27 "required": true28 },29 {30 "version": 1,31 "name": "%VAR-tempTableName",32 "type": "CHARACTER",33 "required": true34 },35 {36 "version": 1,37 "name": "%VAR-targetCaslib",38 "type": "CHARACTER",39 "required": true40 },41 {42 "version": 1,43 "name": "serverId",44 "defaultValue": "cas-shared-default",45 "type": "CHARACTER",46 "required": false47 }48 ],49 "code": "whereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",50 "links": [51 {52 "method": "GET",53 "rel": "self",54 "href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",55 "uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",56 "type": "application/vnd.sas.job.definition"57 },58 {59 "method": "GET",60 "rel": "alternate",61 "href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",62 "uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",63 "type": "application/vnd.sas.summary"64 },65 {66 "method": "PUT",67 "rel": "update",68 "href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",69 "uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",70 "type": "application/vnd.sas.job.definition",71 "responseType": "application/vnd.sas.job.definition"72 },73 {74 "method": "DELETE",75 "rel": "delete",76 "href": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309",77 "uri": "/jobDefinitions/definitions/7b5ef82d-19e3-46e1-ebeb-cf15b8675309"78 }79 ],80 "properties": []81 },82 "arguments": {83 "%VAR-expireDate": "2022-03-31T20:00:01Z",84 "%VAR-targetCaslib": "SystemData",85 "%VAR-tempTableName": "audit_2992476099",86 "serverId": "cas-shared-default"87 },88 "properties": [],89 "createdByApplication": "jobExecution"90 },91 "state": "completed",92 "endTimeStamp": "2022-04-07T20:00:03.975Z",93 "heartbeatTimeStamp": "2022-04-07T20:00:02.431Z",94 "submittedByApplication": "audit-service",95 "heartbeatInterval": 300,96 "elapsedTime": 1637,97 "results": {98 "debuginfo_1": "",99 "severity_1": "normal",100 "statusCode_1": "0",101 "reason_1": "ok",102 "executedCode": "expireDate=\"2022-03-31T20:00:01Z\";\ntempTableName=\"audit_2992476099\";\ntargetCaslib=\"SystemData\";\nwhereStr=cat(\"'Timestamp'n <= '\", expireDate, \"'\");\ndeleteRows / table={name='AUDIT' caslib=targetCaslib, where=whereStr};\nrun;\ncodeStr=cat(\"data AUDIT(caslib=\", targetCaslib, \" append=yes);set \", tempTableName, \"(caslib=\", targetCaslib, \");run;\");\ndatastep.runCode / code=codeStr;\nrun;\ntable.save status=sc / name='AUDIT' caslib=targetCaslib replace=true table={ name='AUDIT' caslib=targetCaslib };\nrun;\ntable.dropTable name='AUDIT' caslib=targetCaslib;\nrun;\ntable.dropTable name=tempTableName caslib=targetCaslib;\nrun;",103 "status_1": ""104 },105 "logLocation": "/files/files/4e5356eb-5b9e-45e4-bc11-7c865a4e14db"106}
Name | Type | Required | Description |
---|---|---|---|
Delegate-Domain | string | false | Name of a credential domain of type OAuth2.0. The credential secret is retrieved to impersonate a group-managed service account for the current request. |
If-Match | string | false | The entity tag obtained from the most recent |
If-Unmodified-Since | string | false | Ignored when |
The new job values.
The execution job.
Name | Type | Required | Description |
---|---|---|---|
id | string | false | The unique identifier that is generated by the API. |
state | string | false | The current state of the job. Allowed values: pendingrunningcanceledcompletedfailedtimedOut |
stateDetails | string | false | Details that supplement the "state" by providing a hint that additional information is available. It is a hint and not the actual information. The purpose of this field is for providers to provide a hint, where applicable, about the state set and for that hint to be used by components which convey state information to clients. It must be set in conjunction with "state". |
results | object | false | The output of the job execution as a map of string keys and values. |
error | Error | false | The representation of an error. |
jobRequest | Job Request Schema | false | The job request. |
heartbeatInterval | integer<int32> | false | The interval in seconds that the heartbeatTimeStamp is updated by the provider before the job times out. This is 0 if there is no heartbeat. |
heartbeatTimeStamp | string<date-time> | false | The timestamp identifying when the last heartbeat was received. It uses the format |
creationTimeStamp | string<date-time> | false | The timestamp identifying when the job was created. It uses the format |
modifiedTimeStamp | string<date-time> | false | The timestamp identifying when the job was last modified. It uses the format |
endTimeStamp | string<date-time> | false | The timestamp identifying when the job state changed to completed or failed. It uses the format |
elapsedTime | number | false | If the job has ended, the value is the difference between the endTimeStamp and the creationTimeStamp. If the job has not ended, the value is the difference between the time that this representation was created and the creationTimeStamp. The units are in milliseconds. A value of -1 is returned if a value is not set for the creationTimeStamp. |
logLocation | string | false | The URI for the log, if one exists. The provider might provide additional information. |
expirationTimeStamp | string<date-time> | false | The timestamp when the job expired and is deleted by the Job Execution service. It uses the format |
createdBy | string | false | The name of the user who created or submitted the job. |
modifiedBy | string | false | The name of the last user who modified this object. |
submittedByApplication | string | false | Value of the query parameter "submitter" on the <= 64 characters |
links | array [Link] | false | Links that apply to this object. Includes "self", "state", "update", "delete", "updateState", "updateHeartbeatTimeStamp", "jobRequest" and "log". |
version | integer | false | The version number of the representation. The current version is 4. |
Status | Meaning | Description | ||
---|---|---|---|---|
200 | OK | The request succeeded. The job updated successfully. | Headers | Schema |
400 | Bad Request | The request was not valid. This occurs when the user provides an ID in the request that does not match the ID in the path of the URL. | Schema | |
404 | Not Found | No job exists at the requested path. | Schema | |
405 | Method Not Allowed | The request could not be completed due to a conflict with the current state of the resource. The job has already completed and can no longer be updated (error code 31501). | Schema | |
412 | Precondition Failed | The `If-Match` request header did not match the resource's entity tag or the `If-Unmodified-Since` request header was earlier than the resource's last modified timestamp. | Schema | |
415 | Unsupported Media Type | The requested media type is not supported. | Schema | |
428 | Precondition Required | The request was missing a `If-Match` or `If-Unmodified-Since` header. | Schema |