All URIs are relative to https://api.equinix.com/metal/v1
Method | HTTP request | Description |
---|---|---|
delete_bgp_session | DELETE /bgp/sessions/{id} | Delete the BGP session |
find_bgp_config_by_project | GET /projects/{id}/bgp-config | Retrieve a bgp config |
find_bgp_session_by_id | GET /bgp/sessions/{id} | Retrieve a BGP session |
find_global_bgp_ranges | GET /projects/{id}/global-bgp-ranges | Retrieve all global bgp ranges |
find_project_bgp_sessions | GET /projects/{id}/bgp/sessions | Retrieve all BGP sessions for project |
request_bgp_config | POST /projects/{id}/bgp-configs | Requesting bgp config |
update_bgp_session | PUT /bgp/sessions/{id} | Update the BGP session |
delete_bgp_session(id)
Delete the BGP session
Deletes the BGP session.
- 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.BGPApi(api_client)
id = 'id_example' # str | BGP session UUID
try:
# Delete the BGP session
api_instance.delete_bgp_session(id)
except ApiException as e:
print("Exception when calling BGPApi->delete_bgp_session: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | BGP session UUID |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | no content | - |
401 | unauthorized | - |
403 | forbidden | - |
404 | not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BgpConfig find_bgp_config_by_project(id, include=include, exclude=exclude)
Retrieve a bgp config
Returns a bgp config
- 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.BGPApi(api_client)
id = 'id_example' # str | Project 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 bgp config
api_response = api_instance.find_bgp_config_by_project(id, include=include, exclude=exclude)
pprint(api_response)
except ApiException as e:
print("Exception when calling BGPApi->find_bgp_config_by_project: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Project 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 When BGP configuration is not enabled empty structure is returned. When BGP configuration is disabled after being enabled BGP configuration data is returned with status disabled. | - |
401 | unauthorized | - |
403 | forbidden | - |
404 | not found The project was not found. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BgpSession find_bgp_session_by_id(id, include=include, exclude=exclude)
Retrieve a BGP session
Returns a BGP session
- 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.BGPApi(api_client)
id = 'id_example' # str | BGP session 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 BGP session
api_response = api_instance.find_bgp_session_by_id(id, include=include, exclude=exclude)
pprint(api_response)
except ApiException as e:
print("Exception when calling BGPApi->find_bgp_session_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | BGP session 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]
GlobalBgpRangeList find_global_bgp_ranges(id)
Retrieve all global bgp ranges
Returns all global bgp ranges for a 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.BGPApi(api_client)
id = 'id_example' # str | Project UUID
try:
# Retrieve all global bgp ranges
api_response = api_instance.find_global_bgp_ranges(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling BGPApi->find_global_bgp_ranges: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Project UUID |
- 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]
BgpSessionList find_project_bgp_sessions(id)
Retrieve all BGP sessions for project
Provides a listing of available BGP sessions for the 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.BGPApi(api_client)
id = 'id_example' # str | Project UUID
try:
# Retrieve all BGP sessions for project
api_response = api_instance.find_project_bgp_sessions(id)
pprint(api_response)
except ApiException as e:
print("Exception when calling BGPApi->find_project_bgp_sessions: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Project UUID |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ok | - |
401 | unauthorized | - |
404 | not found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
request_bgp_config(id, bgp_config_request_input)
Requesting bgp config
Requests to enable bgp configuration for a 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.BGPApi(api_client)
id = 'id_example' # str | Project UUID
bgp_config_request_input = metal.BgpConfigRequestInput() # BgpConfigRequestInput | BGP config Request to create
try:
# Requesting bgp config
api_instance.request_bgp_config(id, bgp_config_request_input)
except ApiException as e:
print("Exception when calling BGPApi->request_bgp_config: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Project UUID | |
bgp_config_request_input | BgpConfigRequestInput | BGP config Request to create |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | no content | - |
401 | unauthorized | - |
403 | forbidden | - |
404 | not found | - |
422 | unprocessable entity | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_bgp_session(id, body)
Update the BGP session
Updates the BGP session by either enabling or disabling the default route functionality.
- 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.BGPApi(api_client)
id = 'id_example' # str | BGP session UUID
body = True # bool | Default route
try:
# Update the BGP session
api_instance.update_bgp_session(id, body)
except ApiException as e:
print("Exception when calling BGPApi->update_bgp_session: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | BGP session UUID | |
body | bool | Default route |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | ok | - |
401 | unauthorized | - |
403 | forbidden | - |
404 | not found | - |
422 | unprocessable entity | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]