All URIs are relative to https://api.equinix.com/metal/v1
Method | HTTP request | Description |
---|---|---|
activate_hardware_reservation | POST /hardware-reservations/{id}/activate | Activate a spare hardware reservation |
find_hardware_reservation_by_id | GET /hardware-reservations/{id} | Retrieve a hardware reservation |
find_project_hardware_reservations | GET /projects/{id}/hardware-reservations | Retrieve all hardware reservations for a given project |
move_hardware_reservation | POST /hardware-reservations/{id}/move | Move a hardware reservation |
HardwareReservation activate_hardware_reservation(id, activate_hardware_reservation_request=activate_hardware_reservation_request)
Activate a spare hardware reservation
Activate a spare hardware reservation
- Api Key Authentication (x_auth_token):
from __future__ import print_function
import time
import metal
from metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = metal.HardwareReservationsApi(api_client)
id = 'id_example' # str | Hardware Reservation UUID
activate_hardware_reservation_request = metal.ActivateHardwareReservationRequest() # ActivateHardwareReservationRequest | Note to attach to the reservation (optional)
try:
# Activate a spare hardware reservation
api_response = api_instance.activate_hardware_reservation(id, activate_hardware_reservation_request=activate_hardware_reservation_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling HardwareReservationsApi->activate_hardware_reservation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Hardware Reservation UUID | |
activate_hardware_reservation_request | ActivateHardwareReservationRequest | Note to attach to the reservation | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | ok | - |
401 | unauthorized | - |
403 | forbidden | - |
404 | not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HardwareReservation find_hardware_reservation_by_id(id, include=include, exclude=exclude)
Retrieve a hardware reservation
Returns a single hardware reservation
- Api Key Authentication (x_auth_token):
from __future__ import print_function
import time
import metal
from metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = metal.HardwareReservationsApi(api_client)
id = 'id_example' # str | HardwareReservation UUID
include = ['include_example'] # list[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude = ['exclude_example'] # list[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
try:
# Retrieve a hardware reservation
api_response = api_instance.find_hardware_reservation_by_id(id, include=include, exclude=exclude)
pprint(api_response)
except ApiException as e:
print("Exception when calling HardwareReservationsApi->find_hardware_reservation_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | HardwareReservation UUID | |
include | list[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] |
exclude | list[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ok | - |
401 | unauthorized | - |
403 | forbidden | - |
404 | not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HardwareReservationList find_project_hardware_reservations(id, query=query, state=state, provisionable=provisionable, include=include, exclude=exclude, page=page, per_page=per_page)
Retrieve all hardware reservations for a given project
Provides a collection of hardware reservations for a given project.
- Api Key Authentication (x_auth_token):
from __future__ import print_function
import time
import metal
from metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = metal.HardwareReservationsApi(api_client)
id = 'id_example' # str | Project UUID
query = 'query_example' # str | Search by facility code, plan name, project name, reservation short ID or device hostname (optional)
state = 'state_example' # str | Filter by hardware reservation state (optional)
provisionable = 'provisionable_example' # str | Filter hardware reservation that is provisionable (optional)
include = ['include_example'] # list[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. (optional)
exclude = ['exclude_example'] # list[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. (optional)
page = 1 # int | Page to return (optional) (default to 1)
per_page = 10 # int | Items returned per page (optional) (default to 10)
try:
# Retrieve all hardware reservations for a given project
api_response = api_instance.find_project_hardware_reservations(id, query=query, state=state, provisionable=provisionable, include=include, exclude=exclude, page=page, per_page=per_page)
pprint(api_response)
except ApiException as e:
print("Exception when calling HardwareReservationsApi->find_project_hardware_reservations: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Project UUID | |
query | str | Search by facility code, plan name, project name, reservation short ID or device hostname | [optional] |
state | str | Filter by hardware reservation state | [optional] |
provisionable | str | Filter hardware reservation that is provisionable | [optional] |
include | list[str] | Nested attributes to include. Included objects will return their full attributes. Attribute names can be dotted (up to 3 levels) to included deeply nested objects. | [optional] |
exclude | list[str] | Nested attributes to exclude. Excluded objects will return only the href attribute. Attribute names can be dotted (up to 3 levels) to exclude deeply nested objects. | [optional] |
page | int | Page to return | [optional] [default to 1] |
per_page | int | Items returned per page | [optional] [default to 10] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ok | - |
401 | unauthorized | - |
403 | forbidden | - |
404 | not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HardwareReservation move_hardware_reservation(id, move_hardware_reservation_request)
Move a hardware reservation
Move a hardware reservation to another project
- Api Key Authentication (x_auth_token):
from __future__ import print_function
import time
import metal
from metal.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.equinix.com/metal/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = metal.Configuration(
host = "https://api.equinix.com/metal/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: x_auth_token
configuration.api_key['x_auth_token'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['x_auth_token'] = 'Bearer'
# Enter a context with an instance of the API client
with metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = metal.HardwareReservationsApi(api_client)
id = 'id_example' # str | Hardware Reservation UUID
move_hardware_reservation_request = metal.MoveHardwareReservationRequest() # MoveHardwareReservationRequest | Destination Project UUID
try:
# Move a hardware reservation
api_response = api_instance.move_hardware_reservation(id, move_hardware_reservation_request)
pprint(api_response)
except ApiException as e:
print("Exception when calling HardwareReservationsApi->move_hardware_reservation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Hardware Reservation UUID | |
move_hardware_reservation_request | MoveHardwareReservationRequest | Destination Project UUID |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | ok | - |
401 | unauthorized | - |
403 | forbidden | - |
404 | not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]