Skip to content

Latest commit

 

History

History
401 lines (278 loc) · 17.8 KB

InstanceActionsApi.md

File metadata and controls

401 lines (278 loc) · 17.8 KB

OpenAPI\Client\InstanceActionsApi

All URIs are relative to https://api.contabo.com, except if the operation defines another base path.

Method HTTP request Description
rescue() POST /v1/compute/instances/{instanceId}/actions/rescue Rescue a compute instance / resource identified by its id
resetPasswordAction() POST /v1/compute/instances/{instanceId}/actions/resetPassword Reset password for a compute instance / resource referenced by an id
restart() POST /v1/compute/instances/{instanceId}/actions/restart Restart a compute instance / resource identified by its id.
shutdown() POST /v1/compute/instances/{instanceId}/actions/shutdown Shutdown compute instance / resource by its id
start() POST /v1/compute/instances/{instanceId}/actions/start Start a compute instance / resource identified by its id
stop() POST /v1/compute/instances/{instanceId}/actions/stop Stop compute instance / resource by its id

rescue()

rescue($x_request_id, $instance_id, $instances_actions_rescue_request, $x_trace_id): \OpenAPI\Client\Model\InstanceRescueActionResponse

Rescue a compute instance / resource identified by its id

You can reboot your instance in rescue mode to resolve system issues. Rescue system is Linux based and its booted instead of your regular operating system. The disk containing your operating sytstem, software and your data is already mounted for you to access and repair/modify files. After a reboot your compute instance will boot your operating system. Please note that this is for advanced users.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: bearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\InstanceActionsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$x_request_id = 04e0f898-37b4-48bc-a794-1a57abe6aa31; // string | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
$instance_id = 12345; // int | The identifier of the compute instance / resource to be started in rescue mode.
$instances_actions_rescue_request = new \OpenAPI\Client\Model\InstancesActionsRescueRequest(); // \OpenAPI\Client\Model\InstancesActionsRescueRequest
$x_trace_id = 'x_trace_id_example'; // string | Identifier to trace group of requests.

try {
    $result = $apiInstance->rescue($x_request_id, $instance_id, $instances_actions_rescue_request, $x_trace_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstanceActionsApi->rescue: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
x_request_id string Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually.
instance_id int The identifier of the compute instance / resource to be started in rescue mode.
instances_actions_rescue_request \OpenAPI\Client\Model\InstancesActionsRescueRequest
x_trace_id string Identifier to trace group of requests. [optional]

Return type

\OpenAPI\Client\Model\InstanceRescueActionResponse

Authorization

bearer

HTTP request headers

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

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

resetPasswordAction()

resetPasswordAction($x_request_id, $instance_id, $instances_reset_password_actions_request, $x_trace_id): \OpenAPI\Client\Model\InstanceResetPasswordActionResponse

Reset password for a compute instance / resource referenced by an id

Reset password for a compute instance / resource referenced by an id. This will reset the current password to the password that you provided in the body of this request.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: bearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\InstanceActionsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$x_request_id = 04e0f898-37b4-48bc-a794-1a57abe6aa31; // string | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
$instance_id = 12345; // int | The identifier of the compute instance / resource to be started in rescue mode.
$instances_reset_password_actions_request = new \OpenAPI\Client\Model\InstancesResetPasswordActionsRequest(); // \OpenAPI\Client\Model\InstancesResetPasswordActionsRequest
$x_trace_id = 'x_trace_id_example'; // string | Identifier to trace group of requests.

try {
    $result = $apiInstance->resetPasswordAction($x_request_id, $instance_id, $instances_reset_password_actions_request, $x_trace_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstanceActionsApi->resetPasswordAction: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
x_request_id string Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually.
instance_id int The identifier of the compute instance / resource to be started in rescue mode.
instances_reset_password_actions_request \OpenAPI\Client\Model\InstancesResetPasswordActionsRequest
x_trace_id string Identifier to trace group of requests. [optional]

Return type

\OpenAPI\Client\Model\InstanceResetPasswordActionResponse

Authorization

bearer

HTTP request headers

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

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

restart()

restart($x_request_id, $instance_id, $x_trace_id): \OpenAPI\Client\Model\InstanceRestartActionResponse

Restart a compute instance / resource identified by its id.

To restart a compute instance that has been identified by its id, you should perform a restart action on it.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: bearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\InstanceActionsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$x_request_id = 04e0f898-37b4-48bc-a794-1a57abe6aa31; // string | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
$instance_id = 12345; // int | The identifier of the compute instance / resource to be started in rescue mode.
$x_trace_id = 'x_trace_id_example'; // string | Identifier to trace group of requests.

try {
    $result = $apiInstance->restart($x_request_id, $instance_id, $x_trace_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstanceActionsApi->restart: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
x_request_id string Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually.
instance_id int The identifier of the compute instance / resource to be started in rescue mode.
x_trace_id string Identifier to trace group of requests. [optional]

Return type

\OpenAPI\Client\Model\InstanceRestartActionResponse

Authorization

bearer

HTTP request headers

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

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

shutdown()

shutdown($x_request_id, $instance_id, $x_trace_id): \OpenAPI\Client\Model\InstanceShutdownActionResponse

Shutdown compute instance / resource by its id

Shutdown an compute instance / resource. This is similar to pressing the power button on a physical machine. This will send an ACPI event for the guest OS, which should then proceed to a clean shutdown.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: bearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\InstanceActionsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$x_request_id = 04e0f898-37b4-48bc-a794-1a57abe6aa31; // string | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
$instance_id = 12345; // int | The identifier of the compute instance / resource to be started in rescue mode.
$x_trace_id = 'x_trace_id_example'; // string | Identifier to trace group of requests.

try {
    $result = $apiInstance->shutdown($x_request_id, $instance_id, $x_trace_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstanceActionsApi->shutdown: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
x_request_id string Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually.
instance_id int The identifier of the compute instance / resource to be started in rescue mode.
x_trace_id string Identifier to trace group of requests. [optional]

Return type

\OpenAPI\Client\Model\InstanceShutdownActionResponse

Authorization

bearer

HTTP request headers

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

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

start()

start($x_request_id, $instance_id, $x_trace_id): \OpenAPI\Client\Model\InstanceStartActionResponse

Start a compute instance / resource identified by its id

Starting a compute instance / resource is like powering on a real server. If the compute instance / resource is already started nothing will happen. You may check the current status anytime when getting information about a compute instance / resource.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: bearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\InstanceActionsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$x_request_id = 04e0f898-37b4-48bc-a794-1a57abe6aa31; // string | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
$instance_id = 12345; // int | The identifier of the compute instance / resource to be started in rescue mode.
$x_trace_id = 'x_trace_id_example'; // string | Identifier to trace group of requests.

try {
    $result = $apiInstance->start($x_request_id, $instance_id, $x_trace_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstanceActionsApi->start: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
x_request_id string Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually.
instance_id int The identifier of the compute instance / resource to be started in rescue mode.
x_trace_id string Identifier to trace group of requests. [optional]

Return type

\OpenAPI\Client\Model\InstanceStartActionResponse

Authorization

bearer

HTTP request headers

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

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

stop()

stop($x_request_id, $instance_id, $x_trace_id): \OpenAPI\Client\Model\InstanceStopActionResponse

Stop compute instance / resource by its id

Stopping a compute instance / resource is like powering off a real server. So please be aware that data may be lost. Alternatively you may log in and shut your compute instance / resource gracefully via the operating system. If the compute instance / resource is already stopped nothing will happen. You may check the current status anytime when getting information about a compute instance / resource.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: bearer
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\InstanceActionsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$x_request_id = 04e0f898-37b4-48bc-a794-1a57abe6aa31; // string | [Uuid4](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_4_(random)) to identify individual requests for support cases. You can use [uuidgenerator](https://www.uuidgenerator.net/version4) to generate them manually.
$instance_id = 12345; // int | The identifier of the compute instance / resource to be started in rescue mode.
$x_trace_id = 'x_trace_id_example'; // string | Identifier to trace group of requests.

try {
    $result = $apiInstance->stop($x_request_id, $instance_id, $x_trace_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstanceActionsApi->stop: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
x_request_id string Uuid4 to identify individual requests for support cases. You can use uuidgenerator to generate them manually.
instance_id int The identifier of the compute instance / resource to be started in rescue mode.
x_trace_id string Identifier to trace group of requests. [optional]

Return type

\OpenAPI\Client\Model\InstanceStopActionResponse

Authorization

bearer

HTTP request headers

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

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