Profiles

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

class ProfilesAPI(api: APISession)[source]
commit(profile_id: str) None[source]

Commits change of the related profile

Parameters:

profile_id (str) – The profile instance identifier.

Returns:

None

Example

>>> tie.profiles.commit('1')
copy_profile(from_id: str, name: str, directories: List[int]) Dict[source]

Creates a new profile from another profile

Parameters:
  • from_id (str) – The profile instance identifier user wants to copy.

  • name (str) – The name of new profile.

  • directories (List[int]) – The list of directory ids.

Returns:

The copied role object.

Return type:

dict

Examples

>>> tie.profiles.copy_profile(
...     from_id='1',
...     name='Copied name',
...     directories=[1, 2]
...     )
create(name: str, directories: List[int]) List[Dict][source]

Create a profile

Parameters:
  • name (str) – The name of new profile.

  • directories (List[int]) – The list of directory identifiers.

Returns:

The created profile objects

Return type:

list[dict]

Example

>>> tie.profiles.create(
...     name='ExampleProfile',
...     directories=[1, 2]
...     )
delete(profile_id: str) None[source]

Delete an existing profile

Parameters:

profile_id (str) – The profile instance identifier.

Return type:

None

Examples

>>> tie.profiles.delete(profile_id='1')
details(profile_id: str) Dict[source]

Retrieves the details for a specific profile

Parameters:

profile_id (str) – The profile instance identifier.

Returns:

The profile object.

Return type:

dict

Examples

>>> tie.profiles.details('1')
list() List[Dict][source]

Retrieve all profiles

Returns:

The list of profile objects

Return type:

list[dict]

Examples

>>> tie.profiles.list()
unstage(profile_id: str) None[source]

Unstages changes of the related profile

Parameters:

profile_id (str) – The profile instance identifier.

Returns:

None

Example

>>> tie.profiles.unstage('1')
update(profile_id: str, **kwargs) Dict[source]

Update an existing profile

Parameters:
  • profile_id (str) – The profile instance identifier.

  • name (optional, str) – The name of profile.

  • deleted (optional, bool) – is the profile deleted?

  • directories (optional, List[int]) – The list of directory ids.

Returns:

The updated profile object.

Return type:

dict

Examples

>>> tie.profiles.update(
...     profile_id='1',
...     name='EDITED'
...     )