Skip to content

Latest commit

 

History

History
378 lines (270 loc) · 13.3 KB

File metadata and controls

378 lines (270 loc) · 13.3 KB

openapi.api.InstancesApi

Load the API package

import 'package:openapi/api.dart';

All URIs are relative to https://cloud.lambda.ai

Method HTTP request Description
getInstance GET /api/v1/instances/{id} Retrieve instance details
launchInstance POST /api/v1/instance-operations/launch Launch instances
listInstanceTypes GET /api/v1/instance-types List available instance types
listInstances GET /api/v1/instances List running instances
postInstance POST /api/v1/instances/{id} Update instance details
restartInstance POST /api/v1/instance-operations/restart Restart instances
terminateInstance POST /api/v1/instance-operations/terminate Terminate instances

getInstance

GetInstance200Response getInstance(id)

Retrieve instance details

Retrieves the details of a specific instance, including whether or not the instance is running.

Example

import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
// TODO Configure HTTP Bearer authorization: bearerAuth
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearerAuth').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearerAuth').setAccessToken(yourTokenGeneratorFunction);

final api_instance = InstancesApi();
final id = 0920582c7ff041399e34823a0be62549; // String | The unique identifier (ID) of the instance

try {
    final result = api_instance.getInstance(id);
    print(result);
} catch (e) {
    print('Exception when calling InstancesApi->getInstance: $e\n');
}

Parameters

Name Type Description Notes
id String The unique identifier (ID) of the instance

Return type

GetInstance200Response

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

launchInstance

LaunchInstance200Response launchInstance(instanceLaunchRequest)

Launch instances

Launches a Lambda On-Demand Cloud instance.

Example

import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
// TODO Configure HTTP Bearer authorization: bearerAuth
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearerAuth').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearerAuth').setAccessToken(yourTokenGeneratorFunction);

final api_instance = InstancesApi();
final instanceLaunchRequest = InstanceLaunchRequest(); // InstanceLaunchRequest | 

try {
    final result = api_instance.launchInstance(instanceLaunchRequest);
    print(result);
} catch (e) {
    print('Exception when calling InstancesApi->launchInstance: $e\n');
}

Parameters

Name Type Description Notes
instanceLaunchRequest InstanceLaunchRequest

Return type

LaunchInstance200Response

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listInstanceTypes

ListInstanceTypes200Response listInstanceTypes()

List available instance types

Retrieves a list of the instance types currently offered on Lambda's public cloud, as well as details about each type. Details include resource specifications, pricing, and regional availability.

Example

import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
// TODO Configure HTTP Bearer authorization: bearerAuth
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearerAuth').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearerAuth').setAccessToken(yourTokenGeneratorFunction);

final api_instance = InstancesApi();

try {
    final result = api_instance.listInstanceTypes();
    print(result);
} catch (e) {
    print('Exception when calling InstancesApi->listInstanceTypes: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

ListInstanceTypes200Response

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

listInstances

ListInstances200Response listInstances()

List running instances

Retrieves a list of your running instances.

Example

import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
// TODO Configure HTTP Bearer authorization: bearerAuth
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearerAuth').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearerAuth').setAccessToken(yourTokenGeneratorFunction);

final api_instance = InstancesApi();

try {
    final result = api_instance.listInstances();
    print(result);
} catch (e) {
    print('Exception when calling InstancesApi->listInstances: $e\n');
}

Parameters

This endpoint does not need any parameter.

Return type

ListInstances200Response

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

postInstance

GetInstance200Response postInstance(id, instanceModificationRequest)

Update instance details

Updates the details of the specified instance.

Example

import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
// TODO Configure HTTP Bearer authorization: bearerAuth
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearerAuth').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearerAuth').setAccessToken(yourTokenGeneratorFunction);

final api_instance = InstancesApi();
final id = 0920582c7ff041399e34823a0be62549; // String | The unique identifier (ID) of the instance
final instanceModificationRequest = InstanceModificationRequest(); // InstanceModificationRequest | 

try {
    final result = api_instance.postInstance(id, instanceModificationRequest);
    print(result);
} catch (e) {
    print('Exception when calling InstancesApi->postInstance: $e\n');
}

Parameters

Name Type Description Notes
id String The unique identifier (ID) of the instance
instanceModificationRequest InstanceModificationRequest

Return type

GetInstance200Response

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

restartInstance

RestartInstance200Response restartInstance(instanceRestartRequest)

Restart instances

Restarts one or more instances.

Example

import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
// TODO Configure HTTP Bearer authorization: bearerAuth
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearerAuth').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearerAuth').setAccessToken(yourTokenGeneratorFunction);

final api_instance = InstancesApi();
final instanceRestartRequest = InstanceRestartRequest(); // InstanceRestartRequest | 

try {
    final result = api_instance.restartInstance(instanceRestartRequest);
    print(result);
} catch (e) {
    print('Exception when calling InstancesApi->restartInstance: $e\n');
}

Parameters

Name Type Description Notes
instanceRestartRequest InstanceRestartRequest

Return type

RestartInstance200Response

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

terminateInstance

TerminateInstance200Response terminateInstance(instanceTerminateRequest)

Terminate instances

Terminates one or more instances.

Example

import 'package:openapi/api.dart';
// TODO Configure HTTP basic authorization: basicAuth
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').username = 'YOUR_USERNAME'
//defaultApiClient.getAuthentication<HttpBasicAuth>('basicAuth').password = 'YOUR_PASSWORD';
// TODO Configure HTTP Bearer authorization: bearerAuth
// Case 1. Use String Token
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearerAuth').setAccessToken('YOUR_ACCESS_TOKEN');
// Case 2. Use Function which generate token.
// String yourTokenGeneratorFunction() { ... }
//defaultApiClient.getAuthentication<HttpBearerAuth>('bearerAuth').setAccessToken(yourTokenGeneratorFunction);

final api_instance = InstancesApi();
final instanceTerminateRequest = InstanceTerminateRequest(); // InstanceTerminateRequest | 

try {
    final result = api_instance.terminateInstance(instanceTerminateRequest);
    print(result);
} catch (e) {
    print('Exception when calling InstancesApi->terminateInstance: $e\n');
}

Parameters

Name Type Description Notes
instanceTerminateRequest InstanceTerminateRequest

Return type

TerminateInstance200Response

Authorization

basicAuth, bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]