# Shared ## Domain Types ### ASN - `type ASN int64` ### Audit Log - `type AuditLog struct{…}` - `ID string` A string that uniquely identifies the audit log. - `Action AuditLogAction` - `Result bool` A boolean that indicates if the action attempted was successful. - `Type string` A short string that describes the action that was performed. - `Actor AuditLogActor` - `ID string` The ID of the actor that performed the action. If a user performed the action, this will be their User ID. - `Email string` The email of the user that performed the action. - `IP string` The IP address of the request that performed the action. - `Type AuditLogActorType` The type of actor, whether a User, Cloudflare Admin, or an Automated System. - `const AuditLogActorTypeUser AuditLogActorType = "user"` - `const AuditLogActorTypeAdmin AuditLogActorType = "admin"` - `const AuditLogActorTypeCloudflare AuditLogActorType = "Cloudflare"` - `Interface string` The source of the event. - `Metadata unknown` An object which can lend more context to the action being logged. This is a flexible value and varies between different actions. - `NewValue string` The new value of the resource that was modified. - `OldValue string` The value of the resource before it was modified. - `Owner AuditLogOwner` - `ID string` Identifier - `Resource AuditLogResource` - `ID string` An identifier for the resource that was affected by the action. - `Type string` A short string that describes the resource that was affected by the action. - `When Time` A UTC RFC3339 timestamp that specifies when the action being logged occured. ### Certificate CA - `type CertificateCA string` The Certificate Authority that will issue the certificate - `const CertificateCADigicert CertificateCA = "digicert"` - `const CertificateCAGoogle CertificateCA = "google"` - `const CertificateCALetsEncrypt CertificateCA = "lets_encrypt"` - `const CertificateCASSLCom CertificateCA = "ssl_com"` ### Certificate Request Type - `type CertificateRequestType string` Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers). - `const CertificateRequestTypeOriginRSA CertificateRequestType = "origin-rsa"` - `const CertificateRequestTypeOriginECC CertificateRequestType = "origin-ecc"` - `const CertificateRequestTypeKeylessCertificate CertificateRequestType = "keyless-certificate"` ### Cloudflare Tunnel - `type CloudflareTunnel struct{…}` A Cloudflare Tunnel that connects your origin to Cloudflare's edge. - `ID string` UUID of the tunnel. - `AccountTag string` Cloudflare account ID - `ConfigSrc CloudflareTunnelConfigSrc` Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard. - `const CloudflareTunnelConfigSrcLocal CloudflareTunnelConfigSrc = "local"` - `const CloudflareTunnelConfigSrcCloudflare CloudflareTunnelConfigSrc = "cloudflare"` - `Connections []CloudflareTunnelConnection` The Cloudflare Tunnel connections between your origin and Cloudflare's edge. - `ID string` UUID of the Cloudflare Tunnel connection. - `ClientID string` UUID of the Cloudflare Tunnel connector. - `ClientVersion string` The cloudflared version used to establish this connection. - `ColoName string` The Cloudflare data center used for this connection. - `IsPendingReconnect bool` Cloudflare continues to track connections for several minutes after they disconnect. This is an optimization to improve latency and reliability of reconnecting. If `true`, the connection has disconnected but is still being tracked. If `false`, the connection is actively serving traffic. - `OpenedAt Time` Timestamp of when the connection was established. - `OriginIP string` The public IP address of the host running cloudflared. - `UUID string` UUID of the Cloudflare Tunnel connection. - `ConnsActiveAt Time` Timestamp of when the tunnel established at least one connection to Cloudflare's edge. If `null`, the tunnel is inactive. - `ConnsInactiveAt Time` Timestamp of when the tunnel became inactive (no connections to Cloudflare's edge). If `null`, the tunnel is active. - `CreatedAt Time` Timestamp of when the resource was created. - `DeletedAt Time` Timestamp of when the resource was deleted. If `null`, the resource has not been deleted. - `Metadata unknown` Metadata associated with the tunnel. - `Name string` A user-friendly name for a tunnel. - `RemoteConfig bool` If `true`, the tunnel can be configured remotely from the Zero Trust dashboard. If `false`, the tunnel must be configured locally on the origin machine. - `Status CloudflareTunnelStatus` The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge). - `const CloudflareTunnelStatusInactive CloudflareTunnelStatus = "inactive"` - `const CloudflareTunnelStatusDegraded CloudflareTunnelStatus = "degraded"` - `const CloudflareTunnelStatusHealthy CloudflareTunnelStatus = "healthy"` - `const CloudflareTunnelStatusDown CloudflareTunnelStatus = "down"` - `TunType CloudflareTunnelTunType` The type of tunnel. - `const CloudflareTunnelTunTypeCfdTunnel CloudflareTunnelTunType = "cfd_tunnel"` - `const CloudflareTunnelTunTypeWARPConnector CloudflareTunnelTunType = "warp_connector"` - `const CloudflareTunnelTunTypeWARP CloudflareTunnelTunType = "warp"` - `const CloudflareTunnelTunTypeMagic CloudflareTunnelTunType = "magic"` - `const CloudflareTunnelTunTypeIPSec CloudflareTunnelTunType = "ip_sec"` - `const CloudflareTunnelTunTypeGRE CloudflareTunnelTunType = "gre"` - `const CloudflareTunnelTunTypeCNI CloudflareTunnelTunType = "cni"` ### Error Data - `type ErrorData struct{…}` - `Code int64` - `DocumentationURL string` - `Message string` - `Source ErrorDataSource` - `Pointer string` ### Identifier - `type Identifier struct{…}` - `ID string` Identifier. ### Load Balancer Preview - `type LoadBalancerPreview struct{…}` - `Pools map[string, string]` Monitored pool IDs mapped to their respective names. - `PreviewID string` ### Member - `type Member struct{…}` - `ID string` Membership identifier tag. - `Email string` The contact email address of the user. - `Policies []MemberPolicy` Access policy for the membership - `ID string` Policy identifier. - `Access MemberPoliciesAccess` Allow or deny operations against the resources. - `const MemberPoliciesAccessAllow MemberPoliciesAccess = "allow"` - `const MemberPoliciesAccessDeny MemberPoliciesAccess = "deny"` - `PermissionGroups []MemberPoliciesPermissionGroup` A set of permission groups that are specified to the policy. - `ID string` Identifier of the permission group. - `Meta MemberPoliciesPermissionGroupsMeta` Attributes associated to the permission group. - `Key string` - `Value string` - `Name string` Name of the permission group. - `ResourceGroups []MemberPoliciesResourceGroup` A list of resource groups that the policy applies to. - `ID string` Identifier of the resource group. - `Scope []MemberPoliciesResourceGroupsScope` The scope associated to the resource group - `Key string` This is a combination of pre-defined resource name and identifier (like Account ID etc.) - `Objects []MemberPoliciesResourceGroupsScopeObject` A list of scope objects for additional context. - `Key string` This is a combination of pre-defined resource name and identifier (like Zone ID etc.) - `Meta MemberPoliciesResourceGroupsMeta` Attributes associated to the resource group. - `Key string` - `Value string` - `Name string` Name of the resource group. - `Roles []Role` Roles assigned to this Member. - `ID string` Role identifier tag. - `Description string` Description of role's permissions. - `Name string` Role name. - `Permissions RolePermissions` - `Analytics PermissionGrant` - `Read bool` - `Write bool` - `Billing PermissionGrant` - `CachePurge PermissionGrant` - `DNS PermissionGrant` - `DNSRecords PermissionGrant` - `LB PermissionGrant` - `Logs PermissionGrant` - `Organization PermissionGrant` - `SSL PermissionGrant` - `WAF PermissionGrant` - `ZoneSettings PermissionGrant` - `Zones PermissionGrant` - `Status MemberStatus` A member's status in the account. - `const MemberStatusAccepted MemberStatus = "accepted"` - `const MemberStatusPending MemberStatus = "pending"` - `User MemberUser` Details of the user associated to the membership. - `Email string` The contact email address of the user. - `ID string` Identifier - `FirstName string` User's first name - `LastName string` User's last name - `TwoFactorAuthenticationEnabled bool` Indicates whether two-factor authentication is enabled for the user account. Does not apply to API authentication. ### Pagination Info - `type PaginationInfo struct{…}` - `Count float64` Total number of results for the requested service - `Page float64` Current page within paginated list of results - `PerPage float64` Number of results per page of results - `TotalCount float64` Total results available without any search parameters ### Permission - `type Permission string` ### Permission Grant - `type PermissionGrant struct{…}` - `Read bool` - `Write bool` ### Rate Plan - `type RatePlan struct{…}` The rate plan applied to the subscription. - `ID RatePlanID` The ID of the rate plan. - `const RatePlanIDFree RatePlanID = "free"` - `const RatePlanIDLite RatePlanID = "lite"` - `const RatePlanIDPro RatePlanID = "pro"` - `const RatePlanIDProPlus RatePlanID = "pro_plus"` - `const RatePlanIDBusiness RatePlanID = "business"` - `const RatePlanIDEnterprise RatePlanID = "enterprise"` - `const RatePlanIDPartnersFree RatePlanID = "partners_free"` - `const RatePlanIDPartnersPro RatePlanID = "partners_pro"` - `const RatePlanIDPartnersBusiness RatePlanID = "partners_business"` - `const RatePlanIDPartnersEnterprise RatePlanID = "partners_enterprise"` - `Currency string` The currency applied to the rate plan subscription. - `ExternallyManaged bool` Whether this rate plan is managed externally from Cloudflare. - `IsContract bool` Whether a rate plan is enterprise-based (or newly adopted term contract). - `PublicName string` The full name of the rate plan. - `Scope string` The scope that this rate plan applies to. - `Sets []string` The list of sets this rate plan applies to. Returns array of strings. ### Response Info - `type ResponseInfo struct{…}` - `Code int64` - `Message string` - `DocumentationURL string` - `Source ResponseInfoSource` - `Pointer string` ### Result - `type Result interface{…}` - `ResultObject` - `Errors []ResponseInfo` - `Code int64` - `Message string` - `DocumentationURL string` - `Source ResponseInfoSource` - `Pointer string` - `Messages []ResponseInfo` - `Code int64` - `Message string` - `DocumentationURL string` - `Source ResponseInfoSource` - `Result []AuditLog` - `ID string` A string that uniquely identifies the audit log. - `Action AuditLogAction` - `Result bool` A boolean that indicates if the action attempted was successful. - `Type string` A short string that describes the action that was performed. - `Actor AuditLogActor` - `ID string` The ID of the actor that performed the action. If a user performed the action, this will be their User ID. - `Email string` The email of the user that performed the action. - `IP string` The IP address of the request that performed the action. - `Type AuditLogActorType` The type of actor, whether a User, Cloudflare Admin, or an Automated System. - `const AuditLogActorTypeUser AuditLogActorType = "user"` - `const AuditLogActorTypeAdmin AuditLogActorType = "admin"` - `const AuditLogActorTypeCloudflare AuditLogActorType = "Cloudflare"` - `Interface string` The source of the event. - `Metadata unknown` An object which can lend more context to the action being logged. This is a flexible value and varies between different actions. - `NewValue string` The new value of the resource that was modified. - `OldValue string` The value of the resource before it was modified. - `Owner AuditLogOwner` - `ID string` Identifier - `Resource AuditLogResource` - `ID string` An identifier for the resource that was affected by the action. - `Type string` A short string that describes the resource that was affected by the action. - `When Time` A UTC RFC3339 timestamp that specifies when the action being logged occured. - `Success bool` - `ResultAaaAPIResponseCommon` - `Errors []ResponseInfo` - `Code int64` - `Message string` - `DocumentationURL string` - `Source ResponseInfoSource` - `Messages []ResponseInfo` - `Code int64` - `Message string` - `DocumentationURL string` - `Source ResponseInfoSource` - `Success ResultAaaAPIResponseCommonSuccess` Whether the API call was successful - `const ResultAaaAPIResponseCommonSuccessTrue ResultAaaAPIResponseCommonSuccess = true` ### Role - `type Role struct{…}` - `ID string` Role identifier tag. - `Description string` Description of role's permissions. - `Name string` Role name. - `Permissions RolePermissions` - `Analytics PermissionGrant` - `Read bool` - `Write bool` - `Billing PermissionGrant` - `CachePurge PermissionGrant` - `DNS PermissionGrant` - `DNSRecords PermissionGrant` - `LB PermissionGrant` - `Logs PermissionGrant` - `Organization PermissionGrant` - `SSL PermissionGrant` - `WAF PermissionGrant` - `ZoneSettings PermissionGrant` - `Zones PermissionGrant` ### Sort Direction - `type SortDirection string` Direction to order DNS records in. - `const SortDirectionAsc SortDirection = "asc"` - `const SortDirectionDesc SortDirection = "desc"` ### Subscription - `type Subscription struct{…}` - `ID string` Subscription identifier tag. - `Currency string` The monetary unit in which pricing information is displayed. - `CurrentPeriodEnd Time` The end of the current period and also when the next billing is due. - `CurrentPeriodStart Time` When the current billing period started. May match initial_period_start if this is the first period. - `Frequency SubscriptionFrequency` How often the subscription is renewed automatically. - `const SubscriptionFrequencyWeekly SubscriptionFrequency = "weekly"` - `const SubscriptionFrequencyMonthly SubscriptionFrequency = "monthly"` - `const SubscriptionFrequencyQuarterly SubscriptionFrequency = "quarterly"` - `const SubscriptionFrequencyYearly SubscriptionFrequency = "yearly"` - `Price float64` The price of the subscription that will be billed, in US dollars. - `RatePlan RatePlan` The rate plan applied to the subscription. - `ID RatePlanID` The ID of the rate plan. - `const RatePlanIDFree RatePlanID = "free"` - `const RatePlanIDLite RatePlanID = "lite"` - `const RatePlanIDPro RatePlanID = "pro"` - `const RatePlanIDProPlus RatePlanID = "pro_plus"` - `const RatePlanIDBusiness RatePlanID = "business"` - `const RatePlanIDEnterprise RatePlanID = "enterprise"` - `const RatePlanIDPartnersFree RatePlanID = "partners_free"` - `const RatePlanIDPartnersPro RatePlanID = "partners_pro"` - `const RatePlanIDPartnersBusiness RatePlanID = "partners_business"` - `const RatePlanIDPartnersEnterprise RatePlanID = "partners_enterprise"` - `Currency string` The currency applied to the rate plan subscription. - `ExternallyManaged bool` Whether this rate plan is managed externally from Cloudflare. - `IsContract bool` Whether a rate plan is enterprise-based (or newly adopted term contract). - `PublicName string` The full name of the rate plan. - `Scope string` The scope that this rate plan applies to. - `Sets []string` The list of sets this rate plan applies to. Returns array of strings. - `State SubscriptionState` The state that the subscription is in. - `const SubscriptionStateTrial SubscriptionState = "Trial"` - `const SubscriptionStateProvisioned SubscriptionState = "Provisioned"` - `const SubscriptionStatePaid SubscriptionState = "Paid"` - `const SubscriptionStateAwaitingPayment SubscriptionState = "AwaitingPayment"` - `const SubscriptionStateCancelled SubscriptionState = "Cancelled"` - `const SubscriptionStateFailed SubscriptionState = "Failed"` - `const SubscriptionStateExpired SubscriptionState = "Expired"` ### Subscription Component - `type SubscriptionComponent struct{…}` A component value for a subscription. - `Default float64` The default amount assigned. - `Name string` The name of the component value. - `Price float64` The unit price for the component value. - `Value float64` The amount of the component value assigned. ### Subscription Zone - `type SubscriptionZone struct{…}` A simple zone object. May have null properties if not a zone subscription. - `ID string` Identifier - `Name string` The domain name ### Token - `type Token struct{…}` - `ID string` Token identifier tag. - `Condition TokenCondition` - `RequestIP TokenConditionRequestIP` Client IP restrictions. - `In []TokenConditionCIDRList` List of IPv4/IPv6 CIDR addresses. - `NotIn []TokenConditionCIDRList` List of IPv4/IPv6 CIDR addresses. - `ExpiresOn Time` The expiration time on or after which the JWT MUST NOT be accepted for processing. - `IssuedOn Time` The time on which the token was created. - `LastUsedOn Time` Last time the token was used. - `ModifiedOn Time` Last time the token was modified. - `Name string` Token name. - `NotBefore Time` The time before which the token MUST NOT be accepted for processing. - `Policies []TokenPolicy` List of access policies assigned to the token. - `ID string` Policy identifier. - `Effect TokenPolicyEffect` Allow or deny operations against the resources. - `const TokenPolicyEffectAllow TokenPolicyEffect = "allow"` - `const TokenPolicyEffectDeny TokenPolicyEffect = "deny"` - `PermissionGroups []TokenPolicyPermissionGroup` A set of permission groups that are specified to the policy. - `ID string` Identifier of the permission group. - `Meta TokenPolicyPermissionGroupsMeta` Attributes associated to the permission group. - `Key string` - `Value string` - `Name string` Name of the permission group. - `Resources TokenPolicyResourcesUnion` A list of resource names that the policy applies to. - `type TokenPolicyResourcesIAMResourcesTypeObjectString map[string, string]` Map of simple string resource permissions - `type TokenPolicyResourcesIAMResourcesTypeObjectNested map[string, map[string, string]]` Map of nested resource permissions - `Status TokenStatus` Status of the token. - `const TokenStatusActive TokenStatus = "active"` - `const TokenStatusDisabled TokenStatus = "disabled"` - `const TokenStatusExpired TokenStatus = "expired"` ### Token Condition CIDR List - `type TokenConditionCIDRList string` IPv4/IPv6 CIDR. ### Token Policy - `type TokenPolicy struct{…}` - `ID string` Policy identifier. - `Effect TokenPolicyEffect` Allow or deny operations against the resources. - `const TokenPolicyEffectAllow TokenPolicyEffect = "allow"` - `const TokenPolicyEffectDeny TokenPolicyEffect = "deny"` - `PermissionGroups []TokenPolicyPermissionGroup` A set of permission groups that are specified to the policy. - `ID string` Identifier of the permission group. - `Meta TokenPolicyPermissionGroupsMeta` Attributes associated to the permission group. - `Key string` - `Value string` - `Name string` Name of the permission group. - `Resources TokenPolicyResourcesUnion` A list of resource names that the policy applies to. - `type TokenPolicyResourcesIAMResourcesTypeObjectString map[string, string]` Map of simple string resource permissions - `type TokenPolicyResourcesIAMResourcesTypeObjectNested map[string, map[string, string]]` Map of nested resource permissions ### Token Value - `type TokenValue string` The token value.