models module - BlueCat Python Library - 24.2

BlueCat Python Library Guide

Locale
English
Product name
BlueCat Python Library
Version
24.2

Models representing all Address Manager object types supported in the API.

class bluecat_libraries.address_manager.api.models.APIAccessRight

Bases: dict

Model for the BAM API object type APIAccessRight.

Key entityId:

ID of the object to which the access right applies. Value type is int. Must be greater than 0.

Key userId:

The access right’s owner’s ID. Value type is int. Must be greater than 0.

Key value:

Value must be “HIDE”, “VIEW”, “ADD”, “CHANGE”, or “FULL”.

Key overrides:

(Optional) Override access rights of entityId’s descendants (by default, they inherit entityId’s access right). Value type is dict[str, str]. Keys are object types to be overriden; values are access right values.

Key properties:

(Optional) Additional properties on the access right. Value type is dict[str, str].

staticmethod from_raw_model(data)

Parameters Description
data (dict[str, str])

Dict obtained by JSON-deserializing an APIAccessRight returned by a BAM endpoint.

Returns: Access right object.

Return type: APIAccessRight

staticmethod to_raw_model(data)

Parameters Description
data (dict[str, Any])

APIAccessRight object or dict equivalent.

Returns: Dict that, once JSON-serialized, can be passed to BAM endpoints.

Return type: dict[str, str]

class bluecat_libraries.address_manager.api.models.APIData

Bases: dict

Model for the BAM API object type APIData.

Key name:

The name of the probe to collect data. Value type is str.

Key properties:

Additional properties on the probe. Value must be list.

staticmethod from_raw_model(data)

Parameters Description
data (dict[str, str])

Dict obtained by JSON-deserializing an APIData returned by a BAM endpoint.

Returns: API Data object.

Return type: APIData

class bluecat_libraries.address_manager.api.models.APIDeploymentOption

Bases: dict

Model for the BAM API object type APIDeploymentOption.

Key id:

The deployment option’s ID. Value type is int.

Key type:

The deployment option’s type. Must be a valid BAM option type.

Key name:

The deployment option’s name. Value type is str.

Key value:

Field values of the option. Value type is list[str].

Key properties:

(Optional) Additional properties on the deployment option. Value type is dict[str, str].

staticmethod from_raw_model(data)

Parameters Description
data (dict[str, str])

Dict obtained by JSON-deserializing an APIDeploymentOption returned by a BAM endpoint.

Returns: Deployment role object, or None if input’s id is 0.

Return type: APIDeploymentOption | None

staticmethod to_raw_model(data)

Parameters Description
data (dict[str, Any])

APIDeploymentOption object or dict equivalent.

Returns: Dict that, once JSON-serialized, can be passed to BAM endpoints.

Return type: dict[str, str]

class bluecat_libraries.address_manager.api.models.APIDeploymentRole

Bases: dict

Model for the BAM API object type APIDeploymentRole.

Key id:

The deployment role’s ID. Value type is int.

Key type:

Value must be “NONE”, “MASTER”, “MASTER_HIDDEN”, “SLAVE”, “SLAVE_STEALTH”, “FORWARDER”, “STUB”, “RECURSION”, “PEER”, or “AD MASTER”.

Key service:

Value must be “DNS”, “DHCP”, or “TFTP”.

Key entityId:

The deployed entity’s ID. Value type is int. Must be greater than 0.

Key serviceInterfaceId:

ID of the server interface being deployed into. Value type is int. Must be greater than 0.

Key properties:

(Optional) Additional properties on the deployment role. Value type is dict[str, str].

staticmethod from_raw_model(data)

Parameters Description
data (dict[str, str])

Dict obtained by JSON-deserializing an APIDeploymentRole returned by a BAM endpoint.

Returns: Deployment role object, or None if input’s id is 0.

Return type: APIDeploymentRole | None

staticmethod to_raw_model(data)

Parameters Description
data (dict[str, Any])

APIDeploymentRole object or dict equivalent.

Returns: Dict that, once JSON-serialized, can be passed to BAM endpoints.

Return type: dict[str, str]

class bluecat_libraries.address_manager.api.models.APIEntity

Bases: dict

Model for the BAM API object type APIEntity.

Key id:

The entity’s ID. Value type is int.

Key name:

The entity’s name. Value type is str | None.

Key type:

The entity’s type. Must be a valid BAM object type.

Key properties:

(Optional) Additional properties on the entity. Value must be dict[str, str].

staticmethod from_raw_model(data)

Parameters Description
data (dict[str, str])

Dict obtained by JSON-deserializing an APIEntity returned by a BAM endpoint.

Returns: Entity object, or None if input’s id is 0.

Return type: APIEntity | None

staticmethod to_raw_model(data)

Parameters Description
data (dict[str, Any])

APIEntity object or dict equivalent.

Returns: Dict that, once JSON-serialized, can be passed to BAM endpoints.

Return type: dict[str, str]

class bluecat_libraries.address_manager.api.models.APIUserDefinedField

Bases: dict

Model for the BAM API object type APIUserDefinedField.

Key name:

The UDF’s unique name. Value type is str.

Key displayName:

The UDF’s display name. Value type is str.

Key type:

The UDF’s type. Must be a valid BAM UDF type.

Key defaultValue:

The UDF’s default value. Value type is str.

Key required:

If true, users must enter data in the field. Value type is bool.

Key hideFromSearch:

If true, the UDF is hidden from search. Value type is bool.

Key validatorProperties:

(Optional) The UDF’s validation properties. Value type is dict[str, str].

Key predefinedValues:

(Optional) The UDF’s preset values. Value type is list[str].

Key properties:

(Optional) Additional properties on the UDF. Value type is dict[str, str].

staticmethod from_raw_model(data)

Parameters Description
data (dict[str, str])

Dict obtained by JSON-deserializing an APIUserDefinedField returned by a BAM endpoint.

Returns: UDF object.

Return type: APIUserDefinedField

staticmethod to_raw_model(data)

Parameters Description
data (dict[str, Any])

APIUserDefinedField object or dict equivalent.

Returns: Dict that, once JSON-serialized, can be passed to BAM endpoints.

Return type: dict[str, str]

class bluecat_libraries.address_manager.api.models.ResponsePolicySearchResult

Bases: dict

Model for the BAM API object type ResponsePolicySearchResult.

Key configId:

ID of the parent configuration in which the response policy item is configured. Value type is int.

Key parentIds:

IDs of parent response policy or response policy zone objects. Value type is list[int]. If policy item is associated with a Response Policy, it is the Response Policy object ID. If policy item is associated with BlueCat Security feed data, it is the RP Zone object ID.

Key name:

The response policy item’s name. Value type is str.

Key category:

The name of the BlueCat security feed category associated with the policy item. Value type is str | None.

Key policyType:

The response policy’s type. Value type is str.

staticmethod from_raw_model(data)

Parameters Description
data (dict[str, str])

Dict obtained by JSON-deserializing a ResponsePolicySearchResult returned by a BAM endpoint.

Returns: Response policy search result object.

Return type: ResponsePolicySearchResult

class bluecat_libraries.address_manager.api.models.RetentionSettings

Bases: dict

Model for BAM history retention settings.

Key admin:

(Optional) The number of days of administrative history to keep in the database. Value type is int.

Key sessionEvent:

(Optional) The number of days of session event history to keep in the database. Value type is int.

Key ddns:

(Optional) The number of days of DDNS history to keep in the database. Value type is int.

Key dhcp:

(Optional) The number of days of DHCP history to keep in the database. Value type is int.

Note:
  • The value for sessionEvent must be greater than or equal to the value of each of the other types.

  • The input value for the retention periods (in days) must be greater than or equal to one.

  • Setting the value to -1 is equivalent to Retain Indefinitely in the BAM database.

  • Setting the DDNS and DHCP retention setting to 0 is equivalent to Do Not Retain, and these records no longer write to the database. So, if a user has enabled the audit data export feature, they will get no records written to their audit data.

staticmethod from_raw_model(data)

Parameters Description
data (str)

A value in the format returned by BAM method “updateRetentionSettings” that holds the ordered settings for: admin, sessionEvent, ddns, and dhcp.

Returns: Retention settings object.

Return type: RetentionSettings

staticmethod to_raw_model(data)

Parameters Description
data (dict[str, Any])

RetentionSettings object or dict equivalent.

Returns: Dict that, once JSON-serialized, can be passed to BAM endpoints.

Return type: dict

class bluecat_libraries.address_manager.api.models.UDLDefinition

Bases: dict

Model for the structure describing User-Defined Link definitions used by Address Manager’s API.

Note:

Starting from Address Manager v9.4.0, the option description is supported.

  • The maximum length of this field is 512 characters.

  • If the description field is not specified, it will be null.

  • On upgrading from Address Manager v9.3.0, the description for the existing links will be populated as null.

Key linkType:

The UDL’s unique name. Value type is str. Cannot be a reserved link type name and cannot start with “BCN_”.

Key displayName:

The UDL’s name as displayed in BAM. Value type is str.

Key sourceEntityTypes:

The UDL’s source entity types. Value type is list[str].

Key destinationEntityTypes:

The UDL’s destination entity types. Value type is list[str].

Key description:

(Optional) The description for the user-defined link.

staticmethod from_raw_model(data)

Parameters Description
data (dict[str, str])

Dict obtained by JSON-deserializing a UDL returned by a BAM endpoint.

Returns: UDL definition object.

Return type: UDLDefinition

staticmethod to_raw_model(data)

Parameters Description
data (dict[str, Any])

UDLDefinition object or dict equivalent.

Returns: JSON-encoded string that can be passed to BAM endpoints.

Return type: str

class bluecat_libraries.address_manager.api.models.UDLRelationship

Bases: dict

Model for the structure describing User-Defined Link relationships used by Address Manager’s API.

Note:

Starting from Address Manager v9.4.0, the option description and destinationEntityIds are supported.

Key linkType:

The UDL’s link type. Value type is str.

Key sourceEntityId:

The UDL’s source entity ID. Value type is int.

Key description:

(optional) The description for the user-defined link.

Key destinationEntityId:

(Optional) The UDL’s destination entity ID. Value type is int.

Key destinationEntityIds:

(Optional) The list of UDL’s destination entity ID, comma-separated inside square brackets.

staticmethod from_raw_model(data)

Parameters Description
data (dict[str, str])

Dict obtained by JSON-deserializing the result of UDLRelationship.to_raw_model(<something>).

Returns: UDL relationship object.

Return type: UDLRelationship

staticmethod to_raw_model(data)

Parameters Description
data (dict[str, Any])

UDLRelationship object or dict equivalent.

Returns: JSON-encoded string that can be passed to BAM endpoints.

Return type: str