Device Certificate Creation

class DeviceCertificateCreation(api)

Bases: _ClientWorkBase

create(name, certificate_container, ca_template, contacts, description=None, naming_pattern='$Client.DNSName$', common_name='$Client.DNSName$', organization=None, organizational_unit=None, city_locality=None, state_province=None, country=None, subject_alternative_names=False, automatic_renewal=True, renewal_days_before=30, key_bit_strength=2048, allow_certificate_sharing=False, attributes=None, get_if_already_exists=True)
Parameters
  • name (str) – The name of the client work

  • certificate_container (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the folder to place certificates.

  • ca_template (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the Certificate Authority.

  • contacts (List[ident.Identity, str]) – List of Identity Object or Prefixed Name of the contacts.

  • description (str) – A description for the certificates

  • naming_pattern (str) – Object naming pattern (defaults to: $Client.DNSName$)

  • common_name (str) – Common name for the certificate

  • organization (str) – Organization for the certificate

  • organizational_unit (List[str]) – A list of organizational units for the certificate

  • city_locality (str) – A city or locality for the certificate

  • state_province (str) – A state or province for the certificate

  • country (str) – A country code for the certificate

  • subject_alternative_names (bool) – A subject alternative name for the certificate

  • automatic_renewal (bool) – Enable automatic renewal (defaults to True)

  • renewal_days_before (int) – Days before expiration for automatic renewal (defaults to 30)

  • key_bit_strength (int) – Key size of the certificates (defaults to 2048)

  • allow_certificate_sharing (bool) – Allow sharing with mobile devices (default sto False)

  • attributes (dict) – Additional attributes to apply to the object.

  • get_if_already_exists (bool) – If the objects already exists, just return it as is.

Returns

Config Object of the client work.

delete(work)

Deletes the client work.

Parameters

work (Union[config.Object, str]) – Config Object or name of the client work.

disable(work)

Disables the client work.

Parameters

work (Union[config.Object, str]) – Config Object or name of the client work.

enable(work)

Enables the client work.

Parameters

work (Union[config.Object, str]) – Config Object or name of the client work.

get(name, raise_error_if_not_exists=True)
Parameters
  • name (str) – The name of the client work.

  • raise_error_if_not_exists (bool) – Raise an exception if the client work does not exist.

Returns

Config Object of the client work.

list()

Lists all client work.

Returns

List of Config Object of all client work.