Skip to content

Commit 43217b5

Browse files
fix(kafka-mgmt/v1): update kafka-mgmt/v1 SDK (#376)
Co-authored-by: app-services-ci <app-services-ci@users.noreply.github.com>
1 parent 443dbe7 commit 43217b5

13 files changed

Lines changed: 1164 additions & 0 deletions

.openapi/kas-fleet-manager.yaml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -896,6 +896,79 @@ paths:
896896
$ref: '#/components/examples/500Example'
897897
parameters:
898898
- $ref: "#/components/parameters/id"
899+
/api/kafkas_mgmt/v1/clusters:
900+
post:
901+
description: Register enterprise OSD cluster
902+
operationId: registerEnterpriseOsdCluster
903+
requestBody:
904+
description: Enterprise OSD cluster details
905+
content:
906+
application/json:
907+
schema:
908+
$ref: '#/components/schemas/EnterpriseOsdClusterPayload'
909+
examples:
910+
USRegion:
911+
$ref: '#/components/examples/USRegionExample'
912+
required: true
913+
responses:
914+
"200":
915+
content:
916+
application/json:
917+
schema:
918+
$ref: '#/components/schemas/KafkaRequest' # change me
919+
examples:
920+
KafkaRequestPostResponseExample:
921+
$ref: '#/components/examples/KafkaRequestExample' # change me
922+
description: Enterprise cluster registered
923+
"400":
924+
content:
925+
application/json:
926+
schema:
927+
$ref: '#/components/schemas/Error'
928+
examples:
929+
400InvalidClusterIdExample:
930+
$ref: '#/components/examples/400InvalidClusterIdExample'
931+
400MInvalidExternalClusterIdExample:
932+
$ref: '#/components/examples/400MInvalidExternalClusterIdExample'
933+
description: Validation errors occurred
934+
"401":
935+
content:
936+
application/json:
937+
schema:
938+
$ref: '#/components/schemas/Error'
939+
examples:
940+
401Example:
941+
$ref: '#/components/examples/401Example'
942+
description: Auth token is invalid
943+
"403":
944+
content:
945+
application/json:
946+
schema:
947+
$ref: '#/components/schemas/Error'
948+
examples:
949+
403Example:
950+
$ref: '#/components/examples/403Example'
951+
description: User is not authorized to access the service
952+
"409":
953+
content:
954+
application/json:
955+
schema:
956+
$ref: '#/components/schemas/Error'
957+
examples:
958+
409ClusterIdConflictExample:
959+
$ref: '#/components/examples/409ClusterIdConflictExample'
960+
description: A conflict has been detected in the creation of this resource
961+
"500":
962+
content:
963+
application/json:
964+
schema:
965+
$ref: '#/components/schemas/Error'
966+
examples:
967+
500Example:
968+
$ref: '#/components/examples/500Example'
969+
description: An unexpected error occurred while registering Enterprise cluster
970+
security:
971+
- Bearer: [ ]
899972

900973
components:
901974
schemas:
@@ -1549,6 +1622,48 @@ components:
15491622
description: Whether connection reauthentication is enabled or not. If set to true, connection reauthentication on the Kafka instance will be required every 5 minutes.
15501623
type: boolean
15511624
nullable: true
1625+
EnterpriseOsdClusterPayload:
1626+
description: Schema for the request body sent to /clusters POST
1627+
required:
1628+
- cluster_id
1629+
- cluster_external_id
1630+
- cluster_ingress_dns_name
1631+
type: object
1632+
properties:
1633+
cluster_id:
1634+
description: OSD cluster ID
1635+
type: string
1636+
cluster_external_id:
1637+
description: external cluster ID. Can be obtained from the response JSON of ocm get /api/clusters_mgmt/v1/clusters/<cluster_id>
1638+
type: string
1639+
cluster_ingress_dns_name:
1640+
description: dns name of the cluster. Can be obtained from the response JSON of the /api/clusters_mgmt/v1/clusters/<cluster_id>/ingresses (dns_name)
1641+
type: string
1642+
EnterpriseCluster:
1643+
description: Enterprise cluster registration endpoint response
1644+
allOf:
1645+
- type: object
1646+
properties:
1647+
cluster_id:
1648+
description: 'ocm cluster id of the registered Enterprise cluster'
1649+
type: string
1650+
status:
1651+
description: 'status of registered Enterprise cluster'
1652+
type: string
1653+
fleetshard_parameters:
1654+
type: array
1655+
items:
1656+
allOf:
1657+
- $ref: "#/components/schemas/FleetshardParameter"
1658+
1659+
FleetshardParameter:
1660+
description: "Fleetshard parameter consumed by enterprise cluster"
1661+
type: object
1662+
properties:
1663+
id:
1664+
type: string
1665+
value:
1666+
type: string
15521667

15531668
parameters:
15541669
id:
@@ -1945,6 +2060,22 @@ components:
19452060
code: "KAFKAS-MGMT-21"
19462061
reason: "missing path parameter: kafka id"
19472062
operation_id: "1lWDGuybIrEnxrAem724gqkkiDv"
2063+
400InvalidClusterIdExample:
2064+
value:
2065+
id: "45"
2066+
kind: "Error"
2067+
href: "/api/kafkas_mgmt/v1/errors/45"
2068+
code: "KAFKAS-MGMT-45"
2069+
reason: "Enterprise cluster ID is invalid"
2070+
operation_id: "1lWDGuybIrEnxrAem724gqkkiDv"
2071+
400MInvalidExternalClusterIdExample:
2072+
value:
2073+
id: "46"
2074+
kind: "Error"
2075+
href: "/api/kafkas_mgmt/v1/errors/46"
2076+
code: "KAFKAS-MGMT-46"
2077+
reason: "Enterprise external cluster ID is invalid"
2078+
operation_id: "1lWDGuybIrEnxrAem724gqkkiDv"
19482079
404Example:
19492080
value:
19502081
id: "7"
@@ -2000,6 +2131,14 @@ components:
20002131
code: "KAFKAS-MGMT-36"
20012132
reason: "Kafka cluster name is already used"
20022133
operation_id: "6kY0UiEkzkXCzWPeI2oYehd3ED"
2134+
409ClusterIdConflictExample:
2135+
value:
2136+
id: "44"
2137+
kind: "Error"
2138+
href: "/api/kafkas_mgmt/v1/errors/44"
2139+
code: "KAFKAS-MGMT-44"
2140+
reason: "Enterprise cluster ID is already used"
2141+
operation_id: "6kY0UiEkzkXCzWPeI2oYehd3ED"
20032142
500Example:
20042143
value:
20052144
id: "9"

packages/kafka-management-sdk/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ Class | Method | HTTP request | Description
129129
*DefaultApi* | [**getMetricsByInstantQuery**](docs/DefaultApi.md#getMetricsByInstantQuery) | **GET** /api/kafkas_mgmt/v1/kafkas/{id}/metrics/query |
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 |
132+
*DefaultApi* | [**registerEnterpriseOsdCluster**](docs/DefaultApi.md#registerEnterpriseOsdCluster) | **POST** /api/kafkas_mgmt/v1/clusters |
132133
*DefaultApi* | [**updateKafkaById**](docs/DefaultApi.md#updateKafkaById) | **PATCH** /api/kafkas_mgmt/v1/kafkas/{id} |
133134
*ErrorsApi* | [**getErrorById**](docs/ErrorsApi.md#getErrorById) | **GET** /api/kafkas_mgmt/v1/errors/{id} |
134135
*ErrorsApi* | [**getErrors**](docs/ErrorsApi.md#getErrors) | **GET** /api/kafkas_mgmt/v1/errors |
@@ -148,9 +149,13 @@ Class | Method | HTTP request | Description
148149
- [CloudRegion](docs/CloudRegion.md)
149150
- [CloudRegionList](docs/CloudRegionList.md)
150151
- [CloudRegionListAllOf](docs/CloudRegionListAllOf.md)
152+
- [EnterpriseCluster](docs/EnterpriseCluster.md)
153+
- [EnterpriseClusterAllOf](docs/EnterpriseClusterAllOf.md)
154+
- [EnterpriseOsdClusterPayload](docs/EnterpriseOsdClusterPayload.md)
151155
- [Error](docs/Error.md)
152156
- [ErrorList](docs/ErrorList.md)
153157
- [ErrorListAllOf](docs/ErrorListAllOf.md)
158+
- [FleetshardParameter](docs/FleetshardParameter.md)
154159
- [InstantQuery](docs/InstantQuery.md)
155160
- [KafkaRequest](docs/KafkaRequest.md)
156161
- [KafkaRequestAllOf](docs/KafkaRequestAllOf.md)

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

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,6 +1199,81 @@ paths:
11991199
security:
12001200
- Bearer: []
12011201
x-accepts: application/json
1202+
/api/kafkas_mgmt/v1/clusters:
1203+
post:
1204+
description: Register enterprise OSD cluster
1205+
operationId: registerEnterpriseOsdCluster
1206+
requestBody:
1207+
content:
1208+
application/json:
1209+
examples:
1210+
USRegion:
1211+
$ref: '#/components/examples/USRegionExample'
1212+
schema:
1213+
$ref: '#/components/schemas/EnterpriseOsdClusterPayload'
1214+
description: Enterprise OSD cluster details
1215+
required: true
1216+
responses:
1217+
"200":
1218+
content:
1219+
application/json:
1220+
examples:
1221+
KafkaRequestPostResponseExample:
1222+
$ref: '#/components/examples/KafkaRequestExample'
1223+
schema:
1224+
$ref: '#/components/schemas/KafkaRequest'
1225+
description: Enterprise cluster registered
1226+
"400":
1227+
content:
1228+
application/json:
1229+
examples:
1230+
"400InvalidClusterIdExample":
1231+
$ref: '#/components/examples/400InvalidClusterIdExample'
1232+
"400MInvalidExternalClusterIdExample":
1233+
$ref: '#/components/examples/400MInvalidExternalClusterIdExample'
1234+
schema:
1235+
$ref: '#/components/schemas/Error'
1236+
description: Validation errors occurred
1237+
"401":
1238+
content:
1239+
application/json:
1240+
examples:
1241+
"401Example":
1242+
$ref: '#/components/examples/401Example'
1243+
schema:
1244+
$ref: '#/components/schemas/Error'
1245+
description: Auth token is invalid
1246+
"403":
1247+
content:
1248+
application/json:
1249+
examples:
1250+
"403Example":
1251+
$ref: '#/components/examples/403Example'
1252+
schema:
1253+
$ref: '#/components/schemas/Error'
1254+
description: User is not authorized to access the service
1255+
"409":
1256+
content:
1257+
application/json:
1258+
examples:
1259+
"409ClusterIdConflictExample":
1260+
$ref: '#/components/examples/409ClusterIdConflictExample'
1261+
schema:
1262+
$ref: '#/components/schemas/Error'
1263+
description: A conflict has been detected in the creation of this resource
1264+
"500":
1265+
content:
1266+
application/json:
1267+
examples:
1268+
"500Example":
1269+
$ref: '#/components/examples/500Example'
1270+
schema:
1271+
$ref: '#/components/schemas/Error'
1272+
description: An unexpected error occurred while registering Enterprise cluster
1273+
security:
1274+
- Bearer: []
1275+
x-contentType: application/json
1276+
x-accepts: application/json
12021277
components:
12031278
examples:
12041279
USRegionExample:
@@ -1435,6 +1510,22 @@ components:
14351510
code: KAFKAS-MGMT-21
14361511
reason: 'missing path parameter: kafka id'
14371512
operation_id: 1lWDGuybIrEnxrAem724gqkkiDv
1513+
"400InvalidClusterIdExample":
1514+
value:
1515+
id: "45"
1516+
kind: Error
1517+
href: /api/kafkas_mgmt/v1/errors/45
1518+
code: KAFKAS-MGMT-45
1519+
reason: Enterprise cluster ID is invalid
1520+
operation_id: 1lWDGuybIrEnxrAem724gqkkiDv
1521+
"400MInvalidExternalClusterIdExample":
1522+
value:
1523+
id: "46"
1524+
kind: Error
1525+
href: /api/kafkas_mgmt/v1/errors/46
1526+
code: KAFKAS-MGMT-46
1527+
reason: Enterprise external cluster ID is invalid
1528+
operation_id: 1lWDGuybIrEnxrAem724gqkkiDv
14381529
"404Example":
14391530
value:
14401531
id: "7"
@@ -1491,6 +1582,14 @@ components:
14911582
code: KAFKAS-MGMT-36
14921583
reason: Kafka cluster name is already used
14931584
operation_id: 6kY0UiEkzkXCzWPeI2oYehd3ED
1585+
"409ClusterIdConflictExample":
1586+
value:
1587+
id: "44"
1588+
kind: Error
1589+
href: /api/kafkas_mgmt/v1/errors/44
1590+
code: KAFKAS-MGMT-44
1591+
reason: Enterprise cluster ID is already used
1592+
operation_id: 6kY0UiEkzkXCzWPeI2oYehd3ED
14941593
"500Example":
14951594
value:
14961595
id: "9"
@@ -2100,6 +2199,41 @@ components:
21002199
nullable: true
21012200
type: boolean
21022201
type: object
2202+
EnterpriseOsdClusterPayload:
2203+
description: Schema for the request body sent to /clusters POST
2204+
example:
2205+
cluster_id: cluster_id
2206+
cluster_external_id: cluster_external_id
2207+
cluster_ingress_dns_name: cluster_ingress_dns_name
2208+
properties:
2209+
cluster_id:
2210+
description: OSD cluster ID
2211+
type: string
2212+
cluster_external_id:
2213+
description: external cluster ID. Can be obtained from the response JSON
2214+
of ocm get /api/clusters_mgmt/v1/clusters/<cluster_id>
2215+
type: string
2216+
cluster_ingress_dns_name:
2217+
description: dns name of the cluster. Can be obtained from the response
2218+
JSON of the /api/clusters_mgmt/v1/clusters/<cluster_id>/ingresses (dns_name)
2219+
type: string
2220+
required:
2221+
- cluster_external_id
2222+
- cluster_id
2223+
- cluster_ingress_dns_name
2224+
type: object
2225+
EnterpriseCluster:
2226+
allOf:
2227+
- $ref: '#/components/schemas/EnterpriseCluster_allOf'
2228+
description: Enterprise cluster registration endpoint response
2229+
FleetshardParameter:
2230+
description: Fleetshard parameter consumed by enterprise cluster
2231+
properties:
2232+
id:
2233+
type: string
2234+
value:
2235+
type: string
2236+
type: object
21032237
ErrorList_allOf:
21042238
properties:
21052239
items:
@@ -2355,6 +2489,20 @@ components:
23552489
- $ref: '#/components/schemas/InstantQuery'
23562490
type: array
23572491
type: object
2492+
EnterpriseCluster_allOf:
2493+
properties:
2494+
cluster_id:
2495+
description: ocm cluster id of the registered Enterprise cluster
2496+
type: string
2497+
status:
2498+
description: status of registered Enterprise cluster
2499+
type: string
2500+
fleetshard_parameters:
2501+
items:
2502+
allOf:
2503+
- $ref: '#/components/schemas/FleetshardParameter'
2504+
type: array
2505+
type: object
23582506
securitySchemes:
23592507
Bearer:
23602508
bearerFormat: JWT

0 commit comments

Comments
 (0)