All URIs are relative to http://localhost
Method | Description |
---|---|
activate_policy_template | Activate Policy Template |
create_policy_template | Create Policy Template |
deactivate_policy_template | Deactivate Policy Template |
deprecate_policy_template | Deprecate Policy Template |
get_policy_template | Get Policy Template |
get_policy_templates | Get Policy Templates |
update_policy_template | Update Policy Template |
ResponseActivatePolicyTemplateResponse activate_policy_template(policy_template_id)
Activate Policy Template
An API endpoint that activates a policy template.
import onelens_backend_client
from onelens_backend_client.models.response_activate_policy_template_response import ResponseActivatePolicyTemplateResponse
from onelens_backend_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = onelens_backend_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with onelens_backend_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = onelens_backend_client.PoliciesPolicyTemplatesApi(api_client)
policy_template_id = 'policy_template_id_example' # str |
try:
# Activate Policy Template
api_response = api_instance.activate_policy_template(policy_template_id)
print("The response of PoliciesPolicyTemplatesApi->activate_policy_template:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PoliciesPolicyTemplatesApi->activate_policy_template: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
policy_template_id | str |
ResponseActivatePolicyTemplateResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseCreatePolicyTemplateResponse create_policy_template(create_policy_template_request)
Create Policy Template
An API endpoint that creates a new policy template.
import onelens_backend_client
from onelens_backend_client.models.create_policy_template_request import CreatePolicyTemplateRequest
from onelens_backend_client.models.response_create_policy_template_response import ResponseCreatePolicyTemplateResponse
from onelens_backend_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = onelens_backend_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with onelens_backend_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = onelens_backend_client.PoliciesPolicyTemplatesApi(api_client)
create_policy_template_request = onelens_backend_client.CreatePolicyTemplateRequest() # CreatePolicyTemplateRequest |
try:
# Create Policy Template
api_response = api_instance.create_policy_template(create_policy_template_request)
print("The response of PoliciesPolicyTemplatesApi->create_policy_template:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PoliciesPolicyTemplatesApi->create_policy_template: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
create_policy_template_request | CreatePolicyTemplateRequest |
ResponseCreatePolicyTemplateResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseDeprecatePolicyTemplateResponse deactivate_policy_template(policy_template_id)
Deactivate Policy Template
An API endpoint that deactivates a policy template.
import onelens_backend_client
from onelens_backend_client.models.response_deprecate_policy_template_response import ResponseDeprecatePolicyTemplateResponse
from onelens_backend_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = onelens_backend_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with onelens_backend_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = onelens_backend_client.PoliciesPolicyTemplatesApi(api_client)
policy_template_id = 'policy_template_id_example' # str |
try:
# Deactivate Policy Template
api_response = api_instance.deactivate_policy_template(policy_template_id)
print("The response of PoliciesPolicyTemplatesApi->deactivate_policy_template:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PoliciesPolicyTemplatesApi->deactivate_policy_template: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
policy_template_id | str |
ResponseDeprecatePolicyTemplateResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseDeprecatePolicyTemplateResponse deprecate_policy_template(policy_template_id)
Deprecate Policy Template
An API endpoint that deprecates a policy template.
import onelens_backend_client
from onelens_backend_client.models.response_deprecate_policy_template_response import ResponseDeprecatePolicyTemplateResponse
from onelens_backend_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = onelens_backend_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with onelens_backend_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = onelens_backend_client.PoliciesPolicyTemplatesApi(api_client)
policy_template_id = 'policy_template_id_example' # str |
try:
# Deprecate Policy Template
api_response = api_instance.deprecate_policy_template(policy_template_id)
print("The response of PoliciesPolicyTemplatesApi->deprecate_policy_template:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PoliciesPolicyTemplatesApi->deprecate_policy_template: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
policy_template_id | str |
ResponseDeprecatePolicyTemplateResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseGetPolicyTemplateByIDResponse get_policy_template(policy_template_id)
Get Policy Template
An API endpoint that retrieves a policy template by id.
import onelens_backend_client
from onelens_backend_client.models.response_get_policy_template_by_id_response import ResponseGetPolicyTemplateByIDResponse
from onelens_backend_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = onelens_backend_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with onelens_backend_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = onelens_backend_client.PoliciesPolicyTemplatesApi(api_client)
policy_template_id = 'policy_template_id_example' # str |
try:
# Get Policy Template
api_response = api_instance.get_policy_template(policy_template_id)
print("The response of PoliciesPolicyTemplatesApi->get_policy_template:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PoliciesPolicyTemplatesApi->get_policy_template: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
policy_template_id | str |
ResponseGetPolicyTemplateByIDResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseGetPolicyTemplatesResponse get_policy_templates(get_policy_templates_request)
Get Policy Templates
An API endpoint that retrieves all policy templates.
import onelens_backend_client
from onelens_backend_client.models.get_policy_templates_request import GetPolicyTemplatesRequest
from onelens_backend_client.models.response_get_policy_templates_response import ResponseGetPolicyTemplatesResponse
from onelens_backend_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = onelens_backend_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with onelens_backend_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = onelens_backend_client.PoliciesPolicyTemplatesApi(api_client)
get_policy_templates_request = onelens_backend_client.GetPolicyTemplatesRequest() # GetPolicyTemplatesRequest |
try:
# Get Policy Templates
api_response = api_instance.get_policy_templates(get_policy_templates_request)
print("The response of PoliciesPolicyTemplatesApi->get_policy_templates:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PoliciesPolicyTemplatesApi->get_policy_templates: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
get_policy_templates_request | GetPolicyTemplatesRequest |
ResponseGetPolicyTemplatesResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ResponseUpdatePolicyTemplateResponse update_policy_template(policy_template_id, policy_template_update_fields_mixin, force_update=force_update)
Update Policy Template
An API endpoint that updates a policy template.
import onelens_backend_client
from onelens_backend_client.models.policy_template_update_fields_mixin import PolicyTemplateUpdateFieldsMixin
from onelens_backend_client.models.response_update_policy_template_response import ResponseUpdatePolicyTemplateResponse
from onelens_backend_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = onelens_backend_client.Configuration(
host = "http://localhost"
)
# Enter a context with an instance of the API client
with onelens_backend_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = onelens_backend_client.PoliciesPolicyTemplatesApi(api_client)
policy_template_id = 'policy_template_id_example' # str |
policy_template_update_fields_mixin = onelens_backend_client.PolicyTemplateUpdateFieldsMixin() # PolicyTemplateUpdateFieldsMixin |
force_update = True # bool | Force update (TRUE/FALSE), default: FALSE (optional)
try:
# Update Policy Template
api_response = api_instance.update_policy_template(policy_template_id, policy_template_update_fields_mixin, force_update=force_update)
print("The response of PoliciesPolicyTemplatesApi->update_policy_template:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling PoliciesPolicyTemplatesApi->update_policy_template: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
policy_template_id | str | ||
policy_template_update_fields_mixin | PolicyTemplateUpdateFieldsMixin | ||
force_update | bool | Force update (TRUE/FALSE), default: FALSE | [optional] |
ResponseUpdatePolicyTemplateResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful Response | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]