2
0
openapi-client-udm/openapi_client_udm/api/policies_dhcp_dnsupdate_api.py
Adam Goldsmith 98daa460a6 Autogenerated using update_openapi_client from udm-rest-client
Actual generator command:

```bash
java -jar openapi-generator-cli-5.4.0.jar generate -g python-legacy \
  --library asyncio \
  --package-name openapi_client_udm \
  --additional-properties=packageVersion=1.0.2 \
  -i udm_openapi.json \
  -o ./python
```
2023-11-27 20:21:43 -05:00

1474 lines
74 KiB
Python

# coding: utf-8
"""
Univention Directory Manager REST interface
Schema definition for the objects in the Univention Directory Manager REST interface. # noqa: E501
The version of the OpenAPI document: 1.0.2
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility library
import six
from openapi_client_udm.api_client import ApiClient
from openapi_client_udm.exceptions import ( # noqa: F401
ApiTypeError,
ApiValueError
)
class PoliciesDhcpDnsupdateApi(object):
"""NOTE: This class is auto generated by OpenAPI Generator
Ref: https://openapi-generator.tech
Do not edit the class manually.
"""
def __init__(self, api_client=None):
if api_client is None:
api_client = ApiClient()
self.api_client = api_client
def udm_policies_dhcp_dnsupdate_object(self, dn, **kwargs): # noqa: E501
""" Get a representation of the DHCP Dynamic DNS policy object with all its properties, policies, options, metadata and references. Includes also instructions how to modify, remove or move the object. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.udm_policies_dhcp_dnsupdate_object(dn, async_req=True)
>>> result = thread.get()
:param dn: The (urlencoded) LDAP Distinguished Name (DN). (required)
:type dn: str
:param user_agent: The user agent.
:type user_agent: str
:param accept_language: The accepted response languages.
:type accept_language: str
:param if_none_match: Use request from cache by using the Etag entity tag if it matches.
:type if_none_match: str
:param if_modified_since: Use request from cache by using the Last-Modified date if it matches.
:type if_modified_since: str
:param x_request_id: A request-ID used for logging and tracing.
:type x_request_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: PoliciesDhcpDnsupdate
"""
kwargs['_return_http_data_only'] = True
return self.udm_policies_dhcp_dnsupdate_object_with_http_info(dn, **kwargs) # noqa: E501
def udm_policies_dhcp_dnsupdate_object_with_http_info(self, dn, **kwargs): # noqa: E501
""" Get a representation of the DHCP Dynamic DNS policy object with all its properties, policies, options, metadata and references. Includes also instructions how to modify, remove or move the object. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.udm_policies_dhcp_dnsupdate_object_with_http_info(dn, async_req=True)
>>> result = thread.get()
:param dn: The (urlencoded) LDAP Distinguished Name (DN). (required)
:type dn: str
:param user_agent: The user agent.
:type user_agent: str
:param accept_language: The accepted response languages.
:type accept_language: str
:param if_none_match: Use request from cache by using the Etag entity tag if it matches.
:type if_none_match: str
:param if_modified_since: Use request from cache by using the Last-Modified date if it matches.
:type if_modified_since: str
:param x_request_id: A request-ID used for logging and tracing.
:type x_request_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(PoliciesDhcpDnsupdate, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'dn',
'user_agent',
'accept_language',
'if_none_match',
'if_modified_since',
'x_request_id'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth',
'_content_type',
'_headers'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method udm_policies_dhcp_dnsupdate_object" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'dn' is set
if self.api_client.client_side_validation and ('dn' not in local_var_params or # noqa: E501
local_var_params['dn'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `dn` when calling `udm_policies_dhcp_dnsupdate_object`") # noqa: E501
if self.api_client.client_side_validation and ('dn' in local_var_params and # noqa: E501
len(local_var_params['dn']) < 3): # noqa: E501
raise ApiValueError("Invalid value for parameter `dn` when calling `udm_policies_dhcp_dnsupdate_object`, length must be greater than or equal to `3`") # noqa: E501
if self.api_client.client_side_validation and 'dn' in local_var_params and not re.search(r'^.+=.+$', local_var_params['dn']): # noqa: E501
raise ApiValueError("Invalid value for parameter `dn` when calling `udm_policies_dhcp_dnsupdate_object`, must conform to the pattern `/^.+=.+$/`") # noqa: E501
collection_formats = {}
path_params = {}
if 'dn' in local_var_params:
path_params['dn'] = local_var_params['dn'] # noqa: E501
query_params = []
header_params = dict(local_var_params.get('_headers', {}))
if 'user_agent' in local_var_params:
header_params['User-Agent'] = local_var_params['user_agent'] # noqa: E501
if 'accept_language' in local_var_params:
header_params['Accept-Language'] = local_var_params['accept_language'] # noqa: E501
if 'if_none_match' in local_var_params:
header_params['If-None-Match'] = local_var_params['if_none_match'] # noqa: E501
if 'if_modified_since' in local_var_params:
header_params['If-Modified-Since'] = local_var_params['if_modified_since'] # noqa: E501
if 'x_request_id' in local_var_params:
header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/hal+json', 'text/html']) # noqa: E501
# Authentication setting
auth_settings = ['basic'] # noqa: E501
response_types_map = {
400: "dict(str, object)",
401: "dict(str, object)",
403: "dict(str, object)",
422: "EmbeddedError",
500: "EmbeddedError",
503: "dict(str, object)",
502: "dict(str, object)",
504: "dict(str, object)",
200: "PoliciesDhcpDnsupdate",
404: "dict(str, object)",
}
return self.api_client.call_api(
'/policies/dhcp_dnsupdate/{dn}', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_types_map=response_types_map,
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def udm_policies_dhcp_dnsupdate_object_create(self, policies_dhcp_dnsupdate, **kwargs): # noqa: E501
"""Create a new DHCP Dynamic DNS policy object # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.udm_policies_dhcp_dnsupdate_object_create(policies_dhcp_dnsupdate, async_req=True)
>>> result = thread.get()
:param policies_dhcp_dnsupdate: (required)
:type policies_dhcp_dnsupdate: PoliciesDhcpDnsupdate
:param user_agent: The user agent.
:type user_agent: str
:param accept_language: The accepted response languages.
:type accept_language: str
:param if_none_match: Use request from cache by using the Etag entity tag if it matches.
:type if_none_match: str
:param if_modified_since: Use request from cache by using the Last-Modified date if it matches.
:type if_modified_since: str
:param x_request_id: A request-ID used for logging and tracing.
:type x_request_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: InlineResponse201
"""
kwargs['_return_http_data_only'] = True
return self.udm_policies_dhcp_dnsupdate_object_create_with_http_info(policies_dhcp_dnsupdate, **kwargs) # noqa: E501
def udm_policies_dhcp_dnsupdate_object_create_with_http_info(self, policies_dhcp_dnsupdate, **kwargs): # noqa: E501
"""Create a new DHCP Dynamic DNS policy object # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.udm_policies_dhcp_dnsupdate_object_create_with_http_info(policies_dhcp_dnsupdate, async_req=True)
>>> result = thread.get()
:param policies_dhcp_dnsupdate: (required)
:type policies_dhcp_dnsupdate: PoliciesDhcpDnsupdate
:param user_agent: The user agent.
:type user_agent: str
:param accept_language: The accepted response languages.
:type accept_language: str
:param if_none_match: Use request from cache by using the Etag entity tag if it matches.
:type if_none_match: str
:param if_modified_since: Use request from cache by using the Last-Modified date if it matches.
:type if_modified_since: str
:param x_request_id: A request-ID used for logging and tracing.
:type x_request_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(InlineResponse201, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'policies_dhcp_dnsupdate',
'user_agent',
'accept_language',
'if_none_match',
'if_modified_since',
'x_request_id'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth',
'_content_type',
'_headers'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method udm_policies_dhcp_dnsupdate_object_create" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'policies_dhcp_dnsupdate' is set
if self.api_client.client_side_validation and ('policies_dhcp_dnsupdate' not in local_var_params or # noqa: E501
local_var_params['policies_dhcp_dnsupdate'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `policies_dhcp_dnsupdate` when calling `udm_policies_dhcp_dnsupdate_object_create`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
header_params = dict(local_var_params.get('_headers', {}))
if 'user_agent' in local_var_params:
header_params['User-Agent'] = local_var_params['user_agent'] # noqa: E501
if 'accept_language' in local_var_params:
header_params['Accept-Language'] = local_var_params['accept_language'] # noqa: E501
if 'if_none_match' in local_var_params:
header_params['If-None-Match'] = local_var_params['if_none_match'] # noqa: E501
if 'if_modified_since' in local_var_params:
header_params['If-Modified-Since'] = local_var_params['if_modified_since'] # noqa: E501
if 'x_request_id' in local_var_params:
header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
if 'policies_dhcp_dnsupdate' in local_var_params:
body_params = local_var_params['policies_dhcp_dnsupdate']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/hal+json', 'text/html']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = local_var_params.get('_content_type',
self.api_client.select_header_content_type(
['application/json'],
'POST', body_params)) # noqa: E501
# Authentication setting
auth_settings = ['basic'] # noqa: E501
response_types_map = {
400: "dict(str, object)",
401: "dict(str, object)",
403: "dict(str, object)",
422: "EmbeddedError",
500: "EmbeddedError",
503: "dict(str, object)",
502: "dict(str, object)",
504: "dict(str, object)",
201: "InlineResponse201",
}
return self.api_client.call_api(
'/policies/dhcp_dnsupdate/', 'POST',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_types_map=response_types_map,
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def udm_policies_dhcp_dnsupdate_object_modify(self, dn, policies_dhcp_dnsupdate, **kwargs): # noqa: E501
"""Modify or move an DHCP Dynamic DNS policy object # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.udm_policies_dhcp_dnsupdate_object_modify(dn, policies_dhcp_dnsupdate, async_req=True)
>>> result = thread.get()
:param dn: The (urlencoded) LDAP Distinguished Name (DN). (required)
:type dn: str
:param policies_dhcp_dnsupdate: (required)
:type policies_dhcp_dnsupdate: PoliciesDhcpDnsupdate
:param if_match: Provide entity tag to make a conditional request to not overwrite any values in a race condition.
:type if_match: str
:param if_unmodified_since: Provide last modified time to make a conditional request to not overwrite any values in a race condition.
:type if_unmodified_since: str
:param user_agent: The user agent.
:type user_agent: str
:param accept_language: The accepted response languages.
:type accept_language: str
:param if_none_match: Use request from cache by using the Etag entity tag if it matches.
:type if_none_match: str
:param if_modified_since: Use request from cache by using the Last-Modified date if it matches.
:type if_modified_since: str
:param x_request_id: A request-ID used for logging and tracing.
:type x_request_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: InlineResponse201
"""
kwargs['_return_http_data_only'] = True
return self.udm_policies_dhcp_dnsupdate_object_modify_with_http_info(dn, policies_dhcp_dnsupdate, **kwargs) # noqa: E501
def udm_policies_dhcp_dnsupdate_object_modify_with_http_info(self, dn, policies_dhcp_dnsupdate, **kwargs): # noqa: E501
"""Modify or move an DHCP Dynamic DNS policy object # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.udm_policies_dhcp_dnsupdate_object_modify_with_http_info(dn, policies_dhcp_dnsupdate, async_req=True)
>>> result = thread.get()
:param dn: The (urlencoded) LDAP Distinguished Name (DN). (required)
:type dn: str
:param policies_dhcp_dnsupdate: (required)
:type policies_dhcp_dnsupdate: PoliciesDhcpDnsupdate
:param if_match: Provide entity tag to make a conditional request to not overwrite any values in a race condition.
:type if_match: str
:param if_unmodified_since: Provide last modified time to make a conditional request to not overwrite any values in a race condition.
:type if_unmodified_since: str
:param user_agent: The user agent.
:type user_agent: str
:param accept_language: The accepted response languages.
:type accept_language: str
:param if_none_match: Use request from cache by using the Etag entity tag if it matches.
:type if_none_match: str
:param if_modified_since: Use request from cache by using the Last-Modified date if it matches.
:type if_modified_since: str
:param x_request_id: A request-ID used for logging and tracing.
:type x_request_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(InlineResponse201, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'dn',
'policies_dhcp_dnsupdate',
'if_match',
'if_unmodified_since',
'user_agent',
'accept_language',
'if_none_match',
'if_modified_since',
'x_request_id'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth',
'_content_type',
'_headers'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method udm_policies_dhcp_dnsupdate_object_modify" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'dn' is set
if self.api_client.client_side_validation and ('dn' not in local_var_params or # noqa: E501
local_var_params['dn'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `dn` when calling `udm_policies_dhcp_dnsupdate_object_modify`") # noqa: E501
# verify the required parameter 'policies_dhcp_dnsupdate' is set
if self.api_client.client_side_validation and ('policies_dhcp_dnsupdate' not in local_var_params or # noqa: E501
local_var_params['policies_dhcp_dnsupdate'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `policies_dhcp_dnsupdate` when calling `udm_policies_dhcp_dnsupdate_object_modify`") # noqa: E501
if self.api_client.client_side_validation and ('dn' in local_var_params and # noqa: E501
len(local_var_params['dn']) < 3): # noqa: E501
raise ApiValueError("Invalid value for parameter `dn` when calling `udm_policies_dhcp_dnsupdate_object_modify`, length must be greater than or equal to `3`") # noqa: E501
if self.api_client.client_side_validation and 'dn' in local_var_params and not re.search(r'^.+=.+$', local_var_params['dn']): # noqa: E501
raise ApiValueError("Invalid value for parameter `dn` when calling `udm_policies_dhcp_dnsupdate_object_modify`, must conform to the pattern `/^.+=.+$/`") # noqa: E501
collection_formats = {}
path_params = {}
if 'dn' in local_var_params:
path_params['dn'] = local_var_params['dn'] # noqa: E501
query_params = []
header_params = dict(local_var_params.get('_headers', {}))
if 'if_match' in local_var_params:
header_params['If-Match'] = local_var_params['if_match'] # noqa: E501
if 'if_unmodified_since' in local_var_params:
header_params['If-Unmodified-Since'] = local_var_params['if_unmodified_since'] # noqa: E501
if 'user_agent' in local_var_params:
header_params['User-Agent'] = local_var_params['user_agent'] # noqa: E501
if 'accept_language' in local_var_params:
header_params['Accept-Language'] = local_var_params['accept_language'] # noqa: E501
if 'if_none_match' in local_var_params:
header_params['If-None-Match'] = local_var_params['if_none_match'] # noqa: E501
if 'if_modified_since' in local_var_params:
header_params['If-Modified-Since'] = local_var_params['if_modified_since'] # noqa: E501
if 'x_request_id' in local_var_params:
header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
if 'policies_dhcp_dnsupdate' in local_var_params:
body_params = local_var_params['policies_dhcp_dnsupdate']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/hal+json', 'text/html']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = local_var_params.get('_content_type',
self.api_client.select_header_content_type(
['application/json'],
'PUT', body_params)) # noqa: E501
# Authentication setting
auth_settings = ['basic'] # noqa: E501
response_types_map = {
400: "dict(str, object)",
401: "dict(str, object)",
403: "dict(str, object)",
422: "EmbeddedError",
500: "EmbeddedError",
503: "dict(str, object)",
502: "dict(str, object)",
504: "dict(str, object)",
201: "InlineResponse201",
202: "dict(str, object)",
204: None,
404: "dict(str, object)",
}
return self.api_client.call_api(
'/policies/dhcp_dnsupdate/{dn}', 'PUT',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_types_map=response_types_map,
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def udm_policies_dhcp_dnsupdate_object_remove(self, dn, **kwargs): # noqa: E501
"""Remove a DHCP Dynamic DNS policies object # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.udm_policies_dhcp_dnsupdate_object_remove(dn, async_req=True)
>>> result = thread.get()
:param dn: The (urlencoded) LDAP Distinguished Name (DN). (required)
:type dn: str
:param cleanup: Whether to perform a cleanup (e.g. of temporary objects, locks, etc).
:type cleanup: bool
:param recursive: Whether to remove referring objects (e.g. DNS or DHCP references).
:type recursive: bool
:param if_match: Provide entity tag to make a conditional request to not overwrite any values in a race condition.
:type if_match: str
:param if_unmodified_since: Provide last modified time to make a conditional request to not overwrite any values in a race condition.
:type if_unmodified_since: str
:param user_agent: The user agent.
:type user_agent: str
:param accept_language: The accepted response languages.
:type accept_language: str
:param if_none_match: Use request from cache by using the Etag entity tag if it matches.
:type if_none_match: str
:param if_modified_since: Use request from cache by using the Last-Modified date if it matches.
:type if_modified_since: str
:param x_request_id: A request-ID used for logging and tracing.
:type x_request_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.udm_policies_dhcp_dnsupdate_object_remove_with_http_info(dn, **kwargs) # noqa: E501
def udm_policies_dhcp_dnsupdate_object_remove_with_http_info(self, dn, **kwargs): # noqa: E501
"""Remove a DHCP Dynamic DNS policies object # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.udm_policies_dhcp_dnsupdate_object_remove_with_http_info(dn, async_req=True)
>>> result = thread.get()
:param dn: The (urlencoded) LDAP Distinguished Name (DN). (required)
:type dn: str
:param cleanup: Whether to perform a cleanup (e.g. of temporary objects, locks, etc).
:type cleanup: bool
:param recursive: Whether to remove referring objects (e.g. DNS or DHCP references).
:type recursive: bool
:param if_match: Provide entity tag to make a conditional request to not overwrite any values in a race condition.
:type if_match: str
:param if_unmodified_since: Provide last modified time to make a conditional request to not overwrite any values in a race condition.
:type if_unmodified_since: str
:param user_agent: The user agent.
:type user_agent: str
:param accept_language: The accepted response languages.
:type accept_language: str
:param if_none_match: Use request from cache by using the Etag entity tag if it matches.
:type if_none_match: str
:param if_modified_since: Use request from cache by using the Last-Modified date if it matches.
:type if_modified_since: str
:param x_request_id: A request-ID used for logging and tracing.
:type x_request_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: None
"""
local_var_params = locals()
all_params = [
'dn',
'cleanup',
'recursive',
'if_match',
'if_unmodified_since',
'user_agent',
'accept_language',
'if_none_match',
'if_modified_since',
'x_request_id'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth',
'_content_type',
'_headers'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method udm_policies_dhcp_dnsupdate_object_remove" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'dn' is set
if self.api_client.client_side_validation and ('dn' not in local_var_params or # noqa: E501
local_var_params['dn'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `dn` when calling `udm_policies_dhcp_dnsupdate_object_remove`") # noqa: E501
if self.api_client.client_side_validation and ('dn' in local_var_params and # noqa: E501
len(local_var_params['dn']) < 3): # noqa: E501
raise ApiValueError("Invalid value for parameter `dn` when calling `udm_policies_dhcp_dnsupdate_object_remove`, length must be greater than or equal to `3`") # noqa: E501
if self.api_client.client_side_validation and 'dn' in local_var_params and not re.search(r'^.+=.+$', local_var_params['dn']): # noqa: E501
raise ApiValueError("Invalid value for parameter `dn` when calling `udm_policies_dhcp_dnsupdate_object_remove`, must conform to the pattern `/^.+=.+$/`") # noqa: E501
collection_formats = {}
path_params = {}
if 'dn' in local_var_params:
path_params['dn'] = local_var_params['dn'] # noqa: E501
query_params = []
if 'cleanup' in local_var_params and local_var_params['cleanup'] is not None: # noqa: E501
query_params.append(('cleanup', local_var_params['cleanup'])) # noqa: E501
if 'recursive' in local_var_params and local_var_params['recursive'] is not None: # noqa: E501
query_params.append(('recursive', local_var_params['recursive'])) # noqa: E501
header_params = dict(local_var_params.get('_headers', {}))
if 'if_match' in local_var_params:
header_params['If-Match'] = local_var_params['if_match'] # noqa: E501
if 'if_unmodified_since' in local_var_params:
header_params['If-Unmodified-Since'] = local_var_params['if_unmodified_since'] # noqa: E501
if 'user_agent' in local_var_params:
header_params['User-Agent'] = local_var_params['user_agent'] # noqa: E501
if 'accept_language' in local_var_params:
header_params['Accept-Language'] = local_var_params['accept_language'] # noqa: E501
if 'if_none_match' in local_var_params:
header_params['If-None-Match'] = local_var_params['if_none_match'] # noqa: E501
if 'if_modified_since' in local_var_params:
header_params['If-Modified-Since'] = local_var_params['if_modified_since'] # noqa: E501
if 'x_request_id' in local_var_params:
header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/hal+json', 'text/html']) # noqa: E501
# Authentication setting
auth_settings = ['basic'] # noqa: E501
response_types_map = {}
return self.api_client.call_api(
'/policies/dhcp_dnsupdate/{dn}', 'DELETE',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_types_map=response_types_map,
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def udm_policies_dhcp_dnsupdate_object_search(self, **kwargs): # noqa: E501
"""Search for DHCP Dynamic DNS policies objects # noqa: E501
Information about the object type and links to search for objects. The found objects are either referenced as HAL links or embedded via HAL embedded resources. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.udm_policies_dhcp_dnsupdate_object_search(async_req=True)
>>> result = thread.get()
:param filter: A LDAP filter which may contain `UDM` property names instead of `LDAP` attribute names.
:type filter: str
:param position: Position which is used as search base.
:type position: str
:param scope: The LDAP search scope (sub, base, one).
:type scope: str
:param query: The values to search for (propertyname and search filter value). Alternatively with `filter` a raw LDAP filter can be given.
:type query: dict(str, object)
:param hidden: Include hidden/system objects in the response.
:type hidden: bool
:param properties: The properties which should be returned, if not given all properties are returned.
:type properties: list[str]
:param limit: **Broken/Experimental**: How many results should be shown per page.
:type limit: int
:param page: **Broken/Experimental**: The search page, starting at one.
:type page: int
:param dir: **Broken/Experimental**: The Sort direction (ASC or DESC).
:type dir: str
:param by: **Broken/Experimental**: Sort the search result by the specified property.
:type by: str
:param user_agent: The user agent.
:type user_agent: str
:param accept_language: The accepted response languages.
:type accept_language: str
:param if_none_match: Use request from cache by using the Etag entity tag if it matches.
:type if_none_match: str
:param if_modified_since: Use request from cache by using the Last-Modified date if it matches.
:type if_modified_since: str
:param x_request_id: A request-ID used for logging and tracing.
:type x_request_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: PoliciesDhcpDnsupdateList
"""
kwargs['_return_http_data_only'] = True
return self.udm_policies_dhcp_dnsupdate_object_search_with_http_info(**kwargs) # noqa: E501
def udm_policies_dhcp_dnsupdate_object_search_with_http_info(self, **kwargs): # noqa: E501
"""Search for DHCP Dynamic DNS policies objects # noqa: E501
Information about the object type and links to search for objects. The found objects are either referenced as HAL links or embedded via HAL embedded resources. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.udm_policies_dhcp_dnsupdate_object_search_with_http_info(async_req=True)
>>> result = thread.get()
:param filter: A LDAP filter which may contain `UDM` property names instead of `LDAP` attribute names.
:type filter: str
:param position: Position which is used as search base.
:type position: str
:param scope: The LDAP search scope (sub, base, one).
:type scope: str
:param query: The values to search for (propertyname and search filter value). Alternatively with `filter` a raw LDAP filter can be given.
:type query: dict(str, object)
:param hidden: Include hidden/system objects in the response.
:type hidden: bool
:param properties: The properties which should be returned, if not given all properties are returned.
:type properties: list[str]
:param limit: **Broken/Experimental**: How many results should be shown per page.
:type limit: int
:param page: **Broken/Experimental**: The search page, starting at one.
:type page: int
:param dir: **Broken/Experimental**: The Sort direction (ASC or DESC).
:type dir: str
:param by: **Broken/Experimental**: Sort the search result by the specified property.
:type by: str
:param user_agent: The user agent.
:type user_agent: str
:param accept_language: The accepted response languages.
:type accept_language: str
:param if_none_match: Use request from cache by using the Etag entity tag if it matches.
:type if_none_match: str
:param if_modified_since: Use request from cache by using the Last-Modified date if it matches.
:type if_modified_since: str
:param x_request_id: A request-ID used for logging and tracing.
:type x_request_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(PoliciesDhcpDnsupdateList, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'filter',
'position',
'scope',
'query',
'hidden',
'properties',
'limit',
'page',
'dir',
'by',
'user_agent',
'accept_language',
'if_none_match',
'if_modified_since',
'x_request_id'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth',
'_content_type',
'_headers'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method udm_policies_dhcp_dnsupdate_object_search" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
if self.api_client.client_side_validation and 'scope' in local_var_params and not re.search(r'^(sub|one|base|base\+one)$', local_var_params['scope']): # noqa: E501
raise ApiValueError("Invalid value for parameter `scope` when calling `udm_policies_dhcp_dnsupdate_object_search`, must conform to the pattern `/^(sub|one|base|base\+one)$/`") # noqa: E501
if self.api_client.client_side_validation and ('properties' in local_var_params and # noqa: E501
len(local_var_params['properties']) < 0): # noqa: E501
raise ApiValueError("Invalid value for parameter `properties` when calling `udm_policies_dhcp_dnsupdate_object_search`, number of items must be greater than or equal to `0`") # noqa: E501
if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 0: # noqa: E501
raise ApiValueError("Invalid value for parameter `limit` when calling `udm_policies_dhcp_dnsupdate_object_search`, must be a value greater than or equal to `0`") # noqa: E501
if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501
raise ApiValueError("Invalid value for parameter `page` when calling `udm_policies_dhcp_dnsupdate_object_search`, must be a value greater than or equal to `1`") # noqa: E501
if self.api_client.client_side_validation and 'dir' in local_var_params and not re.search(r'^(ASC|DESC)$', local_var_params['dir']): # noqa: E501
raise ApiValueError("Invalid value for parameter `dir` when calling `udm_policies_dhcp_dnsupdate_object_search`, must conform to the pattern `/^(ASC|DESC)$/`") # noqa: E501
collection_formats = {}
path_params = {}
query_params = []
if 'filter' in local_var_params and local_var_params['filter'] is not None: # noqa: E501
query_params.append(('filter', local_var_params['filter'])) # noqa: E501
if 'position' in local_var_params and local_var_params['position'] is not None: # noqa: E501
query_params.append(('position', local_var_params['position'])) # noqa: E501
if 'scope' in local_var_params and local_var_params['scope'] is not None: # noqa: E501
query_params.append(('scope', local_var_params['scope'])) # noqa: E501
if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501
query_params.append(('query', local_var_params['query'])) # noqa: E501
if 'hidden' in local_var_params and local_var_params['hidden'] is not None: # noqa: E501
query_params.append(('hidden', local_var_params['hidden'])) # noqa: E501
if 'properties' in local_var_params and local_var_params['properties'] is not None: # noqa: E501
query_params.append(('properties', local_var_params['properties'])) # noqa: E501
collection_formats['properties'] = 'multi' # noqa: E501
if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
query_params.append(('limit', local_var_params['limit'])) # noqa: E501
if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501
query_params.append(('page', local_var_params['page'])) # noqa: E501
if 'dir' in local_var_params and local_var_params['dir'] is not None: # noqa: E501
query_params.append(('dir', local_var_params['dir'])) # noqa: E501
if 'by' in local_var_params and local_var_params['by'] is not None: # noqa: E501
query_params.append(('by', local_var_params['by'])) # noqa: E501
header_params = dict(local_var_params.get('_headers', {}))
if 'user_agent' in local_var_params:
header_params['User-Agent'] = local_var_params['user_agent'] # noqa: E501
if 'accept_language' in local_var_params:
header_params['Accept-Language'] = local_var_params['accept_language'] # noqa: E501
if 'if_none_match' in local_var_params:
header_params['If-None-Match'] = local_var_params['if_none_match'] # noqa: E501
if 'if_modified_since' in local_var_params:
header_params['If-Modified-Since'] = local_var_params['if_modified_since'] # noqa: E501
if 'x_request_id' in local_var_params:
header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/hal+json', 'text/html']) # noqa: E501
# Authentication setting
auth_settings = ['basic'] # noqa: E501
response_types_map = {
400: "dict(str, object)",
401: "dict(str, object)",
403: "dict(str, object)",
422: "EmbeddedError",
500: "EmbeddedError",
503: "dict(str, object)",
502: "dict(str, object)",
504: "dict(str, object)",
200: "PoliciesDhcpDnsupdateList",
}
return self.api_client.call_api(
'/policies/dhcp_dnsupdate/', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_types_map=response_types_map,
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def udm_policies_dhcp_dnsupdate_object_template(self, **kwargs): # noqa: E501
"""Get a template for creating an DHCP Dynamic DNS policy object (contains all properties and their default values) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.udm_policies_dhcp_dnsupdate_object_template(async_req=True)
>>> result = thread.get()
:param position: Position which is used as search base.
:type position: str
:param superordinate: The superordinate DN of the object to create. `position` is sufficient.
:type superordinate: str
:param template: **Experimental**: A |UDM| template object.
:type template: str
:param user_agent: The user agent.
:type user_agent: str
:param accept_language: The accepted response languages.
:type accept_language: str
:param if_none_match: Use request from cache by using the Etag entity tag if it matches.
:type if_none_match: str
:param if_modified_since: Use request from cache by using the Last-Modified date if it matches.
:type if_modified_since: str
:param x_request_id: A request-ID used for logging and tracing.
:type x_request_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: PoliciesDhcpDnsupdate
"""
kwargs['_return_http_data_only'] = True
return self.udm_policies_dhcp_dnsupdate_object_template_with_http_info(**kwargs) # noqa: E501
def udm_policies_dhcp_dnsupdate_object_template_with_http_info(self, **kwargs): # noqa: E501
"""Get a template for creating an DHCP Dynamic DNS policy object (contains all properties and their default values) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.udm_policies_dhcp_dnsupdate_object_template_with_http_info(async_req=True)
>>> result = thread.get()
:param position: Position which is used as search base.
:type position: str
:param superordinate: The superordinate DN of the object to create. `position` is sufficient.
:type superordinate: str
:param template: **Experimental**: A |UDM| template object.
:type template: str
:param user_agent: The user agent.
:type user_agent: str
:param accept_language: The accepted response languages.
:type accept_language: str
:param if_none_match: Use request from cache by using the Etag entity tag if it matches.
:type if_none_match: str
:param if_modified_since: Use request from cache by using the Last-Modified date if it matches.
:type if_modified_since: str
:param x_request_id: A request-ID used for logging and tracing.
:type x_request_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: tuple(PoliciesDhcpDnsupdate, status_code(int), headers(HTTPHeaderDict))
"""
local_var_params = locals()
all_params = [
'position',
'superordinate',
'template',
'user_agent',
'accept_language',
'if_none_match',
'if_modified_since',
'x_request_id'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth',
'_content_type',
'_headers'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method udm_policies_dhcp_dnsupdate_object_template" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
collection_formats = {}
path_params = {}
query_params = []
if 'position' in local_var_params and local_var_params['position'] is not None: # noqa: E501
query_params.append(('position', local_var_params['position'])) # noqa: E501
if 'superordinate' in local_var_params and local_var_params['superordinate'] is not None: # noqa: E501
query_params.append(('superordinate', local_var_params['superordinate'])) # noqa: E501
if 'template' in local_var_params and local_var_params['template'] is not None: # noqa: E501
query_params.append(('template', local_var_params['template'])) # noqa: E501
header_params = dict(local_var_params.get('_headers', {}))
if 'user_agent' in local_var_params:
header_params['User-Agent'] = local_var_params['user_agent'] # noqa: E501
if 'accept_language' in local_var_params:
header_params['Accept-Language'] = local_var_params['accept_language'] # noqa: E501
if 'if_none_match' in local_var_params:
header_params['If-None-Match'] = local_var_params['if_none_match'] # noqa: E501
if 'if_modified_since' in local_var_params:
header_params['If-Modified-Since'] = local_var_params['if_modified_since'] # noqa: E501
if 'x_request_id' in local_var_params:
header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/hal+json', 'text/html']) # noqa: E501
# Authentication setting
auth_settings = ['basic'] # noqa: E501
response_types_map = {
400: "dict(str, object)",
401: "dict(str, object)",
403: "dict(str, object)",
422: "EmbeddedError",
500: "EmbeddedError",
503: "dict(str, object)",
502: "dict(str, object)",
504: "dict(str, object)",
200: "PoliciesDhcpDnsupdate",
}
return self.api_client.call_api(
'/policies/dhcp_dnsupdate/add', 'GET',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_types_map=response_types_map,
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))
def udm_policies_dhcp_dnsupdate_object_update(self, dn, policies_dhcp_dnsupdate, **kwargs): # noqa: E501
"""Modify an DHCP Dynamic DNS policy object (moving is currently not possible) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.udm_policies_dhcp_dnsupdate_object_update(dn, policies_dhcp_dnsupdate, async_req=True)
>>> result = thread.get()
:param dn: The (urlencoded) LDAP Distinguished Name (DN). (required)
:type dn: str
:param policies_dhcp_dnsupdate: (required)
:type policies_dhcp_dnsupdate: PoliciesDhcpDnsupdate
:param if_match: Provide entity tag to make a conditional request to not overwrite any values in a race condition.
:type if_match: str
:param if_unmodified_since: Provide last modified time to make a conditional request to not overwrite any values in a race condition.
:type if_unmodified_since: str
:param user_agent: The user agent.
:type user_agent: str
:param accept_language: The accepted response languages.
:type accept_language: str
:param if_none_match: Use request from cache by using the Etag entity tag if it matches.
:type if_none_match: str
:param if_modified_since: Use request from cache by using the Last-Modified date if it matches.
:type if_modified_since: str
:param x_request_id: A request-ID used for logging and tracing.
:type x_request_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: None
"""
kwargs['_return_http_data_only'] = True
return self.udm_policies_dhcp_dnsupdate_object_update_with_http_info(dn, policies_dhcp_dnsupdate, **kwargs) # noqa: E501
def udm_policies_dhcp_dnsupdate_object_update_with_http_info(self, dn, policies_dhcp_dnsupdate, **kwargs): # noqa: E501
"""Modify an DHCP Dynamic DNS policy object (moving is currently not possible) # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.udm_policies_dhcp_dnsupdate_object_update_with_http_info(dn, policies_dhcp_dnsupdate, async_req=True)
>>> result = thread.get()
:param dn: The (urlencoded) LDAP Distinguished Name (DN). (required)
:type dn: str
:param policies_dhcp_dnsupdate: (required)
:type policies_dhcp_dnsupdate: PoliciesDhcpDnsupdate
:param if_match: Provide entity tag to make a conditional request to not overwrite any values in a race condition.
:type if_match: str
:param if_unmodified_since: Provide last modified time to make a conditional request to not overwrite any values in a race condition.
:type if_unmodified_since: str
:param user_agent: The user agent.
:type user_agent: str
:param accept_language: The accepted response languages.
:type accept_language: str
:param if_none_match: Use request from cache by using the Etag entity tag if it matches.
:type if_none_match: str
:param if_modified_since: Use request from cache by using the Last-Modified date if it matches.
:type if_modified_since: str
:param x_request_id: A request-ID used for logging and tracing.
:type x_request_id: str
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _return_http_data_only: response data without head status code
and headers
:type _return_http_data_only: bool, optional
:param _preload_content: if False, the urllib3.HTTPResponse object will
be returned without reading/decoding response
data. Default is True.
:type _preload_content: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: None
"""
local_var_params = locals()
all_params = [
'dn',
'policies_dhcp_dnsupdate',
'if_match',
'if_unmodified_since',
'user_agent',
'accept_language',
'if_none_match',
'if_modified_since',
'x_request_id'
]
all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth',
'_content_type',
'_headers'
]
)
for key, val in six.iteritems(local_var_params['kwargs']):
if key not in all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method udm_policies_dhcp_dnsupdate_object_update" % key
)
local_var_params[key] = val
del local_var_params['kwargs']
# verify the required parameter 'dn' is set
if self.api_client.client_side_validation and ('dn' not in local_var_params or # noqa: E501
local_var_params['dn'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `dn` when calling `udm_policies_dhcp_dnsupdate_object_update`") # noqa: E501
# verify the required parameter 'policies_dhcp_dnsupdate' is set
if self.api_client.client_side_validation and ('policies_dhcp_dnsupdate' not in local_var_params or # noqa: E501
local_var_params['policies_dhcp_dnsupdate'] is None): # noqa: E501
raise ApiValueError("Missing the required parameter `policies_dhcp_dnsupdate` when calling `udm_policies_dhcp_dnsupdate_object_update`") # noqa: E501
if self.api_client.client_side_validation and ('dn' in local_var_params and # noqa: E501
len(local_var_params['dn']) < 3): # noqa: E501
raise ApiValueError("Invalid value for parameter `dn` when calling `udm_policies_dhcp_dnsupdate_object_update`, length must be greater than or equal to `3`") # noqa: E501
if self.api_client.client_side_validation and 'dn' in local_var_params and not re.search(r'^.+=.+$', local_var_params['dn']): # noqa: E501
raise ApiValueError("Invalid value for parameter `dn` when calling `udm_policies_dhcp_dnsupdate_object_update`, must conform to the pattern `/^.+=.+$/`") # noqa: E501
collection_formats = {}
path_params = {}
if 'dn' in local_var_params:
path_params['dn'] = local_var_params['dn'] # noqa: E501
query_params = []
header_params = dict(local_var_params.get('_headers', {}))
if 'if_match' in local_var_params:
header_params['If-Match'] = local_var_params['if_match'] # noqa: E501
if 'if_unmodified_since' in local_var_params:
header_params['If-Unmodified-Since'] = local_var_params['if_unmodified_since'] # noqa: E501
if 'user_agent' in local_var_params:
header_params['User-Agent'] = local_var_params['user_agent'] # noqa: E501
if 'accept_language' in local_var_params:
header_params['Accept-Language'] = local_var_params['accept_language'] # noqa: E501
if 'if_none_match' in local_var_params:
header_params['If-None-Match'] = local_var_params['if_none_match'] # noqa: E501
if 'if_modified_since' in local_var_params:
header_params['If-Modified-Since'] = local_var_params['if_modified_since'] # noqa: E501
if 'x_request_id' in local_var_params:
header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501
form_params = []
local_var_files = {}
body_params = None
if 'policies_dhcp_dnsupdate' in local_var_params:
body_params = local_var_params['policies_dhcp_dnsupdate']
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json', 'application/hal+json', 'text/html']) # noqa: E501
# HTTP header `Content-Type`
header_params['Content-Type'] = local_var_params.get('_content_type',
self.api_client.select_header_content_type(
['application/json'],
'PATCH', body_params)) # noqa: E501
# Authentication setting
auth_settings = ['basic'] # noqa: E501
response_types_map = {}
return self.api_client.call_api(
'/policies/dhcp_dnsupdate/{dn}', 'PATCH',
path_params,
query_params,
header_params,
body=body_params,
post_params=form_params,
files=local_var_files,
response_types_map=response_types_map,
auth_settings=auth_settings,
async_req=local_var_params.get('async_req'),
_return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
_preload_content=local_var_params.get('_preload_content', True),
_request_timeout=local_var_params.get('_request_timeout'),
collection_formats=collection_formats,
_request_auth=local_var_params.get('_request_auth'))