All URIs are relative to https://infrahub-api.nexgencloud.com/v1
| Method | HTTP request | Description |
|---|---|---|
| add_rules_to_firewall | POST /core/firewalls/{firewall_id}/firewall-rules | Add Rules to Firewall |
| create_firewall | POST /core/firewalls | Create Firewall |
| delete_firewall | DELETE /core/firewalls/{id} | Delete Firewall |
| delete_firewall_rules_from_firewall | DELETE /core/firewalls/{firewall_id}/firewall-rules/{firewall_rule_id} | Delete Firewall Rules from Firewall |
| details_of_firewall_by_id | GET /core/firewalls/{id} | Details of Firewall by ID |
| retrieve_firewalls | GET /core/firewalls | Retrieve Firewalls |
FirewallRule add_rules_to_firewall(firewall_id, payload)
Add Rules to Firewall
- Api Key Authentication (apiKey):
- Api Key Authentication (accessToken):
import hyperstack
from hyperstack.models.create_firewall_rule_payload import CreateFirewallRulePayload
from hyperstack.models.firewall_rule import FirewallRule
from hyperstack.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = hyperstack.Configuration(
host = "https://infrahub-api.nexgencloud.com/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: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'
# Configure API key authorization: accessToken
configuration.api_key['accessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['accessToken'] = 'Bearer'
# Enter a context with an instance of the API client
with hyperstack.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hyperstack.FirewallsApi(api_client)
firewall_id = 56 # int |
payload = hyperstack.CreateFirewallRulePayload() # CreateFirewallRulePayload |
try:
# Add Rules to Firewall
api_response = api_instance.add_rules_to_firewall(firewall_id, payload)
print("The response of FirewallsApi->add_rules_to_firewall:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FirewallsApi->add_rules_to_firewall: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| firewall_id | int | ||
| payload | CreateFirewallRulePayload |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FirewallResponse create_firewall(payload)
Create Firewall
- Api Key Authentication (apiKey):
- Api Key Authentication (accessToken):
import hyperstack
from hyperstack.models.create_firewall_payload import CreateFirewallPayload
from hyperstack.models.firewall_response import FirewallResponse
from hyperstack.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = hyperstack.Configuration(
host = "https://infrahub-api.nexgencloud.com/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: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'
# Configure API key authorization: accessToken
configuration.api_key['accessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['accessToken'] = 'Bearer'
# Enter a context with an instance of the API client
with hyperstack.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hyperstack.FirewallsApi(api_client)
payload = hyperstack.CreateFirewallPayload() # CreateFirewallPayload |
try:
# Create Firewall
api_response = api_instance.create_firewall(payload)
print("The response of FirewallsApi->create_firewall:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FirewallsApi->create_firewall: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| payload | CreateFirewallPayload |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseModel delete_firewall(id)
Delete Firewall
- Api Key Authentication (apiKey):
- Api Key Authentication (accessToken):
import hyperstack
from hyperstack.models.response_model import ResponseModel
from hyperstack.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = hyperstack.Configuration(
host = "https://infrahub-api.nexgencloud.com/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: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'
# Configure API key authorization: accessToken
configuration.api_key['accessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['accessToken'] = 'Bearer'
# Enter a context with an instance of the API client
with hyperstack.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hyperstack.FirewallsApi(api_client)
id = 56 # int |
try:
# Delete Firewall
api_response = api_instance.delete_firewall(id)
print("The response of FirewallsApi->delete_firewall:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FirewallsApi->delete_firewall: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 409 | Conflict | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseModel delete_firewall_rules_from_firewall(firewall_id, firewall_rule_id)
Delete Firewall Rules from Firewall
- Api Key Authentication (apiKey):
- Api Key Authentication (accessToken):
import hyperstack
from hyperstack.models.response_model import ResponseModel
from hyperstack.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = hyperstack.Configuration(
host = "https://infrahub-api.nexgencloud.com/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: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'
# Configure API key authorization: accessToken
configuration.api_key['accessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['accessToken'] = 'Bearer'
# Enter a context with an instance of the API client
with hyperstack.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hyperstack.FirewallsApi(api_client)
firewall_id = 56 # int |
firewall_rule_id = 56 # int |
try:
# Delete Firewall Rules from Firewall
api_response = api_instance.delete_firewall_rules_from_firewall(firewall_id, firewall_rule_id)
print("The response of FirewallsApi->delete_firewall_rules_from_firewall:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FirewallsApi->delete_firewall_rules_from_firewall: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| firewall_id | int | ||
| firewall_rule_id | int |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Exists | - |
| 409 | Conflict | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FirewallDetailResponse details_of_firewall_by_id(id)
Details of Firewall by ID
- Api Key Authentication (apiKey):
- Api Key Authentication (accessToken):
import hyperstack
from hyperstack.models.firewall_detail_response import FirewallDetailResponse
from hyperstack.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = hyperstack.Configuration(
host = "https://infrahub-api.nexgencloud.com/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: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'
# Configure API key authorization: accessToken
configuration.api_key['accessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['accessToken'] = 'Bearer'
# Enter a context with an instance of the API client
with hyperstack.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hyperstack.FirewallsApi(api_client)
id = 56 # int |
try:
# Details of Firewall by ID
api_response = api_instance.details_of_firewall_by_id(id)
print("The response of FirewallsApi->details_of_firewall_by_id:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FirewallsApi->details_of_firewall_by_id: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| id | int |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 404 | Not Found | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
FirewallsListResponse retrieve_firewalls()
Retrieve Firewalls
- Api Key Authentication (apiKey):
- Api Key Authentication (accessToken):
import hyperstack
from hyperstack.models.firewalls_list_response import FirewallsListResponse
from hyperstack.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://infrahub-api.nexgencloud.com/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = hyperstack.Configuration(
host = "https://infrahub-api.nexgencloud.com/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: apiKey
configuration.api_key['apiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['apiKey'] = 'Bearer'
# Configure API key authorization: accessToken
configuration.api_key['accessToken'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['accessToken'] = 'Bearer'
# Enter a context with an instance of the API client
with hyperstack.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hyperstack.FirewallsApi(api_client)
try:
# Retrieve Firewalls
api_response = api_instance.retrieve_firewalls()
print("The response of FirewallsApi->retrieve_firewalls:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FirewallsApi->retrieve_firewalls: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success | - |
| 400 | Bad Request | - |
| 401 | Unauthorized | - |
| 403 | Forbidden | - |
| 500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]