Skip to content

Latest commit

 

History

History
703 lines (518 loc) · 31.2 KB

ApisBatchV1.md

File metadata and controls

703 lines (518 loc) · 31.2 KB

lib_openshift.ApisBatchV1

All URIs are relative to https://localhost:8443/

Method HTTP request Description
create_job POST /apis/batch/v1/jobs create a Job
create_namespaced_job POST /apis/batch/v1/namespaces/{namespace}/jobs create a Job
delete_namespaced_job DELETE /apis/batch/v1/namespaces/{namespace}/jobs/{name} delete a Job
delete_namespaced_jobs DELETE /apis/batch/v1/namespaces/{namespace}/jobs delete collection of Job
get_namespaced_job GET /apis/batch/v1/namespaces/{namespace}/jobs/{name} read the specified Job
list GET /apis/batch/v1 get available resources
list_jobs GET /apis/batch/v1/jobs list or watch objects of kind Job
list_namespaced_jobs GET /apis/batch/v1/namespaces/{namespace}/jobs list or watch objects of kind Job
patch_namespaced_job PATCH /apis/batch/v1/namespaces/{namespace}/jobs/{name} partially update the specified Job
replace_namespaced_job PUT /apis/batch/v1/namespaces/{namespace}/jobs/{name} replace the specified Job
watch_namespaced_watch_job GET /apis/batch/v1/watch/namespaces/{namespace}/jobs/{name} watch changes to an object of kind Job
watch_namespaced_watch_jobs GET /apis/batch/v1/watch/namespaces/{namespace}/jobs watch individual changes to a list of Job
watch_watch_jobs GET /apis/batch/v1/watch/jobs watch individual changes to a list of Job

create_job

V1Job create_job(body, pretty=pretty)

create a Job

Example

import time
import lib_openshift
from lib_openshift.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = lib_openshift.ApisBatchV1()
body = lib_openshift.V1Job() # V1Job | 
pretty = 'pretty_example' # str | If 'true', then the output is pretty printed. (optional)

try: 
    # create a Job
    api_response = api_instance.create_job(body, pretty=pretty)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApisBatchV1->create_job: %s\n" % e

Parameters

Name Type Description Notes
body V1Job
pretty str If 'true', then the output is pretty printed. [optional]

Return type

V1Job

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/yaml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_namespaced_job

V1Job create_namespaced_job(body, namespace, pretty=pretty)

create a Job

Example

import time
import lib_openshift
from lib_openshift.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = lib_openshift.ApisBatchV1()
body = lib_openshift.V1Job() # V1Job | 
namespace = 'namespace_example' # str | object name and auth scope, such as for teams and projects
pretty = 'pretty_example' # str | If 'true', then the output is pretty printed. (optional)

try: 
    # create a Job
    api_response = api_instance.create_namespaced_job(body, namespace, pretty=pretty)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApisBatchV1->create_namespaced_job: %s\n" % e

Parameters

Name Type Description Notes
body V1Job
namespace str object name and auth scope, such as for teams and projects
pretty str If 'true', then the output is pretty printed. [optional]

Return type

V1Job

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/yaml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_namespaced_job

UnversionedStatus delete_namespaced_job(body, namespace, name, pretty=pretty)

delete a Job

Example

import time
import lib_openshift
from lib_openshift.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = lib_openshift.ApisBatchV1()
body = lib_openshift.V1DeleteOptions() # V1DeleteOptions | 
namespace = 'namespace_example' # str | object name and auth scope, such as for teams and projects
name = 'name_example' # str | name of the Job
pretty = 'pretty_example' # str | If 'true', then the output is pretty printed. (optional)

try: 
    # delete a Job
    api_response = api_instance.delete_namespaced_job(body, namespace, name, pretty=pretty)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApisBatchV1->delete_namespaced_job: %s\n" % e

Parameters

Name Type Description Notes
body V1DeleteOptions
namespace str object name and auth scope, such as for teams and projects
name str name of the Job
pretty str If 'true', then the output is pretty printed. [optional]

Return type

UnversionedStatus

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/yaml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_namespaced_jobs

UnversionedStatus delete_namespaced_jobs(namespace, pretty=pretty, label_selector=label_selector, field_selector=field_selector, watch=watch, resource_version=resource_version, timeout_seconds=timeout_seconds)

delete collection of Job

Example

import time
import lib_openshift
from lib_openshift.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = lib_openshift.ApisBatchV1()
namespace = 'namespace_example' # str | object name and auth scope, such as for teams and projects
pretty = 'pretty_example' # str | If 'true', then the output is pretty printed. (optional)
label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
watch = true # bool | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
resource_version = 'resource_version_example' # str | When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. (optional)
timeout_seconds = 56 # int | Timeout for the list/watch call. (optional)

try: 
    # delete collection of Job
    api_response = api_instance.delete_namespaced_jobs(namespace, pretty=pretty, label_selector=label_selector, field_selector=field_selector, watch=watch, resource_version=resource_version, timeout_seconds=timeout_seconds)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApisBatchV1->delete_namespaced_jobs: %s\n" % e

Parameters

Name Type Description Notes
namespace str object name and auth scope, such as for teams and projects
pretty str If 'true', then the output is pretty printed. [optional]
label_selector str A selector to restrict the list of returned objects by their labels. Defaults to everything. [optional]
field_selector str A selector to restrict the list of returned objects by their fields. Defaults to everything. [optional]
watch bool Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. [optional]
resource_version str When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. [optional]
timeout_seconds int Timeout for the list/watch call. [optional]

Return type

UnversionedStatus

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/yaml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_namespaced_job

V1Job get_namespaced_job(namespace, name, pretty=pretty, export=export, exact=exact)

read the specified Job

Example

import time
import lib_openshift
from lib_openshift.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = lib_openshift.ApisBatchV1()
namespace = 'namespace_example' # str | object name and auth scope, such as for teams and projects
name = 'name_example' # str | name of the Job
pretty = 'pretty_example' # str | If 'true', then the output is pretty printed. (optional)
export = true # bool | Should this value be exported.  Export strips fields that a user can not specify. (optional)
exact = true # bool | Should the export be exact.  Exact export maintains cluster-specific fields like 'Namespace' (optional)

try: 
    # read the specified Job
    api_response = api_instance.get_namespaced_job(namespace, name, pretty=pretty, export=export, exact=exact)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApisBatchV1->get_namespaced_job: %s\n" % e

Parameters

Name Type Description Notes
namespace str object name and auth scope, such as for teams and projects
name str name of the Job
pretty str If 'true', then the output is pretty printed. [optional]
export bool Should this value be exported. Export strips fields that a user can not specify. [optional]
exact bool Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace' [optional]

Return type

V1Job

Authorization

No authorization required

HTTP request headers

  • Content-Type: /
  • Accept: application/json, application/yaml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list

list()

get available resources

Example

import time
import lib_openshift
from lib_openshift.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = lib_openshift.ApisBatchV1()

try: 
    # get available resources
    api_instance.list()
except ApiException as e:
    print "Exception when calling ApisBatchV1->list: %s\n" % e

Parameters

This endpoint does not need any parameter.

Return type

void (empty response body)

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/yaml
  • Accept: application/json, application/yaml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_jobs

V1JobList list_jobs(pretty=pretty, label_selector=label_selector, field_selector=field_selector, watch=watch, resource_version=resource_version, timeout_seconds=timeout_seconds)

list or watch objects of kind Job

Example

import time
import lib_openshift
from lib_openshift.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = lib_openshift.ApisBatchV1()
pretty = 'pretty_example' # str | If 'true', then the output is pretty printed. (optional)
label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
watch = true # bool | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
resource_version = 'resource_version_example' # str | When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. (optional)
timeout_seconds = 56 # int | Timeout for the list/watch call. (optional)

try: 
    # list or watch objects of kind Job
    api_response = api_instance.list_jobs(pretty=pretty, label_selector=label_selector, field_selector=field_selector, watch=watch, resource_version=resource_version, timeout_seconds=timeout_seconds)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApisBatchV1->list_jobs: %s\n" % e

Parameters

Name Type Description Notes
pretty str If 'true', then the output is pretty printed. [optional]
label_selector str A selector to restrict the list of returned objects by their labels. Defaults to everything. [optional]
field_selector str A selector to restrict the list of returned objects by their fields. Defaults to everything. [optional]
watch bool Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. [optional]
resource_version str When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. [optional]
timeout_seconds int Timeout for the list/watch call. [optional]

Return type

V1JobList

Authorization

No authorization required

HTTP request headers

  • Content-Type: /
  • Accept: application/json, application/yaml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_namespaced_jobs

V1JobList list_namespaced_jobs(namespace, pretty=pretty, label_selector=label_selector, field_selector=field_selector, watch=watch, resource_version=resource_version, timeout_seconds=timeout_seconds)

list or watch objects of kind Job

Example

import time
import lib_openshift
from lib_openshift.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = lib_openshift.ApisBatchV1()
namespace = 'namespace_example' # str | object name and auth scope, such as for teams and projects
pretty = 'pretty_example' # str | If 'true', then the output is pretty printed. (optional)
label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
watch = true # bool | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
resource_version = 'resource_version_example' # str | When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. (optional)
timeout_seconds = 56 # int | Timeout for the list/watch call. (optional)

try: 
    # list or watch objects of kind Job
    api_response = api_instance.list_namespaced_jobs(namespace, pretty=pretty, label_selector=label_selector, field_selector=field_selector, watch=watch, resource_version=resource_version, timeout_seconds=timeout_seconds)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApisBatchV1->list_namespaced_jobs: %s\n" % e

Parameters

Name Type Description Notes
namespace str object name and auth scope, such as for teams and projects
pretty str If 'true', then the output is pretty printed. [optional]
label_selector str A selector to restrict the list of returned objects by their labels. Defaults to everything. [optional]
field_selector str A selector to restrict the list of returned objects by their fields. Defaults to everything. [optional]
watch bool Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. [optional]
resource_version str When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. [optional]
timeout_seconds int Timeout for the list/watch call. [optional]

Return type

V1JobList

Authorization

No authorization required

HTTP request headers

  • Content-Type: /
  • Accept: application/json, application/yaml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

patch_namespaced_job

V1Job patch_namespaced_job(body, namespace, name, pretty=pretty)

partially update the specified Job

Example

import time
import lib_openshift
from lib_openshift.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = lib_openshift.ApisBatchV1()
body = lib_openshift.UnversionedPatch() # UnversionedPatch | 
namespace = 'namespace_example' # str | object name and auth scope, such as for teams and projects
name = 'name_example' # str | name of the Job
pretty = 'pretty_example' # str | If 'true', then the output is pretty printed. (optional)

try: 
    # partially update the specified Job
    api_response = api_instance.patch_namespaced_job(body, namespace, name, pretty=pretty)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApisBatchV1->patch_namespaced_job: %s\n" % e

Parameters

Name Type Description Notes
body UnversionedPatch
namespace str object name and auth scope, such as for teams and projects
name str name of the Job
pretty str If 'true', then the output is pretty printed. [optional]

Return type

V1Job

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json-patch+json, application/merge-patch+json, application/strategic-merge-patch+json
  • Accept: application/json, application/yaml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

replace_namespaced_job

V1Job replace_namespaced_job(body, namespace, name, pretty=pretty)

replace the specified Job

Example

import time
import lib_openshift
from lib_openshift.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = lib_openshift.ApisBatchV1()
body = lib_openshift.V1Job() # V1Job | 
namespace = 'namespace_example' # str | object name and auth scope, such as for teams and projects
name = 'name_example' # str | name of the Job
pretty = 'pretty_example' # str | If 'true', then the output is pretty printed. (optional)

try: 
    # replace the specified Job
    api_response = api_instance.replace_namespaced_job(body, namespace, name, pretty=pretty)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApisBatchV1->replace_namespaced_job: %s\n" % e

Parameters

Name Type Description Notes
body V1Job
namespace str object name and auth scope, such as for teams and projects
name str name of the Job
pretty str If 'true', then the output is pretty printed. [optional]

Return type

V1Job

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json, application/yaml

[Back to top] [Back to API list] [Back to Model list] [Back to README]

watch_namespaced_watch_job

JsonWatchEvent watch_namespaced_watch_job(namespace, name, pretty=pretty, label_selector=label_selector, field_selector=field_selector, watch=watch, resource_version=resource_version, timeout_seconds=timeout_seconds)

watch changes to an object of kind Job

Example

import time
import lib_openshift
from lib_openshift.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = lib_openshift.ApisBatchV1()
namespace = 'namespace_example' # str | object name and auth scope, such as for teams and projects
name = 'name_example' # str | name of the Job
pretty = 'pretty_example' # str | If 'true', then the output is pretty printed. (optional)
label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
watch = true # bool | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
resource_version = 'resource_version_example' # str | When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. (optional)
timeout_seconds = 56 # int | Timeout for the list/watch call. (optional)

try: 
    # watch changes to an object of kind Job
    api_response = api_instance.watch_namespaced_watch_job(namespace, name, pretty=pretty, label_selector=label_selector, field_selector=field_selector, watch=watch, resource_version=resource_version, timeout_seconds=timeout_seconds)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApisBatchV1->watch_namespaced_watch_job: %s\n" % e

Parameters

Name Type Description Notes
namespace str object name and auth scope, such as for teams and projects
name str name of the Job
pretty str If 'true', then the output is pretty printed. [optional]
label_selector str A selector to restrict the list of returned objects by their labels. Defaults to everything. [optional]
field_selector str A selector to restrict the list of returned objects by their fields. Defaults to everything. [optional]
watch bool Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. [optional]
resource_version str When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. [optional]
timeout_seconds int Timeout for the list/watch call. [optional]

Return type

JsonWatchEvent

Authorization

No authorization required

HTTP request headers

  • Content-Type: /
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

watch_namespaced_watch_jobs

JsonWatchEvent watch_namespaced_watch_jobs(namespace, pretty=pretty, label_selector=label_selector, field_selector=field_selector, watch=watch, resource_version=resource_version, timeout_seconds=timeout_seconds)

watch individual changes to a list of Job

Example

import time
import lib_openshift
from lib_openshift.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = lib_openshift.ApisBatchV1()
namespace = 'namespace_example' # str | object name and auth scope, such as for teams and projects
pretty = 'pretty_example' # str | If 'true', then the output is pretty printed. (optional)
label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
watch = true # bool | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
resource_version = 'resource_version_example' # str | When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. (optional)
timeout_seconds = 56 # int | Timeout for the list/watch call. (optional)

try: 
    # watch individual changes to a list of Job
    api_response = api_instance.watch_namespaced_watch_jobs(namespace, pretty=pretty, label_selector=label_selector, field_selector=field_selector, watch=watch, resource_version=resource_version, timeout_seconds=timeout_seconds)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApisBatchV1->watch_namespaced_watch_jobs: %s\n" % e

Parameters

Name Type Description Notes
namespace str object name and auth scope, such as for teams and projects
pretty str If 'true', then the output is pretty printed. [optional]
label_selector str A selector to restrict the list of returned objects by their labels. Defaults to everything. [optional]
field_selector str A selector to restrict the list of returned objects by their fields. Defaults to everything. [optional]
watch bool Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. [optional]
resource_version str When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. [optional]
timeout_seconds int Timeout for the list/watch call. [optional]

Return type

JsonWatchEvent

Authorization

No authorization required

HTTP request headers

  • Content-Type: /
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

watch_watch_jobs

JsonWatchEvent watch_watch_jobs(pretty=pretty, label_selector=label_selector, field_selector=field_selector, watch=watch, resource_version=resource_version, timeout_seconds=timeout_seconds)

watch individual changes to a list of Job

Example

import time
import lib_openshift
from lib_openshift.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = lib_openshift.ApisBatchV1()
pretty = 'pretty_example' # str | If 'true', then the output is pretty printed. (optional)
label_selector = 'label_selector_example' # str | A selector to restrict the list of returned objects by their labels. Defaults to everything. (optional)
field_selector = 'field_selector_example' # str | A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
watch = true # bool | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. (optional)
resource_version = 'resource_version_example' # str | When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. (optional)
timeout_seconds = 56 # int | Timeout for the list/watch call. (optional)

try: 
    # watch individual changes to a list of Job
    api_response = api_instance.watch_watch_jobs(pretty=pretty, label_selector=label_selector, field_selector=field_selector, watch=watch, resource_version=resource_version, timeout_seconds=timeout_seconds)
    pprint(api_response)
except ApiException as e:
    print "Exception when calling ApisBatchV1->watch_watch_jobs: %s\n" % e

Parameters

Name Type Description Notes
pretty str If 'true', then the output is pretty printed. [optional]
label_selector str A selector to restrict the list of returned objects by their labels. Defaults to everything. [optional]
field_selector str A selector to restrict the list of returned objects by their fields. Defaults to everything. [optional]
watch bool Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. [optional]
resource_version str When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. [optional]
timeout_seconds int Timeout for the list/watch call. [optional]

Return type

JsonWatchEvent

Authorization

No authorization required

HTTP request headers

  • Content-Type: /
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]