Certificate Credential

class CertificateCredential(api)

Bases: _CredentialBase

create(name, parent_folder, certificate, 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.

  • certificate (str) – Base64-encoded PKCS#12 or PFX certificate.

  • 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
Returns

Config Object of the credential object.