Skip to content
API Reference

Secrets

Create
client.Zones.Secrets.New(ctx, zoneID, params) (*Secret, error)
POST/zones/{zone_id}/secrets
List
client.Zones.Secrets.List(ctx, zoneID, params) (*[]Secret, error)
GET/zones/{zone_id}/secrets
Delete
client.Zones.Secrets.Delete(ctx, id, params) error
DELETE/zones/{zone_id}/secrets/{id}
Update
client.Zones.Secrets.Update(ctx, id, params) (*Secret, error)
PATCH/zones/{zone_id}/secrets/{id}
Retrieve
client.Zones.Secrets.Get(ctx, id, params) (*ZoneSecretGetResponse, error)
GET/zones/{zone_id}/secrets/{id}
ModelsExpand Collapse
type Secret struct{…}
ID string

A globally unique opaque identifier

minLength1
CreatedAt Time
formatdate-time
EntityID string

A globally unique opaque identifier

minLength1
Name string

A name for the entity to be displayed in UI

Type SecretType
Accepts one of the following:
const SecretTypeToken SecretType = "token"
const SecretTypePassword SecretType = "password"
UpdatedAt Time
formatdate-time
Version int64
minimum1
ZoneID string

A globally unique opaque identifier

minLength1
Description stringoptional

A description of the entity

maxLength128
Metadata anyoptional

A JSON object containing arbitrary metadata. Metadata will not be encrypted.

type SecretPasswordFields struct{…}
Password string
Type SecretPasswordFieldsType
Username string
type SecretTokenFields struct{…}
Token string
Type SecretTokenFieldsType