cloudflare

package
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2025 License: Apache-2.0 Imports: 47 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildAccountmatrix added in v0.2.0

func BuildAccountmatrix(ctx context.Context, d *plugin.QueryData) []map[string]interface{}

BuildAccountmatrix :: return a list of matrix items, one per account. Allows to perform three level resource listing as in case of cloudflare_access_policy (i.e List Account -> List Applications -> List Access policies for each application)

func ConfigInstance

func ConfigInstance() interface{}

func GetConfig

func GetConfig(connection *plugin.Connection) cloudflareConfig

GetConfig :: retrieve and cast connection config from query data

func Plugin

func Plugin(ctx context.Context) *plugin.Plugin

Types

type AccessApplicationInfo added in v1.2.0

type AccessApplicationInfo struct {
	Account accounts.Account
	zero_trust.AccessApplicationListResponse
}

type AccessGroupInfo added in v1.2.0

type AccessGroupInfo struct {
	Account accounts.Account
	zero_trust.AccessGroupListResponse
}

type BucketData added in v0.9.0

type BucketData = struct {
	types.Bucket
	AccountId string
}

type HealthcheckInfo added in v1.3.0

type HealthcheckInfo struct {
	ZoneID string
	healthchecks.Healthcheck
}

type ManagedTransformInfo added in v1.5.0

type ManagedTransformInfo struct {
	ID            string
	Type          string
	Enabled       bool
	HasConflict   bool
	ConflictsWith []string
	ZoneID        string
}

type NotificationPolicyInfo added in v1.2.0

type NotificationPolicyInfo struct {
	AccountID string
	alerting.Policy
}

type Organization added in v1.2.0

type Organization struct {
	ID          string   `json:"id"`
	Name        string   `json:"name"`
	Status      string   `json:"status"`
	Permissions []string `json:"permissions"`
	Roles       []string `json:"roles"`
}

type RecordInfo added in v1.4.0

type RecordInfo struct {
	ZoneID string
	dns.RecordResponse
}

type UserDetails added in v1.2.0

type UserDetails struct {
	ID                   string         `json:"id"`                                // ID of the user.
	Email                string         `json:"email"`                             // Email of the user.
	Username             string         `json:"username"`                          // Username (often a hashed ID) of the user.
	FirstName            *string        `json:"first_name"`                        // First name of the user (nullable).
	LastName             *string        `json:"last_name"`                         // Last name of the user (nullable).
	Telephone            *string        `json:"telephone"`                         // Telephone number (nullable).
	Country              *string        `json:"country"`                           // Country (nullable).
	Zipcode              *string        `json:"zipcode"`                           // Zipcode (nullable).
	TwoFactorAuthEnabled bool           `json:"two_factor_authentication_enabled"` // True if 2FA is enabled.
	TwoFactorAuthLocked  bool           `json:"two_factor_authentication_locked"`  // True if 2FA is locked.
	CreatedOn            string         `json:"created_on"`                        // ISO8601 timestamp.
	ModifiedOn           string         `json:"modified_on"`                       // ISO8601 timestamp.
	Organizations        []Organization `json:"organizations"`                     // List of organizations the user is part of.
	HasProZones          bool           `json:"has_pro_zones"`
	HasBusinessZones     bool           `json:"has_business_zones"`
	HasEnterpriseZones   bool           `json:"has_enterprise_zones"`
	Suspended            bool           `json:"suspended"`
	Betas                []string       `json:"betas"` // List of beta features enabled.
}

type WorkerScriptInfo added in v1.3.0

type WorkerScriptInfo struct {
	AccountID string
	workers.Script
}

type ZoneSettingInfo added in v1.2.0

type ZoneSettingInfo struct {
	ZoneID string
	zones.SettingGetResponse
}

func ListAllZoneSettings added in v1.2.0

func ListAllZoneSettings(ctx context.Context, d *plugin.QueryData, zoneID string) ([]ZoneSettingInfo, error)

ListAllZoneSettings makes a GET request to https://api.cloudflare.com/client/v4/zones/$ZONE_ID/settings Note: The main API documentation (https://developers.cloudflare.com/api/resources/zones/subresources/settings/methods/list/) lists this endpoint as DEPRECATED. However, according to the deprecation reference (https://developers.cloudflare.com/fundamentals/api/reference/deprecations/#2025-06-08), only the "cname_flattening" setting is affected; the endpoint itself is not fully deprecated.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL