BatchV1Api
All URIs are relative to http://localhost
Cron Job
| Method | HTTP request | Description |
|---|---|---|
| createNamespacedCronJob | POST /apis/batch/v1/namespaces/{namespace}/cronjobs | create a CronJob |
| readNamespacedCronJob | GET /apis/batch/v1/namespaces/{namespace}/cronjobs/{name} | read the specified CronJob |
| listNamespacedCronJob | GET /apis/batch/v1/namespaces/{namespace}/cronjobs | list or watch objects of kind CronJob |
| readNamespacedCronJobStatus | GET /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status | read status of the specified CronJob |
| listCronJobForAllNamespaces | GET /apis/batch/v1/cronjobs | list or watch objects of kind CronJob |
| patchNamespacedCronJob | PATCH /apis/batch/v1/namespaces/{namespace}/cronjobs/{name} | partially update the specified CronJob |
| patchNamespacedCronJobStatus | PATCH /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status | partially update status of the specified CronJob |
| replaceNamespacedCronJob | PUT /apis/batch/v1/namespaces/{namespace}/cronjobs/{name} | replace the specified CronJob |
| deleteCollectionNamespacedCronJob | DELETE /apis/batch/v1/namespaces/{namespace}/cronjobs | delete collection of CronJob |
| deleteNamespacedCronJob | DELETE /apis/batch/v1/namespaces/{namespace}/cronjobs/{name} | delete a CronJob |
| replaceNamespacedCronJobStatus | PUT /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status | replace status of the specified CronJob |
Job
| Method | HTTP request | Description |
|---|---|---|
| createNamespacedJob | POST /apis/batch/v1/namespaces/{namespace}/jobs | create a Job |
| readNamespacedJob | GET /apis/batch/v1/namespaces/{namespace}/jobs/{name} | read the specified Job |
| listNamespacedJob | GET /apis/batch/v1/namespaces/{namespace}/jobs | list or watch objects of kind Job |
| readNamespacedJobStatus | GET /apis/batch/v1/namespaces/{namespace}/jobs/{name}/status | read status of the specified Job |
| listJobForAllNamespaces | GET /apis/batch/v1/jobs | list or watch objects of kind Job |
| patchNamespacedJob | PATCH /apis/batch/v1/namespaces/{namespace}/jobs/{name} | partially update the specified Job |
| patchNamespacedJobStatus | PATCH /apis/batch/v1/namespaces/{namespace}/jobs/{name}/status | partially update status of the specified Job |
| replaceNamespacedJob | PUT /apis/batch/v1/namespaces/{namespace}/jobs/{name} | replace the specified Job |
| deleteCollectionNamespacedJob | DELETE /apis/batch/v1/namespaces/{namespace}/jobs | delete collection of Job |
| deleteNamespacedJob | DELETE /apis/batch/v1/namespaces/{namespace}/jobs/{name} | delete a Job |
| replaceNamespacedJobStatus | PUT /apis/batch/v1/namespaces/{namespace}/jobs/{name}/status | replace status of the specified Job |
APIResources
| Method | HTTP request | Description |
|---|---|---|
| getAPIResources | GET /apis/batch/v1/ | get available resources |
Cron Job
createNamespacedCronJob
V1CronJob createNamespacedCronJob(body)
create a CronJob
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiCreateNamespacedCronJobRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiCreateNamespacedCronJobRequest = {
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
body: { apiVersion: "batch/v1", kind: "CronJob", metadata: { name: "example" }, spec: { schedule: "*/5 * * * *", jobTemplate: { spec: { template: { spec: { containers: [{ name: "job", image: "busybox", command: ["echo", "hello"] }], restartPolicy: "Never" } } } } } }, // See full type: /models/workloads#v1cronjob,
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional)
fieldManager: "fieldManager_example",
// ...1 more optional parameter(s)
};
const data = await apiInstance.createNamespacedCronJob(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | V1CronJob | ||
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldManager | [string] | fieldManager is a name associated with the actor or entity that is making these changes. More info | (optional) defaults to undefined |
| fieldValidation | [string] | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. More info | (optional) defaults to undefined |
Return type
readNamespacedCronJob
V1CronJob readNamespacedCronJob()
read the specified CronJob
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiReadNamespacedCronJobRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiReadNamespacedCronJobRequest = {
// name of the CronJob
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
};
const data = await apiInstance.readNamespacedCronJob(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the CronJob | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
Return type
listNamespacedCronJob
V1CronJobList listNamespacedCronJob()
list or watch objects of kind CronJob
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiListNamespacedCronJobRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiListNamespacedCronJobRequest = {
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional)
allowWatchBookmarks: true,
// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional)
_continue: "continue_example",
// ...8 more optional parameter(s)
};
const data = await apiInstance.listNamespacedCronJob(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| allowWatchBookmarks | [boolean] | allowWatchBookmarks requests watch events with type "BOOKMARK". More info | (optional) defaults to undefined |
| _continue | [string] | The continue option should be set when retrieving more results from the server. More info | (optional) defaults to undefined |
| fieldSelector | [string] | A selector to restrict the list of returned objects by their fields. Defaults to everything. More info | (optional) defaults to undefined |
| labelSelector | [string] | A selector to restrict the list of returned objects by their labels. Defaults to everything. More info | (optional) defaults to undefined |
| limit | [number] | limit is a maximum number of responses to return for a list call. More info | (optional) defaults to undefined |
| resourceVersion | [string] | resourceVersion sets a constraint on what resource versions a request may be served from. More info | (optional) defaults to undefined |
| resourceVersionMatch | [string] | resourceVersionMatch determines how resourceVersion is applied to list calls. More info | (optional) defaults to undefined |
| sendInitialEvents | [boolean] | sendInitialEvents=true may be set together with watch=true. More info | (optional) defaults to undefined |
| timeoutSeconds | [number] | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. More info | (optional) defaults to undefined |
| watch | [boolean] | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. More info | (optional) defaults to undefined |
Return type
readNamespacedCronJobStatus
V1CronJob readNamespacedCronJobStatus()
read status of the specified CronJob
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiReadNamespacedCronJobStatusRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiReadNamespacedCronJobStatusRequest = {
// name of the CronJob
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
};
const data = await apiInstance.readNamespacedCronJobStatus(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the CronJob | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
Return type
listCronJobForAllNamespaces
V1CronJobList listCronJobForAllNamespaces()
list or watch objects of kind CronJob
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiListCronJobForAllNamespacesRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiListCronJobForAllNamespacesRequest = {
// allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional)
allowWatchBookmarks: true,
// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional)
_continue: "continue_example",
// A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
fieldSelector: "fieldSelector_example",
// ...8 more optional parameter(s)
};
const data = await apiInstance.listCronJobForAllNamespaces(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| allowWatchBookmarks | [boolean] | allowWatchBookmarks requests watch events with type "BOOKMARK". More info | (optional) defaults to undefined |
| _continue | [string] | The continue option should be set when retrieving more results from the server. More info | (optional) defaults to undefined |
| fieldSelector | [string] | A selector to restrict the list of returned objects by their fields. Defaults to everything. More info | (optional) defaults to undefined |
| labelSelector | [string] | A selector to restrict the list of returned objects by their labels. Defaults to everything. More info | (optional) defaults to undefined |
| limit | [number] | limit is a maximum number of responses to return for a list call. More info | (optional) defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| resourceVersion | [string] | resourceVersion sets a constraint on what resource versions a request may be served from. More info | (optional) defaults to undefined |
| resourceVersionMatch | [string] | resourceVersionMatch determines how resourceVersion is applied to list calls. More info | (optional) defaults to undefined |
| sendInitialEvents | [boolean] | sendInitialEvents=true may be set together with watch=true. More info | (optional) defaults to undefined |
| timeoutSeconds | [number] | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. More info | (optional) defaults to undefined |
| watch | [boolean] | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. More info | (optional) defaults to undefined |
Return type
patchNamespacedCronJob
V1CronJob patchNamespacedCronJob(body)
partially update the specified CronJob
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiPatchNamespacedCronJobRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiPatchNamespacedCronJobRequest = {
// name of the CronJob
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
body: { /* See type definition in parameter table */ },
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional)
fieldManager: "fieldManager_example",
// ...2 more optional parameter(s)
};
const data = await apiInstance.patchNamespacedCronJob(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | any | ||
| name | [string] | name of the CronJob | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldManager | [string] | fieldManager is a name associated with the actor or entity that is making these changes. More info | (optional) defaults to undefined |
| fieldValidation | [string] | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. More info | (optional) defaults to undefined |
| force | [boolean] | Force is going to "force" Apply requests. More info | (optional) defaults to undefined |
Return type
patchNamespacedCronJobStatus
V1CronJob patchNamespacedCronJobStatus(body)
partially update status of the specified CronJob
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiPatchNamespacedCronJobStatusRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiPatchNamespacedCronJobStatusRequest = {
// name of the CronJob
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
body: { /* See type definition in parameter table */ },
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional)
fieldManager: "fieldManager_example",
// ...2 more optional parameter(s)
};
const data = await apiInstance.patchNamespacedCronJobStatus(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | any | ||
| name | [string] | name of the CronJob | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldManager | [string] | fieldManager is a name associated with the actor or entity that is making these changes. More info | (optional) defaults to undefined |
| fieldValidation | [string] | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. More info | (optional) defaults to undefined |
| force | [boolean] | Force is going to "force" Apply requests. More info | (optional) defaults to undefined |
Return type
replaceNamespacedCronJob
V1CronJob replaceNamespacedCronJob(body)
replace the specified CronJob
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiReplaceNamespacedCronJobRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiReplaceNamespacedCronJobRequest = {
// name of the CronJob
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
body: { apiVersion: "batch/v1", kind: "CronJob", metadata: { name: "example" }, spec: { schedule: "*/5 * * * *", jobTemplate: { spec: { template: { spec: { containers: [{ name: "job", image: "busybox", command: ["echo", "hello"] }], restartPolicy: "Never" } } } } } }, // See full type: /models/workloads#v1cronjob,
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional)
fieldManager: "fieldManager_example",
// ...1 more optional parameter(s)
};
const data = await apiInstance.replaceNamespacedCronJob(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | V1CronJob | ||
| name | [string] | name of the CronJob | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldManager | [string] | fieldManager is a name associated with the actor or entity that is making these changes. More info | (optional) defaults to undefined |
| fieldValidation | [string] | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. More info | (optional) defaults to undefined |
Return type
deleteCollectionNamespacedCronJob
V1Status deleteCollectionNamespacedCronJob()
delete collection of CronJob
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiDeleteCollectionNamespacedCronJobRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiDeleteCollectionNamespacedCronJobRequest = {
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional)
_continue: "continue_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
body: { /* See V1DeleteOptions: /models/other#v1deleteoptions */ },
// ...11 more optional parameter(s)
};
const data = await apiInstance.deleteCollectionNamespacedCronJob(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | V1DeleteOptions | ||
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| _continue | [string] | The continue option should be set when retrieving more results from the server. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldSelector | [string] | A selector to restrict the list of returned objects by their fields. Defaults to everything. More info | (optional) defaults to undefined |
| gracePeriodSeconds | [number] | The duration in seconds before the object should be deleted. More info | (optional) defaults to undefined |
| ignoreStoreReadErrorWithClusterBreakingPotential | [boolean] | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. More info | (optional) defaults to undefined |
| labelSelector | [string] | A selector to restrict the list of returned objects by their labels. Defaults to everything. More info | (optional) defaults to undefined |
| limit | [number] | limit is a maximum number of responses to return for a list call. More info | (optional) defaults to undefined |
| orphanDependents | [boolean] | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. More info | (optional) defaults to undefined |
| propagationPolicy | [string] | Whether and how garbage collection will be performed. More info | (optional) defaults to undefined |
| resourceVersion | [string] | resourceVersion sets a constraint on what resource versions a request may be served from. More info | (optional) defaults to undefined |
| resourceVersionMatch | [string] | resourceVersionMatch determines how resourceVersion is applied to list calls. More info | (optional) defaults to undefined |
| sendInitialEvents | [boolean] | sendInitialEvents=true may be set together with watch=true. More info | (optional) defaults to undefined |
| timeoutSeconds | [number] | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. More info | (optional) defaults to undefined |
Return type
deleteNamespacedCronJob
V1Status deleteNamespacedCronJob()
delete a CronJob
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiDeleteNamespacedCronJobRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiDeleteNamespacedCronJobRequest = {
// name of the CronJob
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional)
gracePeriodSeconds: 1,
body: { /* See V1DeleteOptions: /models/other#v1deleteoptions */ },
// ...3 more optional parameter(s)
};
const data = await apiInstance.deleteNamespacedCronJob(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | V1DeleteOptions | ||
| name | [string] | name of the CronJob | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| gracePeriodSeconds | [number] | The duration in seconds before the object should be deleted. More info | (optional) defaults to undefined |
| ignoreStoreReadErrorWithClusterBreakingPotential | [boolean] | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. More info | (optional) defaults to undefined |
| orphanDependents | [boolean] | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. More info | (optional) defaults to undefined |
| propagationPolicy | [string] | Whether and how garbage collection will be performed. More info | (optional) defaults to undefined |
Return type
replaceNamespacedCronJobStatus
V1CronJob replaceNamespacedCronJobStatus(body)
replace status of the specified CronJob
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiReplaceNamespacedCronJobStatusRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiReplaceNamespacedCronJobStatusRequest = {
// name of the CronJob
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
body: { apiVersion: "batch/v1", kind: "CronJob", metadata: { name: "example" }, spec: { schedule: "*/5 * * * *", jobTemplate: { spec: { template: { spec: { containers: [{ name: "job", image: "busybox", command: ["echo", "hello"] }], restartPolicy: "Never" } } } } } }, // See full type: /models/workloads#v1cronjob,
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional)
fieldManager: "fieldManager_example",
// ...1 more optional parameter(s)
};
const data = await apiInstance.replaceNamespacedCronJobStatus(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | V1CronJob | ||
| name | [string] | name of the CronJob | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldManager | [string] | fieldManager is a name associated with the actor or entity that is making these changes. More info | (optional) defaults to undefined |
| fieldValidation | [string] | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. More info | (optional) defaults to undefined |
Return type
Job
createNamespacedJob
V1Job createNamespacedJob(body)
create a Job
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiCreateNamespacedJobRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiCreateNamespacedJobRequest = {
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
body: { apiVersion: "batch/v1", kind: "Job", metadata: { name: "example" }, spec: { template: { spec: { containers: [{ name: "job", image: "busybox", command: ["echo", "hello"] }], restartPolicy: "Never" } } } }, // See full type: /models/workloads#v1job,
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional)
fieldManager: "fieldManager_example",
// ...1 more optional parameter(s)
};
const data = await apiInstance.createNamespacedJob(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | V1Job | ||
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldManager | [string] | fieldManager is a name associated with the actor or entity that is making these changes. More info | (optional) defaults to undefined |
| fieldValidation | [string] | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. More info | (optional) defaults to undefined |
Return type
readNamespacedJob
V1Job readNamespacedJob()
read the specified Job
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiReadNamespacedJobRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiReadNamespacedJobRequest = {
// name of the Job
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
};
const data = await apiInstance.readNamespacedJob(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the Job | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
Return type
listNamespacedJob
V1JobList listNamespacedJob()
list or watch objects of kind Job
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiListNamespacedJobRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiListNamespacedJobRequest = {
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional)
allowWatchBookmarks: true,
// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional)
_continue: "continue_example",
// ...8 more optional parameter(s)
};
const data = await apiInstance.listNamespacedJob(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| allowWatchBookmarks | [boolean] | allowWatchBookmarks requests watch events with type "BOOKMARK". More info | (optional) defaults to undefined |
| _continue | [string] | The continue option should be set when retrieving more results from the server. More info | (optional) defaults to undefined |
| fieldSelector | [string] | A selector to restrict the list of returned objects by their fields. Defaults to everything. More info | (optional) defaults to undefined |
| labelSelector | [string] | A selector to restrict the list of returned objects by their labels. Defaults to everything. More info | (optional) defaults to undefined |
| limit | [number] | limit is a maximum number of responses to return for a list call. More info | (optional) defaults to undefined |
| resourceVersion | [string] | resourceVersion sets a constraint on what resource versions a request may be served from. More info | (optional) defaults to undefined |
| resourceVersionMatch | [string] | resourceVersionMatch determines how resourceVersion is applied to list calls. More info | (optional) defaults to undefined |
| sendInitialEvents | [boolean] | sendInitialEvents=true may be set together with watch=true. More info | (optional) defaults to undefined |
| timeoutSeconds | [number] | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. More info | (optional) defaults to undefined |
| watch | [boolean] | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. More info | (optional) defaults to undefined |
Return type
readNamespacedJobStatus
V1Job readNamespacedJobStatus()
read status of the specified Job
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiReadNamespacedJobStatusRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiReadNamespacedJobStatusRequest = {
// name of the Job
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
};
const data = await apiInstance.readNamespacedJobStatus(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | [string] | name of the Job | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
Return type
listJobForAllNamespaces
V1JobList listJobForAllNamespaces()
list or watch objects of kind Job
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiListJobForAllNamespacesRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiListJobForAllNamespacesRequest = {
// allowWatchBookmarks requests watch events with type \"BOOKMARK\". Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server\'s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. (optional)
allowWatchBookmarks: true,
// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional)
_continue: "continue_example",
// A selector to restrict the list of returned objects by their fields. Defaults to everything. (optional)
fieldSelector: "fieldSelector_example",
// ...8 more optional parameter(s)
};
const data = await apiInstance.listJobForAllNamespaces(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| allowWatchBookmarks | [boolean] | allowWatchBookmarks requests watch events with type "BOOKMARK". More info | (optional) defaults to undefined |
| _continue | [string] | The continue option should be set when retrieving more results from the server. More info | (optional) defaults to undefined |
| fieldSelector | [string] | A selector to restrict the list of returned objects by their fields. Defaults to everything. More info | (optional) defaults to undefined |
| labelSelector | [string] | A selector to restrict the list of returned objects by their labels. Defaults to everything. More info | (optional) defaults to undefined |
| limit | [number] | limit is a maximum number of responses to return for a list call. More info | (optional) defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| resourceVersion | [string] | resourceVersion sets a constraint on what resource versions a request may be served from. More info | (optional) defaults to undefined |
| resourceVersionMatch | [string] | resourceVersionMatch determines how resourceVersion is applied to list calls. More info | (optional) defaults to undefined |
| sendInitialEvents | [boolean] | sendInitialEvents=true may be set together with watch=true. More info | (optional) defaults to undefined |
| timeoutSeconds | [number] | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. More info | (optional) defaults to undefined |
| watch | [boolean] | Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. More info | (optional) defaults to undefined |
Return type
patchNamespacedJob
V1Job patchNamespacedJob(body)
partially update the specified Job
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiPatchNamespacedJobRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiPatchNamespacedJobRequest = {
// name of the Job
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
body: { /* See type definition in parameter table */ },
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional)
fieldManager: "fieldManager_example",
// ...2 more optional parameter(s)
};
const data = await apiInstance.patchNamespacedJob(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | any | ||
| name | [string] | name of the Job | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldManager | [string] | fieldManager is a name associated with the actor or entity that is making these changes. More info | (optional) defaults to undefined |
| fieldValidation | [string] | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. More info | (optional) defaults to undefined |
| force | [boolean] | Force is going to "force" Apply requests. More info | (optional) defaults to undefined |
Return type
patchNamespacedJobStatus
V1Job patchNamespacedJobStatus(body)
partially update status of the specified Job
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiPatchNamespacedJobStatusRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiPatchNamespacedJobStatusRequest = {
// name of the Job
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
body: { /* See type definition in parameter table */ },
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch). (optional)
fieldManager: "fieldManager_example",
// ...2 more optional parameter(s)
};
const data = await apiInstance.patchNamespacedJobStatus(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | any | ||
| name | [string] | name of the Job | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldManager | [string] | fieldManager is a name associated with the actor or entity that is making these changes. More info | (optional) defaults to undefined |
| fieldValidation | [string] | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. More info | (optional) defaults to undefined |
| force | [boolean] | Force is going to "force" Apply requests. More info | (optional) defaults to undefined |
Return type
replaceNamespacedJob
V1Job replaceNamespacedJob(body)
replace the specified Job
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiReplaceNamespacedJobRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiReplaceNamespacedJobRequest = {
// name of the Job
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
body: { apiVersion: "batch/v1", kind: "Job", metadata: { name: "example" }, spec: { template: { spec: { containers: [{ name: "job", image: "busybox", command: ["echo", "hello"] }], restartPolicy: "Never" } } } }, // See full type: /models/workloads#v1job,
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional)
fieldManager: "fieldManager_example",
// ...1 more optional parameter(s)
};
const data = await apiInstance.replaceNamespacedJob(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | V1Job | ||
| name | [string] | name of the Job | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldManager | [string] | fieldManager is a name associated with the actor or entity that is making these changes. More info | (optional) defaults to undefined |
| fieldValidation | [string] | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. More info | (optional) defaults to undefined |
Return type
deleteCollectionNamespacedJob
V1Status deleteCollectionNamespacedJob()
delete collection of Job
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiDeleteCollectionNamespacedJobRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiDeleteCollectionNamespacedJobRequest = {
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the \"next key\". This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications. (optional)
_continue: "continue_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
body: { /* See V1DeleteOptions: /models/other#v1deleteoptions */ },
// ...11 more optional parameter(s)
};
const data = await apiInstance.deleteCollectionNamespacedJob(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | V1DeleteOptions | ||
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| _continue | [string] | The continue option should be set when retrieving more results from the server. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldSelector | [string] | A selector to restrict the list of returned objects by their fields. Defaults to everything. More info | (optional) defaults to undefined |
| gracePeriodSeconds | [number] | The duration in seconds before the object should be deleted. More info | (optional) defaults to undefined |
| ignoreStoreReadErrorWithClusterBreakingPotential | [boolean] | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. More info | (optional) defaults to undefined |
| labelSelector | [string] | A selector to restrict the list of returned objects by their labels. Defaults to everything. More info | (optional) defaults to undefined |
| limit | [number] | limit is a maximum number of responses to return for a list call. More info | (optional) defaults to undefined |
| orphanDependents | [boolean] | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. More info | (optional) defaults to undefined |
| propagationPolicy | [string] | Whether and how garbage collection will be performed. More info | (optional) defaults to undefined |
| resourceVersion | [string] | resourceVersion sets a constraint on what resource versions a request may be served from. More info | (optional) defaults to undefined |
| resourceVersionMatch | [string] | resourceVersionMatch determines how resourceVersion is applied to list calls. More info | (optional) defaults to undefined |
| sendInitialEvents | [boolean] | sendInitialEvents=true may be set together with watch=true. More info | (optional) defaults to undefined |
| timeoutSeconds | [number] | Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity. More info | (optional) defaults to undefined |
Return type
deleteNamespacedJob
V1Status deleteNamespacedJob()
delete a Job
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiDeleteNamespacedJobRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiDeleteNamespacedJobRequest = {
// name of the Job
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// The duration in seconds before the object should be deleted. Value must be non-negative integer. The value zero indicates delete immediately. If this value is nil, the default grace period for the specified type will be used. Defaults to a per object value if not specified. zero means delete immediately. (optional)
gracePeriodSeconds: 1,
body: { /* See V1DeleteOptions: /models/other#v1deleteoptions */ },
// ...3 more optional parameter(s)
};
const data = await apiInstance.deleteNamespacedJob(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | V1DeleteOptions | ||
| name | [string] | name of the Job | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| gracePeriodSeconds | [number] | The duration in seconds before the object should be deleted. More info | (optional) defaults to undefined |
| ignoreStoreReadErrorWithClusterBreakingPotential | [boolean] | if set to true, it will trigger an unsafe deletion of the resource in case the normal deletion flow fails with a corrupt object error. More info | (optional) defaults to undefined |
| orphanDependents | [boolean] | Deprecated: please use the PropagationPolicy, this field will be deprecated in 1.7. More info | (optional) defaults to undefined |
| propagationPolicy | [string] | Whether and how garbage collection will be performed. More info | (optional) defaults to undefined |
Return type
replaceNamespacedJobStatus
V1Job replaceNamespacedJobStatus(body)
replace status of the specified Job
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
import type { BatchV1ApiReplaceNamespacedJobStatusRequest } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request: BatchV1ApiReplaceNamespacedJobStatusRequest = {
// name of the Job
name: "name_example",
// object name and auth scope, such as for teams and projects
namespace: "namespace_example",
body: { apiVersion: "batch/v1", kind: "Job", metadata: { name: "example" }, spec: { template: { spec: { containers: [{ name: "job", image: "busybox", command: ["echo", "hello"] }], restartPolicy: "Never" } } } }, // See full type: /models/workloads#v1job,
// If \'true\', then the output is pretty printed. Defaults to \'false\' unless the user-agent indicates a browser or command-line HTTP tool (curl and wget). (optional)
pretty: "pretty_example",
// When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed (optional)
dryRun: "dryRun_example",
// fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint. (optional)
fieldManager: "fieldManager_example",
// ...1 more optional parameter(s)
};
const data = await apiInstance.replaceNamespacedJobStatus(request);
console.log('API called successfully. Returned data:', data);
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| body | V1Job | ||
| name | [string] | name of the Job | defaults to undefined |
| namespace | [string] | object name and auth scope, such as for teams and projects | defaults to undefined |
| pretty | [string] | If 'true', then the output is pretty printed. More info | (optional) defaults to undefined |
| dryRun | [string] | When present, indicates that modifications should not be persisted. More info | (optional) defaults to undefined |
| fieldManager | [string] | fieldManager is a name associated with the actor or entity that is making these changes. More info | (optional) defaults to undefined |
| fieldValidation | [string] | fieldValidation instructs the server on how to handle objects in the request (POST/PUT/PATCH) containing unknown or duplicate fields. More info | (optional) defaults to undefined |
Return type
APIResources
getAPIResources
V1APIResourceList getAPIResources()
get available resources
Example
import { createConfiguration, BatchV1Api } from '@kubernetes/client-node';
const configuration = createConfiguration();
const apiInstance = new BatchV1Api(configuration);
const request = {};
const data = await apiInstance.getAPIResources(request);
console.log('API called successfully. Returned data:', data);
Parameters
This endpoint does not need any parameter.