Skip to content

Commit fb04569

Browse files
fix(kafka-mgmt/v1): update kafka-mgmt/v1 SDK (#389)
Co-authored-by: app-services-ci <app-services-ci@users.noreply.github.com>
1 parent 26dd7e7 commit fb04569

5 files changed

Lines changed: 307 additions & 7 deletions

File tree

.openapi/kas-fleet-manager.yaml

Lines changed: 84 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -977,8 +977,8 @@ paths:
977977
examples:
978978
400InvalidClusterIdExample:
979979
$ref: '#/components/examples/400InvalidClusterIdExample'
980-
400MInvalidExternalClusterIdExample:
981-
$ref: '#/components/examples/400MInvalidExternalClusterIdExample'
980+
400InvalidExternalClusterIdExample:
981+
$ref: '#/components/examples/400InvalidExternalClusterIdExample'
982982
description: Validation errors occurred
983983
"401":
984984
content:
@@ -1019,7 +1019,87 @@ paths:
10191019
security:
10201020
- Bearer: [ ]
10211021
tags:
1022-
- enterprise-dataplane-clusters
1022+
- enterprise-dataplane-clusters
1023+
/api/kafkas_mgmt/v1/clusters/{id}:
1024+
delete:
1025+
tags:
1026+
- enterprise-dataplane-clusters
1027+
operationId: deleteEnterpriseClusterById
1028+
parameters:
1029+
- in: query
1030+
name: async
1031+
description: Perform the action in an asynchronous manner
1032+
schema:
1033+
type: boolean
1034+
required: true
1035+
- in: query
1036+
name: force
1037+
description: |-
1038+
When provided with value: true - enterprise cluster will be deleted alongside all kafkas present on the cluster.
1039+
When skipped and enterprise cluster has any kafkas associated with it, the request will fail.
1040+
schema:
1041+
type: boolean
1042+
required: false
1043+
- in: path
1044+
name: id
1045+
description: ID of the enterprise data plane cluster
1046+
schema:
1047+
type: string
1048+
required: true
1049+
responses:
1050+
"202":
1051+
content:
1052+
application/json:
1053+
schema:
1054+
$ref: '#/components/schemas/Error'
1055+
description: Enterprise cluster deletion accepted
1056+
"400":
1057+
content:
1058+
application/json:
1059+
schema:
1060+
$ref: '#/components/schemas/Error'
1061+
examples:
1062+
400DeletionExample:
1063+
$ref: '#/components/examples/400DeletionExample'
1064+
description: Validation errors occurred
1065+
"401":
1066+
content:
1067+
application/json:
1068+
schema:
1069+
$ref: '#/components/schemas/Error'
1070+
examples:
1071+
401Example:
1072+
$ref: '#/components/examples/401Example'
1073+
description: Auth token is invalid
1074+
"403":
1075+
content:
1076+
application/json:
1077+
schema:
1078+
$ref: '#/components/schemas/Error'
1079+
examples:
1080+
403Example:
1081+
$ref: '#/components/examples/403Example'
1082+
description: User not authorized to access the service
1083+
"404":
1084+
content:
1085+
application/json:
1086+
schema:
1087+
$ref: '#/components/schemas/Error'
1088+
examples:
1089+
404DeleteExample:
1090+
$ref: '#/components/examples/404DeleteExample'
1091+
description: No Enterprise cluster with specified ID exists
1092+
"500":
1093+
content:
1094+
application/json:
1095+
schema:
1096+
$ref: '#/components/schemas/Error'
1097+
examples:
1098+
500DeleteExample:
1099+
$ref: '#/components/examples/500DeleteExample'
1100+
description: Unexpected error occurred
1101+
security:
1102+
- Bearer: [ ]
10231103

10241104
components:
10251105
schemas:
@@ -2166,7 +2246,7 @@ components:
21662246
code: "KAFKAS-MGMT-45"
21672247
reason: "Enterprise cluster ID is invalid"
21682248
operation_id: "1lWDGuybIrEnxrAem724gqkkiDv"
2169-
400MInvalidExternalClusterIdExample:
2249+
400InvalidExternalClusterIdExample:
21702250
value:
21712251
id: "46"
21722252
kind: "Error"

packages/kafka-management-sdk/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ Class | Method | HTTP request | Description
130130
*DefaultApi* | [**getMetricsByRangeQuery**](docs/DefaultApi.md#getMetricsByRangeQuery) | **GET** /api/kafkas_mgmt/v1/kafkas/{id}/metrics/query_range |
131131
*DefaultApi* | [**getVersionMetadata**](docs/DefaultApi.md#getVersionMetadata) | **GET** /api/kafkas_mgmt/v1 |
132132
*DefaultApi* | [**updateKafkaById**](docs/DefaultApi.md#updateKafkaById) | **PATCH** /api/kafkas_mgmt/v1/kafkas/{id} |
133+
*EnterpriseDataplaneClustersApi* | [**deleteEnterpriseClusterById**](docs/EnterpriseDataplaneClustersApi.md#deleteEnterpriseClusterById) | **DELETE** /api/kafkas_mgmt/v1/clusters/{id} |
133134
*EnterpriseDataplaneClustersApi* | [**getEnterpriseOsdClusters**](docs/EnterpriseDataplaneClustersApi.md#getEnterpriseOsdClusters) | **GET** /api/kafkas_mgmt/v1/clusters |
134135
*EnterpriseDataplaneClustersApi* | [**registerEnterpriseOsdCluster**](docs/EnterpriseDataplaneClustersApi.md#registerEnterpriseOsdCluster) | **POST** /api/kafkas_mgmt/v1/clusters |
135136
*ErrorsApi* | [**getErrorById**](docs/ErrorsApi.md#getErrorById) | **GET** /api/kafkas_mgmt/v1/errors/{id} |

packages/kafka-management-sdk/api/openapi.yaml

Lines changed: 90 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,8 +1279,8 @@ paths:
12791279
examples:
12801280
"400InvalidClusterIdExample":
12811281
$ref: '#/components/examples/400InvalidClusterIdExample'
1282-
"400MInvalidExternalClusterIdExample":
1283-
$ref: '#/components/examples/400MInvalidExternalClusterIdExample'
1282+
"400InvalidExternalClusterIdExample":
1283+
$ref: '#/components/examples/400InvalidExternalClusterIdExample'
12841284
schema:
12851285
$ref: '#/components/schemas/Error'
12861286
description: Validation errors occurred
@@ -1326,6 +1326,93 @@ paths:
13261326
- enterprise-dataplane-clusters
13271327
x-contentType: application/json
13281328
x-accepts: application/json
1329+
/api/kafkas_mgmt/v1/clusters/{id}:
1330+
delete:
1331+
operationId: deleteEnterpriseClusterById
1332+
parameters:
1333+
- description: Perform the action in an asynchronous manner
1334+
explode: true
1335+
in: query
1336+
name: async
1337+
required: true
1338+
schema:
1339+
type: boolean
1340+
style: form
1341+
- description: |-
1342+
When provided with value: true - enterprise cluster will be deleted alongside all kafkas present on the cluster.
1343+
When skipped and enterprise cluster has any kafkas associated with it, the request will fail.
1344+
explode: true
1345+
in: query
1346+
name: force
1347+
required: false
1348+
schema:
1349+
type: boolean
1350+
style: form
1351+
- description: ID of the enterprise data plane cluster
1352+
explode: false
1353+
in: path
1354+
name: id
1355+
required: true
1356+
schema:
1357+
type: string
1358+
style: simple
1359+
responses:
1360+
"202":
1361+
content:
1362+
application/json:
1363+
schema:
1364+
$ref: '#/components/schemas/Error'
1365+
description: Enterprise cluster deletion accepted
1366+
"400":
1367+
content:
1368+
application/json:
1369+
examples:
1370+
"400DeletionExample":
1371+
$ref: '#/components/examples/400DeletionExample'
1372+
schema:
1373+
$ref: '#/components/schemas/Error'
1374+
description: Validation errors occurred
1375+
"401":
1376+
content:
1377+
application/json:
1378+
examples:
1379+
"401Example":
1380+
$ref: '#/components/examples/401Example'
1381+
schema:
1382+
$ref: '#/components/schemas/Error'
1383+
description: Auth token is invalid
1384+
"403":
1385+
content:
1386+
application/json:
1387+
examples:
1388+
"403Example":
1389+
$ref: '#/components/examples/403Example'
1390+
schema:
1391+
$ref: '#/components/schemas/Error'
1392+
description: User not authorized to access the service
1393+
"404":
1394+
content:
1395+
application/json:
1396+
examples:
1397+
"404DeleteExample":
1398+
$ref: '#/components/examples/404DeleteExample'
1399+
schema:
1400+
$ref: '#/components/schemas/Error'
1401+
description: No Enterprise cluster with specified ID exists
1402+
"500":
1403+
content:
1404+
application/json:
1405+
examples:
1406+
"500DeleteExample":
1407+
$ref: '#/components/examples/500DeleteExample'
1408+
schema:
1409+
$ref: '#/components/schemas/Error'
1410+
description: Unexpected error occurred
1411+
security:
1412+
- Bearer: []
1413+
tags:
1414+
- enterprise-dataplane-clusters
1415+
x-accepts: application/json
13291416
components:
13301417
examples:
13311418
USRegionExample:
@@ -1577,7 +1664,7 @@ components:
15771664
code: KAFKAS-MGMT-45
15781665
reason: Enterprise cluster ID is invalid
15791666
operation_id: 1lWDGuybIrEnxrAem724gqkkiDv
1580-
"400MInvalidExternalClusterIdExample":
1667+
"400InvalidExternalClusterIdExample":
15811668
value:
15821669
id: "46"
15831670
kind: Error

packages/kafka-management-sdk/docs/EnterpriseDataplaneClustersApi.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,90 @@ All URIs are relative to *https://api.openshift.com*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7+
[**deleteEnterpriseClusterById**](EnterpriseDataplaneClustersApi.md#deleteEnterpriseClusterById) | **DELETE** /api/kafkas_mgmt/v1/clusters/{id} |
78
[**getEnterpriseOsdClusters**](EnterpriseDataplaneClustersApi.md#getEnterpriseOsdClusters) | **GET** /api/kafkas_mgmt/v1/clusters |
89
[**registerEnterpriseOsdCluster**](EnterpriseDataplaneClustersApi.md#registerEnterpriseOsdCluster) | **POST** /api/kafkas_mgmt/v1/clusters |
910

1011

1112

13+
## deleteEnterpriseClusterById
14+
15+
> Error deleteEnterpriseClusterById(async, id, force)
16+
17+
18+
19+
### Example
20+
21+
```java
22+
// Import classes:
23+
import com.openshift.cloud.api.kas.invoker.ApiClient;
24+
import com.openshift.cloud.api.kas.invoker.ApiException;
25+
import com.openshift.cloud.api.kas.invoker.Configuration;
26+
import com.openshift.cloud.api.kas.invoker.auth.*;
27+
import com.openshift.cloud.api.kas.invoker.models.*;
28+
import com.openshift.cloud.api.kas.EnterpriseDataplaneClustersApi;
29+
30+
public class Example {
31+
public static void main(String[] args) {
32+
ApiClient defaultClient = Configuration.getDefaultApiClient();
33+
defaultClient.setBasePath("https://api.openshift.com");
34+
35+
// Configure HTTP bearer authorization: Bearer
36+
HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer");
37+
Bearer.setBearerToken("BEARER TOKEN");
38+
39+
EnterpriseDataplaneClustersApi apiInstance = new EnterpriseDataplaneClustersApi(defaultClient);
40+
Boolean async = true; // Boolean | Perform the action in an asynchronous manner
41+
String id = "id_example"; // String | ID of the enterprise data plane cluster
42+
Boolean force = true; // Boolean | When provided with value: true - enterprise cluster will be deleted alongside all kafkas present on the cluster. When skipped and enterprise cluster has any kafkas associated with it, the request will fail.
43+
try {
44+
Error result = apiInstance.deleteEnterpriseClusterById(async, id, force);
45+
System.out.println(result);
46+
} catch (ApiException e) {
47+
System.err.println("Exception when calling EnterpriseDataplaneClustersApi#deleteEnterpriseClusterById");
48+
System.err.println("Status code: " + e.getCode());
49+
System.err.println("Reason: " + e.getResponseBody());
50+
System.err.println("Response headers: " + e.getResponseHeaders());
51+
e.printStackTrace();
52+
}
53+
}
54+
}
55+
```
56+
57+
### Parameters
58+
59+
60+
Name | Type | Description | Notes
61+
------------- | ------------- | ------------- | -------------
62+
**async** | **Boolean**| Perform the action in an asynchronous manner |
63+
**id** | **String**| ID of the enterprise data plane cluster |
64+
**force** | **Boolean**| When provided with value: true - enterprise cluster will be deleted alongside all kafkas present on the cluster. When skipped and enterprise cluster has any kafkas associated with it, the request will fail. | [optional]
65+
66+
### Return type
67+
68+
[**Error**](Error.md)
69+
70+
### Authorization
71+
72+
[Bearer](../README.md#Bearer)
73+
74+
### HTTP request headers
75+
76+
- **Content-Type**: Not defined
77+
- **Accept**: application/json
78+
79+
80+
### HTTP response details
81+
| Status code | Description | Response headers |
82+
|-------------|-------------|------------------|
83+
| **202** | Enterprise cluster deletion accepted | - |
84+
| **400** | Validation errors occurred | - |
85+
| **401** | Auth token is invalid | - |
86+
| **403** | User not authorized to access the service | - |
87+
| **404** | No Enterprise cluster with specified ID exists | - |
88+
| **500** | Unexpected error occurred | - |
89+
90+
1291
## getEnterpriseOsdClusters
1392

1493
> EnterpriseClusterList getEnterpriseOsdClusters()

packages/kafka-management-sdk/src/main/java/com/openshift/cloud/api/kas/EnterpriseDataplaneClustersApi.java

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,59 @@ public void setApiClient(ApiClient apiClient) {
3737
this.apiClient = apiClient;
3838
}
3939

40+
/**
41+
*
42+
*
43+
* @param async Perform the action in an asynchronous manner (required)
44+
* @param id ID of the enterprise data plane cluster (required)
45+
* @param force When provided with value: true - enterprise cluster will be deleted alongside all kafkas present on the cluster. When skipped and enterprise cluster has any kafkas associated with it, the request will fail. (optional)
46+
* @return a {@code Error}
47+
* @throws ApiException if fails to make API call
48+
*/
49+
public Error deleteEnterpriseClusterById(Boolean async, String id, Boolean force) throws ApiException {
50+
Object localVarPostBody = null;
51+
52+
// verify the required parameter 'async' is set
53+
if (async == null) {
54+
throw new ApiException(400, "Missing the required parameter 'async' when calling deleteEnterpriseClusterById");
55+
}
56+
57+
// verify the required parameter 'id' is set
58+
if (id == null) {
59+
throw new ApiException(400, "Missing the required parameter 'id' when calling deleteEnterpriseClusterById");
60+
}
61+
62+
// create path and map variables
63+
String localVarPath = "/api/kafkas_mgmt/v1/clusters/{id}".replaceAll("\\{format\\}","json")
64+
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
65+
66+
// query params
67+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
68+
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
69+
Map<String, String> localVarCookieParams = new HashMap<String, String>();
70+
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
71+
72+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "async", async));
73+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "force", force));
74+
75+
76+
77+
78+
final String[] localVarAccepts = {
79+
"application/json"
80+
};
81+
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
82+
83+
final String[] localVarContentTypes = {
84+
85+
};
86+
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
87+
88+
String[] localVarAuthNames = new String[] { "Bearer" };
89+
90+
GenericType<Error> localVarReturnType = new GenericType<Error>() {};
91+
return apiClient.invokeAPI(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
92+
}
4093
/**
4194
*
4295
* List all Enterprise OSD clusters

0 commit comments

Comments
 (0)