accounts

package
v6.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: Apache-2.0 Imports: 15 Imported by: 1

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 Account

type Account struct {
	// Identifier
	ID string `json:"id,required"`
	// Account name
	Name string      `json:"name,required"`
	Type AccountType `json:"type,required"`
	// Timestamp for the creation of the account
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// Parent container details
	ManagedBy AccountManagedBy `json:"managed_by"`
	// Account settings
	Settings AccountSettings `json:"settings"`
	JSON     accountJSON     `json:"-"`
}

func (*Account) UnmarshalJSON

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

type AccountDeleteParams

type AccountDeleteParams struct {
	// The account ID of the account to be deleted
	AccountID param.Field[string] `path:"account_id,required"`
}

type AccountDeleteResponse

type AccountDeleteResponse struct {
	// Identifier
	ID   string                    `json:"id,required"`
	JSON accountDeleteResponseJSON `json:"-"`
}

func (*AccountDeleteResponse) UnmarshalJSON

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

type AccountDeleteResponseEnvelope

type AccountDeleteResponseEnvelope struct {
	Errors   []AccountDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []AccountDeleteResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success AccountDeleteResponseEnvelopeSuccess `json:"success,required"`
	Result  AccountDeleteResponse                `json:"result,nullable"`
	JSON    accountDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*AccountDeleteResponseEnvelope) UnmarshalJSON

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

type AccountDeleteResponseEnvelopeErrors

type AccountDeleteResponseEnvelopeErrors struct {
	Code             int64                                     `json:"code,required"`
	Message          string                                    `json:"message,required"`
	DocumentationURL string                                    `json:"documentation_url"`
	Source           AccountDeleteResponseEnvelopeErrorsSource `json:"source"`
	JSON             accountDeleteResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*AccountDeleteResponseEnvelopeErrors) UnmarshalJSON

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

type AccountDeleteResponseEnvelopeErrorsSource

type AccountDeleteResponseEnvelopeErrorsSource struct {
	Pointer string                                        `json:"pointer"`
	JSON    accountDeleteResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*AccountDeleteResponseEnvelopeErrorsSource) UnmarshalJSON

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

type AccountDeleteResponseEnvelopeMessages

type AccountDeleteResponseEnvelopeMessages struct {
	Code             int64                                       `json:"code,required"`
	Message          string                                      `json:"message,required"`
	DocumentationURL string                                      `json:"documentation_url"`
	Source           AccountDeleteResponseEnvelopeMessagesSource `json:"source"`
	JSON             accountDeleteResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*AccountDeleteResponseEnvelopeMessages) UnmarshalJSON

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

type AccountDeleteResponseEnvelopeMessagesSource

type AccountDeleteResponseEnvelopeMessagesSource struct {
	Pointer string                                          `json:"pointer"`
	JSON    accountDeleteResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*AccountDeleteResponseEnvelopeMessagesSource) UnmarshalJSON

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

type AccountDeleteResponseEnvelopeSuccess

type AccountDeleteResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	AccountDeleteResponseEnvelopeSuccessTrue AccountDeleteResponseEnvelopeSuccess = true
)

func (AccountDeleteResponseEnvelopeSuccess) IsKnown

type AccountGetParams

type AccountGetParams struct {
	// Account identifier tag.
	AccountID param.Field[string] `path:"account_id,required"`
}

type AccountGetResponseEnvelope

type AccountGetResponseEnvelope struct {
	Errors   []AccountGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []AccountGetResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success AccountGetResponseEnvelopeSuccess `json:"success,required"`
	Result  Account                           `json:"result"`
	JSON    accountGetResponseEnvelopeJSON    `json:"-"`
}

func (*AccountGetResponseEnvelope) UnmarshalJSON

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

type AccountGetResponseEnvelopeErrors

type AccountGetResponseEnvelopeErrors struct {
	Code             int64                                  `json:"code,required"`
	Message          string                                 `json:"message,required"`
	DocumentationURL string                                 `json:"documentation_url"`
	Source           AccountGetResponseEnvelopeErrorsSource `json:"source"`
	JSON             accountGetResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*AccountGetResponseEnvelopeErrors) UnmarshalJSON

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

type AccountGetResponseEnvelopeErrorsSource

type AccountGetResponseEnvelopeErrorsSource struct {
	Pointer string                                     `json:"pointer"`
	JSON    accountGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*AccountGetResponseEnvelopeErrorsSource) UnmarshalJSON

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

type AccountGetResponseEnvelopeMessages

type AccountGetResponseEnvelopeMessages struct {
	Code             int64                                    `json:"code,required"`
	Message          string                                   `json:"message,required"`
	DocumentationURL string                                   `json:"documentation_url"`
	Source           AccountGetResponseEnvelopeMessagesSource `json:"source"`
	JSON             accountGetResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*AccountGetResponseEnvelopeMessages) UnmarshalJSON

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

type AccountGetResponseEnvelopeMessagesSource

type AccountGetResponseEnvelopeMessagesSource struct {
	Pointer string                                       `json:"pointer"`
	JSON    accountGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*AccountGetResponseEnvelopeMessagesSource) UnmarshalJSON

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

type AccountGetResponseEnvelopeSuccess

type AccountGetResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	AccountGetResponseEnvelopeSuccessTrue AccountGetResponseEnvelopeSuccess = true
)

func (AccountGetResponseEnvelopeSuccess) IsKnown

type AccountListParams

type AccountListParams struct {
	// Direction to order results.
	Direction param.Field[AccountListParamsDirection] `query:"direction"`
	// Name of the account.
	Name param.Field[string] `query:"name"`
	// Page number of paginated results.
	Page param.Field[float64] `query:"page"`
	// Maximum number of results per page.
	PerPage param.Field[float64] `query:"per_page"`
}

func (AccountListParams) URLQuery

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

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

type AccountListParamsDirection

type AccountListParamsDirection string

Direction to order results.

const (
	AccountListParamsDirectionAsc  AccountListParamsDirection = "asc"
	AccountListParamsDirectionDesc AccountListParamsDirection = "desc"
)

func (AccountListParamsDirection) IsKnown

func (r AccountListParamsDirection) IsKnown() bool

type AccountManagedBy added in v6.2.0

type AccountManagedBy struct {
	// ID of the parent Organization, if one exists
	ParentOrgID string `json:"parent_org_id"`
	// Name of the parent Organization, if one exists
	ParentOrgName string               `json:"parent_org_name"`
	JSON          accountManagedByJSON `json:"-"`
}

Parent container details

func (*AccountManagedBy) UnmarshalJSON added in v6.2.0

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

type AccountManagedByParam added in v6.2.0

type AccountManagedByParam struct {
}

Parent container details

func (AccountManagedByParam) MarshalJSON added in v6.2.0

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

type AccountNewParams

type AccountNewParams struct {
	// Account name
	Name param.Field[string]               `json:"name,required"`
	Type param.Field[AccountNewParamsType] `json:"type"`
	// information related to the tenant unit, and optionally, an id of the unit to
	// create the account on. see
	// https://developers.cloudflare.com/tenant/how-to/manage-accounts/
	Unit param.Field[AccountNewParamsUnit] `json:"unit"`
}

func (AccountNewParams) MarshalJSON

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

type AccountNewParamsType

type AccountNewParamsType string
const (
	AccountNewParamsTypeStandard   AccountNewParamsType = "standard"
	AccountNewParamsTypeEnterprise AccountNewParamsType = "enterprise"
)

func (AccountNewParamsType) IsKnown

func (r AccountNewParamsType) IsKnown() bool

type AccountNewParamsUnit

type AccountNewParamsUnit struct {
	// Tenant unit ID
	ID param.Field[string] `json:"id"`
}

information related to the tenant unit, and optionally, an id of the unit to create the account on. see https://developers.cloudflare.com/tenant/how-to/manage-accounts/

func (AccountNewParamsUnit) MarshalJSON

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

type AccountNewResponseEnvelope

type AccountNewResponseEnvelope struct {
	Errors   []AccountNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []AccountNewResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success AccountNewResponseEnvelopeSuccess `json:"success,required"`
	Result  Account                           `json:"result"`
	JSON    accountNewResponseEnvelopeJSON    `json:"-"`
}

func (*AccountNewResponseEnvelope) UnmarshalJSON

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

type AccountNewResponseEnvelopeErrors

type AccountNewResponseEnvelopeErrors struct {
	Code             int64                                  `json:"code,required"`
	Message          string                                 `json:"message,required"`
	DocumentationURL string                                 `json:"documentation_url"`
	Source           AccountNewResponseEnvelopeErrorsSource `json:"source"`
	JSON             accountNewResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*AccountNewResponseEnvelopeErrors) UnmarshalJSON

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

type AccountNewResponseEnvelopeErrorsSource

type AccountNewResponseEnvelopeErrorsSource struct {
	Pointer string                                     `json:"pointer"`
	JSON    accountNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*AccountNewResponseEnvelopeErrorsSource) UnmarshalJSON

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

type AccountNewResponseEnvelopeMessages

type AccountNewResponseEnvelopeMessages struct {
	Code             int64                                    `json:"code,required"`
	Message          string                                   `json:"message,required"`
	DocumentationURL string                                   `json:"documentation_url"`
	Source           AccountNewResponseEnvelopeMessagesSource `json:"source"`
	JSON             accountNewResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*AccountNewResponseEnvelopeMessages) UnmarshalJSON

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

type AccountNewResponseEnvelopeMessagesSource

type AccountNewResponseEnvelopeMessagesSource struct {
	Pointer string                                       `json:"pointer"`
	JSON    accountNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*AccountNewResponseEnvelopeMessagesSource) UnmarshalJSON

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

type AccountNewResponseEnvelopeSuccess

type AccountNewResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	AccountNewResponseEnvelopeSuccessTrue AccountNewResponseEnvelopeSuccess = true
)

func (AccountNewResponseEnvelopeSuccess) IsKnown

type AccountOrganizationNewParams added in v6.1.0

type AccountOrganizationNewParams struct {
	AccountID                 param.Field[string] `path:"account_id,required"`
	DestinationOrganizationID param.Field[string] `json:"destination_organization_id,required"`
}

func (AccountOrganizationNewParams) MarshalJSON added in v6.1.0

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

type AccountOrganizationNewResponse added in v6.2.0

type AccountOrganizationNewResponse struct {
	AccountID                 string                             `json:"account_id,required"`
	DestinationOrganizationID string                             `json:"destination_organization_id,required"`
	SourceOrganizationID      string                             `json:"source_organization_id,required"`
	JSON                      accountOrganizationNewResponseJSON `json:"-"`
}

func (*AccountOrganizationNewResponse) UnmarshalJSON added in v6.2.0

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

type AccountOrganizationNewResponseEnvelope added in v6.2.0

type AccountOrganizationNewResponseEnvelope struct {
	Errors   []interface{}                                 `json:"errors,required"`
	Messages []shared.ResponseInfo                         `json:"messages,required"`
	Result   AccountOrganizationNewResponse                `json:"result,required"`
	Success  AccountOrganizationNewResponseEnvelopeSuccess `json:"success,required"`
	JSON     accountOrganizationNewResponseEnvelopeJSON    `json:"-"`
}

func (*AccountOrganizationNewResponseEnvelope) UnmarshalJSON added in v6.2.0

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

type AccountOrganizationNewResponseEnvelopeSuccess added in v6.2.0

type AccountOrganizationNewResponseEnvelopeSuccess bool
const (
	AccountOrganizationNewResponseEnvelopeSuccessTrue AccountOrganizationNewResponseEnvelopeSuccess = true
)

func (AccountOrganizationNewResponseEnvelopeSuccess) IsKnown added in v6.2.0

type AccountOrganizationService added in v6.1.0

type AccountOrganizationService struct {
	Options []option.RequestOption
}

AccountOrganizationService 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 NewAccountOrganizationService method instead.

func NewAccountOrganizationService added in v6.1.0

func NewAccountOrganizationService(opts ...option.RequestOption) (r *AccountOrganizationService)

NewAccountOrganizationService 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 (*AccountOrganizationService) New added in v6.1.0

Move an account within an organization hierarchy or an account outside an organization.

type AccountParam

type AccountParam struct {
	// Identifier
	ID param.Field[string] `json:"id,required"`
	// Account name
	Name param.Field[string]      `json:"name,required"`
	Type param.Field[AccountType] `json:"type,required"`
	// Parent container details
	ManagedBy param.Field[AccountManagedByParam] `json:"managed_by"`
	// Account settings
	Settings param.Field[AccountSettingsParam] `json:"settings"`
}

func (AccountParam) MarshalJSON

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

type AccountProfile added in v6.1.0

type AccountProfile struct {
	BusinessAddress  string             `json:"business_address,required"`
	BusinessEmail    string             `json:"business_email,required"`
	BusinessName     string             `json:"business_name,required"`
	BusinessPhone    string             `json:"business_phone,required"`
	ExternalMetadata string             `json:"external_metadata,required"`
	JSON             accountProfileJSON `json:"-"`
}

func (*AccountProfile) UnmarshalJSON added in v6.1.0

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

type AccountProfileGetParams added in v6.1.0

type AccountProfileGetParams struct {
	AccountID param.Field[string] `path:"account_id,required"`
}

type AccountProfileGetResponseEnvelope added in v6.1.0

type AccountProfileGetResponseEnvelope struct {
	Errors   []interface{}                            `json:"errors,required"`
	Messages []shared.ResponseInfo                    `json:"messages,required"`
	Result   AccountProfile                           `json:"result,required"`
	Success  AccountProfileGetResponseEnvelopeSuccess `json:"success,required"`
	JSON     accountProfileGetResponseEnvelopeJSON    `json:"-"`
}

func (*AccountProfileGetResponseEnvelope) UnmarshalJSON added in v6.1.0

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

type AccountProfileGetResponseEnvelopeSuccess added in v6.1.0

type AccountProfileGetResponseEnvelopeSuccess bool
const (
	AccountProfileGetResponseEnvelopeSuccessTrue AccountProfileGetResponseEnvelopeSuccess = true
)

func (AccountProfileGetResponseEnvelopeSuccess) IsKnown added in v6.1.0

type AccountProfileParam added in v6.1.0

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

func (AccountProfileParam) MarshalJSON added in v6.1.0

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

type AccountProfileService added in v6.1.0

type AccountProfileService struct {
	Options []option.RequestOption
}

AccountProfileService 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 NewAccountProfileService method instead.

func NewAccountProfileService added in v6.1.0

func NewAccountProfileService(opts ...option.RequestOption) (r *AccountProfileService)

NewAccountProfileService 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 (*AccountProfileService) Get added in v6.1.0

Get account profile

func (*AccountProfileService) Update added in v6.1.0

Modify account profile

type AccountProfileUpdateParams added in v6.1.0

type AccountProfileUpdateParams struct {
	AccountID      param.Field[string] `path:"account_id,required"`
	AccountProfile AccountProfileParam `json:"account_profile,required"`
}

func (AccountProfileUpdateParams) MarshalJSON added in v6.1.0

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

type AccountService

type AccountService struct {
	Options              []option.RequestOption
	AccountOrganizations *AccountOrganizationService
	AccountProfile       *AccountProfileService
	Members              *MemberService
	Roles                *RoleService
	Subscriptions        *SubscriptionService
	Tokens               *TokenService
	Logs                 *LogService
}

AccountService 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 NewAccountService method instead.

func NewAccountService

func NewAccountService(opts ...option.RequestOption) (r *AccountService)

NewAccountService 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 (*AccountService) Delete

Delete a specific account (only available for tenant admins at this time). This is a permanent operation that will delete any zones or other resources under the account

func (*AccountService) Get

func (r *AccountService) Get(ctx context.Context, query AccountGetParams, opts ...option.RequestOption) (res *Account, err error)

Get information about a specific account that you are a member of.

func (*AccountService) List

List all accounts you have ownership or verified access to.

func (*AccountService) ListAutoPaging

List all accounts you have ownership or verified access to.

func (*AccountService) New

func (r *AccountService) New(ctx context.Context, body AccountNewParams, opts ...option.RequestOption) (res *Account, err error)

Create an account (only available for tenant admins at this time)

func (*AccountService) Update

func (r *AccountService) Update(ctx context.Context, params AccountUpdateParams, opts ...option.RequestOption) (res *Account, err error)

Update an existing account.

type AccountSettings

type AccountSettings struct {
	// Sets an abuse contact email to notify for abuse reports.
	AbuseContactEmail string `json:"abuse_contact_email"`
	// Indicates whether membership in this account requires that Two-Factor
	// Authentication is enabled
	EnforceTwofactor bool                `json:"enforce_twofactor"`
	JSON             accountSettingsJSON `json:"-"`
}

Account settings

func (*AccountSettings) UnmarshalJSON

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

type AccountSettingsParam

type AccountSettingsParam struct {
	// Sets an abuse contact email to notify for abuse reports.
	AbuseContactEmail param.Field[string] `json:"abuse_contact_email"`
	// Indicates whether membership in this account requires that Two-Factor
	// Authentication is enabled
	EnforceTwofactor param.Field[bool] `json:"enforce_twofactor"`
}

Account settings

func (AccountSettingsParam) MarshalJSON

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

type AccountType

type AccountType string
const (
	AccountTypeStandard   AccountType = "standard"
	AccountTypeEnterprise AccountType = "enterprise"
)

func (AccountType) IsKnown

func (r AccountType) IsKnown() bool

type AccountUpdateParams

type AccountUpdateParams struct {
	// Account identifier tag.
	AccountID param.Field[string] `path:"account_id,required"`
	Account   AccountParam        `json:"account,required"`
}

func (AccountUpdateParams) MarshalJSON

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

type AccountUpdateResponseEnvelope

type AccountUpdateResponseEnvelope struct {
	Errors   []AccountUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []AccountUpdateResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success AccountUpdateResponseEnvelopeSuccess `json:"success,required"`
	Result  Account                              `json:"result"`
	JSON    accountUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*AccountUpdateResponseEnvelope) UnmarshalJSON

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

type AccountUpdateResponseEnvelopeErrors

type AccountUpdateResponseEnvelopeErrors struct {
	Code             int64                                     `json:"code,required"`
	Message          string                                    `json:"message,required"`
	DocumentationURL string                                    `json:"documentation_url"`
	Source           AccountUpdateResponseEnvelopeErrorsSource `json:"source"`
	JSON             accountUpdateResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*AccountUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type AccountUpdateResponseEnvelopeErrorsSource

type AccountUpdateResponseEnvelopeErrorsSource struct {
	Pointer string                                        `json:"pointer"`
	JSON    accountUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*AccountUpdateResponseEnvelopeErrorsSource) UnmarshalJSON

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

type AccountUpdateResponseEnvelopeMessages

type AccountUpdateResponseEnvelopeMessages struct {
	Code             int64                                       `json:"code,required"`
	Message          string                                      `json:"message,required"`
	DocumentationURL string                                      `json:"documentation_url"`
	Source           AccountUpdateResponseEnvelopeMessagesSource `json:"source"`
	JSON             accountUpdateResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*AccountUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type AccountUpdateResponseEnvelopeMessagesSource

type AccountUpdateResponseEnvelopeMessagesSource struct {
	Pointer string                                          `json:"pointer"`
	JSON    accountUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*AccountUpdateResponseEnvelopeMessagesSource) UnmarshalJSON

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

type AccountUpdateResponseEnvelopeSuccess

type AccountUpdateResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	AccountUpdateResponseEnvelopeSuccessTrue AccountUpdateResponseEnvelopeSuccess = true
)

func (AccountUpdateResponseEnvelopeSuccess) IsKnown

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 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 LogAuditListParams

type LogAuditListParams struct {
	// The unique id that identifies the account.
	AccountID param.Field[string] `path:"account_id,required"`
	// 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,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,required" format:"date"`
	AccountName    param.Field[LogAuditListParamsAccountName]    `query:"account_name"`
	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"`
	AuditLogID     param.Field[LogAuditListParamsAuditLogID]     `query:"audit_log_id"`
	// 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"`
	ZoneID          param.Field[LogAuditListParamsZoneID]          `query:"zone_id"`
	ZoneName        param.Field[LogAuditListParamsZoneName]        `query:"zone_name"`
}

func (LogAuditListParams) URLQuery

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

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

type LogAuditListParamsAccountName

type LogAuditListParamsAccountName struct {
	// Filters out audit logs by the account name.
	Not param.Field[[]string] `query:"not"`
}

func (LogAuditListParamsAccountName) URLQuery

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

URLQuery serializes LogAuditListParamsAccountName'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.
	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 (
	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 ID. This can be either the Account ID or
	// 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 (
	LogAuditListParamsActorTypeNotAccount         LogAuditListParamsActorTypeNot = "account"
	LogAuditListParamsActorTypeNotCloudflareAdmin LogAuditListParamsActorTypeNot = "cloudflare_admin"
	LogAuditListParamsActorTypeNotSystem          LogAuditListParamsActorTypeNot = "system"
	LogAuditListParamsActorTypeNotUser            LogAuditListParamsActorTypeNot = "user"
)

func (LogAuditListParamsActorTypeNot) IsKnown

type LogAuditListParamsAuditLogID

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

func (LogAuditListParamsAuditLogID) URLQuery

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

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

type LogAuditListParamsDirection

type LogAuditListParamsDirection string

Sets sorting order.

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

func (LogAuditListParamsDirection) IsKnown

func (r LogAuditListParamsDirection) IsKnown() bool

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 user, an account, or a zone.
	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 (
	LogAuditListParamsResourceScopeNotAccounts LogAuditListParamsResourceScopeNot = "accounts"
	LogAuditListParamsResourceScopeNotUser     LogAuditListParamsResourceScopeNot = "user"
	LogAuditListParamsResourceScopeNotZones    LogAuditListParamsResourceScopeNot = "zones"
)

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 LogAuditListParamsZoneID

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

func (LogAuditListParamsZoneID) URLQuery

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

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

type LogAuditListParamsZoneName

type LogAuditListParamsZoneName struct {
	// Filters out audit logs by the zone name associated with the change.
	Not param.Field[[]string] `query:"not"`
}

func (LogAuditListParamsZoneName) URLQuery

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

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

type LogAuditListResponse

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

func (*LogAuditListResponse) UnmarshalJSON

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

type LogAuditListResponseAccount

type LogAuditListResponseAccount struct {
	// A unique identifier for the account.
	ID string `json:"id"`
	// A string that identifies the account name.
	Name string                          `json:"name"`
	JSON logAuditListResponseAccountJSON `json:"-"`
}

Contains account related information.

func (*LogAuditListResponseAccount) UnmarshalJSON

func (r *LogAuditListResponseAccount) 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"`
	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" format:"ipv4 | ipv6"`
	// Filters by the API token ID when the actor context is an api_token.
	TokenID string `json:"token_id"`
	// Filters by the API token name when the actor context is an api_token.
	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
const (
	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 (
	LogAuditListResponseActorTypeAccount         LogAuditListResponseActorType = "account"
	LogAuditListResponseActorTypeCloudflareAdmin LogAuditListResponseActorType = "cloudflare_admin"
	LogAuditListResponseActorTypeSystem          LogAuditListResponseActorType = "system"
	LogAuditListResponseActorTypeUser            LogAuditListResponseActorType = "user"
)

func (LogAuditListResponseActorType) IsKnown

func (r LogAuditListResponseActorType) IsKnown() bool

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 LogAuditListResponseZone

type LogAuditListResponseZone struct {
	// A string that identifies the zone id.
	ID string `json:"id"`
	// A string that identifies the zone name.
	Name string                       `json:"name"`
	JSON logAuditListResponseZoneJSON `json:"-"`
}

Provides details about the zone affected by the action.

func (*LogAuditListResponseZone) UnmarshalJSON

func (r *LogAuditListResponseZone) 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) List

Gets a list of audit logs for an account. <br /> <br /> This is the beta release of Audit Logs Version 2. Since this is a beta version, there may be gaps or missing entries in the available audit logs. Be aware of the following limitations. <br /> <ul> <li>Audit logs are available only for the past 30 days. <br /></li> <li>Error handling is not yet implemented. <br /> </li> </ul>

func (*LogAuditService) ListAutoPaging

Gets a list of audit logs for an account. <br /> <br /> This is the beta release of Audit Logs Version 2. Since this is a beta version, there may be gaps or missing entries in the available audit logs. Be aware of the following limitations. <br /> <ul> <li>Audit logs are available only for the past 30 days. <br /></li> <li>Error handling is not yet implemented. <br /> </li> </ul>

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 MemberDeleteParams

type MemberDeleteParams struct {
	// Account identifier tag.
	AccountID param.Field[string] `path:"account_id,required"`
}

type MemberDeleteResponse

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

func (*MemberDeleteResponse) UnmarshalJSON

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

type MemberDeleteResponseEnvelope

type MemberDeleteResponseEnvelope struct {
	Errors   []MemberDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []MemberDeleteResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success MemberDeleteResponseEnvelopeSuccess `json:"success,required"`
	Result  MemberDeleteResponse                `json:"result,nullable"`
	JSON    memberDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*MemberDeleteResponseEnvelope) UnmarshalJSON

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

type MemberDeleteResponseEnvelopeErrors

type MemberDeleteResponseEnvelopeErrors struct {
	Code             int64                                    `json:"code,required"`
	Message          string                                   `json:"message,required"`
	DocumentationURL string                                   `json:"documentation_url"`
	Source           MemberDeleteResponseEnvelopeErrorsSource `json:"source"`
	JSON             memberDeleteResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*MemberDeleteResponseEnvelopeErrors) UnmarshalJSON

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

type MemberDeleteResponseEnvelopeErrorsSource

type MemberDeleteResponseEnvelopeErrorsSource struct {
	Pointer string                                       `json:"pointer"`
	JSON    memberDeleteResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*MemberDeleteResponseEnvelopeErrorsSource) UnmarshalJSON

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

type MemberDeleteResponseEnvelopeMessages

type MemberDeleteResponseEnvelopeMessages struct {
	Code             int64                                      `json:"code,required"`
	Message          string                                     `json:"message,required"`
	DocumentationURL string                                     `json:"documentation_url"`
	Source           MemberDeleteResponseEnvelopeMessagesSource `json:"source"`
	JSON             memberDeleteResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*MemberDeleteResponseEnvelopeMessages) UnmarshalJSON

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

type MemberDeleteResponseEnvelopeMessagesSource

type MemberDeleteResponseEnvelopeMessagesSource struct {
	Pointer string                                         `json:"pointer"`
	JSON    memberDeleteResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*MemberDeleteResponseEnvelopeMessagesSource) UnmarshalJSON

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

type MemberDeleteResponseEnvelopeSuccess

type MemberDeleteResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	MemberDeleteResponseEnvelopeSuccessTrue MemberDeleteResponseEnvelopeSuccess = true
)

func (MemberDeleteResponseEnvelopeSuccess) IsKnown

type MemberGetParams

type MemberGetParams struct {
	// Account identifier tag.
	AccountID param.Field[string] `path:"account_id,required"`
}

type MemberGetResponseEnvelope

type MemberGetResponseEnvelope struct {
	Errors   []MemberGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []MemberGetResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success MemberGetResponseEnvelopeSuccess `json:"success,required"`
	Result  shared.Member                    `json:"result"`
	JSON    memberGetResponseEnvelopeJSON    `json:"-"`
}

func (*MemberGetResponseEnvelope) UnmarshalJSON

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

type MemberGetResponseEnvelopeErrors

type MemberGetResponseEnvelopeErrors struct {
	Code             int64                                 `json:"code,required"`
	Message          string                                `json:"message,required"`
	DocumentationURL string                                `json:"documentation_url"`
	Source           MemberGetResponseEnvelopeErrorsSource `json:"source"`
	JSON             memberGetResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*MemberGetResponseEnvelopeErrors) UnmarshalJSON

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

type MemberGetResponseEnvelopeErrorsSource

type MemberGetResponseEnvelopeErrorsSource struct {
	Pointer string                                    `json:"pointer"`
	JSON    memberGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*MemberGetResponseEnvelopeErrorsSource) UnmarshalJSON

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

type MemberGetResponseEnvelopeMessages

type MemberGetResponseEnvelopeMessages struct {
	Code             int64                                   `json:"code,required"`
	Message          string                                  `json:"message,required"`
	DocumentationURL string                                  `json:"documentation_url"`
	Source           MemberGetResponseEnvelopeMessagesSource `json:"source"`
	JSON             memberGetResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*MemberGetResponseEnvelopeMessages) UnmarshalJSON

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

type MemberGetResponseEnvelopeMessagesSource

type MemberGetResponseEnvelopeMessagesSource struct {
	Pointer string                                      `json:"pointer"`
	JSON    memberGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*MemberGetResponseEnvelopeMessagesSource) UnmarshalJSON

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

type MemberGetResponseEnvelopeSuccess

type MemberGetResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	MemberGetResponseEnvelopeSuccessTrue MemberGetResponseEnvelopeSuccess = true
)

func (MemberGetResponseEnvelopeSuccess) IsKnown

type MemberListParams

type MemberListParams struct {
	// Account identifier tag.
	AccountID param.Field[string] `path:"account_id,required"`
	// Direction to order results.
	Direction param.Field[MemberListParamsDirection] `query:"direction"`
	// Field to order results by.
	Order param.Field[MemberListParamsOrder] `query:"order"`
	// Page number of paginated results.
	Page param.Field[float64] `query:"page"`
	// Maximum number of results per page.
	PerPage param.Field[float64] `query:"per_page"`
	// A member's status in the account.
	Status param.Field[MemberListParamsStatus] `query:"status"`
}

func (MemberListParams) URLQuery

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

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

type MemberListParamsDirection

type MemberListParamsDirection string

Direction to order results.

const (
	MemberListParamsDirectionAsc  MemberListParamsDirection = "asc"
	MemberListParamsDirectionDesc MemberListParamsDirection = "desc"
)

func (MemberListParamsDirection) IsKnown

func (r MemberListParamsDirection) IsKnown() bool

type MemberListParamsOrder

type MemberListParamsOrder string

Field to order results by.

const (
	MemberListParamsOrderUserFirstName MemberListParamsOrder = "user.first_name"
	MemberListParamsOrderUserLastName  MemberListParamsOrder = "user.last_name"
	MemberListParamsOrderUserEmail     MemberListParamsOrder = "user.email"
	MemberListParamsOrderStatus        MemberListParamsOrder = "status"
)

func (MemberListParamsOrder) IsKnown

func (r MemberListParamsOrder) IsKnown() bool

type MemberListParamsStatus

type MemberListParamsStatus string

A member's status in the account.

const (
	MemberListParamsStatusAccepted MemberListParamsStatus = "accepted"
	MemberListParamsStatusPending  MemberListParamsStatus = "pending"
	MemberListParamsStatusRejected MemberListParamsStatus = "rejected"
)

func (MemberListParamsStatus) IsKnown

func (r MemberListParamsStatus) IsKnown() bool

type MemberNewParams

type MemberNewParams struct {
	// Account identifier tag.
	AccountID param.Field[string]      `path:"account_id,required"`
	Body      MemberNewParamsBodyUnion `json:"body,required"`
}

func (MemberNewParams) MarshalJSON

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

type MemberNewParamsBody

type MemberNewParamsBody struct {
	// The contact email address of the user.
	Email    param.Field[string]                    `json:"email,required"`
	Policies param.Field[interface{}]               `json:"policies"`
	Roles    param.Field[interface{}]               `json:"roles"`
	Status   param.Field[MemberNewParamsBodyStatus] `json:"status"`
}

func (MemberNewParamsBody) MarshalJSON

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

type MemberNewParamsBodyIAMCreateMemberWithPolicies

type MemberNewParamsBodyIAMCreateMemberWithPolicies struct {
	// The contact email address of the user.
	Email param.Field[string] `json:"email,required"`
	// Array of policies associated with this member.
	Policies param.Field[[]MemberNewParamsBodyIAMCreateMemberWithPoliciesPolicy] `json:"policies,required"`
	Status   param.Field[MemberNewParamsBodyIAMCreateMemberWithPoliciesStatus]   `json:"status"`
}

func (MemberNewParamsBodyIAMCreateMemberWithPolicies) MarshalJSON

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

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesAccess

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesAccess string

Allow or deny operations against the resources.

const (
	MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesAccessAllow MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesAccess = "allow"
	MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesAccessDeny  MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesAccess = "deny"
)

func (MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesAccess) IsKnown

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesPermissionGroup

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesPermissionGroup struct {
	// Identifier of the group.
	ID param.Field[string] `json:"id,required"`
}

A group of permissions.

func (MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesPermissionGroup) MarshalJSON

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesResourceGroup

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesResourceGroup struct {
	// Identifier of the group.
	ID param.Field[string] `json:"id,required"`
}

A group of scoped resources.

func (MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesResourceGroup) MarshalJSON

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPolicy

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPolicy struct {
	// Allow or deny operations against the resources.
	Access param.Field[MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesAccess] `json:"access,required"`
	// A set of permission groups that are specified to the policy.
	PermissionGroups param.Field[[]MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesPermissionGroup] `json:"permission_groups,required"`
	// A list of resource groups that the policy applies to.
	ResourceGroups param.Field[[]MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesResourceGroup] `json:"resource_groups,required"`
}

func (MemberNewParamsBodyIAMCreateMemberWithPoliciesPolicy) MarshalJSON

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

type MemberNewParamsBodyIAMCreateMemberWithPoliciesStatus

type MemberNewParamsBodyIAMCreateMemberWithPoliciesStatus string
const (
	MemberNewParamsBodyIAMCreateMemberWithPoliciesStatusAccepted MemberNewParamsBodyIAMCreateMemberWithPoliciesStatus = "accepted"
	MemberNewParamsBodyIAMCreateMemberWithPoliciesStatusPending  MemberNewParamsBodyIAMCreateMemberWithPoliciesStatus = "pending"
)

func (MemberNewParamsBodyIAMCreateMemberWithPoliciesStatus) IsKnown

type MemberNewParamsBodyIAMCreateMemberWithRoles

type MemberNewParamsBodyIAMCreateMemberWithRoles struct {
	// The contact email address of the user.
	Email param.Field[string] `json:"email,required"`
	// Array of roles associated with this member.
	Roles  param.Field[[]string]                                          `json:"roles,required"`
	Status param.Field[MemberNewParamsBodyIAMCreateMemberWithRolesStatus] `json:"status"`
}

func (MemberNewParamsBodyIAMCreateMemberWithRoles) MarshalJSON

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

type MemberNewParamsBodyIAMCreateMemberWithRolesStatus

type MemberNewParamsBodyIAMCreateMemberWithRolesStatus string
const (
	MemberNewParamsBodyIAMCreateMemberWithRolesStatusAccepted MemberNewParamsBodyIAMCreateMemberWithRolesStatus = "accepted"
	MemberNewParamsBodyIAMCreateMemberWithRolesStatusPending  MemberNewParamsBodyIAMCreateMemberWithRolesStatus = "pending"
)

func (MemberNewParamsBodyIAMCreateMemberWithRolesStatus) IsKnown

type MemberNewParamsBodyStatus

type MemberNewParamsBodyStatus string
const (
	MemberNewParamsBodyStatusAccepted MemberNewParamsBodyStatus = "accepted"
	MemberNewParamsBodyStatusPending  MemberNewParamsBodyStatus = "pending"
)

func (MemberNewParamsBodyStatus) IsKnown

func (r MemberNewParamsBodyStatus) IsKnown() bool

type MemberNewParamsBodyUnion

type MemberNewParamsBodyUnion interface {
	// contains filtered or unexported methods
}

Satisfied by accounts.MemberNewParamsBodyIAMCreateMemberWithRoles, accounts.MemberNewParamsBodyIAMCreateMemberWithPolicies, MemberNewParamsBody.

type MemberNewResponseEnvelope

type MemberNewResponseEnvelope struct {
	Errors   []MemberNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []MemberNewResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success MemberNewResponseEnvelopeSuccess `json:"success,required"`
	Result  shared.Member                    `json:"result"`
	JSON    memberNewResponseEnvelopeJSON    `json:"-"`
}

func (*MemberNewResponseEnvelope) UnmarshalJSON

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

type MemberNewResponseEnvelopeErrors

type MemberNewResponseEnvelopeErrors struct {
	Code             int64                                 `json:"code,required"`
	Message          string                                `json:"message,required"`
	DocumentationURL string                                `json:"documentation_url"`
	Source           MemberNewResponseEnvelopeErrorsSource `json:"source"`
	JSON             memberNewResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*MemberNewResponseEnvelopeErrors) UnmarshalJSON

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

type MemberNewResponseEnvelopeErrorsSource

type MemberNewResponseEnvelopeErrorsSource struct {
	Pointer string                                    `json:"pointer"`
	JSON    memberNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*MemberNewResponseEnvelopeErrorsSource) UnmarshalJSON

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

type MemberNewResponseEnvelopeMessages

type MemberNewResponseEnvelopeMessages struct {
	Code             int64                                   `json:"code,required"`
	Message          string                                  `json:"message,required"`
	DocumentationURL string                                  `json:"documentation_url"`
	Source           MemberNewResponseEnvelopeMessagesSource `json:"source"`
	JSON             memberNewResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*MemberNewResponseEnvelopeMessages) UnmarshalJSON

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

type MemberNewResponseEnvelopeMessagesSource

type MemberNewResponseEnvelopeMessagesSource struct {
	Pointer string                                      `json:"pointer"`
	JSON    memberNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*MemberNewResponseEnvelopeMessagesSource) UnmarshalJSON

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

type MemberNewResponseEnvelopeSuccess

type MemberNewResponseEnvelopeSuccess bool

Whether the API call was successful.

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

A scope is a combination of scope objects which provides additional context.

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, memberID string, body MemberDeleteParams, opts ...option.RequestOption) (res *MemberDeleteResponse, err error)

Remove a member from an account.

func (*MemberService) Get

func (r *MemberService) Get(ctx context.Context, memberID string, query MemberGetParams, opts ...option.RequestOption) (res *shared.Member, err error)

Get information about a specific member of an account.

func (*MemberService) List

List all members of an account.

func (*MemberService) ListAutoPaging

List all members of an account.

func (*MemberService) New

func (r *MemberService) New(ctx context.Context, params MemberNewParams, opts ...option.RequestOption) (res *shared.Member, err error)

Add a user to the list of members for this account.

func (*MemberService) Update

func (r *MemberService) Update(ctx context.Context, memberID string, params MemberUpdateParams, opts ...option.RequestOption) (res *shared.Member, err error)

Modify an account member.

type MemberStatus

type MemberStatus = shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

type MemberUpdateParams

type MemberUpdateParams struct {
	// Account identifier tag.
	AccountID param.Field[string]         `path:"account_id,required"`
	Body      MemberUpdateParamsBodyUnion `json:"body,required"`
}

func (MemberUpdateParams) MarshalJSON

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

type MemberUpdateParamsBody

type MemberUpdateParamsBody struct {
	Policies param.Field[interface{}] `json:"policies"`
	Roles    param.Field[interface{}] `json:"roles"`
	User     param.Field[interface{}] `json:"user"`
}

func (MemberUpdateParamsBody) MarshalJSON

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

type MemberUpdateParamsBodyIAMUpdateMemberWithPolicies

type MemberUpdateParamsBodyIAMUpdateMemberWithPolicies struct {
	// Array of policies associated with this member.
	Policies param.Field[[]MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPolicy] `json:"policies,required"`
}

func (MemberUpdateParamsBodyIAMUpdateMemberWithPolicies) MarshalJSON

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

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesAccess

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesAccess string

Allow or deny operations against the resources.

const (
	MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesAccessAllow MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesAccess = "allow"
	MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesAccessDeny  MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesAccess = "deny"
)

func (MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesAccess) IsKnown

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesPermissionGroup

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesPermissionGroup struct {
	// Identifier of the group.
	ID param.Field[string] `json:"id,required"`
}

A group of permissions.

func (MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesPermissionGroup) MarshalJSON

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesResourceGroup

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesResourceGroup struct {
	// Identifier of the group.
	ID param.Field[string] `json:"id,required"`
}

A group of scoped resources.

func (MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesResourceGroup) MarshalJSON

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPolicy

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPolicy struct {
	// Allow or deny operations against the resources.
	Access param.Field[MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesAccess] `json:"access,required"`
	// A set of permission groups that are specified to the policy.
	PermissionGroups param.Field[[]MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesPermissionGroup] `json:"permission_groups,required"`
	// A list of resource groups that the policy applies to.
	ResourceGroups param.Field[[]MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesResourceGroup] `json:"resource_groups,required"`
}

func (MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPolicy) MarshalJSON

type MemberUpdateParamsBodyIAMUpdateMemberWithRoles

type MemberUpdateParamsBodyIAMUpdateMemberWithRoles struct {
	// Roles assigned to this member.
	Roles param.Field[[]shared.RoleParam] `json:"roles"`
}

func (MemberUpdateParamsBodyIAMUpdateMemberWithRoles) MarshalJSON

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

type MemberUpdateParamsBodyIAMUpdateMemberWithRolesStatus

type MemberUpdateParamsBodyIAMUpdateMemberWithRolesStatus string

A member's status in the account.

const (
	MemberUpdateParamsBodyIAMUpdateMemberWithRolesStatusAccepted MemberUpdateParamsBodyIAMUpdateMemberWithRolesStatus = "accepted"
	MemberUpdateParamsBodyIAMUpdateMemberWithRolesStatusPending  MemberUpdateParamsBodyIAMUpdateMemberWithRolesStatus = "pending"
)

func (MemberUpdateParamsBodyIAMUpdateMemberWithRolesStatus) IsKnown

type MemberUpdateParamsBodyIAMUpdateMemberWithRolesUser

type MemberUpdateParamsBodyIAMUpdateMemberWithRolesUser struct {
	// The contact email address of the user.
	Email param.Field[string] `json:"email,required"`
	// Identifier
	ID param.Field[string] `json:"id"`
	// User's first name
	FirstName param.Field[string] `json:"first_name"`
	// User's last name
	LastName param.Field[string] `json:"last_name"`
}

Details of the user associated to the membership.

func (MemberUpdateParamsBodyIAMUpdateMemberWithRolesUser) MarshalJSON

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

type MemberUpdateParamsBodyStatus

type MemberUpdateParamsBodyStatus string

A member's status in the account.

const (
	MemberUpdateParamsBodyStatusAccepted MemberUpdateParamsBodyStatus = "accepted"
	MemberUpdateParamsBodyStatusPending  MemberUpdateParamsBodyStatus = "pending"
)

func (MemberUpdateParamsBodyStatus) IsKnown

func (r MemberUpdateParamsBodyStatus) IsKnown() bool

type MemberUpdateParamsBodyUnion

type MemberUpdateParamsBodyUnion interface {
	// contains filtered or unexported methods
}

Satisfied by accounts.MemberUpdateParamsBodyIAMUpdateMemberWithRoles, accounts.MemberUpdateParamsBodyIAMUpdateMemberWithPolicies, MemberUpdateParamsBody.

type MemberUpdateResponseEnvelope

type MemberUpdateResponseEnvelope struct {
	Errors   []MemberUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []MemberUpdateResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success MemberUpdateResponseEnvelopeSuccess `json:"success,required"`
	Result  shared.Member                       `json:"result"`
	JSON    memberUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*MemberUpdateResponseEnvelope) UnmarshalJSON

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

type MemberUpdateResponseEnvelopeErrors

type MemberUpdateResponseEnvelopeErrors struct {
	Code             int64                                    `json:"code,required"`
	Message          string                                   `json:"message,required"`
	DocumentationURL string                                   `json:"documentation_url"`
	Source           MemberUpdateResponseEnvelopeErrorsSource `json:"source"`
	JSON             memberUpdateResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*MemberUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type MemberUpdateResponseEnvelopeErrorsSource

type MemberUpdateResponseEnvelopeErrorsSource struct {
	Pointer string                                       `json:"pointer"`
	JSON    memberUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*MemberUpdateResponseEnvelopeErrorsSource) UnmarshalJSON

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

type MemberUpdateResponseEnvelopeMessages

type MemberUpdateResponseEnvelopeMessages struct {
	Code             int64                                      `json:"code,required"`
	Message          string                                     `json:"message,required"`
	DocumentationURL string                                     `json:"documentation_url"`
	Source           MemberUpdateResponseEnvelopeMessagesSource `json:"source"`
	JSON             memberUpdateResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*MemberUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type MemberUpdateResponseEnvelopeMessagesSource

type MemberUpdateResponseEnvelopeMessagesSource struct {
	Pointer string                                         `json:"pointer"`
	JSON    memberUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*MemberUpdateResponseEnvelopeMessagesSource) UnmarshalJSON

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

type MemberUpdateResponseEnvelopeSuccess

type MemberUpdateResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	MemberUpdateResponseEnvelopeSuccessTrue MemberUpdateResponseEnvelopeSuccess = true
)

func (MemberUpdateResponseEnvelopeSuccess) IsKnown

type MemberUser

type MemberUser = shared.MemberUser

Details of the user associated to the membership.

This is an alias to an internal type.

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 RoleGetParams

type RoleGetParams struct {
	// Account identifier tag.
	AccountID param.Field[string] `path:"account_id,required"`
}

type RoleGetResponseEnvelope

type RoleGetResponseEnvelope struct {
	Errors   []RoleGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []RoleGetResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success RoleGetResponseEnvelopeSuccess `json:"success,required"`
	Result  shared.Role                    `json:"result"`
	JSON    roleGetResponseEnvelopeJSON    `json:"-"`
}

func (*RoleGetResponseEnvelope) UnmarshalJSON

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

type RoleGetResponseEnvelopeErrors

type RoleGetResponseEnvelopeErrors struct {
	Code             int64                               `json:"code,required"`
	Message          string                              `json:"message,required"`
	DocumentationURL string                              `json:"documentation_url"`
	Source           RoleGetResponseEnvelopeErrorsSource `json:"source"`
	JSON             roleGetResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*RoleGetResponseEnvelopeErrors) UnmarshalJSON

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

type RoleGetResponseEnvelopeErrorsSource

type RoleGetResponseEnvelopeErrorsSource struct {
	Pointer string                                  `json:"pointer"`
	JSON    roleGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*RoleGetResponseEnvelopeErrorsSource) UnmarshalJSON

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

type RoleGetResponseEnvelopeMessages

type RoleGetResponseEnvelopeMessages struct {
	Code             int64                                 `json:"code,required"`
	Message          string                                `json:"message,required"`
	DocumentationURL string                                `json:"documentation_url"`
	Source           RoleGetResponseEnvelopeMessagesSource `json:"source"`
	JSON             roleGetResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*RoleGetResponseEnvelopeMessages) UnmarshalJSON

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

type RoleGetResponseEnvelopeMessagesSource

type RoleGetResponseEnvelopeMessagesSource struct {
	Pointer string                                    `json:"pointer"`
	JSON    roleGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*RoleGetResponseEnvelopeMessagesSource) UnmarshalJSON

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

type RoleGetResponseEnvelopeSuccess

type RoleGetResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	RoleGetResponseEnvelopeSuccessTrue RoleGetResponseEnvelopeSuccess = true
)

func (RoleGetResponseEnvelopeSuccess) IsKnown

type RoleListParams

type RoleListParams struct {
	// Account identifier tag.
	AccountID param.Field[string] `path:"account_id,required"`
	// Page number of paginated results.
	Page param.Field[float64] `query:"page"`
	// Number of roles per page.
	PerPage param.Field[float64] `query:"per_page"`
}

func (RoleListParams) URLQuery

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

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

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 RoleService

type RoleService struct {
	Options []option.RequestOption
}

RoleService 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 NewRoleService method instead.

func NewRoleService

func NewRoleService(opts ...option.RequestOption) (r *RoleService)

NewRoleService 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 (*RoleService) Get

func (r *RoleService) Get(ctx context.Context, roleID string, query RoleGetParams, opts ...option.RequestOption) (res *shared.Role, err error)

Get information about a specific role for an account.

func (*RoleService) List

Get all available roles for an account.

func (*RoleService) ListAutoPaging

Get all available roles for an account.

type SortDirection

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

type Status

type Status string

Whether the user is a member of the organization or has an invitation pending.

const (
	StatusMember  Status = "member"
	StatusInvited Status = "invited"
)

func (Status) IsKnown

func (r Status) IsKnown() bool

type Subscription

type Subscription = shared.Subscription

This is an alias to an internal type.

type SubscriptionDeleteParams

type SubscriptionDeleteParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
}

type SubscriptionDeleteResponse

type SubscriptionDeleteResponse struct {
	// Subscription identifier tag.
	SubscriptionID string                         `json:"subscription_id"`
	JSON           subscriptionDeleteResponseJSON `json:"-"`
}

func (*SubscriptionDeleteResponse) UnmarshalJSON

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

type SubscriptionDeleteResponseEnvelope

type SubscriptionDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo      `json:"errors,required"`
	Messages []shared.ResponseInfo      `json:"messages,required"`
	Result   SubscriptionDeleteResponse `json:"result,required"`
	// Whether the API call was successful
	Success SubscriptionDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    subscriptionDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*SubscriptionDeleteResponseEnvelope) UnmarshalJSON

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

type SubscriptionDeleteResponseEnvelopeSuccess

type SubscriptionDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SubscriptionDeleteResponseEnvelopeSuccessTrue SubscriptionDeleteResponseEnvelopeSuccess = true
)

func (SubscriptionDeleteResponseEnvelopeSuccess) IsKnown

type SubscriptionFrequency

type SubscriptionFrequency = shared.SubscriptionFrequency

How often the subscription is renewed automatically.

This is an alias to an internal type.

type SubscriptionGetParams

type SubscriptionGetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
}

type SubscriptionNewParams

type SubscriptionNewParams struct {
	// Identifier
	AccountID    param.Field[string]      `path:"account_id,required"`
	Subscription shared.SubscriptionParam `json:"subscription,required"`
}

func (SubscriptionNewParams) MarshalJSON

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

type SubscriptionNewResponseEnvelope

type SubscriptionNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   shared.Subscription   `json:"result,required"`
	// Whether the API call was successful
	Success SubscriptionNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    subscriptionNewResponseEnvelopeJSON    `json:"-"`
}

func (*SubscriptionNewResponseEnvelope) UnmarshalJSON

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

type SubscriptionNewResponseEnvelopeSuccess

type SubscriptionNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SubscriptionNewResponseEnvelopeSuccessTrue SubscriptionNewResponseEnvelopeSuccess = true
)

func (SubscriptionNewResponseEnvelopeSuccess) IsKnown

type SubscriptionParam

type SubscriptionParam = shared.SubscriptionParam

This is an alias to an internal type.

type SubscriptionService

type SubscriptionService struct {
	Options []option.RequestOption
}

SubscriptionService 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 NewSubscriptionService method instead.

func NewSubscriptionService

func NewSubscriptionService(opts ...option.RequestOption) (r *SubscriptionService)

NewSubscriptionService 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 (*SubscriptionService) Delete

func (r *SubscriptionService) Delete(ctx context.Context, subscriptionIdentifier string, body SubscriptionDeleteParams, opts ...option.RequestOption) (res *SubscriptionDeleteResponse, err error)

Deletes an account's subscription.

func (*SubscriptionService) Get

Lists all of an account's subscriptions.

func (*SubscriptionService) GetAutoPaging

Lists all of an account's subscriptions.

func (*SubscriptionService) New

Creates an account subscription.

func (*SubscriptionService) Update

func (r *SubscriptionService) Update(ctx context.Context, subscriptionIdentifier string, params SubscriptionUpdateParams, opts ...option.RequestOption) (res *shared.Subscription, err error)

Updates an account subscription.

type SubscriptionState

type SubscriptionState = shared.SubscriptionState

The state that the subscription is in.

This is an alias to an internal type.

type SubscriptionUpdateParams

type SubscriptionUpdateParams struct {
	// Identifier
	AccountID    param.Field[string]      `path:"account_id,required"`
	Subscription shared.SubscriptionParam `json:"subscription,required"`
}

func (SubscriptionUpdateParams) MarshalJSON

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

type SubscriptionUpdateResponseEnvelope

type SubscriptionUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   shared.Subscription   `json:"result,required"`
	// Whether the API call was successful
	Success SubscriptionUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    subscriptionUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*SubscriptionUpdateResponseEnvelope) UnmarshalJSON

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

type SubscriptionUpdateResponseEnvelopeSuccess

type SubscriptionUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SubscriptionUpdateResponseEnvelopeSuccessTrue SubscriptionUpdateResponseEnvelopeSuccess = true
)

func (SubscriptionUpdateResponseEnvelopeSuccess) IsKnown

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 TokenDeleteParams

type TokenDeleteParams struct {
	// Account identifier tag.
	AccountID param.Field[string] `path:"account_id,required"`
}

type TokenDeleteResponse

type TokenDeleteResponse struct {
	// Identifier
	ID   string                  `json:"id,required"`
	JSON tokenDeleteResponseJSON `json:"-"`
}

func (*TokenDeleteResponse) UnmarshalJSON

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

type TokenDeleteResponseEnvelope

type TokenDeleteResponseEnvelope struct {
	Errors   []TokenDeleteResponseEnvelopeErrors   `json:"errors,required"`
	Messages []TokenDeleteResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success TokenDeleteResponseEnvelopeSuccess `json:"success,required"`
	Result  TokenDeleteResponse                `json:"result,nullable"`
	JSON    tokenDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*TokenDeleteResponseEnvelope) UnmarshalJSON

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

type TokenDeleteResponseEnvelopeErrors

type TokenDeleteResponseEnvelopeErrors struct {
	Code             int64                                   `json:"code,required"`
	Message          string                                  `json:"message,required"`
	DocumentationURL string                                  `json:"documentation_url"`
	Source           TokenDeleteResponseEnvelopeErrorsSource `json:"source"`
	JSON             tokenDeleteResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*TokenDeleteResponseEnvelopeErrors) UnmarshalJSON

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

type TokenDeleteResponseEnvelopeErrorsSource

type TokenDeleteResponseEnvelopeErrorsSource struct {
	Pointer string                                      `json:"pointer"`
	JSON    tokenDeleteResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*TokenDeleteResponseEnvelopeErrorsSource) UnmarshalJSON

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

type TokenDeleteResponseEnvelopeMessages

type TokenDeleteResponseEnvelopeMessages struct {
	Code             int64                                     `json:"code,required"`
	Message          string                                    `json:"message,required"`
	DocumentationURL string                                    `json:"documentation_url"`
	Source           TokenDeleteResponseEnvelopeMessagesSource `json:"source"`
	JSON             tokenDeleteResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*TokenDeleteResponseEnvelopeMessages) UnmarshalJSON

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

type TokenDeleteResponseEnvelopeMessagesSource

type TokenDeleteResponseEnvelopeMessagesSource struct {
	Pointer string                                        `json:"pointer"`
	JSON    tokenDeleteResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*TokenDeleteResponseEnvelopeMessagesSource) UnmarshalJSON

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

type TokenDeleteResponseEnvelopeSuccess

type TokenDeleteResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	TokenDeleteResponseEnvelopeSuccessTrue TokenDeleteResponseEnvelopeSuccess = true
)

func (TokenDeleteResponseEnvelopeSuccess) IsKnown

type TokenGetParams

type TokenGetParams struct {
	// Account identifier tag.
	AccountID param.Field[string] `path:"account_id,required"`
}

type TokenGetResponseEnvelope

type TokenGetResponseEnvelope struct {
	Errors   []TokenGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []TokenGetResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success TokenGetResponseEnvelopeSuccess `json:"success,required"`
	Result  shared.Token                    `json:"result"`
	JSON    tokenGetResponseEnvelopeJSON    `json:"-"`
}

func (*TokenGetResponseEnvelope) UnmarshalJSON

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

type TokenGetResponseEnvelopeErrors

type TokenGetResponseEnvelopeErrors struct {
	Code             int64                                `json:"code,required"`
	Message          string                               `json:"message,required"`
	DocumentationURL string                               `json:"documentation_url"`
	Source           TokenGetResponseEnvelopeErrorsSource `json:"source"`
	JSON             tokenGetResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*TokenGetResponseEnvelopeErrors) UnmarshalJSON

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

type TokenGetResponseEnvelopeErrorsSource

type TokenGetResponseEnvelopeErrorsSource struct {
	Pointer string                                   `json:"pointer"`
	JSON    tokenGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*TokenGetResponseEnvelopeErrorsSource) UnmarshalJSON

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

type TokenGetResponseEnvelopeMessages

type TokenGetResponseEnvelopeMessages struct {
	Code             int64                                  `json:"code,required"`
	Message          string                                 `json:"message,required"`
	DocumentationURL string                                 `json:"documentation_url"`
	Source           TokenGetResponseEnvelopeMessagesSource `json:"source"`
	JSON             tokenGetResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*TokenGetResponseEnvelopeMessages) UnmarshalJSON

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

type TokenGetResponseEnvelopeMessagesSource

type TokenGetResponseEnvelopeMessagesSource struct {
	Pointer string                                     `json:"pointer"`
	JSON    tokenGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*TokenGetResponseEnvelopeMessagesSource) UnmarshalJSON

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

type TokenGetResponseEnvelopeSuccess

type TokenGetResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	TokenGetResponseEnvelopeSuccessTrue TokenGetResponseEnvelopeSuccess = true
)

func (TokenGetResponseEnvelopeSuccess) IsKnown

type TokenListParams

type TokenListParams struct {
	// Account identifier tag.
	AccountID param.Field[string] `path:"account_id,required"`
	// Direction to order results.
	Direction param.Field[TokenListParamsDirection] `query:"direction"`
	// Page number of paginated results.
	Page param.Field[float64] `query:"page"`
	// Maximum number of results per page.
	PerPage param.Field[float64] `query:"per_page"`
}

func (TokenListParams) URLQuery

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

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

type TokenListParamsDirection

type TokenListParamsDirection string

Direction to order results.

const (
	TokenListParamsDirectionAsc  TokenListParamsDirection = "asc"
	TokenListParamsDirectionDesc TokenListParamsDirection = "desc"
)

func (TokenListParamsDirection) IsKnown

func (r TokenListParamsDirection) IsKnown() bool

type TokenNewParams

type TokenNewParams struct {
	// Account identifier tag.
	AccountID param.Field[string] `path:"account_id,required"`
	// Token name.
	Name param.Field[string] `json:"name,required"`
	// List of access policies assigned to the token.
	Policies  param.Field[[]shared.TokenPolicyParam] `json:"policies,required"`
	Condition param.Field[TokenNewParamsCondition]   `json:"condition"`
	// The expiration time on or after which the JWT MUST NOT be accepted for
	// processing.
	ExpiresOn param.Field[time.Time] `json:"expires_on" format:"date-time"`
	// The time before which the token MUST NOT be accepted for processing.
	NotBefore param.Field[time.Time] `json:"not_before" format:"date-time"`
}

func (TokenNewParams) MarshalJSON

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

type TokenNewParamsCondition

type TokenNewParamsCondition struct {
	// Client IP restrictions.
	RequestIP param.Field[TokenNewParamsConditionRequestIP] `json:"request_ip"`
}

func (TokenNewParamsCondition) MarshalJSON

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

type TokenNewParamsConditionRequestIP

type TokenNewParamsConditionRequestIP struct {
	// List of IPv4/IPv6 CIDR addresses.
	In param.Field[[]shared.TokenConditionCIDRListParam] `json:"in"`
	// List of IPv4/IPv6 CIDR addresses.
	NotIn param.Field[[]shared.TokenConditionCIDRListParam] `json:"not_in"`
}

Client IP restrictions.

func (TokenNewParamsConditionRequestIP) MarshalJSON

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

type TokenNewResponse

type TokenNewResponse struct {
	// Token identifier tag.
	ID        string                    `json:"id"`
	Condition TokenNewResponseCondition `json:"condition"`
	// The expiration time on or after which the JWT MUST NOT be accepted for
	// processing.
	ExpiresOn time.Time `json:"expires_on" format:"date-time"`
	// The time on which the token was created.
	IssuedOn time.Time `json:"issued_on" format:"date-time"`
	// Last time the token was used.
	LastUsedOn time.Time `json:"last_used_on" format:"date-time"`
	// Last time the token was modified.
	ModifiedOn time.Time `json:"modified_on" format:"date-time"`
	// Token name.
	Name string `json:"name"`
	// The time before which the token MUST NOT be accepted for processing.
	NotBefore time.Time `json:"not_before" format:"date-time"`
	// List of access policies assigned to the token.
	Policies []shared.TokenPolicy `json:"policies"`
	// Status of the token.
	Status TokenNewResponseStatus `json:"status"`
	// The token value.
	Value shared.TokenValue    `json:"value"`
	JSON  tokenNewResponseJSON `json:"-"`
}

func (*TokenNewResponse) UnmarshalJSON

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

type TokenNewResponseCondition

type TokenNewResponseCondition struct {
	// Client IP restrictions.
	RequestIP TokenNewResponseConditionRequestIP `json:"request_ip"`
	JSON      tokenNewResponseConditionJSON      `json:"-"`
}

func (*TokenNewResponseCondition) UnmarshalJSON

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

type TokenNewResponseConditionRequestIP

type TokenNewResponseConditionRequestIP struct {
	// List of IPv4/IPv6 CIDR addresses.
	In []shared.TokenConditionCIDRList `json:"in"`
	// List of IPv4/IPv6 CIDR addresses.
	NotIn []shared.TokenConditionCIDRList        `json:"not_in"`
	JSON  tokenNewResponseConditionRequestIPJSON `json:"-"`
}

Client IP restrictions.

func (*TokenNewResponseConditionRequestIP) UnmarshalJSON

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

type TokenNewResponseEnvelope

type TokenNewResponseEnvelope struct {
	Errors   []TokenNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []TokenNewResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success TokenNewResponseEnvelopeSuccess `json:"success,required"`
	Result  TokenNewResponse                `json:"result"`
	JSON    tokenNewResponseEnvelopeJSON    `json:"-"`
}

func (*TokenNewResponseEnvelope) UnmarshalJSON

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

type TokenNewResponseEnvelopeErrors

type TokenNewResponseEnvelopeErrors struct {
	Code             int64                                `json:"code,required"`
	Message          string                               `json:"message,required"`
	DocumentationURL string                               `json:"documentation_url"`
	Source           TokenNewResponseEnvelopeErrorsSource `json:"source"`
	JSON             tokenNewResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*TokenNewResponseEnvelopeErrors) UnmarshalJSON

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

type TokenNewResponseEnvelopeErrorsSource

type TokenNewResponseEnvelopeErrorsSource struct {
	Pointer string                                   `json:"pointer"`
	JSON    tokenNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*TokenNewResponseEnvelopeErrorsSource) UnmarshalJSON

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

type TokenNewResponseEnvelopeMessages

type TokenNewResponseEnvelopeMessages struct {
	Code             int64                                  `json:"code,required"`
	Message          string                                 `json:"message,required"`
	DocumentationURL string                                 `json:"documentation_url"`
	Source           TokenNewResponseEnvelopeMessagesSource `json:"source"`
	JSON             tokenNewResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*TokenNewResponseEnvelopeMessages) UnmarshalJSON

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

type TokenNewResponseEnvelopeMessagesSource

type TokenNewResponseEnvelopeMessagesSource struct {
	Pointer string                                     `json:"pointer"`
	JSON    tokenNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*TokenNewResponseEnvelopeMessagesSource) UnmarshalJSON

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

type TokenNewResponseEnvelopeSuccess

type TokenNewResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	TokenNewResponseEnvelopeSuccessTrue TokenNewResponseEnvelopeSuccess = true
)

func (TokenNewResponseEnvelopeSuccess) IsKnown

type TokenNewResponseStatus

type TokenNewResponseStatus string

Status of the token.

const (
	TokenNewResponseStatusActive   TokenNewResponseStatus = "active"
	TokenNewResponseStatusDisabled TokenNewResponseStatus = "disabled"
	TokenNewResponseStatusExpired  TokenNewResponseStatus = "expired"
)

func (TokenNewResponseStatus) IsKnown

func (r TokenNewResponseStatus) IsKnown() bool

type TokenParam

type TokenParam = shared.TokenParam

This is an alias to an internal type.

type TokenPermissionGroupGetParams

type TokenPermissionGroupGetParams struct {
	// Account identifier tag.
	AccountID param.Field[string] `path:"account_id,required"`
	// Filter by the name of the permission group. The value must be URL-encoded.
	Name param.Field[string] `query:"name"`
	// Filter by the scope of the permission group. The value must be URL-encoded.
	Scope param.Field[string] `query:"scope"`
}

func (TokenPermissionGroupGetParams) URLQuery

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

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

type TokenPermissionGroupGetResponse

type TokenPermissionGroupGetResponse struct {
	// Public ID.
	ID string `json:"id"`
	// Permission Group Name
	Name string `json:"name"`
	// Resources to which the Permission Group is scoped
	Scopes []TokenPermissionGroupGetResponseScope `json:"scopes"`
	JSON   tokenPermissionGroupGetResponseJSON    `json:"-"`
}

func (*TokenPermissionGroupGetResponse) UnmarshalJSON

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

type TokenPermissionGroupGetResponseEnvelope

type TokenPermissionGroupGetResponseEnvelope struct {
	Errors   []TokenPermissionGroupGetResponseEnvelopeErrors   `json:"errors,required"`
	Messages []TokenPermissionGroupGetResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success    TokenPermissionGroupGetResponseEnvelopeSuccess    `json:"success,required"`
	Result     []TokenPermissionGroupGetResponse                 `json:"result"`
	ResultInfo TokenPermissionGroupGetResponseEnvelopeResultInfo `json:"result_info"`
	JSON       tokenPermissionGroupGetResponseEnvelopeJSON       `json:"-"`
}

func (*TokenPermissionGroupGetResponseEnvelope) UnmarshalJSON

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

type TokenPermissionGroupGetResponseEnvelopeErrors

type TokenPermissionGroupGetResponseEnvelopeErrors struct {
	Code             int64                                               `json:"code,required"`
	Message          string                                              `json:"message,required"`
	DocumentationURL string                                              `json:"documentation_url"`
	Source           TokenPermissionGroupGetResponseEnvelopeErrorsSource `json:"source"`
	JSON             tokenPermissionGroupGetResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*TokenPermissionGroupGetResponseEnvelopeErrors) UnmarshalJSON

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

type TokenPermissionGroupGetResponseEnvelopeErrorsSource

type TokenPermissionGroupGetResponseEnvelopeErrorsSource struct {
	Pointer string                                                  `json:"pointer"`
	JSON    tokenPermissionGroupGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*TokenPermissionGroupGetResponseEnvelopeErrorsSource) UnmarshalJSON

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

type TokenPermissionGroupGetResponseEnvelopeMessages

type TokenPermissionGroupGetResponseEnvelopeMessages struct {
	Code             int64                                                 `json:"code,required"`
	Message          string                                                `json:"message,required"`
	DocumentationURL string                                                `json:"documentation_url"`
	Source           TokenPermissionGroupGetResponseEnvelopeMessagesSource `json:"source"`
	JSON             tokenPermissionGroupGetResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*TokenPermissionGroupGetResponseEnvelopeMessages) UnmarshalJSON

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

type TokenPermissionGroupGetResponseEnvelopeMessagesSource

type TokenPermissionGroupGetResponseEnvelopeMessagesSource struct {
	Pointer string                                                    `json:"pointer"`
	JSON    tokenPermissionGroupGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*TokenPermissionGroupGetResponseEnvelopeMessagesSource) UnmarshalJSON

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

type TokenPermissionGroupGetResponseEnvelopeResultInfo

type TokenPermissionGroupGetResponseEnvelopeResultInfo struct {
	// Total number of results for the requested service
	Count float64 `json:"count"`
	// Current page within paginated list of results
	Page float64 `json:"page"`
	// Number of results per page of results
	PerPage float64 `json:"per_page"`
	// Total results available without any search parameters
	TotalCount float64                                               `json:"total_count"`
	JSON       tokenPermissionGroupGetResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*TokenPermissionGroupGetResponseEnvelopeResultInfo) UnmarshalJSON

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

type TokenPermissionGroupGetResponseEnvelopeSuccess

type TokenPermissionGroupGetResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	TokenPermissionGroupGetResponseEnvelopeSuccessTrue TokenPermissionGroupGetResponseEnvelopeSuccess = true
)

func (TokenPermissionGroupGetResponseEnvelopeSuccess) IsKnown

type TokenPermissionGroupGetResponseScope

type TokenPermissionGroupGetResponseScope string
const (
	TokenPermissionGroupGetResponseScopeComCloudflareAPIAccount     TokenPermissionGroupGetResponseScope = "com.cloudflare.api.account"
	TokenPermissionGroupGetResponseScopeComCloudflareAPIAccountZone TokenPermissionGroupGetResponseScope = "com.cloudflare.api.account.zone"
	TokenPermissionGroupGetResponseScopeComCloudflareAPIUser        TokenPermissionGroupGetResponseScope = "com.cloudflare.api.user"
	TokenPermissionGroupGetResponseScopeComCloudflareEdgeR2Bucket   TokenPermissionGroupGetResponseScope = "com.cloudflare.edge.r2.bucket"
)

func (TokenPermissionGroupGetResponseScope) IsKnown

type TokenPermissionGroupListParams

type TokenPermissionGroupListParams struct {
	// Account identifier tag.
	AccountID param.Field[string] `path:"account_id,required"`
	// Filter by the name of the permission group. The value must be URL-encoded.
	Name param.Field[string] `query:"name"`
	// Filter by the scope of the permission group. The value must be URL-encoded.
	Scope param.Field[string] `query:"scope"`
}

func (TokenPermissionGroupListParams) URLQuery

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

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

type TokenPermissionGroupListResponse

type TokenPermissionGroupListResponse struct {
	// Public ID.
	ID string `json:"id"`
	// Permission Group Name
	Name string `json:"name"`
	// Resources to which the Permission Group is scoped
	Scopes []TokenPermissionGroupListResponseScope `json:"scopes"`
	JSON   tokenPermissionGroupListResponseJSON    `json:"-"`
}

func (*TokenPermissionGroupListResponse) UnmarshalJSON

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

type TokenPermissionGroupListResponseScope

type TokenPermissionGroupListResponseScope string
const (
	TokenPermissionGroupListResponseScopeComCloudflareAPIAccount     TokenPermissionGroupListResponseScope = "com.cloudflare.api.account"
	TokenPermissionGroupListResponseScopeComCloudflareAPIAccountZone TokenPermissionGroupListResponseScope = "com.cloudflare.api.account.zone"
	TokenPermissionGroupListResponseScopeComCloudflareAPIUser        TokenPermissionGroupListResponseScope = "com.cloudflare.api.user"
	TokenPermissionGroupListResponseScopeComCloudflareEdgeR2Bucket   TokenPermissionGroupListResponseScope = "com.cloudflare.edge.r2.bucket"
)

func (TokenPermissionGroupListResponseScope) IsKnown

type TokenPermissionGroupService

type TokenPermissionGroupService struct {
	Options []option.RequestOption
}

TokenPermissionGroupService 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 NewTokenPermissionGroupService method instead.

func NewTokenPermissionGroupService

func NewTokenPermissionGroupService(opts ...option.RequestOption) (r *TokenPermissionGroupService)

NewTokenPermissionGroupService 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 (*TokenPermissionGroupService) Get

Find all available permission groups for Account Owned API Tokens

func (*TokenPermissionGroupService) List

Find all available permission groups for Account Owned API Tokens

func (*TokenPermissionGroupService) ListAutoPaging

Find all available permission groups for Account Owned API Tokens

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 TokenService

type TokenService struct {
	Options          []option.RequestOption
	PermissionGroups *TokenPermissionGroupService
	Value            *TokenValueService
}

TokenService 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 NewTokenService method instead.

func NewTokenService

func NewTokenService(opts ...option.RequestOption) (r *TokenService)

NewTokenService 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 (*TokenService) Delete

func (r *TokenService) Delete(ctx context.Context, tokenID string, body TokenDeleteParams, opts ...option.RequestOption) (res *TokenDeleteResponse, err error)

Destroy an Account Owned API token.

func (*TokenService) Get

func (r *TokenService) Get(ctx context.Context, tokenID string, query TokenGetParams, opts ...option.RequestOption) (res *shared.Token, err error)

Get information about a specific Account Owned API token.

func (*TokenService) List

List all Account Owned API tokens created for this account.

func (*TokenService) ListAutoPaging

List all Account Owned API tokens created for this account.

func (*TokenService) New

func (r *TokenService) New(ctx context.Context, params TokenNewParams, opts ...option.RequestOption) (res *TokenNewResponse, err error)

Create a new Account Owned API token.

func (*TokenService) Update

func (r *TokenService) Update(ctx context.Context, tokenID string, params TokenUpdateParams, opts ...option.RequestOption) (res *shared.Token, err error)

Update an existing token.

func (*TokenService) Verify

func (r *TokenService) Verify(ctx context.Context, query TokenVerifyParams, opts ...option.RequestOption) (res *TokenVerifyResponse, err error)

Test whether a token works.

type TokenStatus

type TokenStatus = shared.TokenStatus

Status of the token.

This is an alias to an internal type.

type TokenUpdateParams

type TokenUpdateParams struct {
	// Account identifier tag.
	AccountID param.Field[string] `path:"account_id,required"`
	Token     shared.TokenParam   `json:"token,required"`
}

func (TokenUpdateParams) MarshalJSON

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

type TokenUpdateResponseEnvelope

type TokenUpdateResponseEnvelope struct {
	Errors   []TokenUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []TokenUpdateResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success TokenUpdateResponseEnvelopeSuccess `json:"success,required"`
	Result  shared.Token                       `json:"result"`
	JSON    tokenUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*TokenUpdateResponseEnvelope) UnmarshalJSON

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

type TokenUpdateResponseEnvelopeErrors

type TokenUpdateResponseEnvelopeErrors struct {
	Code             int64                                   `json:"code,required"`
	Message          string                                  `json:"message,required"`
	DocumentationURL string                                  `json:"documentation_url"`
	Source           TokenUpdateResponseEnvelopeErrorsSource `json:"source"`
	JSON             tokenUpdateResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*TokenUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type TokenUpdateResponseEnvelopeErrorsSource

type TokenUpdateResponseEnvelopeErrorsSource struct {
	Pointer string                                      `json:"pointer"`
	JSON    tokenUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*TokenUpdateResponseEnvelopeErrorsSource) UnmarshalJSON

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

type TokenUpdateResponseEnvelopeMessages

type TokenUpdateResponseEnvelopeMessages struct {
	Code             int64                                     `json:"code,required"`
	Message          string                                    `json:"message,required"`
	DocumentationURL string                                    `json:"documentation_url"`
	Source           TokenUpdateResponseEnvelopeMessagesSource `json:"source"`
	JSON             tokenUpdateResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*TokenUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type TokenUpdateResponseEnvelopeMessagesSource

type TokenUpdateResponseEnvelopeMessagesSource struct {
	Pointer string                                        `json:"pointer"`
	JSON    tokenUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*TokenUpdateResponseEnvelopeMessagesSource) UnmarshalJSON

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

type TokenUpdateResponseEnvelopeSuccess

type TokenUpdateResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	TokenUpdateResponseEnvelopeSuccessTrue TokenUpdateResponseEnvelopeSuccess = true
)

func (TokenUpdateResponseEnvelopeSuccess) IsKnown

type TokenValue

type TokenValue = shared.TokenValue

The token value.

This is an alias to an internal type.

type TokenValueService

type TokenValueService struct {
	Options []option.RequestOption
}

TokenValueService 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 NewTokenValueService method instead.

func NewTokenValueService

func NewTokenValueService(opts ...option.RequestOption) (r *TokenValueService)

NewTokenValueService 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 (*TokenValueService) Update

func (r *TokenValueService) Update(ctx context.Context, tokenID string, params TokenValueUpdateParams, opts ...option.RequestOption) (res *shared.TokenValue, err error)

Roll the Account Owned API token secret.

type TokenValueUpdateParams

type TokenValueUpdateParams struct {
	// Account identifier tag.
	AccountID param.Field[string] `path:"account_id,required"`
	Body      interface{}         `json:"body,required"`
}

func (TokenValueUpdateParams) MarshalJSON

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

type TokenValueUpdateResponseEnvelope

type TokenValueUpdateResponseEnvelope struct {
	Errors   []TokenValueUpdateResponseEnvelopeErrors   `json:"errors,required"`
	Messages []TokenValueUpdateResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success TokenValueUpdateResponseEnvelopeSuccess `json:"success,required"`
	// The token value.
	Result shared.TokenValue                    `json:"result"`
	JSON   tokenValueUpdateResponseEnvelopeJSON `json:"-"`
}

func (*TokenValueUpdateResponseEnvelope) UnmarshalJSON

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

type TokenValueUpdateResponseEnvelopeErrors

type TokenValueUpdateResponseEnvelopeErrors struct {
	Code             int64                                        `json:"code,required"`
	Message          string                                       `json:"message,required"`
	DocumentationURL string                                       `json:"documentation_url"`
	Source           TokenValueUpdateResponseEnvelopeErrorsSource `json:"source"`
	JSON             tokenValueUpdateResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*TokenValueUpdateResponseEnvelopeErrors) UnmarshalJSON

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

type TokenValueUpdateResponseEnvelopeErrorsSource

type TokenValueUpdateResponseEnvelopeErrorsSource struct {
	Pointer string                                           `json:"pointer"`
	JSON    tokenValueUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*TokenValueUpdateResponseEnvelopeErrorsSource) UnmarshalJSON

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

type TokenValueUpdateResponseEnvelopeMessages

type TokenValueUpdateResponseEnvelopeMessages struct {
	Code             int64                                          `json:"code,required"`
	Message          string                                         `json:"message,required"`
	DocumentationURL string                                         `json:"documentation_url"`
	Source           TokenValueUpdateResponseEnvelopeMessagesSource `json:"source"`
	JSON             tokenValueUpdateResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*TokenValueUpdateResponseEnvelopeMessages) UnmarshalJSON

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

type TokenValueUpdateResponseEnvelopeMessagesSource

type TokenValueUpdateResponseEnvelopeMessagesSource struct {
	Pointer string                                             `json:"pointer"`
	JSON    tokenValueUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*TokenValueUpdateResponseEnvelopeMessagesSource) UnmarshalJSON

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

type TokenValueUpdateResponseEnvelopeSuccess

type TokenValueUpdateResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	TokenValueUpdateResponseEnvelopeSuccessTrue TokenValueUpdateResponseEnvelopeSuccess = true
)

func (TokenValueUpdateResponseEnvelopeSuccess) IsKnown

type TokenVerifyParams

type TokenVerifyParams struct {
	// Account identifier tag.
	AccountID param.Field[string] `path:"account_id,required"`
}

type TokenVerifyResponse

type TokenVerifyResponse struct {
	// Token identifier tag.
	ID string `json:"id,required"`
	// Status of the token.
	Status TokenVerifyResponseStatus `json:"status,required"`
	// The expiration time on or after which the JWT MUST NOT be accepted for
	// processing.
	ExpiresOn time.Time `json:"expires_on" format:"date-time"`
	// The time before which the token MUST NOT be accepted for processing.
	NotBefore time.Time               `json:"not_before" format:"date-time"`
	JSON      tokenVerifyResponseJSON `json:"-"`
}

func (*TokenVerifyResponse) UnmarshalJSON

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

type TokenVerifyResponseEnvelope

type TokenVerifyResponseEnvelope struct {
	Errors   []TokenVerifyResponseEnvelopeErrors   `json:"errors,required"`
	Messages []TokenVerifyResponseEnvelopeMessages `json:"messages,required"`
	// Whether the API call was successful.
	Success TokenVerifyResponseEnvelopeSuccess `json:"success,required"`
	Result  TokenVerifyResponse                `json:"result"`
	JSON    tokenVerifyResponseEnvelopeJSON    `json:"-"`
}

func (*TokenVerifyResponseEnvelope) UnmarshalJSON

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

type TokenVerifyResponseEnvelopeErrors

type TokenVerifyResponseEnvelopeErrors struct {
	Code             int64                                   `json:"code,required"`
	Message          string                                  `json:"message,required"`
	DocumentationURL string                                  `json:"documentation_url"`
	Source           TokenVerifyResponseEnvelopeErrorsSource `json:"source"`
	JSON             tokenVerifyResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*TokenVerifyResponseEnvelopeErrors) UnmarshalJSON

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

type TokenVerifyResponseEnvelopeErrorsSource

type TokenVerifyResponseEnvelopeErrorsSource struct {
	Pointer string                                      `json:"pointer"`
	JSON    tokenVerifyResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*TokenVerifyResponseEnvelopeErrorsSource) UnmarshalJSON

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

type TokenVerifyResponseEnvelopeMessages

type TokenVerifyResponseEnvelopeMessages struct {
	Code             int64                                     `json:"code,required"`
	Message          string                                    `json:"message,required"`
	DocumentationURL string                                    `json:"documentation_url"`
	Source           TokenVerifyResponseEnvelopeMessagesSource `json:"source"`
	JSON             tokenVerifyResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*TokenVerifyResponseEnvelopeMessages) UnmarshalJSON

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

type TokenVerifyResponseEnvelopeMessagesSource

type TokenVerifyResponseEnvelopeMessagesSource struct {
	Pointer string                                        `json:"pointer"`
	JSON    tokenVerifyResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*TokenVerifyResponseEnvelopeMessagesSource) UnmarshalJSON

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

type TokenVerifyResponseEnvelopeSuccess

type TokenVerifyResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	TokenVerifyResponseEnvelopeSuccessTrue TokenVerifyResponseEnvelopeSuccess = true
)

func (TokenVerifyResponseEnvelopeSuccess) IsKnown

type TokenVerifyResponseStatus

type TokenVerifyResponseStatus string

Status of the token.

const (
	TokenVerifyResponseStatusActive   TokenVerifyResponseStatus = "active"
	TokenVerifyResponseStatusDisabled TokenVerifyResponseStatus = "disabled"
	TokenVerifyResponseStatusExpired  TokenVerifyResponseStatus = "expired"
)

func (TokenVerifyResponseStatus) IsKnown

func (r TokenVerifyResponseStatus) IsKnown() bool

Jump to

Keyboard shortcuts

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