Template
- class CodeSignTemplate(api)
Bases:
FeatureBase- Parameters:
api (Authenticate)
- create(name, template_type, per_user=False, parent_folder='\\VED\\Code Signing\\Environment Templates', raise_if_already_exists=True)
Create an environment template.
- Parameters:
name (str) – Name of the template.
template_type (str | TemplateType) – String literal: Code Signing Apple Environment Template, Code Signing Certificate Environment Template, Code Signing CSP Environment Template, Code Signing DotNet Environment Template, Code Signing Key Pair Environment Template, or Code Signing GPG Environment Template
per_user (bool) – Immutable. The mode that supports multiple cryptographic objects to use for signing. Applies only to Code Signing Certificate Environment Template and Code Signing GPG Environment Template.
parent_folder (Object | str) – Config Object or Distinguished Name (DN) of the parent folder.
raise_if_already_exists (bool) – If the object already exists, raise an error.
- Returns:
A CodeSign environment template.
- Return type:
AppleTemplate | CertificateTemplate | CSPTemplate | DotNetTemplate | GPGTemplate | KeyPairTemplate
- delete(template, force=False)
Delete an environment template.
- Parameters:
template (str | Object | AppleTemplate | CertificateTemplate | CSPTemplate | DotNetTemplate | GPGTemplate | KeyPairTemplate) – Template object, Distinguished Name (DN) , or Config Object of the template.
force (bool) – Force the deletion of the template. If true, the template will be deleted even if it is in use. If false, the template will only be deleted if it is not in use.
- enumerate(_filter=None)
Enumerate the environment templates.
- Parameters:
_filter (str) – The template name.
- Returns:
List of environment templates.
- get(dn=None, guid=None, id=None)
Get an environment template using a Distinguished Name (DN), GUID, or Identifier.
- Parameters:
dn (str) – Distinguished Name (DN) of the template.
guid (str) – GUID of the template.
id (str) – Identifier of the template.
- Returns:
Template object.
- Return type:
AppleTemplate | CertificateTemplate | CSPTemplate | DotNetTemplate | GPGTemplate | KeyPairTemplate
- rename(template, new_dn)
Rename a template by giving it a new Distinguished Name (DN).
- Parameters:
template (str | Object | AppleTemplate | CertificateTemplate | CSPTemplate | DotNetTemplate | GPGTemplate | KeyPairTemplate) – Template object, Config Object, or Distinguished Name (DN) of the template.
new_dn (str) – The new Distinguished Name (DN) for the template.
- update(template, object_naming_pattern=None)
Update an environment template.
- Parameters:
template (Object | AppleTemplate | CertificateTemplate | CSPTemplate | DotNetTemplate | GPGTemplate | KeyPairTemplate) – The updated template.
object_naming_pattern (str) – Only valid if the template PerUser attribute is already set to true. The pattern that stores signing Certificate objects in the Policy Tree by a user’s identity. Each signer has a unique Policy folder. The default is $Sign.Project$$Sign.Environment$$Sign.User$.
Returns: