Infrastructure

Methods described in this section relate to the infrastructure API. These methods can be accessed at TenableAD.infrastructure.

class InfrastructureAPI(api: restfly.session.APISession)[source]
create(name: str, login: str, password: str) List[Dict][source]

Creates a new infrastructure instance with inputs of name, username and password.

Parameters
  • name (str) – The new name for the infrastructure instance.

  • login (str) – The login name for the infrastructure instance.

  • password (str) – The password for the infrastructure instance.

Returns

Newly created infrastructure instance.

Return type

list

Examples

>>> tad.infrastructure.create(
...     name='test_user',
...     login='test_user@gmail.com',
...     password='tenable.ad'))
delete(infrastructure_id: str)[source]

Deletes the particular infrastructure instance.

Parameters

infrastructure_id (str) – The infrastructure instance identifier.

Return type

None

Examples

>>> tad.infrastructure.delete(infrastructure_id='1')
details(infrastructure_id: str) Dict[source]

Gets the details of particular infrastructure instance.

Parameters

infrastructure_id (str) – The infrastructure instance identifier.

Returns

Details of particular infrastructure_id.

Return type

dict

Examples

>>> tad.infrastructure.details(infrastructure_id='1')
list() List[Dict][source]

Retrieves the list of infrastructures.

Returns

List of infrastructure instances.

Return type

list

Examples

>>> tad.infrastructure.list()
update(infrastructure_id: str, **kwargs) Dict[source]

Updates the infrastructure of the specific infrastructure instance.

Parameters
  • infrastructure_id (str) – The infrastructure instance identifier.

  • name (optional, str) – New name to be updated.

  • login (optional, str) – New login name to be updated.

  • password (optional, str) – New password to be updated.

Returns

Updated infrastructure instance.

Return type

dict

Examples

>>> tad.infrastructure.update(
...     infrastructure_id='1',
...     login='updated_login@tenable.com',
...     name='updated_user')