Create a context

post/contexts
Internal-Use Only

Creates a context using the context request in the request body.

Request Samples

1

Response Samples

1{
2 "createdBy": "sas.batch",
3 "creationTimeStamp": "2022-06-13T11:37:08.210222Z",
4 "description": "Default Batch Context",
5 "id": "6794ba8a-6aff-4989-ae77-93f67286aea2",
6 "isMultiServer": true,
7 "launcherContextId": "01a0ce1b-a704-4fd9-8475-11ec1e746a22",
8 "links": [
9 {
10 "method": "GET",
11 "rel": "self",
12 "href": "/batch/contexts/6794ba8a-6aff-4989-ae77-93f67286aea2",
13 "uri": "/batch/contexts/6794ba8a-6aff-4989-ae77-93f67286aea2",
14 "type": "application/vnd.sas.batch.context"
15 },
16 {
17 "method": "DELETE",
18 "rel": "delete",
19 "href": "/batch/contexts/6794ba8a-6aff-4989-ae77-93f67286aea2",
20 "uri": "/batch/contexts/6794ba8a-6aff-4989-ae77-93f67286aea2"
21 },
22 {
23 "method": "GET",
24 "rel": "up",
25 "href": "/batch/contexts",
26 "uri": "/batch/contexts",
27 "type": "application/vnd.sas.collection",
28 "itemType": "application/vnd.sas.batch.context"
29 }
30 ],
31 "maxServers": 0,
32 "minServers": 2,
33 "modifiedBy": "someuser",
34 "modifiedTimeStamp": "2022-06-13T12:30:39.113567Z",
35 "name": "default",
36 "providerOptions": "",
37 "queueName": "default",
38 "requiredResources": "gpuRequired",
39 "runServerAs": "myServiceAcct",
40 "sasOptions": "-memsize 2048",
41 "serverTimeout": 600,
42 "version": 3
43}

Request Body

Provides information to create a Batch context.

NameTypeRequiredDescription
description
string
false

Specifies the description of the Batch context.

<= 1000 characters
launcherContextId
string
false

Specifies the ID of the launcher context to use. Required if launcherContextName is not provided.

launcherContextName
string
false

Specifies the name of the launcher context to use.

name
string
false

Specifies the name of the Batch context.

<= 100 characters
queueName
string
false

Specifies the name of the SAS Workload Orchestrator queue to use if SAS Workload Management is part of the deployment.

<= 250 characters
requiredResources
string
false

Specifies SAS Workload Orchestrator tags that identify on which hosts this job can run if SAS Workload Management is part of the deployment.

<= 500 characters
sasOptions
string
false

Specifies the SAS options to use on the SAS command line.

<= 1000 characters
version
integer<int32>
false

Specifies the version number of this representation schema. This is version 1.

>= 1<= 3

Responses

StatusMeaningDescription
201CreatedThe context was created.HeadersSchema
400Bad RequestThe update context request is not valid due to one of the following reasons. <UL> <LI> The request is not valid JSON. <LI> The version is not a number. <LI> The version is not a valid value. <LI> A required field is missing. <LI> A field's length is too long. <LI> The launcher context specified by the context ID or context name is not found. </UL> See the returned error response for more information.Schema
406Not AcceptableThe requested response type is not acceptable. See the returned error response for more information and acceptable response types.Schema
409ConflictThe specified context name is already in use. Context names must be unique.Schema