All URIs are relative to https://api.equinix.com/metal/v1
Method | HTTP request | Description |
---|---|---|
create_email | POST /emails | Create an email |
delete_email | DELETE /emails/{id} | Delete the email |
find_email_by_id | GET /emails/{id} | Retrieve an email |
update_email | PUT /emails/{id} | Update the email |
Email create_email(create_email_input)
Create an email
Add a new email address to the current user.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.create_email_input import CreateEmailInput
from equinix_metal.models.email import Email
from equinix_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 = equinix_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'] = os.environ["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 equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.EmailsApi(api_client)
create_email_input = equinix_metal.CreateEmailInput() # CreateEmailInput | Email to create
try:
# Create an email
api_response = api_instance.create_email(create_email_input)
print("The response of EmailsApi->create_email:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EmailsApi->create_email: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
create_email_input | CreateEmailInput | Email to create |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | created | - |
401 | unauthorized | - |
422 | unprocessable entity | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_email(id)
Delete the email
Deletes the email.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_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 = equinix_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'] = os.environ["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 equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.EmailsApi(api_client)
id = 'id_example' # str | Email UUID
try:
# Delete the email
api_instance.delete_email(id)
except Exception as e:
print("Exception when calling EmailsApi->delete_email: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Email 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]
Email find_email_by_id(id)
Retrieve an email
Provides one of the user’s emails.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.email import Email
from equinix_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 = equinix_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'] = os.environ["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 equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.EmailsApi(api_client)
id = 'id_example' # str | Email UUID
try:
# Retrieve an email
api_response = api_instance.find_email_by_id(id)
print("The response of EmailsApi->find_email_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EmailsApi->find_email_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Email 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]
Email update_email(id, update_email_input)
Update the email
Updates the email.
- Api Key Authentication (x_auth_token):
import equinix_metal
from equinix_metal.models.email import Email
from equinix_metal.models.update_email_input import UpdateEmailInput
from equinix_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 = equinix_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'] = os.environ["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 equinix_metal.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = equinix_metal.EmailsApi(api_client)
id = 'id_example' # str | Email UUID
update_email_input = equinix_metal.UpdateEmailInput() # UpdateEmailInput | email to update
try:
# Update the email
api_response = api_instance.update_email(id, update_email_input)
print("The response of EmailsApi->update_email:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling EmailsApi->update_email: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | str | Email UUID | |
update_email_input | UpdateEmailInput | email to update |
- 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]