Generic Credential
- class GenericCredential(api)
Bases:
_CredentialBase
- create(name, parent_folder, generic, password=None, expiration=6, description=None, encryption_key=None, shared=False, contacts=None, get_if_already_exists=True)
- Parameters
name (str) – Name of the credential object.
parent_folder (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the parent folder.
generic (str) – Unclassified binary data.
password (str) – Password.
expiration (int) – Number months from today at which the credential expires.
description (str) – Description of the credential object.
encryption_key (str) – Encryption Key used to protect the credential data.
shared (bool) – If
True
, the credential can be shared between multiple objects.contacts (List[Union[ident.Identity, str]]) – List of Identity Object or Prefixed Name to be set as contacts.
get_if_already_exists (bool) – If the objects already exists, just return it as is.
- Returns
Config Object of the credential object.
- delete(credential)
Deletes the credential object.
- Parameters
credential (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the credential object.
- get(credential_dn, raise_error_if_not_exists=True)
- Parameters
credential_dn (str) – Distinguished Name (DN) of the credential object.
raise_error_if_not_exists (bool) – Raise an exception if the credential Distinguished Name (DN) does not exist.
- Returns
Config Object of the credential object.