Coroutine-native client covering the full Hanzo /v1 cloud surface, for JVM and Android. Generated with openapi-generator kotlin (library=jvm-okhttp4, useCoroutines=true). Coordinate: ai.hanzo:sdk. Base URL: https://api.hanzo.ai. Co-authored-by: Hanzo Dev <[email protected]>
9.7 KiB
RayApi
All URIs are relative to https://api.hanzo.ai
| Method | HTTP request | Description |
|---|---|---|
| engineCreateRayCluster | POST /v1/engine/ray/clusters | Create Ray cluster |
| engineDeleteRayCluster | DELETE /v1/engine/ray/clusters/{name} | Delete Ray cluster |
| engineGetRayCluster | GET /v1/engine/ray/clusters/{name} | Get Ray cluster |
| engineGetRayClusterStatus | GET /v1/engine/ray/clusters/{name}/status | Get Ray cluster status |
| engineGetRayDashboard | GET /v1/engine/ray/clusters/{name}/dashboard | Get Ray dashboard URL |
| engineListRayClusters | GET /v1/engine/ray/clusters | List Ray clusters |
| engineScaleRayCluster | PUT /v1/engine/ray/clusters/{name}/scale | Scale Ray workers |
engineCreateRayCluster
EngineRayCluster engineCreateRayCluster(engineRayClusterCreate)
Create Ray cluster
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = RayApi()
val engineRayClusterCreate : EngineRayClusterCreate = // EngineRayClusterCreate |
try {
val result : EngineRayCluster = apiInstance.engineCreateRayCluster(engineRayClusterCreate)
println(result)
} catch (e: ClientException) {
println("4xx response calling RayApi#engineCreateRayCluster")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling RayApi#engineCreateRayCluster")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| engineRayClusterCreate | EngineRayClusterCreate |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json
engineDeleteRayCluster
kotlin.Any engineDeleteRayCluster(name)
Delete Ray cluster
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = RayApi()
val name : kotlin.String = name_example // kotlin.String |
try {
val result : kotlin.Any = apiInstance.engineDeleteRayCluster(name)
println(result)
} catch (e: ClientException) {
println("4xx response calling RayApi#engineDeleteRayCluster")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling RayApi#engineDeleteRayCluster")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
engineGetRayCluster
EngineRayCluster engineGetRayCluster(name)
Get Ray cluster
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = RayApi()
val name : kotlin.String = name_example // kotlin.String |
try {
val result : EngineRayCluster = apiInstance.engineGetRayCluster(name)
println(result)
} catch (e: ClientException) {
println("4xx response calling RayApi#engineGetRayCluster")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling RayApi#engineGetRayCluster")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
engineGetRayClusterStatus
EngineRayCluster engineGetRayClusterStatus(name)
Get Ray cluster status
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = RayApi()
val name : kotlin.String = name_example // kotlin.String |
try {
val result : EngineRayCluster = apiInstance.engineGetRayClusterStatus(name)
println(result)
} catch (e: ClientException) {
println("4xx response calling RayApi#engineGetRayClusterStatus")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling RayApi#engineGetRayClusterStatus")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | kotlin.String |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
engineGetRayDashboard
EngineGetRayDashboard200Response engineGetRayDashboard(name)
Get Ray dashboard URL
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = RayApi()
val name : kotlin.String = name_example // kotlin.String |
try {
val result : EngineGetRayDashboard200Response = apiInstance.engineGetRayDashboard(name)
println(result)
} catch (e: ClientException) {
println("4xx response calling RayApi#engineGetRayDashboard")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling RayApi#engineGetRayDashboard")
e.printStackTrace()
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| name | kotlin.String |
Return type
EngineGetRayDashboard200Response
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
engineListRayClusters
EngineListRayClusters200Response engineListRayClusters(namespace, status)
List Ray clusters
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = RayApi()
val namespace : kotlin.String = namespace_example // kotlin.String |
val status : kotlin.String = status_example // kotlin.String |
try {
val result : EngineListRayClusters200Response = apiInstance.engineListRayClusters(namespace, status)
println(result)
} catch (e: ClientException) {
println("4xx response calling RayApi#engineListRayClusters")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling RayApi#engineListRayClusters")
e.printStackTrace()
}
Parameters
| namespace | kotlin.String| | [optional] |
| Name | Type | Description | Notes |
|---|---|---|---|
| status | kotlin.String | [optional] [enum: creating, running, suspended, failed, deleting] |
Return type
EngineListRayClusters200Response
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
engineScaleRayCluster
EngineRayCluster engineScaleRayCluster(name, engineRayClusterScale)
Scale Ray workers
Example
// Import classes:
//import ai.hanzo.sdk.infrastructure.*
//import ai.hanzo.sdk.models.*
val apiInstance = RayApi()
val name : kotlin.String = name_example // kotlin.String |
val engineRayClusterScale : EngineRayClusterScale = // EngineRayClusterScale |
try {
val result : EngineRayCluster = apiInstance.engineScaleRayCluster(name, engineRayClusterScale)
println(result)
} catch (e: ClientException) {
println("4xx response calling RayApi#engineScaleRayCluster")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling RayApi#engineScaleRayCluster")
e.printStackTrace()
}
Parameters
| name | kotlin.String| | |
| Name | Type | Description | Notes |
|---|---|---|---|
| engineRayClusterScale | EngineRayClusterScale |
Return type
Authorization
Configure bearerAuth statically:
ApiClient.accessToken = ""
Configure bearerAuth dynamically:
apiInstance.accessTokenProvider = { "" }
HTTP request headers
- Content-Type: application/json
- Accept: application/json