Type Alias EnvCertificate

EnvCertificate: {
    activateCertificate(
        certificateId: string,
        wait?: boolean,
        interval?: number,
        retries?: number,
    ): Promise<CertificateResponse>;
    createCertificate(
        active: boolean,
        certificate: string,
        privateKey: string,
        wait?: boolean,
        interval?: number,
        retries?: number,
    ): Promise<CertificateResponse>;
    deactivateCertificate(
        certificateId: string,
        wait?: boolean,
        interval?: number,
        retries?: number,
    ): Promise<CertificateResponse>;
    deleteCertificate(
        certificateId: string,
        force?: boolean,
        interval?: number,
        retries?: number,
    ): Promise<CertificateResponse>;
    deleteCertificates(
        force?: boolean,
        interval?: number,
        retries?: number,
    ): Promise<CertificateResponse[]>;
    isCertificateActive(certificateId: string): Promise<boolean>;
    isCertificateLive(certificateId: string): Promise<boolean>;
    readCertificate(certificateId: string): Promise<CertificateResponse>;
    readCertificates(noDecode?: boolean): Promise<CertificateResponse[]>;
    updateCertificate(
        certificateId: string,
        active: boolean,
    ): Promise<CertificateResponse>;
}

Type declaration

  • activateCertificate:function
    • Activate certificate

      Parameters

      • certificateId: string

        ID of the certificate

      • Optionalwait: boolean

        Wait until certificate is live (use interval and retries to modify default behavior)

      • Optionalinterval: number

        Only applies when wait=true: Time (in milliseconds) to wait between retries (default: 5000)

      • Optionalretries: number

        Only applies when wait=true: How many times to retry (default: 24)

      Returns Promise<CertificateResponse>

      a promise that resolves to a certificate object

  • createCertificate:function
    • Create certificate

      Parameters

      • active: boolean

        The active status of the certificate. Set this to true for the certificate to actively be served.

      • certificate: string

        The PEM formatted certificate.

      • privateKey: string

        The private key for the certificate. For security reasons, only insert requests include this field.

      • Optionalwait: boolean

        Wait until certificate is live (use interval and retries to modify default behavior)

      • Optionalinterval: number

        Only applies when wait=true: Time (in milliseconds) to wait between retries (default: 5000)

      • Optionalretries: number

        Only applies when wait=true: How many times to retry (default: 24)

      Returns Promise<CertificateResponse>

      a promise that resolves to a certificate object

  • deactivateCertificate:function
    • Deactivate certificate

      Parameters

      • certificateId: string

        ID of the certificate

      • Optionalwait: boolean

        Wait until certificate is live (use interval and retries to modify default behavior)

      • Optionalinterval: number

        Only applies when wait=true: Time (in milliseconds) to wait between retries (default: 5000)

      • Optionalretries: number

        Only applies when wait=true: How many times to retry (default: 24)

      Returns Promise<CertificateResponse>

      a promise that resolves to a certificate object

  • deleteCertificate:function
    • Delete certificate

      Parameters

      • certificateId: string

        certificate id/name

      • Optionalforce: boolean

        force deletion of active certificate by attempting to deactivate it (use interval and retries to modify default behavior)

      • Optionalinterval: number

        Only applies when force=true: Time (in milliseconds) to wait between retries (default: 5000)

      • Optionalretries: number

        Only applies when force=true: How many times to retry (default: 24)

      Returns Promise<CertificateResponse>

      a promise that resolves to a certificate object

  • deleteCertificates:function
    • Delete all certificates

      Parameters

      • Optionalforce: boolean

        force deletion of active certificate by attempting to deactivate it (use interval and retries to modify default behavior)

      • Optionalinterval: number

        Only applies when force=true: Time (in milliseconds) to wait between retries (default: 5000)

      • Optionalretries: number

        Only applies when force=true: How many times to retry (default: 24)

      Returns Promise<CertificateResponse[]>

      a promise that resolves to a certificate object

  • isCertificateActive:function
    • Check if certificate is active

      Parameters

      • certificateId: string

        ID of the certificate

      Returns Promise<boolean>

      a promise that resolves to true or false

  • isCertificateLive:function
    • Check if certificate is live

      Parameters

      • certificateId: string

        ID of the certificate

      Returns Promise<boolean>

      a promise that resolves to true or false

  • readCertificate:function
  • readCertificates:function
  • updateCertificate:function
    • Update certificate

      Parameters

      • certificateId: string

        ID of the certificate

      • active: boolean

        The active status of the certificate. Set this to true for the certificate to actively be served.

      Returns Promise<CertificateResponse>

      a promise that resolves to a certificate object

MMNEPVFCICPMFPCPTTAAATR