thousandeyes-sdk-python/thousandeyes-sdk-tests/docs/DNSSECApi.md
Shahid Hussain Khan 745e74afc4
CP-2189 Update SDK names for admin and monitors modules (#9)
* CP-2189 Update SDK names for admin and monitors modules

* CP-2189 Move client to core

* CP-2189 Change client to core
2024-06-04 16:09:40 +01:00

459 lines
20 KiB
Markdown

# thousandeyes_sdk.tests.DNSSECApi
All URIs are relative to *https://api.thousandeyes.com*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_dns_sec_test**](DNSSECApi.md#create_dns_sec_test) | **POST** /v7/tests/dnssec | Create DNSSEC test
[**delete_dns_sec_test**](DNSSECApi.md#delete_dns_sec_test) | **DELETE** /v7/tests/dnssec/{testId} | Delete DNSSEC test
[**get_dns_sec_test**](DNSSECApi.md#get_dns_sec_test) | **GET** /v7/tests/dnssec/{testId} | Get DNSSEC test
[**get_dns_sec_tests**](DNSSECApi.md#get_dns_sec_tests) | **GET** /v7/tests/dnssec | List DNSSEC tests
[**update_dns_sec_test**](DNSSECApi.md#update_dns_sec_test) | **PUT** /v7/tests/dnssec/{testId} | Update DNSSEC test
# **create_dns_sec_test**
> DnsSecTest create_dns_sec_test(update_dns_sec_test, aid=aid, expand=expand)
Create DNSSEC test
Creates a new DNSSEC test. This method requires Account Admin permissions.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.tests
from thousandeyes_sdk.tests.models.dns_sec_test import DnsSecTest
from thousandeyes_sdk.tests.models.expand import Expand
from thousandeyes_sdk.tests.models.update_dns_sec_test import UpdateDnsSecTest
from thousandeyes_sdk.tests.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# 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 Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.tests.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.tests.DNSSECApi(api_client)
update_dns_sec_test = thousandeyes_sdk.tests.UpdateDnsSecTest() # UpdateDnsSecTest |
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
expand = [thousandeyes_sdk.tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional)
try:
# Create DNSSEC test
api_response = api_instance.create_dns_sec_test(update_dns_sec_test, aid=aid, expand=expand)
print("The response of DNSSECApi->create_dns_sec_test:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DNSSECApi->create_dns_sec_test: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**update_dns_sec_test** | [**UpdateDnsSecTest**](UpdateDnsSecTest.md)| |
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
**expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. | [optional]
### Return type
[**DnsSecTest**](DnsSecTest.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | Created | * Location - <br> |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
**502** | Bad Gateway | - |
**0** | An error occurred | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **delete_dns_sec_test**
> delete_dns_sec_test(test_id, aid=aid)
Delete DNSSEC test
Deletes the specified DNSSEC test. This method requires Account Admin permissions.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.tests
from thousandeyes_sdk.tests.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# 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 Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.tests.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.tests.DNSSECApi(api_client)
test_id = '281474976710706' # str | ID of the test
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# Delete DNSSEC test
api_instance.delete_dns_sec_test(test_id, aid=aid)
except Exception as e:
print("Exception when calling DNSSECApi->delete_dns_sec_test: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**test_id** | **str**| ID of the test |
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
void (empty response body)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**204** | No content | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
**502** | Bad Gateway | - |
**0** | An error occurred | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_dns_sec_test**
> DnsSecTest get_dns_sec_test(test_id, aid=aid, expand=expand)
Get DNSSEC test
Returns details for a DNSSEC test, including name, intervals, targets, alert rules and agents.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.tests
from thousandeyes_sdk.tests.models.dns_sec_test import DnsSecTest
from thousandeyes_sdk.tests.models.expand import Expand
from thousandeyes_sdk.tests.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# 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 Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.tests.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.tests.DNSSECApi(api_client)
test_id = '281474976710706' # str | ID of the test
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
expand = [thousandeyes_sdk.tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional)
try:
# Get DNSSEC test
api_response = api_instance.get_dns_sec_test(test_id, aid=aid, expand=expand)
print("The response of DNSSECApi->get_dns_sec_test:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DNSSECApi->get_dns_sec_test: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**test_id** | **str**| ID of the test |
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
**expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the &#x60;agents&#x60; sub-resource, they need to pass the &#x60;?expand&#x3D;agent&#x60; query. | [optional]
### Return type
[**DnsSecTest**](DnsSecTest.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
**502** | Bad Gateway | - |
**0** | An error occurred | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **get_dns_sec_tests**
> DnsSecTests get_dns_sec_tests(aid=aid)
List DNSSEC tests
Returns a list of all DNSSEC tests and saved events.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.tests
from thousandeyes_sdk.tests.models.dns_sec_tests import DnsSecTests
from thousandeyes_sdk.tests.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# 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 Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.tests.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.tests.DNSSECApi(api_client)
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
try:
# List DNSSEC tests
api_response = api_instance.get_dns_sec_tests(aid=aid)
print("The response of DNSSECApi->get_dns_sec_tests:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DNSSECApi->get_dns_sec_tests: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
### Return type
[**DnsSecTests**](DnsSecTests.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
**502** | Bad Gateway | - |
**0** | An error occurred | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
# **update_dns_sec_test**
> DnsSecTest update_dns_sec_test(test_id, update_dns_sec_test, aid=aid, expand=expand)
Update DNSSEC test
Updates a DNSSEC test. The target test cannot be a live share or saved event. This method requires Account Admin permissions.
### Example
* Bearer Authentication (BearerAuth):
```python
import thousandeyes_sdk.tests
from thousandeyes_sdk.tests.models.dns_sec_test import DnsSecTest
from thousandeyes_sdk.tests.models.expand import Expand
from thousandeyes_sdk.tests.models.update_dns_sec_test import UpdateDnsSecTest
from thousandeyes_sdk.tests.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.thousandeyes.com
# See configuration.py for a list of all supported configuration parameters.
configuration = thousandeyes_sdk.core.Configuration(
host = "https://api.thousandeyes.com"
)
# 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 Bearer authorization: BearerAuth
configuration = thousandeyes_sdk.core.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with thousandeyes_sdk.tests.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = thousandeyes_sdk.tests.DNSSECApi(api_client)
test_id = '281474976710706' # str | ID of the test
update_dns_sec_test = thousandeyes_sdk.tests.UpdateDnsSecTest() # UpdateDnsSecTest |
aid = '1234' # str | A unique identifier associated with your account group. You can retrieve your `AccountGroupId` from the `/account-groups` endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. (optional)
expand = [thousandeyes_sdk.tests.Expand()] # List[Expand] | Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the `agents` sub-resource, they need to pass the `?expand=agent` query. (optional)
try:
# Update DNSSEC test
api_response = api_instance.update_dns_sec_test(test_id, update_dns_sec_test, aid=aid, expand=expand)
print("The response of DNSSECApi->update_dns_sec_test:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DNSSECApi->update_dns_sec_test: %s\n" % e)
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**test_id** | **str**| ID of the test |
**update_dns_sec_test** | [**UpdateDnsSecTest**](UpdateDnsSecTest.md)| |
**aid** | **str**| A unique identifier associated with your account group. You can retrieve your &#x60;AccountGroupId&#x60; from the &#x60;/account-groups&#x60; endpoint. Note that you must be assigned to the target account group. Specifying this parameter without being assigned to the target account group will result in an error response. | [optional]
**expand** | [**List[Expand]**](Expand.md)| Optional parameter on whether or not to expand the test sub-resources. By default no expansion is going to take place if the query parameter is not present. If the user wishes to expand the &#x60;agents&#x60; sub-resource, they need to pass the &#x60;?expand&#x3D;agent&#x60; query. | [optional]
### Return type
[**DnsSecTest**](DnsSecTest.md)
### Authorization
[BearerAuth](../README.md#BearerAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/hal+json, application/json, application/problem+json
### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | OK | - |
**400** | Bad Request | - |
**401** | Unauthorized | - |
**403** | Insufficient permissions to query endpoint | - |
**404** | Not found | - |
**429** | Exhausted rate limit for the organization | - |
**500** | Internal server error | - |
**502** | Bad Gateway | - |
**0** | An error occurred | - |
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)