Skip to content

Commit 057a49d

Browse files
Releasing version 2.122.1
Co-authored-by: Harsh Kumar <h.harsh.kumar@oracle.com>
1 parent bf24157 commit 057a49d

File tree

294 files changed

+17991
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

294 files changed

+17991
-7
lines changed

index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,3 +240,4 @@ export import resourceanalytics = require("oci-resourceanalytics");
240240
export import iot = require("oci-iot");
241241
export import dif = require("oci-dif");
242242
export import psa = require("oci-psa");
243+
export import batch = require("oci-batch");

lib/batch/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
# OCI NodeJS client for Batch Service
3+
4+
This module enables you to write code to manage resources for Batch Service.
5+
6+
## Requirements
7+
8+
To use this module, you must have the following:
9+
10+
- An Oracle Cloud Infrastructure account.
11+
- A user created in that account, in a group with a policy that grants the desired permissions. This can be a user for yourself, or another person/system that needs to call the API. For an example of how to set up a new user, group, compartment, and policy, see [Adding Users](https://docs.cloud.oracle.com/en-us/iaas/Content/GSG/Tasks/addingusers.htm). For a list of typical policies you may want to use, see [Common Policies](https://docs.cloud.oracle.com/en-us/iaas/Content/Identity/Concepts/commonpolicies.htm).
12+
- A key pair used for signing API requests, with the public key uploaded to Oracle. Only the user calling the API should be in possession of the private key. For more information, see [Configuring Credentials](https://docs.cloud.oracle.com/en-us/iaas/Content/API/SDKDocs/typescriptsdkgettingstarted.htm#Configure)
13+
14+
## Installing
15+
16+
Use the following command to install this module:
17+
18+
```
19+
npm install oci-batch
20+
```
21+
22+
Alternatively you can git clone this repo.

lib/batch/index.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* Batch API
3+
* Use the Batch Control Plane API to encapsulate and manage all aspects of computationally intensive jobs.
4+
* OpenAPI spec version: 20251031
5+
*
6+
*
7+
* NOTE: This class is auto generated by OracleSDKGenerator.
8+
* Do not edit the class manually.
9+
*
10+
* Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
11+
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
12+
*/
13+
14+
import * as requests from "./lib/request";
15+
import * as models from "./lib/model";
16+
import * as responses from "./lib/response";
17+
import * as client from "./lib/client";
18+
import * as batchcomputing_waiter from "./lib/batchcomputing-waiter";
19+
20+
export { models };
21+
export { requests };
22+
export { responses };
23+
export import BatchComputingClient = client.BatchComputingClient;
24+
export import BatchComputingWaiter = batchcomputing_waiter.BatchComputingWaiter;
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
/**
2+
* Batch API
3+
* Use the Batch Control Plane API to encapsulate and manage all aspects of computationally intensive jobs.
4+
* OpenAPI spec version: 20251031
5+
*
6+
*
7+
* NOTE: This class is auto generated by OracleSDKGenerator.
8+
* Do not edit the class manually.
9+
*
10+
* Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
11+
* This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
12+
*/
13+
14+
import * as serviceRequests from "./request";
15+
import * as serviceResponses from "./response";
16+
import * as models from "./model";
17+
import { BatchComputingClient } from "./client";
18+
import { genericWaiter, genericTerminalConditionWaiter, WaiterConfiguration } from "oci-common";
19+
20+
export class BatchComputingWaiter {
21+
public constructor(
22+
private client: BatchComputingClient,
23+
private readonly config?: WaiterConfiguration
24+
) {}
25+
26+
/**
27+
* Waits forBatchContext till it reaches any of the provided states
28+
*
29+
* @param request the request to send
30+
* @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states
31+
* @return response returns GetBatchContextResponse | null (null in case of 404 response)
32+
*/
33+
public async forBatchContext(
34+
request: serviceRequests.GetBatchContextRequest,
35+
...targetStates: models.BatchContext.LifecycleState[]
36+
): Promise<serviceResponses.GetBatchContextResponse | null> {
37+
return genericTerminalConditionWaiter(
38+
this.config,
39+
() => this.client.getBatchContext(request),
40+
response => targetStates.includes(response.batchContext.lifecycleState!),
41+
targetStates.includes(models.BatchContext.LifecycleState.Deleted)
42+
);
43+
}
44+
45+
/**
46+
* Waits forBatchJob till it reaches any of the provided states
47+
*
48+
* @param request the request to send
49+
* @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states
50+
* @return response returns GetBatchJobResponse
51+
*/
52+
public async forBatchJob(
53+
request: serviceRequests.GetBatchJobRequest,
54+
...targetStates: models.BatchJob.LifecycleState[]
55+
): Promise<serviceResponses.GetBatchJobResponse> {
56+
return genericWaiter(
57+
this.config,
58+
() => this.client.getBatchJob(request),
59+
response => targetStates.includes(response.batchJob.lifecycleState!)
60+
);
61+
}
62+
63+
/**
64+
* Waits forBatchJobPool till it reaches any of the provided states
65+
*
66+
* @param request the request to send
67+
* @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states
68+
* @return response returns GetBatchJobPoolResponse | null (null in case of 404 response)
69+
*/
70+
public async forBatchJobPool(
71+
request: serviceRequests.GetBatchJobPoolRequest,
72+
...targetStates: models.BatchJobPool.LifecycleState[]
73+
): Promise<serviceResponses.GetBatchJobPoolResponse | null> {
74+
return genericTerminalConditionWaiter(
75+
this.config,
76+
() => this.client.getBatchJobPool(request),
77+
response => targetStates.includes(response.batchJobPool.lifecycleState!),
78+
targetStates.includes(models.BatchJobPool.LifecycleState.Deleted)
79+
);
80+
}
81+
82+
/**
83+
* Waits forBatchTask till it reaches any of the provided states
84+
*
85+
* @param request the request to send
86+
* @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states
87+
* @return response returns GetBatchTaskResponse
88+
*/
89+
public async forBatchTask(
90+
request: serviceRequests.GetBatchTaskRequest,
91+
...targetStates: models.BatchTask.LifecycleState[]
92+
): Promise<serviceResponses.GetBatchTaskResponse> {
93+
return genericWaiter(
94+
this.config,
95+
() => this.client.getBatchTask(request),
96+
response => targetStates.includes(response.batchTask.lifecycleState!)
97+
);
98+
}
99+
100+
/**
101+
* Waits forBatchTaskEnvironment till it reaches any of the provided states
102+
*
103+
* @param request the request to send
104+
* @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states
105+
* @return response returns GetBatchTaskEnvironmentResponse | null (null in case of 404 response)
106+
*/
107+
public async forBatchTaskEnvironment(
108+
request: serviceRequests.GetBatchTaskEnvironmentRequest,
109+
...targetStates: models.BatchTaskEnvironment.LifecycleState[]
110+
): Promise<serviceResponses.GetBatchTaskEnvironmentResponse | null> {
111+
return genericTerminalConditionWaiter(
112+
this.config,
113+
() => this.client.getBatchTaskEnvironment(request),
114+
response => targetStates.includes(response.batchTaskEnvironment.lifecycleState!),
115+
targetStates.includes(models.BatchTaskEnvironment.LifecycleState.Deleted)
116+
);
117+
}
118+
119+
/**
120+
* Waits forBatchTaskProfile till it reaches any of the provided states
121+
*
122+
* @param request the request to send
123+
* @param targetStates the desired states to wait for. The waiter will return once the resource reaches any of the provided states
124+
* @return response returns GetBatchTaskProfileResponse | null (null in case of 404 response)
125+
*/
126+
public async forBatchTaskProfile(
127+
request: serviceRequests.GetBatchTaskProfileRequest,
128+
...targetStates: models.BatchTaskProfile.LifecycleState[]
129+
): Promise<serviceResponses.GetBatchTaskProfileResponse | null> {
130+
return genericTerminalConditionWaiter(
131+
this.config,
132+
() => this.client.getBatchTaskProfile(request),
133+
response => targetStates.includes(response.batchTaskProfile.lifecycleState!),
134+
targetStates.includes(models.BatchTaskProfile.LifecycleState.Deleted)
135+
);
136+
}
137+
138+
/**
139+
* Waits forWorkRequest
140+
*
141+
* @param request the request to send
142+
* @return response returns GetWorkRequestResponse
143+
*/
144+
public async forWorkRequest(
145+
request: serviceRequests.GetWorkRequestRequest
146+
): Promise<serviceResponses.GetWorkRequestResponse> {
147+
return genericWaiter(
148+
this.config,
149+
() => this.client.getWorkRequest(request),
150+
response => (response.workRequest.timeFinished ? true : false)
151+
);
152+
}
153+
}

0 commit comments

Comments
 (0)