organizations

package
v7.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: Apache-2.0 Imports: 19 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CertificateCADigicert = shared.CertificateCADigicert

This is an alias to an internal value.

View Source
const CertificateCAGoogle = shared.CertificateCAGoogle

This is an alias to an internal value.

View Source
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt

This is an alias to an internal value.

View Source
const CertificateCASSLCom = shared.CertificateCASSLCom

This is an alias to an internal value.

View Source
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA

This is an alias to an internal value.

View Source
const CloudflareTunnelConfigSrcCloudflare = shared.CloudflareTunnelConfigSrcCloudflare

This is an alias to an internal value.

View Source
const CloudflareTunnelConfigSrcLocal = shared.CloudflareTunnelConfigSrcLocal

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

View Source
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow

This is an alias to an internal value.

View Source
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny

This is an alias to an internal value.

View Source
const MemberStatusAccepted = shared.MemberStatusAccepted

This is an alias to an internal value.

View Source
const MemberStatusPending = shared.MemberStatusPending

This is an alias to an internal value.

View Source
const RatePlanIDBusiness = shared.RatePlanIDBusiness

This is an alias to an internal value.

View Source
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDFree = shared.RatePlanIDFree

This is an alias to an internal value.

View Source
const RatePlanIDLite = shared.RatePlanIDLite

This is an alias to an internal value.

View Source
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness

This is an alias to an internal value.

View Source
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree

This is an alias to an internal value.

View Source
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro

This is an alias to an internal value.

View Source
const RatePlanIDPro = shared.RatePlanIDPro

This is an alias to an internal value.

View Source
const RatePlanIDProPlus = shared.RatePlanIDProPlus

This is an alias to an internal value.

View Source
const SortDirectionAsc = shared.SortDirectionAsc

This is an alias to an internal value.

View Source
const SortDirectionDesc = shared.SortDirectionDesc

This is an alias to an internal value.

View Source
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly

This is an alias to an internal value.

View Source
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment

This is an alias to an internal value.

View Source
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled

This is an alias to an internal value.

View Source
const SubscriptionStateExpired = shared.SubscriptionStateExpired

This is an alias to an internal value.

View Source
const SubscriptionStateFailed = shared.SubscriptionStateFailed

This is an alias to an internal value.

View Source
const SubscriptionStatePaid = shared.SubscriptionStatePaid

This is an alias to an internal value.

View Source
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned

This is an alias to an internal value.

View Source
const SubscriptionStateTrial = shared.SubscriptionStateTrial

This is an alias to an internal value.

View Source
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow

This is an alias to an internal value.

View Source
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny

This is an alias to an internal value.

View Source
const TokenStatusActive = shared.TokenStatusActive

This is an alias to an internal value.

View Source
const TokenStatusDisabled = shared.TokenStatusDisabled

This is an alias to an internal value.

View Source
const TokenStatusExpired = shared.TokenStatusExpired

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

The type of actor, whether a User, Cloudflare Admin, or an Automated System.

This is an alias to an internal type.

type AuditLogOwner

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type BillingService added in v7.4.0

type BillingService struct {
	Options []option.RequestOption
	Usage   *BillingUsageService
}

BillingService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBillingService method instead.

func NewBillingService added in v7.4.0

func NewBillingService(opts ...option.RequestOption) (r *BillingService)

NewBillingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type BillingUsageGetParams added in v7.4.0

type BillingUsageGetParams struct {
	// Start date for the usage query (ISO 8601). Required if `to` is set. When omitted
	// along with `to`, defaults to the start of the current month. Filters by charge
	// period (when consumption happened), not billing period. The maximum date range
	// is 31 days.
	From param.Field[time.Time] `query:"from" format:"date"`
	// End date for the usage query (ISO 8601). Required if `from` is set. When omitted
	// along with `from`, defaults to today. Filters by charge period (when consumption
	// happened), not billing period. The maximum date range is 31 days.
	To param.Field[time.Time] `query:"to" format:"date"`
}

func (BillingUsageGetParams) URLQuery added in v7.4.0

func (r BillingUsageGetParams) URLQuery() (v url.Values)

URLQuery serializes BillingUsageGetParams's query parameters as `url.Values`.

type BillingUsageGetResponse added in v7.4.0

type BillingUsageGetResponse struct {
	// Highest-level classification of a charge based on the nature of how it gets
	// billed. Currently only "Usage" is supported.
	ChargeCategory BillingUsageGetResponseChargeCategory `json:"ChargeCategory" api:"required"`
	// Self-contained summary of the charge's purpose and price.
	ChargeDescription string `json:"ChargeDescription" api:"required"`
	// Indicates how often a charge occurs. Currently only "Usage-Based" is supported.
	ChargeFrequency BillingUsageGetResponseChargeFrequency `json:"ChargeFrequency" api:"required"`
	// Exclusive end of the time interval during which the usage was consumed.
	ChargePeriodEnd time.Time `json:"ChargePeriodEnd" api:"required" format:"date-time"`
	// Inclusive start of the time interval during which the usage was consumed.
	ChargePeriodStart time.Time `json:"ChargePeriodStart" api:"required" format:"date-time"`
	// Unit of measure for the consumed quantity (e.g., "GB", "Requests",
	// "vCPU-Hours").
	ConsumedUnit string `json:"ConsumedUnit" api:"required"`
	// Name of the entity providing the underlying infrastructure or platform.
	HostProviderName string `json:"HostProviderName" api:"required"`
	// Name of the entity responsible for invoicing for the services consumed.
	InvoiceIssuerName string `json:"InvoiceIssuerName" api:"required"`
	// Name of the entity that made the services available for purchase.
	ServiceProviderName string `json:"ServiceProviderName" api:"required"`
	// The unique identifier for the billable metric in the Cloudflare catalog. For
	// cost billed under a since-archived billable metric this is the metric's catalog
	// public id (a UUID) rather than its usage metric name, so it stays separate from
	// the live metric that replaced it. Cloudflare extension; replaces FOCUS SkuId.
	XBillableMetricID string `json:"x_BillableMetricId" api:"required"`
	// A charge serving as the basis for invoicing, inclusive of all reduced rates and
	// discounts while excluding the amortization of upfront charges (one-time or
	// recurring).
	BilledCost float64 `json:"BilledCost" api:"nullable"`
	// Public identifier of the Cloudflare account (account tag). Omitted when account
	// is not part of the requested grouping, and always omitted for usage measured at
	// contract level, even when grouping by account: that usage is returned as its own
	// record with no account.
	BillingAccountID string `json:"BillingAccountId"`
	// Display name of the Cloudflare account. Omitted when account is not part of the
	// requested grouping, and for usage measured at contract level.
	BillingAccountName string `json:"BillingAccountName"`
	// Currency that a charge was billed in (ISO 4217).
	BillingCurrency string `json:"BillingCurrency" api:"nullable"`
	// Exclusive end of the billing cycle that contains this usage record.
	BillingPeriodEnd time.Time `json:"BillingPeriodEnd" api:"nullable" format:"date-time"`
	// Inclusive start of the billing cycle that contains this usage record.
	BillingPeriodStart time.Time `json:"BillingPeriodStart" api:"nullable" format:"date-time"`
	// Indicates whether the row represents a correction to one or more charges
	// invoiced in a previous billing period.
	ChargeClass BillingUsageGetResponseChargeClass `json:"ChargeClass" api:"nullable"`
	// Measured usage amount within the charge period. Reflects raw metered consumption
	// before pricing transformations.
	ConsumedQuantity float64 `json:"ConsumedQuantity"`
	// Cost calculated by multiplying ContractedUnitPrice and the corresponding
	// PricingQuantity.
	ContractedCost float64 `json:"ContractedCost" api:"nullable"`
	// The agreed-upon unit price for a single PricingUnit of the associated billable
	// metric, inclusive of negotiated discounts, if present, while excluding any other
	// discounts.
	ContractedUnitPrice float64 `json:"ContractedUnitPrice" api:"nullable"`
	// The amortized cost of the charge after applying all reduced rates, discounts,
	// and the applicable portion of relevant, prepaid purchases (one-time or
	// recurring) that covered the charge.
	EffectiveCost float64 `json:"EffectiveCost" api:"nullable"`
	// Cost calculated by multiplying ListUnitPrice and the corresponding
	// PricingQuantity.
	ListCost float64 `json:"ListCost" api:"nullable"`
	// Suggested provider-published unit price for a single PricingUnit of the
	// associated billable metric, exclusive of any discounts.
	ListUnitPrice float64 `json:"ListUnitPrice" api:"nullable"`
	// Volume of a given service used or purchased, based on the PricingUnit.
	PricingQuantity float64 `json:"PricingQuantity" api:"nullable"`
	// Provider-specified measurement unit for determining unit prices, indicating how
	// the provider rates measured usage after applying pricing rules like block
	// pricing.
	PricingUnit string `json:"PricingUnit" api:"nullable"`
	// Provider-assigned identifier for an isolated geographic area where a service is
	// provided.
	RegionID string `json:"RegionId" api:"nullable"`
	// Name of an isolated geographic area where a service is provided.
	RegionName string `json:"RegionName" api:"nullable"`
	// Unique identifier assigned to a grouping of services. For Cloudflare, this is
	// the subscription or contract ID.
	SubAccountID string `json:"SubAccountId"`
	// Name assigned to a grouping of services. For Cloudflare, this is the
	// subscription or contract display name.
	SubAccountName string `json:"SubAccountName"`
	// Tag values for the requested `GroupBy` keys. Omitted when `GroupBy` is not
	// provided. Missing keys are omitted, and key-only tags are returned as boolean
	// `true`. All other tag values are strings.
	Tags map[string]BillingUsageGetResponseTagsUnion `json:"Tags"`
	// The display name of the billable metric. Cloudflare extension; replaces FOCUS
	// SkuMeter.
	XBillableMetricName string `json:"x_BillableMetricName"`
	// The product category the charge belongs to (e.g., "Developer", "Cloudflare
	// One"). Cloudflare extension; replaces FOCUS ServiceCategory.
	XProductCategoryName string `json:"x_ProductCategoryName"`
	// The unique identifier for the product family in the Cloudflare catalog.
	// Cloudflare extension; replaces FOCUS ServiceId.
	XProductFamilyID string `json:"x_ProductFamilyId"`
	// The product family the charge belongs to (e.g., "R2", "Workers"). Cloudflare
	// extension; replaces FOCUS ServiceName.
	XProductFamilyName string `json:"x_ProductFamilyName"`
	// The identifier for the Cloudflare zone (zone tag). Omitted when zone is not part
	// of the requested grouping, and always omitted for usage measured at contract
	// level, even when grouping by zone. Cloudflare extension.
	XZoneID string `json:"x_ZoneId" api:"nullable"`
	// The display name of the Cloudflare zone. Omitted when zone is not part of the
	// requested grouping, and for usage measured at contract level. Cloudflare
	// extension.
	XZoneName string                      `json:"x_ZoneName" api:"nullable"`
	JSON      billingUsageGetResponseJSON `json:"-"`
}

A single cost and usage record for a metered product within a specific charge period, aligned with the FinOps FOCUS v1.3 specification.

func (*BillingUsageGetResponse) UnmarshalJSON added in v7.4.0

func (r *BillingUsageGetResponse) UnmarshalJSON(data []byte) (err error)

type BillingUsageGetResponseChargeCategory added in v7.4.0

type BillingUsageGetResponseChargeCategory string

Highest-level classification of a charge based on the nature of how it gets billed. Currently only "Usage" is supported.

const (
	BillingUsageGetResponseChargeCategoryUsage BillingUsageGetResponseChargeCategory = "Usage"
)

func (BillingUsageGetResponseChargeCategory) IsKnown added in v7.4.0

type BillingUsageGetResponseChargeClass added in v7.4.0

type BillingUsageGetResponseChargeClass string

Indicates whether the row represents a correction to one or more charges invoiced in a previous billing period.

const (
	BillingUsageGetResponseChargeClassCorrection BillingUsageGetResponseChargeClass = "Correction"
)

func (BillingUsageGetResponseChargeClass) IsKnown added in v7.4.0

type BillingUsageGetResponseChargeFrequency added in v7.4.0

type BillingUsageGetResponseChargeFrequency string

Indicates how often a charge occurs. Currently only "Usage-Based" is supported.

const (
	BillingUsageGetResponseChargeFrequencyUsageBased BillingUsageGetResponseChargeFrequency = "Usage-Based"
)

func (BillingUsageGetResponseChargeFrequency) IsKnown added in v7.4.0

type BillingUsageGetResponseEnvelope added in v7.4.0

type BillingUsageGetResponseEnvelope struct {
	// Contains error details if the request failed.
	Errors []BillingUsageGetResponseEnvelopeErrors `json:"errors" api:"required,nullable"`
	// Contains informational notices about the response.
	Messages []BillingUsageGetResponseEnvelopeMessages `json:"messages" api:"required,nullable"`
	// Contains the array of cost and usage records.
	Result []BillingUsageGetResponse `json:"result" api:"required"`
	// Indicates whether the API call was successful.
	Success BillingUsageGetResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    billingUsageGetResponseEnvelopeJSON    `json:"-"`
}

Successful response containing an array of FOCUS-aligned cost and usage records.

func (*BillingUsageGetResponseEnvelope) UnmarshalJSON added in v7.4.0

func (r *BillingUsageGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type BillingUsageGetResponseEnvelopeErrors added in v7.4.0

type BillingUsageGetResponseEnvelopeErrors struct {
	// Describes the error or notice.
	Message string `json:"message" api:"required"`
	// Identifies the error or notice type.
	Code int64                                     `json:"code"`
	JSON billingUsageGetResponseEnvelopeErrorsJSON `json:"-"`
}

Represents an API notice or error detail.

func (*BillingUsageGetResponseEnvelopeErrors) UnmarshalJSON added in v7.4.0

func (r *BillingUsageGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type BillingUsageGetResponseEnvelopeMessages added in v7.4.0

type BillingUsageGetResponseEnvelopeMessages struct {
	// Describes the error or notice.
	Message string `json:"message" api:"required"`
	// Identifies the error or notice type.
	Code int64                                       `json:"code"`
	JSON billingUsageGetResponseEnvelopeMessagesJSON `json:"-"`
}

Represents an API notice or error detail.

func (*BillingUsageGetResponseEnvelopeMessages) UnmarshalJSON added in v7.4.0

func (r *BillingUsageGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)

type BillingUsageGetResponseEnvelopeSuccess added in v7.4.0

type BillingUsageGetResponseEnvelopeSuccess bool

Indicates whether the API call was successful.

const (
	BillingUsageGetResponseEnvelopeSuccessTrue BillingUsageGetResponseEnvelopeSuccess = true
)

func (BillingUsageGetResponseEnvelopeSuccess) IsKnown added in v7.4.0

type BillingUsageGetResponseTagsBoolean added in v7.10.0

type BillingUsageGetResponseTagsBoolean bool
const (
	BillingUsageGetResponseTagsBooleanTrue BillingUsageGetResponseTagsBoolean = true
)

func (BillingUsageGetResponseTagsBoolean) ImplementsBillingUsageGetResponseTagsUnion added in v7.10.0

func (r BillingUsageGetResponseTagsBoolean) ImplementsBillingUsageGetResponseTagsUnion()

func (BillingUsageGetResponseTagsBoolean) IsKnown added in v7.10.0

type BillingUsageGetResponseTagsUnion added in v7.10.0

type BillingUsageGetResponseTagsUnion interface {
	ImplementsBillingUsageGetResponseTagsUnion()
}

Union satisfied by shared.UnionString or BillingUsageGetResponseTagsBoolean.

type BillingUsageService added in v7.4.0

type BillingUsageService struct {
	Options []option.RequestOption
}

BillingUsageService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBillingUsageService method instead.

func NewBillingUsageService added in v7.4.0

func NewBillingUsageService(opts ...option.RequestOption) (r *BillingUsageService)

NewBillingUsageService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*BillingUsageService) Get added in v7.4.0

func (r *BillingUsageService) Get(ctx context.Context, organizationID string, query BillingUsageGetParams, opts ...option.RequestOption) (res *[]BillingUsageGetResponse, err error)

Returns cost and usage data for all accounts within an organization, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification.

Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. The response includes usage for every account belonging to the specified organization.

**Note:** This endpoint serves `usage` records only; cost and pricing fields are absent from responses. Rated costs are available per account via `POST /accounts/{account_id}/billable/usage` with `Metric: cost`.

When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days.

An organization with no accounts, or an organization ID that does not exist, returns a successful response with an empty result set rather than an error.

type CertificateCA

type CertificateCA = shared.CertificateCA

The Certificate Authority that will issue the certificate.

This is an alias to an internal type.

type CertificateRequestType

type CertificateRequestType = shared.CertificateRequestType

Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).

This is an alias to an internal type.

type CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

A Cloudflare Tunnel that connects your origin to Cloudflare's edge.

This is an alias to an internal type.

type CloudflareTunnelConfigSrc

type CloudflareTunnelConfigSrc = shared.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.

This is an alias to an internal type.

type CloudflareTunnelConnection

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelStatus

type CloudflareTunnelStatus = shared.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).

This is an alias to an internal type.

type CloudflareTunnelTunType

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type ErrorDataSource

type ErrorDataSource = shared.ErrorDataSource

This is an alias to an internal type.

type LogAuditHistoryParams added in v7.7.0

type LogAuditHistoryParams struct {
	// RFC3339 timestamp of the source audit log entry's action time. Used to narrow
	// the source-entry lookup window. Provide the `action.time` value from the audit
	// log identified by `id`.
	ActionTime param.Field[time.Time] `query:"action_time" api:"required" format:"date-time"`
	// Limits the returned results to logs older than the specified date. This can be a
	// date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that
	// conforms to RFC3339.
	Before param.Field[time.Time] `query:"before" api:"required" format:"date"`
	// Limits the returned results to logs newer than the specified date. This can be a
	// date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that
	// conforms to RFC3339.
	Since param.Field[time.Time] `query:"since" api:"required" format:"date"`
	// The cursor is an opaque token used to paginate through large sets of records. It
	// indicates the position from which to continue when requesting the next set of
	// records. A valid cursor value can be obtained from the cursor object in the
	// result_info structure of a previous response.
	Cursor param.Field[string] `query:"cursor"`
	// Sets sorting order.
	Direction param.Field[LogAuditHistoryParamsDirection] `query:"direction"`
	// The number limits the objects to return. The cursor attribute may be used to
	// iterate over the next batch of objects if there are more than the limit.
	Limit param.Field[float64] `query:"limit"`
}

func (LogAuditHistoryParams) URLQuery added in v7.7.0

func (r LogAuditHistoryParams) URLQuery() (v url.Values)

URLQuery serializes LogAuditHistoryParams's query parameters as `url.Values`.

type LogAuditHistoryParamsDirection added in v7.7.0

type LogAuditHistoryParamsDirection string

Sets sorting order.

const (
	LogAuditHistoryParamsDirectionDesc LogAuditHistoryParamsDirection = "desc"
	LogAuditHistoryParamsDirectionAsc  LogAuditHistoryParamsDirection = "asc"
)

func (LogAuditHistoryParamsDirection) IsKnown added in v7.7.0

type LogAuditHistoryResponse added in v7.7.0

type LogAuditHistoryResponse struct {
	// A unique identifier for the audit log entry.
	ID string `json:"id"`
	// Provides information about the action performed.
	Action LogAuditHistoryResponseAction `json:"action"`
	// Provides details about the actor who performed the action.
	Actor LogAuditHistoryResponseActor `json:"actor"`
	// Contains organization related information.
	Organization LogAuditHistoryResponseOrganization `json:"organization"`
	// Provides raw information about the request and response.
	Raw LogAuditHistoryResponseRaw `json:"raw"`
	// Provides details about the affected resource.
	Resource LogAuditHistoryResponseResource `json:"resource"`
	JSON     logAuditHistoryResponseJSON     `json:"-"`
}

func (*LogAuditHistoryResponse) UnmarshalJSON added in v7.7.0

func (r *LogAuditHistoryResponse) UnmarshalJSON(data []byte) (err error)

type LogAuditHistoryResponseAction added in v7.7.0

type LogAuditHistoryResponseAction struct {
	// A short description of the action performed.
	Description string `json:"description"`
	// The result of the action, indicating success or failure.
	Result string `json:"result"`
	// A timestamp indicating when the action was logged.
	Time time.Time `json:"time" format:"date-time"`
	// A short string that describes the action that was performed.
	Type string                            `json:"type"`
	JSON logAuditHistoryResponseActionJSON `json:"-"`
}

Provides information about the action performed.

func (*LogAuditHistoryResponseAction) UnmarshalJSON added in v7.7.0

func (r *LogAuditHistoryResponseAction) UnmarshalJSON(data []byte) (err error)

type LogAuditHistoryResponseActor added in v7.7.0

type LogAuditHistoryResponseActor struct {
	// The ID of the actor who performed the action. If a user performed the action,
	// this will be their User ID.
	ID string `json:"id"`
	// The context in which the action was initiated.
	//
	// - `api`: The action was performed through the API. The specific credential type
	//   was not recorded.
	// - `api_key`: The action was authenticated with a Cloudflare Global API Key.
	// - `api_token`: The action was authenticated with an API token.
	// - `dash`: The action was performed through the Cloudflare dashboard.
	// - `oauth`: The action was authenticated with an OAuth token.
	// - `origin_ca_key`: The action was authenticated with an Origin CA key.
	Context LogAuditHistoryResponseActorContext `json:"context"`
	// The email of the actor who performed the action.
	Email string `json:"email" format:"email"`
	// The IP address of the request that performed the action.
	IPAddress string `json:"ip_address"`
	// The API token ID when the actor context is an api_token or oauth.
	TokenID string `json:"token_id"`
	// The API token name when the actor context is an api_token or oauth.
	TokenName string `json:"token_name"`
	// The type of actor.
	Type LogAuditHistoryResponseActorType `json:"type"`
	JSON logAuditHistoryResponseActorJSON `json:"-"`
}

Provides details about the actor who performed the action.

func (*LogAuditHistoryResponseActor) UnmarshalJSON added in v7.7.0

func (r *LogAuditHistoryResponseActor) UnmarshalJSON(data []byte) (err error)

type LogAuditHistoryResponseActorContext added in v7.7.0

type LogAuditHistoryResponseActorContext string

The context in which the action was initiated.

  • `api`: The action was performed through the API. The specific credential type was not recorded.
  • `api_key`: The action was authenticated with a Cloudflare Global API Key.
  • `api_token`: The action was authenticated with an API token.
  • `dash`: The action was performed through the Cloudflare dashboard.
  • `oauth`: The action was authenticated with an OAuth token.
  • `origin_ca_key`: The action was authenticated with an Origin CA key.
const (
	LogAuditHistoryResponseActorContextAPI         LogAuditHistoryResponseActorContext = "api"
	LogAuditHistoryResponseActorContextAPIKey      LogAuditHistoryResponseActorContext = "api_key"
	LogAuditHistoryResponseActorContextAPIToken    LogAuditHistoryResponseActorContext = "api_token"
	LogAuditHistoryResponseActorContextDash        LogAuditHistoryResponseActorContext = "dash"
	LogAuditHistoryResponseActorContextOAuth       LogAuditHistoryResponseActorContext = "oauth"
	LogAuditHistoryResponseActorContextOriginCAKey LogAuditHistoryResponseActorContext = "origin_ca_key"
)

func (LogAuditHistoryResponseActorContext) IsKnown added in v7.7.0

type LogAuditHistoryResponseActorType added in v7.7.0

type LogAuditHistoryResponseActorType string

The type of actor.

const (
	LogAuditHistoryResponseActorTypeCloudflareAdmin LogAuditHistoryResponseActorType = "cloudflare_admin"
	LogAuditHistoryResponseActorTypeSystem          LogAuditHistoryResponseActorType = "system"
	LogAuditHistoryResponseActorTypeUser            LogAuditHistoryResponseActorType = "user"
)

func (LogAuditHistoryResponseActorType) IsKnown added in v7.7.0

type LogAuditHistoryResponseEnvelope added in v7.7.0

type LogAuditHistoryResponseEnvelope struct {
	Errors []LogAuditHistoryResponseEnvelopeErrors `json:"errors" api:"required"`
	Result []LogAuditHistoryResponse               `json:"result" api:"required"`
	// Provides information about the result of the request, including count, cursor,
	// and identification quality.
	ResultInfo LogAuditHistoryResponseEnvelopeResultInfo `json:"result_info" api:"required"`
	// Indicates whether the API call was successful
	Success LogAuditHistoryResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    logAuditHistoryResponseEnvelopeJSON    `json:"-"`
}

func (*LogAuditHistoryResponseEnvelope) UnmarshalJSON added in v7.7.0

func (r *LogAuditHistoryResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type LogAuditHistoryResponseEnvelopeErrors added in v7.7.0

type LogAuditHistoryResponseEnvelopeErrors struct {
	Message string                                    `json:"message" api:"required"`
	JSON    logAuditHistoryResponseEnvelopeErrorsJSON `json:"-"`
}

func (*LogAuditHistoryResponseEnvelopeErrors) UnmarshalJSON added in v7.7.0

func (r *LogAuditHistoryResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)

type LogAuditHistoryResponseEnvelopeResultInfo added in v7.7.0

type LogAuditHistoryResponseEnvelopeResultInfo struct {
	// The number of records returned in the response.
	Count int64 `json:"count" api:"required"`
	// Indicates the quality of the resource identification used to derive the history.
	//
	// - `exact`: Resource was identified by the resource URI.
	// - `approximate`: Resource was identified without the resource URI.
	// - `unavailable`: The source audit log entry did not contain enough information
	//   to identify the resource; result is empty.
	HistoryStatus LogAuditHistoryResponseEnvelopeResultInfoHistoryStatus `json:"history_status" api:"required"`
	// The cursor token used for pagination.
	Cursor string                                        `json:"cursor"`
	JSON   logAuditHistoryResponseEnvelopeResultInfoJSON `json:"-"`
}

Provides information about the result of the request, including count, cursor, and identification quality.

func (*LogAuditHistoryResponseEnvelopeResultInfo) UnmarshalJSON added in v7.7.0

func (r *LogAuditHistoryResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)

type LogAuditHistoryResponseEnvelopeResultInfoHistoryStatus added in v7.7.0

type LogAuditHistoryResponseEnvelopeResultInfoHistoryStatus string

Indicates the quality of the resource identification used to derive the history.

  • `exact`: Resource was identified by the resource URI.
  • `approximate`: Resource was identified without the resource URI.
  • `unavailable`: The source audit log entry did not contain enough information to identify the resource; result is empty.
const (
	LogAuditHistoryResponseEnvelopeResultInfoHistoryStatusExact       LogAuditHistoryResponseEnvelopeResultInfoHistoryStatus = "exact"
	LogAuditHistoryResponseEnvelopeResultInfoHistoryStatusApproximate LogAuditHistoryResponseEnvelopeResultInfoHistoryStatus = "approximate"
	LogAuditHistoryResponseEnvelopeResultInfoHistoryStatusUnavailable LogAuditHistoryResponseEnvelopeResultInfoHistoryStatus = "unavailable"
)

func (LogAuditHistoryResponseEnvelopeResultInfoHistoryStatus) IsKnown added in v7.7.0

type LogAuditHistoryResponseEnvelopeSuccess added in v7.7.0

type LogAuditHistoryResponseEnvelopeSuccess bool

Indicates whether the API call was successful

const (
	LogAuditHistoryResponseEnvelopeSuccessTrue LogAuditHistoryResponseEnvelopeSuccess = true
)

func (LogAuditHistoryResponseEnvelopeSuccess) IsKnown added in v7.7.0

type LogAuditHistoryResponseOrganization added in v7.7.0

type LogAuditHistoryResponseOrganization struct {
	// A unique identifier for the organization.
	ID   string                                  `json:"id"`
	JSON logAuditHistoryResponseOrganizationJSON `json:"-"`
}

Contains organization related information.

func (*LogAuditHistoryResponseOrganization) UnmarshalJSON added in v7.7.0

func (r *LogAuditHistoryResponseOrganization) UnmarshalJSON(data []byte) (err error)

type LogAuditHistoryResponseRaw added in v7.7.0

type LogAuditHistoryResponseRaw struct {
	// The Cloudflare Ray ID for the request.
	CfRayID string `json:"cf_ray_id"`
	// The HTTP method of the request.
	Method string `json:"method"`
	// The HTTP response status code returned by the API.
	StatusCode int64 `json:"status_code"`
	// The URI of the request.
	URI string `json:"uri"`
	// The client's user agent string sent with the request.
	UserAgent string                         `json:"user_agent"`
	JSON      logAuditHistoryResponseRawJSON `json:"-"`
}

Provides raw information about the request and response.

func (*LogAuditHistoryResponseRaw) UnmarshalJSON added in v7.7.0

func (r *LogAuditHistoryResponseRaw) UnmarshalJSON(data []byte) (err error)

type LogAuditHistoryResponseResource added in v7.7.0

type LogAuditHistoryResponseResource struct {
	// The unique identifier for the affected resource.
	ID string `json:"id"`
	// The Cloudflare product associated with the resource.
	Product  string      `json:"product"`
	Request  interface{} `json:"request"`
	Response interface{} `json:"response"`
	// The scope of the resource.
	Scope interface{} `json:"scope"`
	// The type of the resource.
	Type string                              `json:"type"`
	JSON logAuditHistoryResponseResourceJSON `json:"-"`
}

Provides details about the affected resource.

func (*LogAuditHistoryResponseResource) UnmarshalJSON added in v7.7.0

func (r *LogAuditHistoryResponseResource) UnmarshalJSON(data []byte) (err error)

type LogAuditListParams

type LogAuditListParams struct {
	// Limits the returned results to logs older than the specified date. This can be a
	// date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that
	// conforms to RFC3339.
	Before param.Field[time.Time] `query:"before" api:"required" format:"date"`
	// Limits the returned results to logs newer than the specified date. This can be a
	// date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that
	// conforms to RFC3339.
	Since          param.Field[time.Time]                        `query:"since" api:"required" format:"date"`
	ID             param.Field[LogAuditListParamsID]             `query:"id"`
	ActionResult   param.Field[LogAuditListParamsActionResult]   `query:"action_result"`
	ActionType     param.Field[LogAuditListParamsActionType]     `query:"action_type"`
	ActorContext   param.Field[LogAuditListParamsActorContext]   `query:"actor_context"`
	ActorEmail     param.Field[LogAuditListParamsActorEmail]     `query:"actor_email"`
	ActorID        param.Field[LogAuditListParamsActorID]        `query:"actor_id"`
	ActorIPAddress param.Field[LogAuditListParamsActorIPAddress] `query:"actor_ip_address"`
	ActorTokenID   param.Field[LogAuditListParamsActorTokenID]   `query:"actor_token_id"`
	ActorTokenName param.Field[LogAuditListParamsActorTokenName] `query:"actor_token_name"`
	ActorType      param.Field[LogAuditListParamsActorType]      `query:"actor_type"`
	// The cursor is an opaque token used to paginate through large sets of records. It
	// indicates the position from which to continue when requesting the next set of
	// records. A valid cursor value can be obtained from the cursor object in the
	// result_info structure of a previous response.
	Cursor param.Field[string] `query:"cursor"`
	// Sets sorting order.
	Direction param.Field[LogAuditListParamsDirection] `query:"direction"`
	// The number limits the objects to return. The cursor attribute may be used to
	// iterate over the next batch of objects if there are more than the limit.
	Limit           param.Field[float64]                           `query:"limit"`
	RawCfRayID      param.Field[LogAuditListParamsRawCfRayID]      `query:"raw_cf_ray_id"`
	RawMethod       param.Field[LogAuditListParamsRawMethod]       `query:"raw_method"`
	RawStatusCode   param.Field[LogAuditListParamsRawStatusCode]   `query:"raw_status_code"`
	RawURI          param.Field[LogAuditListParamsRawURI]          `query:"raw_uri"`
	ResourceID      param.Field[LogAuditListParamsResourceID]      `query:"resource_id"`
	ResourceProduct param.Field[LogAuditListParamsResourceProduct] `query:"resource_product"`
	ResourceScope   param.Field[LogAuditListParamsResourceScope]   `query:"resource_scope"`
	ResourceType    param.Field[LogAuditListParamsResourceType]    `query:"resource_type"`
}

func (LogAuditListParams) URLQuery

func (r LogAuditListParams) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParams's query parameters as `url.Values`.

type LogAuditListParamsActionResult

type LogAuditListParamsActionResult struct {
	// Filters out audit logs by whether the action was successful or not.
	Not param.Field[[]LogAuditListParamsActionResultNot] `query:"not"`
}

func (LogAuditListParamsActionResult) URLQuery

func (r LogAuditListParamsActionResult) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsActionResult's query parameters as `url.Values`.

type LogAuditListParamsActionResultNot

type LogAuditListParamsActionResultNot string
const (
	LogAuditListParamsActionResultNotSuccess LogAuditListParamsActionResultNot = "success"
	LogAuditListParamsActionResultNotFailure LogAuditListParamsActionResultNot = "failure"
)

func (LogAuditListParamsActionResultNot) IsKnown

type LogAuditListParamsActionType

type LogAuditListParamsActionType struct {
	// Filters out audit logs by the action type.
	Not param.Field[[]LogAuditListParamsActionTypeNot] `query:"not"`
}

func (LogAuditListParamsActionType) URLQuery

func (r LogAuditListParamsActionType) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsActionType's query parameters as `url.Values`.

type LogAuditListParamsActionTypeNot

type LogAuditListParamsActionTypeNot string
const (
	LogAuditListParamsActionTypeNotCreate LogAuditListParamsActionTypeNot = "create"
	LogAuditListParamsActionTypeNotDelete LogAuditListParamsActionTypeNot = "delete"
	LogAuditListParamsActionTypeNotView   LogAuditListParamsActionTypeNot = "view"
	LogAuditListParamsActionTypeNotUpdate LogAuditListParamsActionTypeNot = "update"
)

func (LogAuditListParamsActionTypeNot) IsKnown

type LogAuditListParamsActorContext

type LogAuditListParamsActorContext struct {
	// Filters out audit logs by the actor context.
	//
	// - `api`: The action was performed through the API. The specific credential type
	//   was not recorded.
	// - `api_key`: The action was authenticated with a Cloudflare Global API Key.
	// - `api_token`: The action was authenticated with an API token.
	// - `dash`: The action was performed through the Cloudflare dashboard.
	// - `oauth`: The action was authenticated with an OAuth token.
	// - `origin_ca_key`: The action was authenticated with an Origin CA key.
	Not param.Field[[]LogAuditListParamsActorContextNot] `query:"not"`
}

func (LogAuditListParamsActorContext) URLQuery

func (r LogAuditListParamsActorContext) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsActorContext's query parameters as `url.Values`.

type LogAuditListParamsActorContextNot

type LogAuditListParamsActorContextNot string
const (
	LogAuditListParamsActorContextNotAPI         LogAuditListParamsActorContextNot = "api"
	LogAuditListParamsActorContextNotAPIKey      LogAuditListParamsActorContextNot = "api_key"
	LogAuditListParamsActorContextNotAPIToken    LogAuditListParamsActorContextNot = "api_token"
	LogAuditListParamsActorContextNotDash        LogAuditListParamsActorContextNot = "dash"
	LogAuditListParamsActorContextNotOAuth       LogAuditListParamsActorContextNot = "oauth"
	LogAuditListParamsActorContextNotOriginCAKey LogAuditListParamsActorContextNot = "origin_ca_key"
)

func (LogAuditListParamsActorContextNot) IsKnown

type LogAuditListParamsActorEmail

type LogAuditListParamsActorEmail struct {
	// Filters out audit logs by the actor's email address.
	Not param.Field[[]string] `query:"not" format:"email"`
}

func (LogAuditListParamsActorEmail) URLQuery

func (r LogAuditListParamsActorEmail) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsActorEmail's query parameters as `url.Values`.

type LogAuditListParamsActorID

type LogAuditListParamsActorID struct {
	// Filters out audit logs by the actor's user ID.
	Not param.Field[[]string] `query:"not"`
}

func (LogAuditListParamsActorID) URLQuery

func (r LogAuditListParamsActorID) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsActorID's query parameters as `url.Values`.

type LogAuditListParamsActorIPAddress

type LogAuditListParamsActorIPAddress struct {
	// Filters out audit logs IP address where the action was initiated.
	Not param.Field[[]string] `query:"not"`
}

func (LogAuditListParamsActorIPAddress) URLQuery

func (r LogAuditListParamsActorIPAddress) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsActorIPAddress's query parameters as `url.Values`.

type LogAuditListParamsActorTokenID

type LogAuditListParamsActorTokenID struct {
	// Filters out audit logs by the API token ID when the actor context is an
	// api_token or oauth.
	Not param.Field[[]string] `query:"not"`
}

func (LogAuditListParamsActorTokenID) URLQuery

func (r LogAuditListParamsActorTokenID) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsActorTokenID's query parameters as `url.Values`.

type LogAuditListParamsActorTokenName

type LogAuditListParamsActorTokenName struct {
	// Filters out audit logs by the API token name when the actor context is an
	// api_token or oauth.
	Not param.Field[[]string] `query:"not"`
}

func (LogAuditListParamsActorTokenName) URLQuery

func (r LogAuditListParamsActorTokenName) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsActorTokenName's query parameters as `url.Values`.

type LogAuditListParamsActorType

type LogAuditListParamsActorType struct {
	// Filters out audit logs by the actor type.
	Not param.Field[[]LogAuditListParamsActorTypeNot] `query:"not"`
}

func (LogAuditListParamsActorType) URLQuery

func (r LogAuditListParamsActorType) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsActorType's query parameters as `url.Values`.

type LogAuditListParamsActorTypeNot

type LogAuditListParamsActorTypeNot string
const (
	LogAuditListParamsActorTypeNotCloudflareAdmin LogAuditListParamsActorTypeNot = "cloudflare_admin"
	LogAuditListParamsActorTypeNotSystem          LogAuditListParamsActorTypeNot = "system"
	LogAuditListParamsActorTypeNotUser            LogAuditListParamsActorTypeNot = "user"
)

func (LogAuditListParamsActorTypeNot) IsKnown

type LogAuditListParamsDirection

type LogAuditListParamsDirection string

Sets sorting order.

const (
	LogAuditListParamsDirectionDesc LogAuditListParamsDirection = "desc"
	LogAuditListParamsDirectionAsc  LogAuditListParamsDirection = "asc"
)

func (LogAuditListParamsDirection) IsKnown

func (r LogAuditListParamsDirection) IsKnown() bool

type LogAuditListParamsID

type LogAuditListParamsID struct {
	// Filters out audit logs by their IDs.
	Not param.Field[[]string] `query:"not"`
}

func (LogAuditListParamsID) URLQuery

func (r LogAuditListParamsID) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsID's query parameters as `url.Values`.

type LogAuditListParamsRawCfRayID

type LogAuditListParamsRawCfRayID struct {
	// Filters out audit logs by the response CF Ray ID.
	Not param.Field[[]string] `query:"not"`
}

func (LogAuditListParamsRawCfRayID) URLQuery

func (r LogAuditListParamsRawCfRayID) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsRawCfRayID's query parameters as `url.Values`.

type LogAuditListParamsRawMethod

type LogAuditListParamsRawMethod struct {
	// Filters out audit logs by the HTTP method for the API call.
	Not param.Field[[]string] `query:"not"`
}

func (LogAuditListParamsRawMethod) URLQuery

func (r LogAuditListParamsRawMethod) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsRawMethod's query parameters as `url.Values`.

type LogAuditListParamsRawStatusCode

type LogAuditListParamsRawStatusCode struct {
	// Filters out audit logs by the response status code that was returned.
	Not param.Field[[]int64] `query:"not"`
}

func (LogAuditListParamsRawStatusCode) URLQuery

func (r LogAuditListParamsRawStatusCode) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsRawStatusCode's query parameters as `url.Values`.

type LogAuditListParamsRawURI

type LogAuditListParamsRawURI struct {
	// Filters out audit logs by the request URI.
	Not param.Field[[]string] `query:"not"`
}

func (LogAuditListParamsRawURI) URLQuery

func (r LogAuditListParamsRawURI) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsRawURI's query parameters as `url.Values`.

type LogAuditListParamsResourceID

type LogAuditListParamsResourceID struct {
	// Filters out audit logs by the resource ID.
	Not param.Field[[]string] `query:"not"`
}

func (LogAuditListParamsResourceID) URLQuery

func (r LogAuditListParamsResourceID) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsResourceID's query parameters as `url.Values`.

type LogAuditListParamsResourceProduct

type LogAuditListParamsResourceProduct struct {
	// Filters out audit logs by the Cloudflare product associated with the changed
	// resource.
	Not param.Field[[]string] `query:"not"`
}

func (LogAuditListParamsResourceProduct) URLQuery

func (r LogAuditListParamsResourceProduct) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsResourceProduct's query parameters as `url.Values`.

type LogAuditListParamsResourceScope

type LogAuditListParamsResourceScope struct {
	// Filters out audit logs by the resource scope, specifying whether the resource is
	// associated with an organization.
	Not param.Field[[]LogAuditListParamsResourceScopeNot] `query:"not"`
}

func (LogAuditListParamsResourceScope) URLQuery

func (r LogAuditListParamsResourceScope) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsResourceScope's query parameters as `url.Values`.

type LogAuditListParamsResourceScopeNot

type LogAuditListParamsResourceScopeNot string
const (
	LogAuditListParamsResourceScopeNotOrganizations LogAuditListParamsResourceScopeNot = "organizations"
)

func (LogAuditListParamsResourceScopeNot) IsKnown

type LogAuditListParamsResourceType

type LogAuditListParamsResourceType struct {
	// Filters out audit logs based on the unique type of resource changed by the
	// action.
	Not param.Field[[]string] `query:"not"`
}

func (LogAuditListParamsResourceType) URLQuery

func (r LogAuditListParamsResourceType) URLQuery() (v url.Values)

URLQuery serializes LogAuditListParamsResourceType's query parameters as `url.Values`.

type LogAuditListResponse

type LogAuditListResponse struct {
	// A unique identifier for the audit log entry.
	ID string `json:"id"`
	// Provides information about the action performed.
	Action LogAuditListResponseAction `json:"action"`
	// Provides details about the actor who performed the action.
	Actor LogAuditListResponseActor `json:"actor"`
	// Contains organization related information.
	Organization LogAuditListResponseOrganization `json:"organization"`
	// Provides raw information about the request and response.
	Raw LogAuditListResponseRaw `json:"raw"`
	// Provides details about the affected resource.
	Resource LogAuditListResponseResource `json:"resource"`
	JSON     logAuditListResponseJSON     `json:"-"`
}

func (*LogAuditListResponse) UnmarshalJSON

func (r *LogAuditListResponse) UnmarshalJSON(data []byte) (err error)

type LogAuditListResponseAction

type LogAuditListResponseAction struct {
	// A short description of the action performed.
	Description string `json:"description"`
	// The result of the action, indicating success or failure.
	Result string `json:"result"`
	// A timestamp indicating when the action was logged.
	Time time.Time `json:"time" format:"date-time"`
	// A short string that describes the action that was performed.
	Type string                         `json:"type"`
	JSON logAuditListResponseActionJSON `json:"-"`
}

Provides information about the action performed.

func (*LogAuditListResponseAction) UnmarshalJSON

func (r *LogAuditListResponseAction) UnmarshalJSON(data []byte) (err error)

type LogAuditListResponseActor

type LogAuditListResponseActor struct {
	// The ID of the actor who performed the action. If a user performed the action,
	// this will be their User ID.
	ID string `json:"id"`
	// The context in which the action was initiated.
	//
	// - `api`: The action was performed through the API. The specific credential type
	//   was not recorded.
	// - `api_key`: The action was authenticated with a Cloudflare Global API Key.
	// - `api_token`: The action was authenticated with an API token.
	// - `dash`: The action was performed through the Cloudflare dashboard.
	// - `oauth`: The action was authenticated with an OAuth token.
	// - `origin_ca_key`: The action was authenticated with an Origin CA key.
	Context LogAuditListResponseActorContext `json:"context"`
	// The email of the actor who performed the action.
	Email string `json:"email" format:"email"`
	// The IP address of the request that performed the action.
	IPAddress string `json:"ip_address"`
	// The API token ID when the actor context is an api_token or oauth.
	TokenID string `json:"token_id"`
	// The API token name when the actor context is an api_token or oauth.
	TokenName string `json:"token_name"`
	// The type of actor.
	Type LogAuditListResponseActorType `json:"type"`
	JSON logAuditListResponseActorJSON `json:"-"`
}

Provides details about the actor who performed the action.

func (*LogAuditListResponseActor) UnmarshalJSON

func (r *LogAuditListResponseActor) UnmarshalJSON(data []byte) (err error)

type LogAuditListResponseActorContext

type LogAuditListResponseActorContext string

The context in which the action was initiated.

  • `api`: The action was performed through the API. The specific credential type was not recorded.
  • `api_key`: The action was authenticated with a Cloudflare Global API Key.
  • `api_token`: The action was authenticated with an API token.
  • `dash`: The action was performed through the Cloudflare dashboard.
  • `oauth`: The action was authenticated with an OAuth token.
  • `origin_ca_key`: The action was authenticated with an Origin CA key.
const (
	LogAuditListResponseActorContextAPI         LogAuditListResponseActorContext = "api"
	LogAuditListResponseActorContextAPIKey      LogAuditListResponseActorContext = "api_key"
	LogAuditListResponseActorContextAPIToken    LogAuditListResponseActorContext = "api_token"
	LogAuditListResponseActorContextDash        LogAuditListResponseActorContext = "dash"
	LogAuditListResponseActorContextOAuth       LogAuditListResponseActorContext = "oauth"
	LogAuditListResponseActorContextOriginCAKey LogAuditListResponseActorContext = "origin_ca_key"
)

func (LogAuditListResponseActorContext) IsKnown

type LogAuditListResponseActorType

type LogAuditListResponseActorType string

The type of actor.

const (
	LogAuditListResponseActorTypeCloudflareAdmin LogAuditListResponseActorType = "cloudflare_admin"
	LogAuditListResponseActorTypeSystem          LogAuditListResponseActorType = "system"
	LogAuditListResponseActorTypeUser            LogAuditListResponseActorType = "user"
)

func (LogAuditListResponseActorType) IsKnown

func (r LogAuditListResponseActorType) IsKnown() bool

type LogAuditListResponseOrganization

type LogAuditListResponseOrganization struct {
	// A unique identifier for the organization.
	ID   string                               `json:"id"`
	JSON logAuditListResponseOrganizationJSON `json:"-"`
}

Contains organization related information.

func (*LogAuditListResponseOrganization) UnmarshalJSON

func (r *LogAuditListResponseOrganization) UnmarshalJSON(data []byte) (err error)

type LogAuditListResponseRaw

type LogAuditListResponseRaw struct {
	// The Cloudflare Ray ID for the request.
	CfRayID string `json:"cf_ray_id"`
	// The HTTP method of the request.
	Method string `json:"method"`
	// The HTTP response status code returned by the API.
	StatusCode int64 `json:"status_code"`
	// The URI of the request.
	URI string `json:"uri"`
	// The client's user agent string sent with the request.
	UserAgent string                      `json:"user_agent"`
	JSON      logAuditListResponseRawJSON `json:"-"`
}

Provides raw information about the request and response.

func (*LogAuditListResponseRaw) UnmarshalJSON

func (r *LogAuditListResponseRaw) UnmarshalJSON(data []byte) (err error)

type LogAuditListResponseResource

type LogAuditListResponseResource struct {
	// The unique identifier for the affected resource.
	ID string `json:"id"`
	// The Cloudflare product associated with the resource.
	Product  string      `json:"product"`
	Request  interface{} `json:"request"`
	Response interface{} `json:"response"`
	// The scope of the resource.
	Scope interface{} `json:"scope"`
	// The type of the resource.
	Type string                           `json:"type"`
	JSON logAuditListResponseResourceJSON `json:"-"`
}

Provides details about the affected resource.

func (*LogAuditListResponseResource) UnmarshalJSON

func (r *LogAuditListResponseResource) UnmarshalJSON(data []byte) (err error)

type LogAuditService

type LogAuditService struct {
	Options []option.RequestOption
}

LogAuditService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLogAuditService method instead.

func NewLogAuditService

func NewLogAuditService(opts ...option.RequestOption) (r *LogAuditService)

NewLogAuditService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*LogAuditService) History added in v7.7.0

func (r *LogAuditService) History(ctx context.Context, organizationID string, id string, query LogAuditHistoryParams, opts ...option.RequestOption) (res *[]LogAuditHistoryResponse, err error)

Returns the chronological change history for the resource identified by the given organization-scoped audit log entry.

The endpoint first locates the source audit log entry by `id` (using `action_time` to narrow the lookup window), derives identifying filters from that entry, and then returns matching audit logs within the `since`/`before` window.

The `result_info.history_status` field indicates the quality of the resource identification used:

  • `exact`: Resource was identified by the resource URI.
  • `approximate`: Resource was identified without the resource URI.
  • `unavailable`: The source audit log entry did not contain enough information to identify the resource; an empty result is returned.

func (*LogAuditService) List

Gets a list of audit logs for an organization.

func (*LogAuditService) ListAutoPaging

Gets a list of audit logs for an organization.

type LogService

type LogService struct {
	Options []option.RequestOption
	Audit   *LogAuditService
}

LogService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewLogService method instead.

func NewLogService

func NewLogService(opts ...option.RequestOption) (r *LogService)

NewLogService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

type Member

type Member = shared.Member

This is an alias to an internal type.

type MemberDeleteResponse

type MemberDeleteResponse struct {
	ID   string                   `json:"id" api:"required"`
	JSON memberDeleteResponseJSON `json:"-"`
}

func (*MemberDeleteResponse) UnmarshalJSON

func (r *MemberDeleteResponse) UnmarshalJSON(data []byte) (err error)

type MemberDeleteResponseEnvelope

type MemberDeleteResponseEnvelope struct {
	Errors   []interface{}                       `json:"errors" api:"required"`
	Messages []shared.ResponseInfo               `json:"messages" api:"required"`
	Result   MemberDeleteResponse                `json:"result" api:"required"`
	Success  MemberDeleteResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON     memberDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*MemberDeleteResponseEnvelope) UnmarshalJSON

func (r *MemberDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type MemberDeleteResponseEnvelopeSuccess

type MemberDeleteResponseEnvelopeSuccess bool
const (
	MemberDeleteResponseEnvelopeSuccessTrue MemberDeleteResponseEnvelopeSuccess = true
)

func (MemberDeleteResponseEnvelopeSuccess) IsKnown

type MemberGetResponseEnvelope

type MemberGetResponseEnvelope struct {
	Errors   []interface{}                    `json:"errors" api:"required"`
	Messages []shared.ResponseInfo            `json:"messages" api:"required"`
	Result   OrganizationMember               `json:"result" api:"required"`
	Success  MemberGetResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON     memberGetResponseEnvelopeJSON    `json:"-"`
}

func (*MemberGetResponseEnvelope) UnmarshalJSON

func (r *MemberGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type MemberGetResponseEnvelopeSuccess

type MemberGetResponseEnvelopeSuccess bool
const (
	MemberGetResponseEnvelopeSuccessTrue MemberGetResponseEnvelopeSuccess = true
)

func (MemberGetResponseEnvelopeSuccess) IsKnown

type MemberListParams

type MemberListParams struct {
	// The amount of items to return. Defaults to 10.
	PageSize param.Field[int64] `query:"page_size"`
	// An opaque token returned from the last list response that when provided will
	// retrieve the next page.
	//
	// Parameters used to filter the retrieved list must remain in subsequent requests
	// with a page token.
	PageToken param.Field[string] `query:"page_token"`
	// Filter the list of memberships by membership status. Defaults to `active`,
	// `pending`, and `rejected`; pass `canceled` explicitly to include canceled
	// memberships.
	Status param.Field[[]MemberListParamsStatus] `query:"status"`
	User   param.Field[MemberListParamsUser]     `query:"user"`
}

func (MemberListParams) URLQuery

func (r MemberListParams) URLQuery() (v url.Values)

URLQuery serializes MemberListParams's query parameters as `url.Values`.

type MemberListParamsStatus

type MemberListParamsStatus string
const (
	MemberListParamsStatusActive   MemberListParamsStatus = "active"
	MemberListParamsStatusPending  MemberListParamsStatus = "pending"
	MemberListParamsStatusRejected MemberListParamsStatus = "rejected"
	MemberListParamsStatusCanceled MemberListParamsStatus = "canceled"
)

func (MemberListParamsStatus) IsKnown

func (r MemberListParamsStatus) IsKnown() bool

type MemberListParamsUser

type MemberListParamsUser struct {
	// Filter the list of memberships for a specific email that ends with a substring.
	Email param.Field[string] `query:"email"`
}

func (MemberListParamsUser) URLQuery

func (r MemberListParamsUser) URLQuery() (v url.Values)

URLQuery serializes MemberListParamsUser's query parameters as `url.Values`.

type MemberNewParams

type MemberNewParams struct {
	Member param.Field[MemberNewParamsMember] `json:"member" api:"required"`
}

func (MemberNewParams) MarshalJSON

func (r MemberNewParams) MarshalJSON() (data []byte, err error)

type MemberNewParamsMember

type MemberNewParamsMember struct {
	User param.Field[MemberNewParamsMemberUser] `json:"user" api:"required"`
}

func (MemberNewParamsMember) MarshalJSON

func (r MemberNewParamsMember) MarshalJSON() (data []byte, err error)

type MemberNewParamsMemberUser

type MemberNewParamsMemberUser struct {
	Email param.Field[string] `json:"email" api:"required"`
}

func (MemberNewParamsMemberUser) MarshalJSON

func (r MemberNewParamsMemberUser) MarshalJSON() (data []byte, err error)

type MemberNewResponseEnvelope

type MemberNewResponseEnvelope struct {
	Errors   []interface{}                    `json:"errors" api:"required"`
	Messages []shared.ResponseInfo            `json:"messages" api:"required"`
	Result   OrganizationMember               `json:"result" api:"required"`
	Success  MemberNewResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON     memberNewResponseEnvelopeJSON    `json:"-"`
}

func (*MemberNewResponseEnvelope) UnmarshalJSON

func (r *MemberNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type MemberNewResponseEnvelopeSuccess

type MemberNewResponseEnvelopeSuccess bool
const (
	MemberNewResponseEnvelopeSuccessTrue MemberNewResponseEnvelopeSuccess = true
)

func (MemberNewResponseEnvelopeSuccess) IsKnown

type MemberPoliciesAccess

type MemberPoliciesAccess = shared.MemberPoliciesAccess

Allow or deny operations against the resources.

This is an alias to an internal type.

type MemberPoliciesPermissionGroup

type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type MemberPoliciesPermissionGroupsMeta

type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type MemberPoliciesResourceGroup

type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup

A group of scoped resources.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsMeta

type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta

Attributes associated to the resource group.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScope

type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope

The scope associated to the resource group

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScopeObject

type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject

A scope object represents any resource that can have actions applied against invite.

This is an alias to an internal type.

type MemberPolicy

type MemberPolicy = shared.MemberPolicy

This is an alias to an internal type.

type MemberService

type MemberService struct {
	Options []option.RequestOption
}

MemberService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMemberService method instead.

func NewMemberService

func NewMemberService(opts ...option.RequestOption) (r *MemberService)

NewMemberService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MemberService) Delete

func (r *MemberService) Delete(ctx context.Context, organizationID string, memberID string, opts ...option.RequestOption) (res *MemberDeleteResponse, err error)

Delete a membership to a particular Organization.

func (*MemberService) Get

func (r *MemberService) Get(ctx context.Context, organizationID string, memberID string, opts ...option.RequestOption) (res *OrganizationMember, err error)

Retrieve a single membership from an Organization.

func (*MemberService) List

func (r *MemberService) List(ctx context.Context, organizationID string, query MemberListParams, opts ...option.RequestOption) (res *pagination.SinglePage[OrganizationMember], err error)

List memberships for an Organization.

func (*MemberService) ListAutoPaging

List memberships for an Organization.

func (*MemberService) New

func (r *MemberService) New(ctx context.Context, organizationID string, body MemberNewParams, opts ...option.RequestOption) (res *OrganizationMember, err error)

Create a membership that grants access to a specific Organization.

type MemberStatus

type MemberStatus = shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

type MemberUser

type MemberUser = shared.MemberUser

Details of the user associated to the membership.

This is an alias to an internal type.

type Organization

type Organization struct {
	ID         string                  `json:"id" api:"required"`
	CreateTime time.Time               `json:"create_time" api:"required" format:"date-time"`
	Meta       OrganizationMeta        `json:"meta" api:"required"`
	Name       string                  `json:"name" api:"required"`
	Parent     OrganizationParent      `json:"parent"`
	Profile    accounts.AccountProfile `json:"profile"`
	JSON       organizationJSON        `json:"-"`
}

References an Organization in the Cloudflare data model.

func (*Organization) UnmarshalJSON

func (r *Organization) UnmarshalJSON(data []byte) (err error)

type OrganizationAccountGetParams

type OrganizationAccountGetParams struct {
	AccountPubname param.Field[OrganizationAccountGetParamsAccountPubname] `query:"account_pubname"`
	// Sort direction for the order_by field. Valid values: `asc`, `desc`. Defaults to
	// `asc` when order_by is specified.
	Direction param.Field[OrganizationAccountGetParamsDirection] `query:"direction"`
	// Include Account tags from the resource tag mirror. Omit this parameter to
	// preserve the existing Account response shape.
	IncludeTags param.Field[bool] `query:"include_tags"`
	// Whether to calculate and return the exact result_info.total_size for cursor
	// pagination. Defaults to true. When false, total_size is omitted. page_size and
	// include_total may change between pages; next_page_token remains the
	// authoritative continuation signal.
	IncludeTotal param.Field[bool]                             `query:"include_total"`
	Name         param.Field[OrganizationAccountGetParamsName] `query:"name"`
	// Field to order results by. Currently supported values: `account_name`.
	OrderBy param.Field[OrganizationAccountGetParamsOrderBy] `query:"order_by"`
	// The amount of items to return. Defaults to 10.
	PageSize param.Field[int64] `query:"page_size"`
	// An opaque token returned from the last list response that when provided will
	// retrieve the next page.
	//
	// Parameters used to filter the retrieved list must remain in subsequent requests
	// with a page token.
	PageToken param.Field[string] `query:"page_token"`
	// Filter accounts by lifecycle status. Defaults to `active`.
	Status param.Field[OrganizationAccountGetParamsStatus] `query:"status"`
	Accept param.Field[string]                             `header:"Accept"`
}

func (OrganizationAccountGetParams) URLQuery

func (r OrganizationAccountGetParams) URLQuery() (v url.Values)

URLQuery serializes OrganizationAccountGetParams's query parameters as `url.Values`.

type OrganizationAccountGetParamsAccountPubname

type OrganizationAccountGetParamsAccountPubname struct {
	// (case-insensitive) Filter the list of accounts to where the account_pubname
	// contains a particular string.
	Contains param.Field[string] `query:"contains"`
	// (case-insensitive) Filter the list of accounts to where the account_pubname ends
	// with a particular string.
	EndsWith param.Field[string] `query:"endsWith"`
	// (case-insensitive) Filter the list of accounts to where the account_pubname
	// starts with a particular string.
	StartsWith param.Field[string] `query:"startsWith"`
}

func (OrganizationAccountGetParamsAccountPubname) URLQuery

URLQuery serializes OrganizationAccountGetParamsAccountPubname's query parameters as `url.Values`.

type OrganizationAccountGetParamsDirection

type OrganizationAccountGetParamsDirection string

Sort direction for the order_by field. Valid values: `asc`, `desc`. Defaults to `asc` when order_by is specified.

const (
	OrganizationAccountGetParamsDirectionAsc  OrganizationAccountGetParamsDirection = "asc"
	OrganizationAccountGetParamsDirectionDesc OrganizationAccountGetParamsDirection = "desc"
)

func (OrganizationAccountGetParamsDirection) IsKnown

type OrganizationAccountGetParamsName

type OrganizationAccountGetParamsName struct {
	// (case-insensitive) Filter the list of accounts to where the name contains a
	// particular string.
	Contains param.Field[string] `query:"contains"`
	// (case-insensitive) Filter the list of accounts to where the name ends with a
	// particular string.
	EndsWith param.Field[string] `query:"endsWith"`
	// (case-insensitive) Filter the list of accounts to where the name starts with a
	// particular string.
	StartsWith param.Field[string] `query:"startsWith"`
}

func (OrganizationAccountGetParamsName) URLQuery

func (r OrganizationAccountGetParamsName) URLQuery() (v url.Values)

URLQuery serializes OrganizationAccountGetParamsName's query parameters as `url.Values`.

type OrganizationAccountGetParamsOrderBy

type OrganizationAccountGetParamsOrderBy string

Field to order results by. Currently supported values: `account_name`.

const (
	OrganizationAccountGetParamsOrderByAccountName OrganizationAccountGetParamsOrderBy = "account_name"
)

func (OrganizationAccountGetParamsOrderBy) IsKnown

type OrganizationAccountGetParamsStatus

type OrganizationAccountGetParamsStatus string

Filter accounts by lifecycle status. Defaults to `active`.

const (
	OrganizationAccountGetParamsStatusActive  OrganizationAccountGetParamsStatus = "active"
	OrganizationAccountGetParamsStatusDeleted OrganizationAccountGetParamsStatus = "deleted"
)

func (OrganizationAccountGetParamsStatus) IsKnown

type OrganizationAccountGetResponse

type OrganizationAccountGetResponse struct {
	CreatedOn time.Time `json:"created_on" api:"required" format:"date-time"`
	// This field can have the runtime type of [tenants.TenantAccountSettings],
	// [OrganizationAccountGetResponseOrganizationsLegacyAccountSettings].
	Settings                     interface{}                                                `json:"settings" api:"required"`
	ID                           string                                                     `json:"id"`
	AccountPubname               string                                                     `json:"account_pubname" api:"nullable"`
	AccountTag                   string                                                     `json:"account_tag"`
	AccountType                  OrganizationAccountGetResponseAccountType                  `json:"account_type"`
	EnterpriseProvisioningStatus OrganizationAccountGetResponseEnterpriseProvisioningStatus `json:"enterprise_provisioning_status"`
	Name                         string                                                     `json:"name" api:"nullable"`
	ProvisioningMode             OrganizationAccountGetResponseProvisioningMode             `json:"provisioning_mode"`
	// This field can have the runtime type of [map[string]string].
	Tags interface{}                        `json:"tags"`
	Type OrganizationAccountGetResponseType `json:"type"`
	JSON organizationAccountGetResponseJSON `json:"-"`
	// contains filtered or unexported fields
}

func (OrganizationAccountGetResponse) AsUnion

AsUnion returns a OrganizationAccountGetResponseUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are tenants.TenantAccount, OrganizationAccountGetResponseOrganizationsLegacyAccount.

func (*OrganizationAccountGetResponse) UnmarshalJSON

func (r *OrganizationAccountGetResponse) UnmarshalJSON(data []byte) (err error)

type OrganizationAccountGetResponseAccountType

type OrganizationAccountGetResponseAccountType string
const (
	OrganizationAccountGetResponseAccountTypeStandard   OrganizationAccountGetResponseAccountType = "standard"
	OrganizationAccountGetResponseAccountTypeEnterprise OrganizationAccountGetResponseAccountType = "enterprise"
)

func (OrganizationAccountGetResponseAccountType) IsKnown

type OrganizationAccountGetResponseEnterpriseProvisioningStatus

type OrganizationAccountGetResponseEnterpriseProvisioningStatus string
const (
	OrganizationAccountGetResponseEnterpriseProvisioningStatusPending   OrganizationAccountGetResponseEnterpriseProvisioningStatus = "pending"
	OrganizationAccountGetResponseEnterpriseProvisioningStatusCompleted OrganizationAccountGetResponseEnterpriseProvisioningStatus = "completed"
	OrganizationAccountGetResponseEnterpriseProvisioningStatusRejected  OrganizationAccountGetResponseEnterpriseProvisioningStatus = "rejected"
	OrganizationAccountGetResponseEnterpriseProvisioningStatusCancelled OrganizationAccountGetResponseEnterpriseProvisioningStatus = "cancelled"
)

func (OrganizationAccountGetResponseEnterpriseProvisioningStatus) IsKnown

type OrganizationAccountGetResponseEnvelope

type OrganizationAccountGetResponseEnvelope struct {
	Errors     []interface{}                                    `json:"errors" api:"required"`
	Messages   []shared.ResponseInfo                            `json:"messages" api:"required"`
	Result     []OrganizationAccountGetResponse                 `json:"result" api:"required"`
	ResultInfo OrganizationAccountGetResponseEnvelopeResultInfo `json:"result_info" api:"required"`
	Success    OrganizationAccountGetResponseEnvelopeSuccess    `json:"success" api:"required"`
	JSON       organizationAccountGetResponseEnvelopeJSON       `json:"-"`
}

func (*OrganizationAccountGetResponseEnvelope) UnmarshalJSON

func (r *OrganizationAccountGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type OrganizationAccountGetResponseEnvelopeResultInfo

type OrganizationAccountGetResponseEnvelopeResultInfo struct {
	// Use this opaque token in the next request to retrieve the next page.
	//
	// Parameters used to filter the retrieved list must remain in subsequent requests
	// with a page token.
	NextPageToken string `json:"next_page_token"`
	// Counts the total amount of items in a list with the applied filters. The API
	// omits next_page_token to indicate no more items in a particular list.
	TotalSize int64                                                `json:"total_size"`
	JSON      organizationAccountGetResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*OrganizationAccountGetResponseEnvelopeResultInfo) UnmarshalJSON

func (r *OrganizationAccountGetResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)

type OrganizationAccountGetResponseEnvelopeSuccess

type OrganizationAccountGetResponseEnvelopeSuccess bool
const (
	OrganizationAccountGetResponseEnvelopeSuccessTrue OrganizationAccountGetResponseEnvelopeSuccess = true
)

func (OrganizationAccountGetResponseEnvelopeSuccess) IsKnown

type OrganizationAccountGetResponseOrganizationsLegacyAccount

type OrganizationAccountGetResponseOrganizationsLegacyAccount struct {
	AccountPubname string                                                              `json:"account_pubname" api:"required,nullable"`
	AccountTag     string                                                              `json:"account_tag" api:"required"`
	AccountType    OrganizationAccountGetResponseOrganizationsLegacyAccountAccountType `json:"account_type" api:"required"`
	CreatedOn      time.Time                                                           `json:"created_on" api:"required" format:"date-time"`
	Settings       OrganizationAccountGetResponseOrganizationsLegacyAccountSettings    `json:"settings" api:"required"`
	JSON           organizationAccountGetResponseOrganizationsLegacyAccountJSON        `json:"-"`
}

func (OrganizationAccountGetResponseOrganizationsLegacyAccount) ImplementsOrganizationAccountGetResponse

func (r OrganizationAccountGetResponseOrganizationsLegacyAccount) ImplementsOrganizationAccountGetResponse()

func (*OrganizationAccountGetResponseOrganizationsLegacyAccount) UnmarshalJSON

type OrganizationAccountGetResponseOrganizationsLegacyAccountAccountType

type OrganizationAccountGetResponseOrganizationsLegacyAccountAccountType string
const (
	OrganizationAccountGetResponseOrganizationsLegacyAccountAccountTypeStandard   OrganizationAccountGetResponseOrganizationsLegacyAccountAccountType = "standard"
	OrganizationAccountGetResponseOrganizationsLegacyAccountAccountTypeEnterprise OrganizationAccountGetResponseOrganizationsLegacyAccountAccountType = "enterprise"
)

func (OrganizationAccountGetResponseOrganizationsLegacyAccountAccountType) IsKnown

type OrganizationAccountGetResponseOrganizationsLegacyAccountSettings

type OrganizationAccountGetResponseOrganizationsLegacyAccountSettings struct {
	AccessApprovalExpiry        time.Time                                                            `json:"access_approval_expiry" api:"required,nullable" format:"date-time"`
	APIAccessEnabled            bool                                                                 `json:"api_access_enabled" api:"required"`
	EnforceTwoFactor            bool                                                                 `json:"enforce_two_factor" api:"required"`
	UseAccountCustomNSByDefault bool                                                                 `json:"use_account_custom_ns_by_default" api:"required"`
	JSON                        organizationAccountGetResponseOrganizationsLegacyAccountSettingsJSON `json:"-"`
}

func (*OrganizationAccountGetResponseOrganizationsLegacyAccountSettings) UnmarshalJSON

type OrganizationAccountGetResponseProvisioningMode

type OrganizationAccountGetResponseProvisioningMode string
const (
	OrganizationAccountGetResponseProvisioningModeAssisted OrganizationAccountGetResponseProvisioningMode = "assisted"
)

func (OrganizationAccountGetResponseProvisioningMode) IsKnown

type OrganizationAccountGetResponseType

type OrganizationAccountGetResponseType string
const (
	OrganizationAccountGetResponseTypeStandard   OrganizationAccountGetResponseType = "standard"
	OrganizationAccountGetResponseTypeEnterprise OrganizationAccountGetResponseType = "enterprise"
)

func (OrganizationAccountGetResponseType) IsKnown

type OrganizationAccountGetResponseUnion

type OrganizationAccountGetResponseUnion interface {
	ImplementsOrganizationAccountGetResponse()
}

Union satisfied by tenants.TenantAccount or OrganizationAccountGetResponseOrganizationsLegacyAccount.

type OrganizationAccountService

type OrganizationAccountService struct {
	Options []option.RequestOption
}

OrganizationAccountService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationAccountService method instead.

func NewOrganizationAccountService

func NewOrganizationAccountService(opts ...option.RequestOption) (r *OrganizationAccountService)

NewOrganizationAccountService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OrganizationAccountService) Get

Retrieve the accounts immediately attached to a specific organization. Accounts attached to sub-organizations are not included. Use `page_token` and `page_size` for cursor pagination. The default response uses Account fields; `Accept: application/json; legacy=true` requests the LegacyAccount representation.

type OrganizationDeleteResponse

type OrganizationDeleteResponse struct {
	ID   string                         `json:"id" api:"required"`
	JSON organizationDeleteResponseJSON `json:"-"`
}

func (*OrganizationDeleteResponse) UnmarshalJSON

func (r *OrganizationDeleteResponse) UnmarshalJSON(data []byte) (err error)

type OrganizationDeleteResponseEnvelope

type OrganizationDeleteResponseEnvelope struct {
	Errors   []interface{}                             `json:"errors" api:"required"`
	Messages []shared.ResponseInfo                     `json:"messages" api:"required"`
	Result   OrganizationDeleteResponse                `json:"result" api:"required"`
	Success  OrganizationDeleteResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON     organizationDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*OrganizationDeleteResponseEnvelope) UnmarshalJSON

func (r *OrganizationDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type OrganizationDeleteResponseEnvelopeSuccess

type OrganizationDeleteResponseEnvelopeSuccess bool
const (
	OrganizationDeleteResponseEnvelopeSuccessTrue OrganizationDeleteResponseEnvelopeSuccess = true
)

func (OrganizationDeleteResponseEnvelopeSuccess) IsKnown

type OrganizationGetResponseEnvelope

type OrganizationGetResponseEnvelope struct {
	Errors   []interface{}         `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	// References an Organization in the Cloudflare data model.
	Result  Organization                           `json:"result" api:"required"`
	Success OrganizationGetResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    organizationGetResponseEnvelopeJSON    `json:"-"`
}

func (*OrganizationGetResponseEnvelope) UnmarshalJSON

func (r *OrganizationGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type OrganizationGetResponseEnvelopeSuccess

type OrganizationGetResponseEnvelopeSuccess bool
const (
	OrganizationGetResponseEnvelopeSuccessTrue OrganizationGetResponseEnvelopeSuccess = true
)

func (OrganizationGetResponseEnvelopeSuccess) IsKnown

type OrganizationListParams

type OrganizationListParams struct {
	// Only return organizations with the specified IDs (ex. id=foo&id=bar). Send
	// multiple elements by repeating the query value.
	ID         param.Field[[]string]                         `query:"id"`
	Containing param.Field[OrganizationListParamsContaining] `query:"containing"`
	// Sort direction for the `order_by` field. Defaults to `asc` when `order_by` is
	// specified.
	Direction param.Field[OrganizationListParamsDirection] `query:"direction"`
	Member    param.Field[OrganizationListParamsMember]    `query:"member"`
	Name      param.Field[OrganizationListParamsName]      `query:"name"`
	// Field to order results by. Currently supported values: `name`. When not
	// specified, results are ordered by hierarchy.
	OrderBy param.Field[OrganizationListParamsOrderBy] `query:"order_by"`
	// The amount of items to return. Defaults to 10.
	PageSize param.Field[int64] `query:"page_size"`
	// An opaque token returned from the last list response that when provided will
	// retrieve the next page.
	//
	// Parameters used to filter the retrieved list must remain in subsequent requests
	// with a page token.
	PageToken param.Field[string]                       `query:"page_token"`
	Parent    param.Field[OrganizationListParamsParent] `query:"parent"`
}

func (OrganizationListParams) URLQuery

func (r OrganizationListParams) URLQuery() (v url.Values)

URLQuery serializes OrganizationListParams's query parameters as `url.Values`.

type OrganizationListParamsContaining

type OrganizationListParamsContaining struct {
	// Filter the list of organizations to the ones that contain this particular
	// account.
	Account param.Field[string] `query:"account"`
	// Filter the list of organizations to the ones that contain this particular
	// organization.
	Organization param.Field[string] `query:"organization"`
	// Filter the list of organizations to the ones that contain this particular user.
	//
	// IMPORTANT: Just because an organization "contains" a user is not a
	// representation of any authorization or privilege to manage any resources
	// therein. An organization "containing" a user simply means the user is managed by
	// that organization.
	User param.Field[string] `query:"user"`
}

func (OrganizationListParamsContaining) URLQuery

func (r OrganizationListParamsContaining) URLQuery() (v url.Values)

URLQuery serializes OrganizationListParamsContaining's query parameters as `url.Values`.

type OrganizationListParamsDirection

type OrganizationListParamsDirection string

Sort direction for the `order_by` field. Defaults to `asc` when `order_by` is specified.

const (
	OrganizationListParamsDirectionAsc  OrganizationListParamsDirection = "asc"
	OrganizationListParamsDirectionDesc OrganizationListParamsDirection = "desc"
)

func (OrganizationListParamsDirection) IsKnown

type OrganizationListParamsMember

type OrganizationListParamsMember struct {
	// Filter organizations to those where the given user, by email, is an active
	// member of that exact organization. This does not include hierarchy-derived
	// access.
	Email param.Field[string] `query:"email"`
}

func (OrganizationListParamsMember) URLQuery

func (r OrganizationListParamsMember) URLQuery() (v url.Values)

URLQuery serializes OrganizationListParamsMember's query parameters as `url.Values`.

type OrganizationListParamsName

type OrganizationListParamsName struct {
	// (case-insensitive) Filter the list of organizations to where the name contains a
	// particular string.
	Contains param.Field[string] `query:"contains"`
	// (case-insensitive) Filter the list of organizations to where the name ends with
	// a particular string.
	EndsWith param.Field[string] `query:"endsWith"`
	// (case-insensitive) Filter the list of organizations to where the name starts
	// with a particular string.
	StartsWith param.Field[string] `query:"startsWith"`
}

func (OrganizationListParamsName) URLQuery

func (r OrganizationListParamsName) URLQuery() (v url.Values)

URLQuery serializes OrganizationListParamsName's query parameters as `url.Values`.

type OrganizationListParamsOrderBy

type OrganizationListParamsOrderBy string

Field to order results by. Currently supported values: `name`. When not specified, results are ordered by hierarchy.

const (
	OrganizationListParamsOrderByName OrganizationListParamsOrderBy = "name"
)

func (OrganizationListParamsOrderBy) IsKnown

func (r OrganizationListParamsOrderBy) IsKnown() bool

type OrganizationListParamsParent

type OrganizationListParamsParent struct {
	// Filter the list of organizations to the ones that are a sub-organization of the
	// specified organization.
	//
	// "null" is a valid value to provide for this parameter. It means "where an
	// organization has no parent (i.e. it is a 'root' organization)."
	ID param.Field[OrganizationListParamsParentID] `query:"id"`
}

func (OrganizationListParamsParent) URLQuery

func (r OrganizationListParamsParent) URLQuery() (v url.Values)

URLQuery serializes OrganizationListParamsParent's query parameters as `url.Values`.

type OrganizationListParamsParentID

type OrganizationListParamsParentID string

Filter the list of organizations to the ones that are a sub-organization of the specified organization.

"null" is a valid value to provide for this parameter. It means "where an organization has no parent (i.e. it is a 'root' organization)."

const (
	OrganizationListParamsParentIDNull OrganizationListParamsParentID = "null"
)

func (OrganizationListParamsParentID) IsKnown

type OrganizationMember

type OrganizationMember struct {
	// Organization Member ID
	ID         string                   `json:"id" api:"required"`
	CreateTime time.Time                `json:"create_time" api:"required" format:"date-time"`
	Meta       map[string]interface{}   `json:"meta" api:"required"`
	Status     OrganizationMemberStatus `json:"status" api:"required"`
	UpdateTime time.Time                `json:"update_time" api:"required" format:"date-time"`
	User       OrganizationMemberUser   `json:"user" api:"required"`
	// Direct policies of the membership. Present only for DSR members enrolled in
	// Organization Roles.
	Policies []OrganizationMemberPolicy `json:"policies"`
	JSON     organizationMemberJSON     `json:"-"`
}

func (*OrganizationMember) UnmarshalJSON

func (r *OrganizationMember) UnmarshalJSON(data []byte) (err error)

type OrganizationMemberPoliciesRole

type OrganizationMemberPoliciesRole struct {
	ID   string                             `json:"id" api:"required"`
	JSON organizationMemberPoliciesRoleJSON `json:"-"`
}

func (*OrganizationMemberPoliciesRole) UnmarshalJSON

func (r *OrganizationMemberPoliciesRole) UnmarshalJSON(data []byte) (err error)

type OrganizationMemberPoliciesScope

type OrganizationMemberPoliciesScope struct {
	// An Organization (`com.cloudflare.api.tenant.unit.<tag>`) or Account
	// (`com.cloudflare.api.account.<tag>`) key.
	Key string `json:"key" api:"required"`
	// The route Organization for Account scopes. Optional in requests and always
	// returned for Account scopes.
	SubsetOf []interface{}                       `json:"subset_of"`
	JSON     organizationMemberPoliciesScopeJSON `json:"-"`
}

func (*OrganizationMemberPoliciesScope) UnmarshalJSON

func (r *OrganizationMemberPoliciesScope) UnmarshalJSON(data []byte) (err error)

type OrganizationMemberPolicy

type OrganizationMemberPolicy struct {
	Roles  []OrganizationMemberPoliciesRole  `json:"roles" api:"required"`
	Scopes []OrganizationMemberPoliciesScope `json:"scopes" api:"required"`
	// Omit to create a policy. An unchanged policy keeps its ID; a changed policy is
	// replaced under a new ID.
	ID   string                       `json:"id"`
	JSON organizationMemberPolicyJSON `json:"-"`
}

func (*OrganizationMemberPolicy) UnmarshalJSON

func (r *OrganizationMemberPolicy) UnmarshalJSON(data []byte) (err error)

type OrganizationMemberStatus

type OrganizationMemberStatus string
const (
	OrganizationMemberStatusActive   OrganizationMemberStatus = "active"
	OrganizationMemberStatusPending  OrganizationMemberStatus = "pending"
	OrganizationMemberStatusRejected OrganizationMemberStatus = "rejected"
	OrganizationMemberStatusCanceled OrganizationMemberStatus = "canceled"
)

func (OrganizationMemberStatus) IsKnown

func (r OrganizationMemberStatus) IsKnown() bool

type OrganizationMemberUser

type OrganizationMemberUser struct {
	ID                             string                     `json:"id" api:"required"`
	Email                          string                     `json:"email" api:"required"`
	Name                           string                     `json:"name" api:"required"`
	TwoFactorAuthenticationEnabled bool                       `json:"two_factor_authentication_enabled" api:"required"`
	JSON                           organizationMemberUserJSON `json:"-"`
}

func (*OrganizationMemberUser) UnmarshalJSON

func (r *OrganizationMemberUser) UnmarshalJSON(data []byte) (err error)

type OrganizationMeta

type OrganizationMeta struct {
	AreChildAccountsAccessibleByOrgMembers bool `json:"are_child_accounts_accessible_by_org_members"`
	// Ordered chain of organization tags from the root organization down to (and
	// including) this organization itself. Root organizations return a single-element
	// array containing their own tag; sub-organizations return
	// `[rootTag, ...intermediateTags, parentTag, selfTag]`. Useful for constructing
	// authorization scopes that need to cover every ancestor in the hierarchy.
	HierarchyTags []string `json:"hierarchy_tags"`
	ManagedBy     string   `json:"managed_by"`
	// Enable features for Organizations.
	TenantFlags OrganizationMetaTenantFlags `json:"tenant_flags"`
	TenantType  string                      `json:"tenant_type"`
	ExtraFields map[string]interface{}      `json:"-" api:"extrafields"`
	JSON        organizationMetaJSON        `json:"-"`
}

func (*OrganizationMeta) UnmarshalJSON

func (r *OrganizationMeta) UnmarshalJSON(data []byte) (err error)

type OrganizationMetaTenantFlags added in v7.9.0

type OrganizationMetaTenantFlags struct {
	AccountCreation                      string                          `json:"account_creation" api:"required"`
	AccountCreationAppliesTenantDefaults string                          `json:"account_creation_applies_tenant_defaults" api:"required"`
	AccountDeletion                      string                          `json:"account_deletion" api:"required"`
	AccountMigration                     string                          `json:"account_migration" api:"required"`
	AccountMobility                      string                          `json:"account_mobility" api:"required"`
	EnterpriseCapability                 string                          `json:"enterprise_capability" api:"required"`
	MemberManagement                     string                          `json:"member_management" api:"required"`
	SubOrgCreation                       string                          `json:"sub_org_creation" api:"required"`
	JSON                                 organizationMetaTenantFlagsJSON `json:"-"`
}

Enable features for Organizations.

func (*OrganizationMetaTenantFlags) UnmarshalJSON added in v7.9.0

func (r *OrganizationMetaTenantFlags) UnmarshalJSON(data []byte) (err error)

type OrganizationNewParams

type OrganizationNewParams struct {
	// The Organization name, limited to 65 UTF-8 bytes.
	Name   param.Field[string]                      `json:"name" api:"required"`
	Parent param.Field[OrganizationNewParamsParent] `json:"parent"`
	// Optional profile fields, each limited to 1,000 UTF-8 bytes. An empty profile is
	// ignored.
	Profile param.Field[OrganizationNewParamsProfile] `json:"profile"`
}

func (OrganizationNewParams) MarshalJSON

func (r OrganizationNewParams) MarshalJSON() (data []byte, err error)

type OrganizationNewParamsParent

type OrganizationNewParamsParent struct {
	ID param.Field[string] `json:"id" api:"required"`
}

func (OrganizationNewParamsParent) MarshalJSON

func (r OrganizationNewParamsParent) MarshalJSON() (data []byte, err error)

type OrganizationNewParamsProfile

type OrganizationNewParamsProfile struct {
	BusinessAddress  param.Field[string] `json:"business_address"`
	BusinessEmail    param.Field[string] `json:"business_email"`
	BusinessName     param.Field[string] `json:"business_name"`
	BusinessPhone    param.Field[string] `json:"business_phone"`
	ExternalMetadata param.Field[string] `json:"external_metadata"`
}

Optional profile fields, each limited to 1,000 UTF-8 bytes. An empty profile is ignored.

func (OrganizationNewParamsProfile) MarshalJSON

func (r OrganizationNewParamsProfile) MarshalJSON() (data []byte, err error)

type OrganizationNewResponseEnvelope

type OrganizationNewResponseEnvelope struct {
	Errors   []interface{}         `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	// References an Organization in the Cloudflare data model.
	Result  Organization                           `json:"result" api:"required"`
	Success OrganizationNewResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    organizationNewResponseEnvelopeJSON    `json:"-"`
}

func (*OrganizationNewResponseEnvelope) UnmarshalJSON

func (r *OrganizationNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type OrganizationNewResponseEnvelopeSuccess

type OrganizationNewResponseEnvelopeSuccess bool
const (
	OrganizationNewResponseEnvelopeSuccessTrue OrganizationNewResponseEnvelopeSuccess = true
)

func (OrganizationNewResponseEnvelopeSuccess) IsKnown

type OrganizationParent

type OrganizationParent struct {
	ID   string                 `json:"id" api:"required"`
	Name string                 `json:"name" api:"required"`
	JSON organizationParentJSON `json:"-"`
}

func (*OrganizationParent) UnmarshalJSON

func (r *OrganizationParent) UnmarshalJSON(data []byte) (err error)

type OrganizationProfileGetResponseEnvelope

type OrganizationProfileGetResponseEnvelope struct {
	Errors   []interface{}                                 `json:"errors" api:"required"`
	Messages []shared.ResponseInfo                         `json:"messages" api:"required"`
	Result   accounts.AccountProfile                       `json:"result" api:"required"`
	Success  OrganizationProfileGetResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON     organizationProfileGetResponseEnvelopeJSON    `json:"-"`
}

func (*OrganizationProfileGetResponseEnvelope) UnmarshalJSON

func (r *OrganizationProfileGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type OrganizationProfileGetResponseEnvelopeSuccess

type OrganizationProfileGetResponseEnvelopeSuccess bool
const (
	OrganizationProfileGetResponseEnvelopeSuccessTrue OrganizationProfileGetResponseEnvelopeSuccess = true
)

func (OrganizationProfileGetResponseEnvelopeSuccess) IsKnown

type OrganizationProfileService

type OrganizationProfileService struct {
	Options []option.RequestOption
}

OrganizationProfileService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationProfileService method instead.

func NewOrganizationProfileService

func NewOrganizationProfileService(opts ...option.RequestOption) (r *OrganizationProfileService)

NewOrganizationProfileService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OrganizationProfileService) Get

func (r *OrganizationProfileService) Get(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *accounts.AccountProfile, err error)

Retrieves the business profile (name, email, phone, address, and external metadata) associated with this organization's customer record. Profiles can be shared across accounts and organizations. Only available to members of the organization.

func (*OrganizationProfileService) Update

func (r *OrganizationProfileService) Update(ctx context.Context, organizationID string, body OrganizationProfileUpdateParams, opts ...option.RequestOption) (err error)

Partially updates the business profile (name, email, phone, address, and external metadata) associated with this organization's customer record, creating the profile if it does not exist. Changes apply to every account and organization sharing that profile. Omitted, empty, or null fields are left unchanged. Each profile field is limited to 1,000 UTF-8 bytes. Only available to members of the organization.

type OrganizationProfileUpdateParams

type OrganizationProfileUpdateParams struct {
	BusinessAddress  param.Field[string] `json:"business_address"`
	BusinessEmail    param.Field[string] `json:"business_email"`
	BusinessName     param.Field[string] `json:"business_name"`
	BusinessPhone    param.Field[string] `json:"business_phone"`
	ExternalMetadata param.Field[string] `json:"external_metadata"`
}

func (OrganizationProfileUpdateParams) MarshalJSON

func (r OrganizationProfileUpdateParams) MarshalJSON() (data []byte, err error)

type OrganizationService

type OrganizationService struct {
	Options              []option.RequestOption
	OrganizationAccounts *OrganizationAccountService
	OrganizationProfile  *OrganizationProfileService
	Members              *MemberService
	Logs                 *LogService
	Billing              *BillingService
}

User API tokens can list and create Organizations, but reading, updating, or deleting an Organization requires a Global API key and your registered email address. The `cloudflare_organization` Terraform resource therefore requires a Global API key for its full lifecycle.

See [Organizations authentication limitations](https://developers.cloudflare.com/fundamentals/organizations/limitations/#api-authentication) for credential compatibility by operation. Each endpoint’s **Security** section lists its supported authentication methods, with **Accepted Permissions** where applicable.

OrganizationService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationService method instead.

func NewOrganizationService

func NewOrganizationService(opts ...option.RequestOption) (r *OrganizationService)

NewOrganizationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*OrganizationService) Delete

func (r *OrganizationService) Delete(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationDeleteResponse, err error)

Delete an organization. It must not contain active sub-organizations or accounts. A root organization must also have no active managed users. Sub-organization deletion availability depends on the organization's capabilities.

**Access Control:** Root deletion is restricted to enterprise organizations.

func (*OrganizationService) Get

func (r *OrganizationService) Get(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *Organization, err error)

Retrieve the details of a certain organization.

func (*OrganizationService) List

Retrieve a list of organizations a particular user has access to. At most one of `containing.account`, `containing.user`, or `containing.organization` may be provided.

func (*OrganizationService) ListAutoPaging

Retrieve a list of organizations a particular user has access to. At most one of `containing.account`, `containing.user`, or `containing.organization` may be provided.

func (*OrganizationService) New

Create a new organization for a user. Sub-organization creation availability depends on the organization's capabilities. The optional `profile` object accepts partial profile details; its individual fields are not required. Organization names are limited to 65 UTF-8 bytes. Each profile field is limited to 1,000 UTF-8 bytes, and a non-empty business email must be valid. At least one of business name, address, phone, or email must be non-empty to persist a profile.

func (*OrganizationService) Update

func (r *OrganizationService) Update(ctx context.Context, organizationID string, body OrganizationUpdateParams, opts ...option.RequestOption) (res *Organization, err error)

Update an organization's name. Supplying `parent_id` verifies the current parent; this endpoint cannot move an organization. Organization names are limited to 65 UTF-8 bytes.

type OrganizationUpdateParams

type OrganizationUpdateParams struct {
	// The Organization name, limited to 65 UTF-8 bytes. An omitted, empty, or
	// unchanged value is a no-op.
	Name param.Field[string] `json:"name"`
	// The current parent Organization ID. A different value is rejected; this endpoint
	// cannot move an Organization.
	ParentID param.Field[string] `json:"parent_id"`
}

func (OrganizationUpdateParams) MarshalJSON

func (r OrganizationUpdateParams) MarshalJSON() (data []byte, err error)

type OrganizationUpdateResponseEnvelope

type OrganizationUpdateResponseEnvelope struct {
	Errors   []interface{}         `json:"errors" api:"required"`
	Messages []shared.ResponseInfo `json:"messages" api:"required"`
	// References an Organization in the Cloudflare data model.
	Result  Organization                              `json:"result" api:"required"`
	Success OrganizationUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
	JSON    organizationUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*OrganizationUpdateResponseEnvelope) UnmarshalJSON

func (r *OrganizationUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type OrganizationUpdateResponseEnvelopeSuccess

type OrganizationUpdateResponseEnvelopeSuccess bool
const (
	OrganizationUpdateResponseEnvelopeSuccessTrue OrganizationUpdateResponseEnvelopeSuccess = true
)

func (OrganizationUpdateResponseEnvelopeSuccess) IsKnown

type Permission

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type RatePlan

type RatePlan = shared.RatePlan

The rate plan applied to the subscription.

This is an alias to an internal type.

type RatePlanID

type RatePlanID = shared.RatePlanID

The ID of the rate plan.

This is an alias to an internal type.

type RatePlanParam

type RatePlanParam = shared.RatePlanParam

The rate plan applied to the subscription.

This is an alias to an internal type.

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type ResponseInfoSource

type ResponseInfoSource = shared.ResponseInfoSource

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

type RoleParam

type RoleParam = shared.RoleParam

This is an alias to an internal type.

type RolePermissions

type RolePermissions = shared.RolePermissions

This is an alias to an internal type.

type RolePermissionsParam

type RolePermissionsParam = shared.RolePermissionsParam

This is an alias to an internal type.

type SortDirection

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

type Subscription

type Subscription = shared.Subscription

This is an alias to an internal type.

type SubscriptionFrequency

type SubscriptionFrequency = shared.SubscriptionFrequency

How often the subscription is renewed automatically.

This is an alias to an internal type.

type SubscriptionParam

type SubscriptionParam = shared.SubscriptionParam

This is an alias to an internal type.

type SubscriptionState

type SubscriptionState = shared.SubscriptionState

The state that the subscription is in.

This is an alias to an internal type.

type Token

type Token = shared.Token

This is an alias to an internal type.

type TokenCondition

type TokenCondition = shared.TokenCondition

This is an alias to an internal type.

type TokenConditionCIDRList

type TokenConditionCIDRList = shared.TokenConditionCIDRList

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionCIDRListParam

type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionParam

type TokenConditionParam = shared.TokenConditionParam

This is an alias to an internal type.

type TokenConditionRequestIP

type TokenConditionRequestIP = shared.TokenConditionRequestIP

Client IP restrictions.

This is an alias to an internal type.

type TokenConditionRequestIPParam

type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam

Client IP restrictions.

This is an alias to an internal type.

type TokenParam

type TokenParam = shared.TokenParam

This is an alias to an internal type.

type TokenPolicy

type TokenPolicy = shared.TokenPolicy

This is an alias to an internal type.

type TokenPolicyEffect

type TokenPolicyEffect = shared.TokenPolicyEffect

Allow or deny operations against the resources.

This is an alias to an internal type.

type TokenPolicyParam

type TokenPolicyParam = shared.TokenPolicyParam

This is an alias to an internal type.

type TokenPolicyPermissionGroup

type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupParam

type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMeta

type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMetaParam

type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectNested

type TokenPolicyResourcesIAMResourcesTypeObjectNested = shared.TokenPolicyResourcesIAMResourcesTypeObjectNested

Map of nested resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam

type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectNestedParam

Map of nested resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectString

type TokenPolicyResourcesIAMResourcesTypeObjectString = shared.TokenPolicyResourcesIAMResourcesTypeObjectString

Map of simple string resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectStringParam

type TokenPolicyResourcesIAMResourcesTypeObjectStringParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectStringParam

Map of simple string resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesUnion

type TokenPolicyResourcesUnion = shared.TokenPolicyResourcesUnion

A list of resource names that the policy applies to.

This is an alias to an internal type.

type TokenPolicyResourcesUnionParam

type TokenPolicyResourcesUnionParam = shared.TokenPolicyResourcesUnionParam

A list of resource names that the policy applies to.

This is an alias to an internal type.

type TokenStatus

type TokenStatus = shared.TokenStatus

Status of the token.

This is an alias to an internal type.

type TokenValue

type TokenValue = shared.TokenValue

The token value.

This is an alias to an internal type.

Jump to

Keyboard shortcuts

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