Skip to content
Start here

Get Zero Trust certificate configuration

Deprecated
client.ZeroTrust.Gateway.Configurations.CustomCertificate.Get(ctx, query) (*CustomCertificateSettings, error)
GET/accounts/{account_id}/gateway/configuration/custom_certificate

Retrieve the current Zero Trust certificate configuration.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
ParametersExpand Collapse
query GatewayConfigurationCustomCertificateGetParams
AccountID param.Field[string]
ReturnsExpand Collapse
type CustomCertificateSettings struct{…}

Specify custom certificate settings for BYO-PKI. This field is deprecated; use certificate instead.

Enabled bool

Specify whether to enable a custom certificate authority for signing Gateway traffic.

ID stringOptional

Specify the UUID of the certificate (ID from MTLS certificate store).

BindingStatus stringOptional

Indicate the internal certificate status.

UpdatedAt TimeOptional
formatdate-time

Get Zero Trust certificate configuration

package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/cloudflare-go"
  "github.com/stainless-sdks/cloudflare-go/option"
  "github.com/stainless-sdks/cloudflare-go/zero_trust"
)

func main() {
  client := cloudflare.NewClient(
    option.WithAPIToken("Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY"),
  )
  customCertificateSettings, err := client.ZeroTrust.Gateway.Configurations.CustomCertificate.Get(context.TODO(), zero_trust.GatewayConfigurationCustomCertificateGetParams{
    AccountID: cloudflare.F("699d98642c564d2e855e9661899b7252"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", customCertificateSettings.ID)
}
{
  "enabled": true,
  "id": "d1b364c5-1311-466e-a194-f0e943e0799f",
  "binding_status": "pending_deployment",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
Returns Examples
{
  "enabled": true,
  "id": "d1b364c5-1311-466e-a194-f0e943e0799f",
  "binding_status": "pending_deployment",
  "updated_at": "2019-12-27T18:11:19.117Z"
}