r2

package
v4.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: Apache-2.0 Imports: 15 Imported by: 2

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 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 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 SortDirectionAsc = shared.SortDirectionAsc

This is an alias to an internal value.

View Source
const SortDirectionDesc = shared.SortDirectionDesc

This is an alias to an internal value.

View Source
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly

This is an alias to an internal value.

View Source
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment

This is an alias to an internal value.

View Source
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled

This is an alias to an internal value.

View Source
const SubscriptionStateExpired = shared.SubscriptionStateExpired

This is an alias to an internal value.

View Source
const SubscriptionStateFailed = shared.SubscriptionStateFailed

This is an alias to an internal value.

View Source
const SubscriptionStatePaid = shared.SubscriptionStatePaid

This is an alias to an internal value.

View Source
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned

This is an alias to an internal value.

View Source
const SubscriptionStateTrial = shared.SubscriptionStateTrial

This is an alias to an internal value.

View Source
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow

This is an alias to an internal value.

View Source
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny

This is an alias to an internal value.

View Source
const TokenStatusActive = shared.TokenStatusActive

This is an alias to an internal value.

View Source
const TokenStatusDisabled = shared.TokenStatusDisabled

This is an alias to an internal value.

View Source
const TokenStatusExpired = shared.TokenStatusExpired

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

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

This is an alias to an internal type.

type AuditLogOwner

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type Bucket

type Bucket struct {
	// Creation timestamp
	CreationDate string `json:"creation_date"`
	// Location of the bucket
	Location BucketLocation `json:"location"`
	// Name of the bucket
	Name string `json:"name"`
	// Storage class for newly uploaded objects, unless specified otherwise.
	StorageClass BucketStorageClass `json:"storage_class"`
	JSON         bucketJSON         `json:"-"`
}

A single R2 bucket

func (*Bucket) UnmarshalJSON

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

type BucketCORSDeleteParams

type BucketCORSDeleteParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketCORSDeleteParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

type BucketCORSDeleteParamsCfR2Jurisdiction

type BucketCORSDeleteParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketCORSDeleteParamsCfR2JurisdictionDefault BucketCORSDeleteParamsCfR2Jurisdiction = "default"
	BucketCORSDeleteParamsCfR2JurisdictionEu      BucketCORSDeleteParamsCfR2Jurisdiction = "eu"
	BucketCORSDeleteParamsCfR2JurisdictionFedramp BucketCORSDeleteParamsCfR2Jurisdiction = "fedramp"
)

func (BucketCORSDeleteParamsCfR2Jurisdiction) IsKnown

type BucketCORSDeleteResponse

type BucketCORSDeleteResponse = interface{}

type BucketCORSDeleteResponseEnvelope

type BucketCORSDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo    `json:"errors,required"`
	Messages []string                 `json:"messages,required"`
	Result   BucketCORSDeleteResponse `json:"result,required"`
	// Whether the API call was successful
	Success BucketCORSDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketCORSDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*BucketCORSDeleteResponseEnvelope) UnmarshalJSON

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

type BucketCORSDeleteResponseEnvelopeSuccess

type BucketCORSDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketCORSDeleteResponseEnvelopeSuccessTrue BucketCORSDeleteResponseEnvelopeSuccess = true
)

func (BucketCORSDeleteResponseEnvelopeSuccess) IsKnown

type BucketCORSGetParams

type BucketCORSGetParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketCORSGetParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

type BucketCORSGetParamsCfR2Jurisdiction

type BucketCORSGetParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketCORSGetParamsCfR2JurisdictionDefault BucketCORSGetParamsCfR2Jurisdiction = "default"
	BucketCORSGetParamsCfR2JurisdictionEu      BucketCORSGetParamsCfR2Jurisdiction = "eu"
	BucketCORSGetParamsCfR2JurisdictionFedramp BucketCORSGetParamsCfR2Jurisdiction = "fedramp"
)

func (BucketCORSGetParamsCfR2Jurisdiction) IsKnown

type BucketCORSGetResponse

type BucketCORSGetResponse struct {
	Rules []BucketCORSGetResponseRule `json:"rules"`
	JSON  bucketCORSGetResponseJSON   `json:"-"`
}

func (*BucketCORSGetResponse) UnmarshalJSON

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

type BucketCORSGetResponseEnvelope

type BucketCORSGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []string              `json:"messages,required"`
	Result   BucketCORSGetResponse `json:"result,required"`
	// Whether the API call was successful
	Success BucketCORSGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketCORSGetResponseEnvelopeJSON    `json:"-"`
}

func (*BucketCORSGetResponseEnvelope) UnmarshalJSON

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

type BucketCORSGetResponseEnvelopeSuccess

type BucketCORSGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketCORSGetResponseEnvelopeSuccessTrue BucketCORSGetResponseEnvelopeSuccess = true
)

func (BucketCORSGetResponseEnvelopeSuccess) IsKnown

type BucketCORSGetResponseRule

type BucketCORSGetResponseRule struct {
	// Object specifying allowed origins, methods and headers for this CORS rule.
	Allowed BucketCORSGetResponseRulesAllowed `json:"allowed,required"`
	// Identifier for this rule
	ID string `json:"id"`
	// Specifies the headers that can be exposed back, and accessed by, the JavaScript
	// making the cross-origin request. If you need to access headers beyond the
	// safelisted response headers, such as Content-Encoding or cf-cache-status, you
	// must specify it here.
	ExposeHeaders []string `json:"exposeHeaders"`
	// Specifies the amount of time (in seconds) browsers are allowed to cache CORS
	// preflight responses. Browsers may limit this to 2 hours or less, even if the
	// maximum value (86400) is specified.
	MaxAgeSeconds float64                       `json:"maxAgeSeconds"`
	JSON          bucketCORSGetResponseRuleJSON `json:"-"`
}

func (*BucketCORSGetResponseRule) UnmarshalJSON

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

type BucketCORSGetResponseRulesAllowed

type BucketCORSGetResponseRulesAllowed struct {
	// Specifies the value for the Access-Control-Allow-Methods header R2 sets when
	// requesting objects in a bucket from a browser.
	Methods []BucketCORSGetResponseRulesAllowedMethod `json:"methods,required"`
	// Specifies the value for the Access-Control-Allow-Origin header R2 sets when
	// requesting objects in a bucket from a browser.
	Origins []string `json:"origins,required"`
	// Specifies the value for the Access-Control-Allow-Headers header R2 sets when
	// requesting objects in this bucket from a browser. Cross-origin requests that
	// include custom headers (e.g. x-user-id) should specify these headers as
	// AllowedHeaders.
	Headers []string                              `json:"headers"`
	JSON    bucketCORSGetResponseRulesAllowedJSON `json:"-"`
}

Object specifying allowed origins, methods and headers for this CORS rule.

func (*BucketCORSGetResponseRulesAllowed) UnmarshalJSON

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

type BucketCORSGetResponseRulesAllowedMethod

type BucketCORSGetResponseRulesAllowedMethod string
const (
	BucketCORSGetResponseRulesAllowedMethodGet    BucketCORSGetResponseRulesAllowedMethod = "GET"
	BucketCORSGetResponseRulesAllowedMethodPut    BucketCORSGetResponseRulesAllowedMethod = "PUT"
	BucketCORSGetResponseRulesAllowedMethodPost   BucketCORSGetResponseRulesAllowedMethod = "POST"
	BucketCORSGetResponseRulesAllowedMethodDelete BucketCORSGetResponseRulesAllowedMethod = "DELETE"
	BucketCORSGetResponseRulesAllowedMethodHead   BucketCORSGetResponseRulesAllowedMethod = "HEAD"
)

func (BucketCORSGetResponseRulesAllowedMethod) IsKnown

type BucketCORSService

type BucketCORSService struct {
	Options []option.RequestOption
}

BucketCORSService 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 NewBucketCORSService method instead.

func NewBucketCORSService

func NewBucketCORSService(opts ...option.RequestOption) (r *BucketCORSService)

NewBucketCORSService 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 (*BucketCORSService) Delete

func (r *BucketCORSService) Delete(ctx context.Context, bucketName string, params BucketCORSDeleteParams, opts ...option.RequestOption) (res *BucketCORSDeleteResponse, err error)

Delete the CORS policy for a bucket

func (*BucketCORSService) Get

func (r *BucketCORSService) Get(ctx context.Context, bucketName string, params BucketCORSGetParams, opts ...option.RequestOption) (res *BucketCORSGetResponse, err error)

Get the CORS policy for a bucket

func (*BucketCORSService) Update

func (r *BucketCORSService) Update(ctx context.Context, bucketName string, params BucketCORSUpdateParams, opts ...option.RequestOption) (res *BucketCORSUpdateResponse, err error)

Set the CORS policy for a bucket

type BucketCORSUpdateParams

type BucketCORSUpdateParams struct {
	// Account ID
	AccountID param.Field[string]                       `path:"account_id,required"`
	Rules     param.Field[[]BucketCORSUpdateParamsRule] `json:"rules"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketCORSUpdateParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

func (BucketCORSUpdateParams) MarshalJSON

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

type BucketCORSUpdateParamsCfR2Jurisdiction

type BucketCORSUpdateParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketCORSUpdateParamsCfR2JurisdictionDefault BucketCORSUpdateParamsCfR2Jurisdiction = "default"
	BucketCORSUpdateParamsCfR2JurisdictionEu      BucketCORSUpdateParamsCfR2Jurisdiction = "eu"
	BucketCORSUpdateParamsCfR2JurisdictionFedramp BucketCORSUpdateParamsCfR2Jurisdiction = "fedramp"
)

func (BucketCORSUpdateParamsCfR2Jurisdiction) IsKnown

type BucketCORSUpdateParamsRule

type BucketCORSUpdateParamsRule struct {
	// Object specifying allowed origins, methods and headers for this CORS rule.
	Allowed param.Field[BucketCORSUpdateParamsRulesAllowed] `json:"allowed,required"`
	// Identifier for this rule
	ID param.Field[string] `json:"id"`
	// Specifies the headers that can be exposed back, and accessed by, the JavaScript
	// making the cross-origin request. If you need to access headers beyond the
	// safelisted response headers, such as Content-Encoding or cf-cache-status, you
	// must specify it here.
	ExposeHeaders param.Field[[]string] `json:"exposeHeaders"`
	// Specifies the amount of time (in seconds) browsers are allowed to cache CORS
	// preflight responses. Browsers may limit this to 2 hours or less, even if the
	// maximum value (86400) is specified.
	MaxAgeSeconds param.Field[float64] `json:"maxAgeSeconds"`
}

func (BucketCORSUpdateParamsRule) MarshalJSON

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

type BucketCORSUpdateParamsRulesAllowed

type BucketCORSUpdateParamsRulesAllowed struct {
	// Specifies the value for the Access-Control-Allow-Methods header R2 sets when
	// requesting objects in a bucket from a browser.
	Methods param.Field[[]BucketCORSUpdateParamsRulesAllowedMethod] `json:"methods,required"`
	// Specifies the value for the Access-Control-Allow-Origin header R2 sets when
	// requesting objects in a bucket from a browser.
	Origins param.Field[[]string] `json:"origins,required"`
	// Specifies the value for the Access-Control-Allow-Headers header R2 sets when
	// requesting objects in this bucket from a browser. Cross-origin requests that
	// include custom headers (e.g. x-user-id) should specify these headers as
	// AllowedHeaders.
	Headers param.Field[[]string] `json:"headers"`
}

Object specifying allowed origins, methods and headers for this CORS rule.

func (BucketCORSUpdateParamsRulesAllowed) MarshalJSON

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

type BucketCORSUpdateParamsRulesAllowedMethod

type BucketCORSUpdateParamsRulesAllowedMethod string
const (
	BucketCORSUpdateParamsRulesAllowedMethodGet    BucketCORSUpdateParamsRulesAllowedMethod = "GET"
	BucketCORSUpdateParamsRulesAllowedMethodPut    BucketCORSUpdateParamsRulesAllowedMethod = "PUT"
	BucketCORSUpdateParamsRulesAllowedMethodPost   BucketCORSUpdateParamsRulesAllowedMethod = "POST"
	BucketCORSUpdateParamsRulesAllowedMethodDelete BucketCORSUpdateParamsRulesAllowedMethod = "DELETE"
	BucketCORSUpdateParamsRulesAllowedMethodHead   BucketCORSUpdateParamsRulesAllowedMethod = "HEAD"
)

func (BucketCORSUpdateParamsRulesAllowedMethod) IsKnown

type BucketCORSUpdateResponse

type BucketCORSUpdateResponse = interface{}

type BucketCORSUpdateResponseEnvelope

type BucketCORSUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo    `json:"errors,required"`
	Messages []string                 `json:"messages,required"`
	Result   BucketCORSUpdateResponse `json:"result,required"`
	// Whether the API call was successful
	Success BucketCORSUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketCORSUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*BucketCORSUpdateResponseEnvelope) UnmarshalJSON

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

type BucketCORSUpdateResponseEnvelopeSuccess

type BucketCORSUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketCORSUpdateResponseEnvelopeSuccessTrue BucketCORSUpdateResponseEnvelopeSuccess = true
)

func (BucketCORSUpdateResponseEnvelopeSuccess) IsKnown

type BucketDeleteParams

type BucketDeleteParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketDeleteParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

type BucketDeleteParamsCfR2Jurisdiction

type BucketDeleteParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketDeleteParamsCfR2JurisdictionDefault BucketDeleteParamsCfR2Jurisdiction = "default"
	BucketDeleteParamsCfR2JurisdictionEu      BucketDeleteParamsCfR2Jurisdiction = "eu"
	BucketDeleteParamsCfR2JurisdictionFedramp BucketDeleteParamsCfR2Jurisdiction = "fedramp"
)

func (BucketDeleteParamsCfR2Jurisdiction) IsKnown

type BucketDeleteResponse

type BucketDeleteResponse = interface{}

type BucketDeleteResponseEnvelope

type BucketDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []string              `json:"messages,required"`
	Result   BucketDeleteResponse  `json:"result,required"`
	// Whether the API call was successful
	Success BucketDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*BucketDeleteResponseEnvelope) UnmarshalJSON

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

type BucketDeleteResponseEnvelopeSuccess

type BucketDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketDeleteResponseEnvelopeSuccessTrue BucketDeleteResponseEnvelopeSuccess = true
)

func (BucketDeleteResponseEnvelopeSuccess) IsKnown

type BucketDomainCustomDeleteParams

type BucketDomainCustomDeleteParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketDomainCustomDeleteParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

type BucketDomainCustomDeleteParamsCfR2Jurisdiction

type BucketDomainCustomDeleteParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketDomainCustomDeleteParamsCfR2JurisdictionDefault BucketDomainCustomDeleteParamsCfR2Jurisdiction = "default"
	BucketDomainCustomDeleteParamsCfR2JurisdictionEu      BucketDomainCustomDeleteParamsCfR2Jurisdiction = "eu"
	BucketDomainCustomDeleteParamsCfR2JurisdictionFedramp BucketDomainCustomDeleteParamsCfR2Jurisdiction = "fedramp"
)

func (BucketDomainCustomDeleteParamsCfR2Jurisdiction) IsKnown

type BucketDomainCustomDeleteResponse

type BucketDomainCustomDeleteResponse struct {
	// Name of the removed custom domain
	Domain string                               `json:"domain,required"`
	JSON   bucketDomainCustomDeleteResponseJSON `json:"-"`
}

func (*BucketDomainCustomDeleteResponse) UnmarshalJSON

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

type BucketDomainCustomDeleteResponseEnvelope

type BucketDomainCustomDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo            `json:"errors,required"`
	Messages []string                         `json:"messages,required"`
	Result   BucketDomainCustomDeleteResponse `json:"result,required"`
	// Whether the API call was successful
	Success BucketDomainCustomDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketDomainCustomDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*BucketDomainCustomDeleteResponseEnvelope) UnmarshalJSON

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

type BucketDomainCustomDeleteResponseEnvelopeSuccess

type BucketDomainCustomDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketDomainCustomDeleteResponseEnvelopeSuccessTrue BucketDomainCustomDeleteResponseEnvelopeSuccess = true
)

func (BucketDomainCustomDeleteResponseEnvelopeSuccess) IsKnown

type BucketDomainCustomGetParams

type BucketDomainCustomGetParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketDomainCustomGetParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

type BucketDomainCustomGetParamsCfR2Jurisdiction

type BucketDomainCustomGetParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketDomainCustomGetParamsCfR2JurisdictionDefault BucketDomainCustomGetParamsCfR2Jurisdiction = "default"
	BucketDomainCustomGetParamsCfR2JurisdictionEu      BucketDomainCustomGetParamsCfR2Jurisdiction = "eu"
	BucketDomainCustomGetParamsCfR2JurisdictionFedramp BucketDomainCustomGetParamsCfR2Jurisdiction = "fedramp"
)

func (BucketDomainCustomGetParamsCfR2Jurisdiction) IsKnown

type BucketDomainCustomGetResponse

type BucketDomainCustomGetResponse struct {
	// Domain name of the custom domain to be added
	Domain string `json:"domain,required"`
	// Whether this bucket is publicly accessible at the specified custom domain
	Enabled bool                                `json:"enabled,required"`
	Status  BucketDomainCustomGetResponseStatus `json:"status,required"`
	// Minimum TLS Version the custom domain will accept for incoming connections. If
	// not set, defaults to 1.0.
	MinTLS BucketDomainCustomGetResponseMinTLS `json:"minTLS"`
	// Zone ID of the custom domain resides in
	ZoneID string `json:"zoneId"`
	// Zone that the custom domain resides in
	ZoneName string                            `json:"zoneName"`
	JSON     bucketDomainCustomGetResponseJSON `json:"-"`
}

func (*BucketDomainCustomGetResponse) UnmarshalJSON

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

type BucketDomainCustomGetResponseEnvelope

type BucketDomainCustomGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo         `json:"errors,required"`
	Messages []string                      `json:"messages,required"`
	Result   BucketDomainCustomGetResponse `json:"result,required"`
	// Whether the API call was successful
	Success BucketDomainCustomGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketDomainCustomGetResponseEnvelopeJSON    `json:"-"`
}

func (*BucketDomainCustomGetResponseEnvelope) UnmarshalJSON

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

type BucketDomainCustomGetResponseEnvelopeSuccess

type BucketDomainCustomGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketDomainCustomGetResponseEnvelopeSuccessTrue BucketDomainCustomGetResponseEnvelopeSuccess = true
)

func (BucketDomainCustomGetResponseEnvelopeSuccess) IsKnown

type BucketDomainCustomGetResponseMinTLS

type BucketDomainCustomGetResponseMinTLS string

Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.

const (
	BucketDomainCustomGetResponseMinTLS1_0 BucketDomainCustomGetResponseMinTLS = "1.0"
	BucketDomainCustomGetResponseMinTLS1_1 BucketDomainCustomGetResponseMinTLS = "1.1"
	BucketDomainCustomGetResponseMinTLS1_2 BucketDomainCustomGetResponseMinTLS = "1.2"
	BucketDomainCustomGetResponseMinTLS1_3 BucketDomainCustomGetResponseMinTLS = "1.3"
)

func (BucketDomainCustomGetResponseMinTLS) IsKnown

type BucketDomainCustomGetResponseStatus

type BucketDomainCustomGetResponseStatus struct {
	// Ownership status of the domain
	Ownership BucketDomainCustomGetResponseStatusOwnership `json:"ownership,required"`
	// SSL certificate status
	SSL  BucketDomainCustomGetResponseStatusSSL  `json:"ssl,required"`
	JSON bucketDomainCustomGetResponseStatusJSON `json:"-"`
}

func (*BucketDomainCustomGetResponseStatus) UnmarshalJSON

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

type BucketDomainCustomGetResponseStatusOwnership

type BucketDomainCustomGetResponseStatusOwnership string

Ownership status of the domain

const (
	BucketDomainCustomGetResponseStatusOwnershipPending     BucketDomainCustomGetResponseStatusOwnership = "pending"
	BucketDomainCustomGetResponseStatusOwnershipActive      BucketDomainCustomGetResponseStatusOwnership = "active"
	BucketDomainCustomGetResponseStatusOwnershipDeactivated BucketDomainCustomGetResponseStatusOwnership = "deactivated"
	BucketDomainCustomGetResponseStatusOwnershipBlocked     BucketDomainCustomGetResponseStatusOwnership = "blocked"
	BucketDomainCustomGetResponseStatusOwnershipError       BucketDomainCustomGetResponseStatusOwnership = "error"
	BucketDomainCustomGetResponseStatusOwnershipUnknown     BucketDomainCustomGetResponseStatusOwnership = "unknown"
)

func (BucketDomainCustomGetResponseStatusOwnership) IsKnown

type BucketDomainCustomGetResponseStatusSSL

type BucketDomainCustomGetResponseStatusSSL string

SSL certificate status

const (
	BucketDomainCustomGetResponseStatusSSLInitializing BucketDomainCustomGetResponseStatusSSL = "initializing"
	BucketDomainCustomGetResponseStatusSSLPending      BucketDomainCustomGetResponseStatusSSL = "pending"
	BucketDomainCustomGetResponseStatusSSLActive       BucketDomainCustomGetResponseStatusSSL = "active"
	BucketDomainCustomGetResponseStatusSSLDeactivated  BucketDomainCustomGetResponseStatusSSL = "deactivated"
	BucketDomainCustomGetResponseStatusSSLError        BucketDomainCustomGetResponseStatusSSL = "error"
	BucketDomainCustomGetResponseStatusSSLUnknown      BucketDomainCustomGetResponseStatusSSL = "unknown"
)

func (BucketDomainCustomGetResponseStatusSSL) IsKnown

type BucketDomainCustomListParams

type BucketDomainCustomListParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketDomainCustomListParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

type BucketDomainCustomListParamsCfR2Jurisdiction

type BucketDomainCustomListParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketDomainCustomListParamsCfR2JurisdictionDefault BucketDomainCustomListParamsCfR2Jurisdiction = "default"
	BucketDomainCustomListParamsCfR2JurisdictionEu      BucketDomainCustomListParamsCfR2Jurisdiction = "eu"
	BucketDomainCustomListParamsCfR2JurisdictionFedramp BucketDomainCustomListParamsCfR2Jurisdiction = "fedramp"
)

func (BucketDomainCustomListParamsCfR2Jurisdiction) IsKnown

type BucketDomainCustomListResponse

type BucketDomainCustomListResponse struct {
	Domains []BucketDomainCustomListResponseDomain `json:"domains,required"`
	JSON    bucketDomainCustomListResponseJSON     `json:"-"`
}

func (*BucketDomainCustomListResponse) UnmarshalJSON

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

type BucketDomainCustomListResponseDomain

type BucketDomainCustomListResponseDomain struct {
	// Domain name of the custom domain to be added
	Domain string `json:"domain,required"`
	// Whether this bucket is publicly accessible at the specified custom domain
	Enabled bool                                        `json:"enabled,required"`
	Status  BucketDomainCustomListResponseDomainsStatus `json:"status,required"`
	// Minimum TLS Version the custom domain will accept for incoming connections. If
	// not set, defaults to 1.0.
	MinTLS BucketDomainCustomListResponseDomainsMinTLS `json:"minTLS"`
	// Zone ID of the custom domain resides in
	ZoneID string `json:"zoneId"`
	// Zone that the custom domain resides in
	ZoneName string                                   `json:"zoneName"`
	JSON     bucketDomainCustomListResponseDomainJSON `json:"-"`
}

func (*BucketDomainCustomListResponseDomain) UnmarshalJSON

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

type BucketDomainCustomListResponseDomainsMinTLS

type BucketDomainCustomListResponseDomainsMinTLS string

Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.

const (
	BucketDomainCustomListResponseDomainsMinTLS1_0 BucketDomainCustomListResponseDomainsMinTLS = "1.0"
	BucketDomainCustomListResponseDomainsMinTLS1_1 BucketDomainCustomListResponseDomainsMinTLS = "1.1"
	BucketDomainCustomListResponseDomainsMinTLS1_2 BucketDomainCustomListResponseDomainsMinTLS = "1.2"
	BucketDomainCustomListResponseDomainsMinTLS1_3 BucketDomainCustomListResponseDomainsMinTLS = "1.3"
)

func (BucketDomainCustomListResponseDomainsMinTLS) IsKnown

type BucketDomainCustomListResponseDomainsStatus

type BucketDomainCustomListResponseDomainsStatus struct {
	// Ownership status of the domain
	Ownership BucketDomainCustomListResponseDomainsStatusOwnership `json:"ownership,required"`
	// SSL certificate status
	SSL  BucketDomainCustomListResponseDomainsStatusSSL  `json:"ssl,required"`
	JSON bucketDomainCustomListResponseDomainsStatusJSON `json:"-"`
}

func (*BucketDomainCustomListResponseDomainsStatus) UnmarshalJSON

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

type BucketDomainCustomListResponseDomainsStatusOwnership

type BucketDomainCustomListResponseDomainsStatusOwnership string

Ownership status of the domain

const (
	BucketDomainCustomListResponseDomainsStatusOwnershipPending     BucketDomainCustomListResponseDomainsStatusOwnership = "pending"
	BucketDomainCustomListResponseDomainsStatusOwnershipActive      BucketDomainCustomListResponseDomainsStatusOwnership = "active"
	BucketDomainCustomListResponseDomainsStatusOwnershipDeactivated BucketDomainCustomListResponseDomainsStatusOwnership = "deactivated"
	BucketDomainCustomListResponseDomainsStatusOwnershipBlocked     BucketDomainCustomListResponseDomainsStatusOwnership = "blocked"
	BucketDomainCustomListResponseDomainsStatusOwnershipError       BucketDomainCustomListResponseDomainsStatusOwnership = "error"
	BucketDomainCustomListResponseDomainsStatusOwnershipUnknown     BucketDomainCustomListResponseDomainsStatusOwnership = "unknown"
)

func (BucketDomainCustomListResponseDomainsStatusOwnership) IsKnown

type BucketDomainCustomListResponseDomainsStatusSSL

type BucketDomainCustomListResponseDomainsStatusSSL string

SSL certificate status

const (
	BucketDomainCustomListResponseDomainsStatusSSLInitializing BucketDomainCustomListResponseDomainsStatusSSL = "initializing"
	BucketDomainCustomListResponseDomainsStatusSSLPending      BucketDomainCustomListResponseDomainsStatusSSL = "pending"
	BucketDomainCustomListResponseDomainsStatusSSLActive       BucketDomainCustomListResponseDomainsStatusSSL = "active"
	BucketDomainCustomListResponseDomainsStatusSSLDeactivated  BucketDomainCustomListResponseDomainsStatusSSL = "deactivated"
	BucketDomainCustomListResponseDomainsStatusSSLError        BucketDomainCustomListResponseDomainsStatusSSL = "error"
	BucketDomainCustomListResponseDomainsStatusSSLUnknown      BucketDomainCustomListResponseDomainsStatusSSL = "unknown"
)

func (BucketDomainCustomListResponseDomainsStatusSSL) IsKnown

type BucketDomainCustomListResponseEnvelope

type BucketDomainCustomListResponseEnvelope struct {
	Errors   []shared.ResponseInfo          `json:"errors,required"`
	Messages []string                       `json:"messages,required"`
	Result   BucketDomainCustomListResponse `json:"result,required"`
	// Whether the API call was successful
	Success BucketDomainCustomListResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketDomainCustomListResponseEnvelopeJSON    `json:"-"`
}

func (*BucketDomainCustomListResponseEnvelope) UnmarshalJSON

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

type BucketDomainCustomListResponseEnvelopeSuccess

type BucketDomainCustomListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketDomainCustomListResponseEnvelopeSuccessTrue BucketDomainCustomListResponseEnvelopeSuccess = true
)

func (BucketDomainCustomListResponseEnvelopeSuccess) IsKnown

type BucketDomainCustomNewParams

type BucketDomainCustomNewParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// Name of the custom domain to be added
	Domain param.Field[string] `json:"domain,required"`
	// Whether to enable public bucket access at the custom domain. If undefined, the
	// domain will be enabled.
	Enabled param.Field[bool] `json:"enabled,required"`
	// Zone ID of the custom domain
	ZoneID param.Field[string] `json:"zoneId,required"`
	// Minimum TLS Version the custom domain will accept for incoming connections. If
	// not set, defaults to 1.0.
	MinTLS param.Field[BucketDomainCustomNewParamsMinTLS] `json:"minTLS"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketDomainCustomNewParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

func (BucketDomainCustomNewParams) MarshalJSON

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

type BucketDomainCustomNewParamsCfR2Jurisdiction

type BucketDomainCustomNewParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketDomainCustomNewParamsCfR2JurisdictionDefault BucketDomainCustomNewParamsCfR2Jurisdiction = "default"
	BucketDomainCustomNewParamsCfR2JurisdictionEu      BucketDomainCustomNewParamsCfR2Jurisdiction = "eu"
	BucketDomainCustomNewParamsCfR2JurisdictionFedramp BucketDomainCustomNewParamsCfR2Jurisdiction = "fedramp"
)

func (BucketDomainCustomNewParamsCfR2Jurisdiction) IsKnown

type BucketDomainCustomNewParamsMinTLS

type BucketDomainCustomNewParamsMinTLS string

Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.

const (
	BucketDomainCustomNewParamsMinTLS1_0 BucketDomainCustomNewParamsMinTLS = "1.0"
	BucketDomainCustomNewParamsMinTLS1_1 BucketDomainCustomNewParamsMinTLS = "1.1"
	BucketDomainCustomNewParamsMinTLS1_2 BucketDomainCustomNewParamsMinTLS = "1.2"
	BucketDomainCustomNewParamsMinTLS1_3 BucketDomainCustomNewParamsMinTLS = "1.3"
)

func (BucketDomainCustomNewParamsMinTLS) IsKnown

type BucketDomainCustomNewResponse

type BucketDomainCustomNewResponse struct {
	// Domain name of the affected custom domain
	Domain string `json:"domain,required"`
	// Whether this bucket is publicly accessible at the specified custom domain
	Enabled bool `json:"enabled,required"`
	// Minimum TLS Version the custom domain will accept for incoming connections. If
	// not set, defaults to 1.0.
	MinTLS BucketDomainCustomNewResponseMinTLS `json:"minTLS"`
	JSON   bucketDomainCustomNewResponseJSON   `json:"-"`
}

func (*BucketDomainCustomNewResponse) UnmarshalJSON

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

type BucketDomainCustomNewResponseEnvelope

type BucketDomainCustomNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo         `json:"errors,required"`
	Messages []string                      `json:"messages,required"`
	Result   BucketDomainCustomNewResponse `json:"result,required"`
	// Whether the API call was successful
	Success BucketDomainCustomNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketDomainCustomNewResponseEnvelopeJSON    `json:"-"`
}

func (*BucketDomainCustomNewResponseEnvelope) UnmarshalJSON

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

type BucketDomainCustomNewResponseEnvelopeSuccess

type BucketDomainCustomNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketDomainCustomNewResponseEnvelopeSuccessTrue BucketDomainCustomNewResponseEnvelopeSuccess = true
)

func (BucketDomainCustomNewResponseEnvelopeSuccess) IsKnown

type BucketDomainCustomNewResponseMinTLS

type BucketDomainCustomNewResponseMinTLS string

Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.

const (
	BucketDomainCustomNewResponseMinTLS1_0 BucketDomainCustomNewResponseMinTLS = "1.0"
	BucketDomainCustomNewResponseMinTLS1_1 BucketDomainCustomNewResponseMinTLS = "1.1"
	BucketDomainCustomNewResponseMinTLS1_2 BucketDomainCustomNewResponseMinTLS = "1.2"
	BucketDomainCustomNewResponseMinTLS1_3 BucketDomainCustomNewResponseMinTLS = "1.3"
)

func (BucketDomainCustomNewResponseMinTLS) IsKnown

type BucketDomainCustomService

type BucketDomainCustomService struct {
	Options []option.RequestOption
}

BucketDomainCustomService 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 NewBucketDomainCustomService method instead.

func NewBucketDomainCustomService

func NewBucketDomainCustomService(opts ...option.RequestOption) (r *BucketDomainCustomService)

NewBucketDomainCustomService 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 (*BucketDomainCustomService) Delete

Remove custom domain registration from an existing R2 bucket

func (*BucketDomainCustomService) Get

Get the configuration for a custom domain on an existing R2 bucket.

func (*BucketDomainCustomService) List

Gets a list of all custom domains registered with an existing R2 bucket.

func (*BucketDomainCustomService) New

Register a new custom domain for an existing R2 bucket.

func (*BucketDomainCustomService) Update

Edit the configuration for a custom domain on an existing R2 bucket.

type BucketDomainCustomUpdateParams

type BucketDomainCustomUpdateParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// Whether to enable public bucket access at the specified custom domain
	Enabled param.Field[bool] `json:"enabled"`
	// Minimum TLS Version the custom domain will accept for incoming connections. If
	// not set, defaults to previous value.
	MinTLS param.Field[BucketDomainCustomUpdateParamsMinTLS] `json:"minTLS"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketDomainCustomUpdateParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

func (BucketDomainCustomUpdateParams) MarshalJSON

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

type BucketDomainCustomUpdateParamsCfR2Jurisdiction

type BucketDomainCustomUpdateParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketDomainCustomUpdateParamsCfR2JurisdictionDefault BucketDomainCustomUpdateParamsCfR2Jurisdiction = "default"
	BucketDomainCustomUpdateParamsCfR2JurisdictionEu      BucketDomainCustomUpdateParamsCfR2Jurisdiction = "eu"
	BucketDomainCustomUpdateParamsCfR2JurisdictionFedramp BucketDomainCustomUpdateParamsCfR2Jurisdiction = "fedramp"
)

func (BucketDomainCustomUpdateParamsCfR2Jurisdiction) IsKnown

type BucketDomainCustomUpdateParamsMinTLS

type BucketDomainCustomUpdateParamsMinTLS string

Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to previous value.

const (
	BucketDomainCustomUpdateParamsMinTLS1_0 BucketDomainCustomUpdateParamsMinTLS = "1.0"
	BucketDomainCustomUpdateParamsMinTLS1_1 BucketDomainCustomUpdateParamsMinTLS = "1.1"
	BucketDomainCustomUpdateParamsMinTLS1_2 BucketDomainCustomUpdateParamsMinTLS = "1.2"
	BucketDomainCustomUpdateParamsMinTLS1_3 BucketDomainCustomUpdateParamsMinTLS = "1.3"
)

func (BucketDomainCustomUpdateParamsMinTLS) IsKnown

type BucketDomainCustomUpdateResponse

type BucketDomainCustomUpdateResponse struct {
	// Domain name of the affected custom domain
	Domain string `json:"domain,required"`
	// Whether this bucket is publicly accessible at the specified custom domain
	Enabled bool `json:"enabled"`
	// Minimum TLS Version the custom domain will accept for incoming connections. If
	// not set, defaults to 1.0.
	MinTLS BucketDomainCustomUpdateResponseMinTLS `json:"minTLS"`
	JSON   bucketDomainCustomUpdateResponseJSON   `json:"-"`
}

func (*BucketDomainCustomUpdateResponse) UnmarshalJSON

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

type BucketDomainCustomUpdateResponseEnvelope

type BucketDomainCustomUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo            `json:"errors,required"`
	Messages []string                         `json:"messages,required"`
	Result   BucketDomainCustomUpdateResponse `json:"result,required"`
	// Whether the API call was successful
	Success BucketDomainCustomUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketDomainCustomUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*BucketDomainCustomUpdateResponseEnvelope) UnmarshalJSON

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

type BucketDomainCustomUpdateResponseEnvelopeSuccess

type BucketDomainCustomUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketDomainCustomUpdateResponseEnvelopeSuccessTrue BucketDomainCustomUpdateResponseEnvelopeSuccess = true
)

func (BucketDomainCustomUpdateResponseEnvelopeSuccess) IsKnown

type BucketDomainCustomUpdateResponseMinTLS

type BucketDomainCustomUpdateResponseMinTLS string

Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.

const (
	BucketDomainCustomUpdateResponseMinTLS1_0 BucketDomainCustomUpdateResponseMinTLS = "1.0"
	BucketDomainCustomUpdateResponseMinTLS1_1 BucketDomainCustomUpdateResponseMinTLS = "1.1"
	BucketDomainCustomUpdateResponseMinTLS1_2 BucketDomainCustomUpdateResponseMinTLS = "1.2"
	BucketDomainCustomUpdateResponseMinTLS1_3 BucketDomainCustomUpdateResponseMinTLS = "1.3"
)

func (BucketDomainCustomUpdateResponseMinTLS) IsKnown

type BucketDomainManagedListParams

type BucketDomainManagedListParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketDomainManagedListParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

type BucketDomainManagedListParamsCfR2Jurisdiction

type BucketDomainManagedListParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketDomainManagedListParamsCfR2JurisdictionDefault BucketDomainManagedListParamsCfR2Jurisdiction = "default"
	BucketDomainManagedListParamsCfR2JurisdictionEu      BucketDomainManagedListParamsCfR2Jurisdiction = "eu"
	BucketDomainManagedListParamsCfR2JurisdictionFedramp BucketDomainManagedListParamsCfR2Jurisdiction = "fedramp"
)

func (BucketDomainManagedListParamsCfR2Jurisdiction) IsKnown

type BucketDomainManagedListResponse

type BucketDomainManagedListResponse struct {
	// Bucket ID
	BucketID string `json:"bucketId,required"`
	// Domain name of the bucket's r2.dev domain
	Domain string `json:"domain,required"`
	// Whether this bucket is publicly accessible at the r2.dev domain
	Enabled bool                                `json:"enabled,required"`
	JSON    bucketDomainManagedListResponseJSON `json:"-"`
}

func (*BucketDomainManagedListResponse) UnmarshalJSON

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

type BucketDomainManagedListResponseEnvelope

type BucketDomainManagedListResponseEnvelope struct {
	Errors   []shared.ResponseInfo           `json:"errors,required"`
	Messages []string                        `json:"messages,required"`
	Result   BucketDomainManagedListResponse `json:"result,required"`
	// Whether the API call was successful
	Success BucketDomainManagedListResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketDomainManagedListResponseEnvelopeJSON    `json:"-"`
}

func (*BucketDomainManagedListResponseEnvelope) UnmarshalJSON

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

type BucketDomainManagedListResponseEnvelopeSuccess

type BucketDomainManagedListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketDomainManagedListResponseEnvelopeSuccessTrue BucketDomainManagedListResponseEnvelopeSuccess = true
)

func (BucketDomainManagedListResponseEnvelopeSuccess) IsKnown

type BucketDomainManagedService

type BucketDomainManagedService struct {
	Options []option.RequestOption
}

BucketDomainManagedService 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 NewBucketDomainManagedService method instead.

func NewBucketDomainManagedService

func NewBucketDomainManagedService(opts ...option.RequestOption) (r *BucketDomainManagedService)

NewBucketDomainManagedService 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 (*BucketDomainManagedService) List

Gets state of public access over the bucket's R2-managed (r2.dev) domain.

func (*BucketDomainManagedService) Update

Updates state of public access over the bucket's R2-managed (r2.dev) domain.

type BucketDomainManagedUpdateParams

type BucketDomainManagedUpdateParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// Whether to enable public bucket access at the r2.dev domain
	Enabled param.Field[bool] `json:"enabled,required"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketDomainManagedUpdateParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

func (BucketDomainManagedUpdateParams) MarshalJSON

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

type BucketDomainManagedUpdateParamsCfR2Jurisdiction

type BucketDomainManagedUpdateParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketDomainManagedUpdateParamsCfR2JurisdictionDefault BucketDomainManagedUpdateParamsCfR2Jurisdiction = "default"
	BucketDomainManagedUpdateParamsCfR2JurisdictionEu      BucketDomainManagedUpdateParamsCfR2Jurisdiction = "eu"
	BucketDomainManagedUpdateParamsCfR2JurisdictionFedramp BucketDomainManagedUpdateParamsCfR2Jurisdiction = "fedramp"
)

func (BucketDomainManagedUpdateParamsCfR2Jurisdiction) IsKnown

type BucketDomainManagedUpdateResponse

type BucketDomainManagedUpdateResponse struct {
	// Bucket ID
	BucketID string `json:"bucketId,required"`
	// Domain name of the bucket's r2.dev domain
	Domain string `json:"domain,required"`
	// Whether this bucket is publicly accessible at the r2.dev domain
	Enabled bool                                  `json:"enabled,required"`
	JSON    bucketDomainManagedUpdateResponseJSON `json:"-"`
}

func (*BucketDomainManagedUpdateResponse) UnmarshalJSON

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

type BucketDomainManagedUpdateResponseEnvelope

type BucketDomainManagedUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo             `json:"errors,required"`
	Messages []string                          `json:"messages,required"`
	Result   BucketDomainManagedUpdateResponse `json:"result,required"`
	// Whether the API call was successful
	Success BucketDomainManagedUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketDomainManagedUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*BucketDomainManagedUpdateResponseEnvelope) UnmarshalJSON

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

type BucketDomainManagedUpdateResponseEnvelopeSuccess

type BucketDomainManagedUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketDomainManagedUpdateResponseEnvelopeSuccessTrue BucketDomainManagedUpdateResponseEnvelopeSuccess = true
)

func (BucketDomainManagedUpdateResponseEnvelopeSuccess) IsKnown

type BucketDomainService

type BucketDomainService struct {
	Options []option.RequestOption
	Custom  *BucketDomainCustomService
	Managed *BucketDomainManagedService
}

BucketDomainService 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 NewBucketDomainService method instead.

func NewBucketDomainService

func NewBucketDomainService(opts ...option.RequestOption) (r *BucketDomainService)

NewBucketDomainService 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 BucketEventNotificationConfigurationGetParams

type BucketEventNotificationConfigurationGetParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketEventNotificationConfigurationGetParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

type BucketEventNotificationConfigurationGetParamsCfR2Jurisdiction

type BucketEventNotificationConfigurationGetParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketEventNotificationConfigurationGetParamsCfR2JurisdictionDefault BucketEventNotificationConfigurationGetParamsCfR2Jurisdiction = "default"
	BucketEventNotificationConfigurationGetParamsCfR2JurisdictionEu      BucketEventNotificationConfigurationGetParamsCfR2Jurisdiction = "eu"
	BucketEventNotificationConfigurationGetParamsCfR2JurisdictionFedramp BucketEventNotificationConfigurationGetParamsCfR2Jurisdiction = "fedramp"
)

func (BucketEventNotificationConfigurationGetParamsCfR2Jurisdiction) IsKnown

type BucketEventNotificationConfigurationGetResponse

type BucketEventNotificationConfigurationGetResponse struct {
	// Name of the bucket.
	BucketName string `json:"bucketName"`
	// List of queues associated with the bucket.
	Queues []BucketEventNotificationConfigurationGetResponseQueue `json:"queues"`
	JSON   bucketEventNotificationConfigurationGetResponseJSON    `json:"-"`
}

func (*BucketEventNotificationConfigurationGetResponse) UnmarshalJSON

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

type BucketEventNotificationConfigurationGetResponseEnvelope

type BucketEventNotificationConfigurationGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo                           `json:"errors,required"`
	Messages []string                                        `json:"messages,required"`
	Result   BucketEventNotificationConfigurationGetResponse `json:"result,required"`
	// Whether the API call was successful
	Success BucketEventNotificationConfigurationGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketEventNotificationConfigurationGetResponseEnvelopeJSON    `json:"-"`
}

func (*BucketEventNotificationConfigurationGetResponseEnvelope) UnmarshalJSON

type BucketEventNotificationConfigurationGetResponseEnvelopeSuccess

type BucketEventNotificationConfigurationGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketEventNotificationConfigurationGetResponseEnvelopeSuccessTrue BucketEventNotificationConfigurationGetResponseEnvelopeSuccess = true
)

func (BucketEventNotificationConfigurationGetResponseEnvelopeSuccess) IsKnown

type BucketEventNotificationConfigurationGetResponseQueue

type BucketEventNotificationConfigurationGetResponseQueue struct {
	// Queue ID
	QueueID string `json:"queueId"`
	// Name of the queue
	QueueName string                                                      `json:"queueName"`
	Rules     []BucketEventNotificationConfigurationGetResponseQueuesRule `json:"rules"`
	JSON      bucketEventNotificationConfigurationGetResponseQueueJSON    `json:"-"`
}

func (*BucketEventNotificationConfigurationGetResponseQueue) UnmarshalJSON

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

type BucketEventNotificationConfigurationGetResponseQueuesRule

type BucketEventNotificationConfigurationGetResponseQueuesRule struct {
	// Array of R2 object actions that will trigger notifications
	Actions []BucketEventNotificationConfigurationGetResponseQueuesRulesAction `json:"actions,required"`
	// Timestamp when the rule was created
	CreatedAt string `json:"createdAt"`
	// A description that can be used to identify the event notification rule after
	// creation
	Description string `json:"description"`
	// Notifications will be sent only for objects with this prefix
	Prefix string `json:"prefix"`
	// Rule ID
	RuleID string `json:"ruleId"`
	// Notifications will be sent only for objects with this suffix
	Suffix string                                                        `json:"suffix"`
	JSON   bucketEventNotificationConfigurationGetResponseQueuesRuleJSON `json:"-"`
}

func (*BucketEventNotificationConfigurationGetResponseQueuesRule) UnmarshalJSON

type BucketEventNotificationConfigurationGetResponseQueuesRulesAction

type BucketEventNotificationConfigurationGetResponseQueuesRulesAction string
const (
	BucketEventNotificationConfigurationGetResponseQueuesRulesActionPutObject               BucketEventNotificationConfigurationGetResponseQueuesRulesAction = "PutObject"
	BucketEventNotificationConfigurationGetResponseQueuesRulesActionCopyObject              BucketEventNotificationConfigurationGetResponseQueuesRulesAction = "CopyObject"
	BucketEventNotificationConfigurationGetResponseQueuesRulesActionDeleteObject            BucketEventNotificationConfigurationGetResponseQueuesRulesAction = "DeleteObject"
	BucketEventNotificationConfigurationGetResponseQueuesRulesActionCompleteMultipartUpload BucketEventNotificationConfigurationGetResponseQueuesRulesAction = "CompleteMultipartUpload"
	BucketEventNotificationConfigurationGetResponseQueuesRulesActionLifecycleDeletion       BucketEventNotificationConfigurationGetResponseQueuesRulesAction = "LifecycleDeletion"
)

func (BucketEventNotificationConfigurationGetResponseQueuesRulesAction) IsKnown

type BucketEventNotificationConfigurationQueueDeleteParams

type BucketEventNotificationConfigurationQueueDeleteParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketEventNotificationConfigurationQueueDeleteParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

type BucketEventNotificationConfigurationQueueDeleteParamsCfR2Jurisdiction

type BucketEventNotificationConfigurationQueueDeleteParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketEventNotificationConfigurationQueueDeleteParamsCfR2JurisdictionDefault BucketEventNotificationConfigurationQueueDeleteParamsCfR2Jurisdiction = "default"
	BucketEventNotificationConfigurationQueueDeleteParamsCfR2JurisdictionEu      BucketEventNotificationConfigurationQueueDeleteParamsCfR2Jurisdiction = "eu"
	BucketEventNotificationConfigurationQueueDeleteParamsCfR2JurisdictionFedramp BucketEventNotificationConfigurationQueueDeleteParamsCfR2Jurisdiction = "fedramp"
)

func (BucketEventNotificationConfigurationQueueDeleteParamsCfR2Jurisdiction) IsKnown

type BucketEventNotificationConfigurationQueueDeleteResponse

type BucketEventNotificationConfigurationQueueDeleteResponse = interface{}

type BucketEventNotificationConfigurationQueueDeleteResponseEnvelope

type BucketEventNotificationConfigurationQueueDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo                                   `json:"errors,required"`
	Messages []string                                                `json:"messages,required"`
	Result   BucketEventNotificationConfigurationQueueDeleteResponse `json:"result,required"`
	// Whether the API call was successful
	Success BucketEventNotificationConfigurationQueueDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketEventNotificationConfigurationQueueDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*BucketEventNotificationConfigurationQueueDeleteResponseEnvelope) UnmarshalJSON

type BucketEventNotificationConfigurationQueueDeleteResponseEnvelopeSuccess

type BucketEventNotificationConfigurationQueueDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketEventNotificationConfigurationQueueDeleteResponseEnvelopeSuccessTrue BucketEventNotificationConfigurationQueueDeleteResponseEnvelopeSuccess = true
)

func (BucketEventNotificationConfigurationQueueDeleteResponseEnvelopeSuccess) IsKnown

type BucketEventNotificationConfigurationQueueService

type BucketEventNotificationConfigurationQueueService struct {
	Options []option.RequestOption
}

BucketEventNotificationConfigurationQueueService 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 NewBucketEventNotificationConfigurationQueueService method instead.

func NewBucketEventNotificationConfigurationQueueService

func NewBucketEventNotificationConfigurationQueueService(opts ...option.RequestOption) (r *BucketEventNotificationConfigurationQueueService)

NewBucketEventNotificationConfigurationQueueService 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 (*BucketEventNotificationConfigurationQueueService) Delete

Delete an event notification rule. **If no body is provided, all rules for specified queue will be deleted**.

func (*BucketEventNotificationConfigurationQueueService) Update

Create event notification rule.

type BucketEventNotificationConfigurationQueueUpdateParams

type BucketEventNotificationConfigurationQueueUpdateParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// Array of rules to drive notifications
	Rules param.Field[[]BucketEventNotificationConfigurationQueueUpdateParamsRule] `json:"rules"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketEventNotificationConfigurationQueueUpdateParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

func (BucketEventNotificationConfigurationQueueUpdateParams) MarshalJSON

type BucketEventNotificationConfigurationQueueUpdateParamsCfR2Jurisdiction

type BucketEventNotificationConfigurationQueueUpdateParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketEventNotificationConfigurationQueueUpdateParamsCfR2JurisdictionDefault BucketEventNotificationConfigurationQueueUpdateParamsCfR2Jurisdiction = "default"
	BucketEventNotificationConfigurationQueueUpdateParamsCfR2JurisdictionEu      BucketEventNotificationConfigurationQueueUpdateParamsCfR2Jurisdiction = "eu"
	BucketEventNotificationConfigurationQueueUpdateParamsCfR2JurisdictionFedramp BucketEventNotificationConfigurationQueueUpdateParamsCfR2Jurisdiction = "fedramp"
)

func (BucketEventNotificationConfigurationQueueUpdateParamsCfR2Jurisdiction) IsKnown

type BucketEventNotificationConfigurationQueueUpdateParamsRule

type BucketEventNotificationConfigurationQueueUpdateParamsRule struct {
	// Array of R2 object actions that will trigger notifications
	Actions param.Field[[]BucketEventNotificationConfigurationQueueUpdateParamsRulesAction] `json:"actions,required"`
	// A description that can be used to identify the event notification rule after
	// creation
	Description param.Field[string] `json:"description"`
	// Notifications will be sent only for objects with this prefix
	Prefix param.Field[string] `json:"prefix"`
	// Notifications will be sent only for objects with this suffix
	Suffix param.Field[string] `json:"suffix"`
}

func (BucketEventNotificationConfigurationQueueUpdateParamsRule) MarshalJSON

type BucketEventNotificationConfigurationQueueUpdateParamsRulesAction

type BucketEventNotificationConfigurationQueueUpdateParamsRulesAction string
const (
	BucketEventNotificationConfigurationQueueUpdateParamsRulesActionPutObject               BucketEventNotificationConfigurationQueueUpdateParamsRulesAction = "PutObject"
	BucketEventNotificationConfigurationQueueUpdateParamsRulesActionCopyObject              BucketEventNotificationConfigurationQueueUpdateParamsRulesAction = "CopyObject"
	BucketEventNotificationConfigurationQueueUpdateParamsRulesActionDeleteObject            BucketEventNotificationConfigurationQueueUpdateParamsRulesAction = "DeleteObject"
	BucketEventNotificationConfigurationQueueUpdateParamsRulesActionCompleteMultipartUpload BucketEventNotificationConfigurationQueueUpdateParamsRulesAction = "CompleteMultipartUpload"
	BucketEventNotificationConfigurationQueueUpdateParamsRulesActionLifecycleDeletion       BucketEventNotificationConfigurationQueueUpdateParamsRulesAction = "LifecycleDeletion"
)

func (BucketEventNotificationConfigurationQueueUpdateParamsRulesAction) IsKnown

type BucketEventNotificationConfigurationQueueUpdateResponse

type BucketEventNotificationConfigurationQueueUpdateResponse = interface{}

type BucketEventNotificationConfigurationQueueUpdateResponseEnvelope

type BucketEventNotificationConfigurationQueueUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo                                   `json:"errors,required"`
	Messages []string                                                `json:"messages,required"`
	Result   BucketEventNotificationConfigurationQueueUpdateResponse `json:"result,required"`
	// Whether the API call was successful
	Success BucketEventNotificationConfigurationQueueUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketEventNotificationConfigurationQueueUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*BucketEventNotificationConfigurationQueueUpdateResponseEnvelope) UnmarshalJSON

type BucketEventNotificationConfigurationQueueUpdateResponseEnvelopeSuccess

type BucketEventNotificationConfigurationQueueUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketEventNotificationConfigurationQueueUpdateResponseEnvelopeSuccessTrue BucketEventNotificationConfigurationQueueUpdateResponseEnvelopeSuccess = true
)

func (BucketEventNotificationConfigurationQueueUpdateResponseEnvelopeSuccess) IsKnown

type BucketEventNotificationConfigurationService

type BucketEventNotificationConfigurationService struct {
	Options []option.RequestOption
	Queues  *BucketEventNotificationConfigurationQueueService
}

BucketEventNotificationConfigurationService 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 NewBucketEventNotificationConfigurationService method instead.

func NewBucketEventNotificationConfigurationService

func NewBucketEventNotificationConfigurationService(opts ...option.RequestOption) (r *BucketEventNotificationConfigurationService)

NewBucketEventNotificationConfigurationService 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 (*BucketEventNotificationConfigurationService) Get

List all event notification rules for a bucket.

type BucketEventNotificationService

type BucketEventNotificationService struct {
	Options       []option.RequestOption
	Configuration *BucketEventNotificationConfigurationService
}

BucketEventNotificationService 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 NewBucketEventNotificationService method instead.

func NewBucketEventNotificationService

func NewBucketEventNotificationService(opts ...option.RequestOption) (r *BucketEventNotificationService)

NewBucketEventNotificationService 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 BucketGetParams

type BucketGetParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketGetParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

type BucketGetParamsCfR2Jurisdiction

type BucketGetParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketGetParamsCfR2JurisdictionDefault BucketGetParamsCfR2Jurisdiction = "default"
	BucketGetParamsCfR2JurisdictionEu      BucketGetParamsCfR2Jurisdiction = "eu"
	BucketGetParamsCfR2JurisdictionFedramp BucketGetParamsCfR2Jurisdiction = "fedramp"
)

func (BucketGetParamsCfR2Jurisdiction) IsKnown

type BucketGetResponseEnvelope

type BucketGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []string              `json:"messages,required"`
	// A single R2 bucket
	Result Bucket `json:"result,required"`
	// Whether the API call was successful
	Success BucketGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketGetResponseEnvelopeJSON    `json:"-"`
}

func (*BucketGetResponseEnvelope) UnmarshalJSON

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

type BucketGetResponseEnvelopeSuccess

type BucketGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketGetResponseEnvelopeSuccessTrue BucketGetResponseEnvelopeSuccess = true
)

func (BucketGetResponseEnvelopeSuccess) IsKnown

type BucketLifecycleGetParams

type BucketLifecycleGetParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketLifecycleGetParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

type BucketLifecycleGetParamsCfR2Jurisdiction

type BucketLifecycleGetParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketLifecycleGetParamsCfR2JurisdictionDefault BucketLifecycleGetParamsCfR2Jurisdiction = "default"
	BucketLifecycleGetParamsCfR2JurisdictionEu      BucketLifecycleGetParamsCfR2Jurisdiction = "eu"
	BucketLifecycleGetParamsCfR2JurisdictionFedramp BucketLifecycleGetParamsCfR2Jurisdiction = "fedramp"
)

func (BucketLifecycleGetParamsCfR2Jurisdiction) IsKnown

type BucketLifecycleGetResponse

type BucketLifecycleGetResponse struct {
	Rules []BucketLifecycleGetResponseRule `json:"rules"`
	JSON  bucketLifecycleGetResponseJSON   `json:"-"`
}

func (*BucketLifecycleGetResponse) UnmarshalJSON

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

type BucketLifecycleGetResponseEnvelope

type BucketLifecycleGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo      `json:"errors,required"`
	Messages []string                   `json:"messages,required"`
	Result   BucketLifecycleGetResponse `json:"result,required"`
	// Whether the API call was successful
	Success BucketLifecycleGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketLifecycleGetResponseEnvelopeJSON    `json:"-"`
}

func (*BucketLifecycleGetResponseEnvelope) UnmarshalJSON

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

type BucketLifecycleGetResponseEnvelopeSuccess

type BucketLifecycleGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketLifecycleGetResponseEnvelopeSuccessTrue BucketLifecycleGetResponseEnvelopeSuccess = true
)

func (BucketLifecycleGetResponseEnvelopeSuccess) IsKnown

type BucketLifecycleGetResponseRule

type BucketLifecycleGetResponseRule struct {
	// Unique identifier for this rule
	ID string `json:"id,required"`
	// Conditions that apply to all transitions of this rule
	Conditions BucketLifecycleGetResponseRulesConditions `json:"conditions,required"`
	// Whether or not this rule is in effect
	Enabled bool `json:"enabled,required"`
	// Transition to abort ongoing multipart uploads
	AbortMultipartUploadsTransition BucketLifecycleGetResponseRulesAbortMultipartUploadsTransition `json:"abortMultipartUploadsTransition"`
	// Transition to delete objects
	DeleteObjectsTransition BucketLifecycleGetResponseRulesDeleteObjectsTransition `json:"deleteObjectsTransition"`
	// Transitions to change the storage class of objects
	StorageClassTransitions []BucketLifecycleGetResponseRulesStorageClassTransition `json:"storageClassTransitions"`
	JSON                    bucketLifecycleGetResponseRuleJSON                      `json:"-"`
}

func (*BucketLifecycleGetResponseRule) UnmarshalJSON

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

type BucketLifecycleGetResponseRulesAbortMultipartUploadsTransition

type BucketLifecycleGetResponseRulesAbortMultipartUploadsTransition struct {
	// Condition for lifecycle transitions to apply after an object reaches an age in
	// seconds
	Condition BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionCondition `json:"condition"`
	JSON      bucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionJSON      `json:"-"`
}

Transition to abort ongoing multipart uploads

func (*BucketLifecycleGetResponseRulesAbortMultipartUploadsTransition) UnmarshalJSON

type BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionCondition

type BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionCondition struct {
	MaxAge int64                                                                       `json:"maxAge,required"`
	Type   BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionConditionType `json:"type,required"`
	JSON   bucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionConditionJSON `json:"-"`
}

Condition for lifecycle transitions to apply after an object reaches an age in seconds

func (*BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionCondition) UnmarshalJSON

type BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionConditionType

type BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionConditionType string
const (
	BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionConditionTypeAge BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionConditionType = "Age"
)

func (BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionConditionType) IsKnown

type BucketLifecycleGetResponseRulesConditions

type BucketLifecycleGetResponseRulesConditions struct {
	// Transitions will only apply to objects/uploads in the bucket that start with the
	// given prefix, an empty prefix can be provided to scope rule to all
	// objects/uploads
	Prefix string                                        `json:"prefix,required"`
	JSON   bucketLifecycleGetResponseRulesConditionsJSON `json:"-"`
}

Conditions that apply to all transitions of this rule

func (*BucketLifecycleGetResponseRulesConditions) UnmarshalJSON

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

type BucketLifecycleGetResponseRulesDeleteObjectsTransition

type BucketLifecycleGetResponseRulesDeleteObjectsTransition struct {
	// Condition for lifecycle transitions to apply after an object reaches an age in
	// seconds
	Condition BucketLifecycleGetResponseRulesDeleteObjectsTransitionCondition `json:"condition"`
	JSON      bucketLifecycleGetResponseRulesDeleteObjectsTransitionJSON      `json:"-"`
}

Transition to delete objects

func (*BucketLifecycleGetResponseRulesDeleteObjectsTransition) UnmarshalJSON

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

type BucketLifecycleGetResponseRulesDeleteObjectsTransitionCondition

type BucketLifecycleGetResponseRulesDeleteObjectsTransitionCondition struct {
	Type   BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionType `json:"type,required"`
	Date   time.Time                                                           `json:"date" format:"date"`
	MaxAge int64                                                               `json:"maxAge"`
	JSON   bucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionJSON `json:"-"`
	// contains filtered or unexported fields
}

Condition for lifecycle transitions to apply after an object reaches an age in seconds

func (*BucketLifecycleGetResponseRulesDeleteObjectsTransitionCondition) UnmarshalJSON

type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeCondition

type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeCondition struct {
	MaxAge int64                                                                                      `json:"maxAge,required"`
	Type   BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType `json:"type,required"`
	JSON   bucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionJSON `json:"-"`
}

Condition for lifecycle transitions to apply after an object reaches an age in seconds

func (*BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeCondition) UnmarshalJSON

type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType

type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType string
const (
	BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionTypeAge BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType = "Age"
)

func (BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType) IsKnown

type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateCondition

type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateCondition struct {
	Date time.Time                                                                                   `json:"date,required" format:"date"`
	Type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType `json:"type,required"`
	JSON bucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionJSON `json:"-"`
}

Condition for lifecycle transitions to apply on a specific date

func (*BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateCondition) UnmarshalJSON

type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType

type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType string
const (
	BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionTypeDate BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType = "Date"
)

func (BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType) IsKnown

type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionType

type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionType string
const (
	BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionTypeAge  BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionType = "Age"
	BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionTypeDate BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionType = "Date"
)

func (BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionType) IsKnown

type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionUnion

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

Condition for lifecycle transitions to apply after an object reaches an age in seconds

Union satisfied by r2.BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeCondition or r2.BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateCondition.

type BucketLifecycleGetResponseRulesStorageClassTransition

type BucketLifecycleGetResponseRulesStorageClassTransition struct {
	// Condition for lifecycle transitions to apply after an object reaches an age in
	// seconds
	Condition    BucketLifecycleGetResponseRulesStorageClassTransitionsCondition    `json:"condition,required"`
	StorageClass BucketLifecycleGetResponseRulesStorageClassTransitionsStorageClass `json:"storageClass,required"`
	JSON         bucketLifecycleGetResponseRulesStorageClassTransitionJSON          `json:"-"`
}

func (*BucketLifecycleGetResponseRulesStorageClassTransition) UnmarshalJSON

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

type BucketLifecycleGetResponseRulesStorageClassTransitionsCondition

type BucketLifecycleGetResponseRulesStorageClassTransitionsCondition struct {
	Type   BucketLifecycleGetResponseRulesStorageClassTransitionsConditionType `json:"type,required"`
	Date   time.Time                                                           `json:"date" format:"date"`
	MaxAge int64                                                               `json:"maxAge"`
	JSON   bucketLifecycleGetResponseRulesStorageClassTransitionsConditionJSON `json:"-"`
	// contains filtered or unexported fields
}

Condition for lifecycle transitions to apply after an object reaches an age in seconds

func (*BucketLifecycleGetResponseRulesStorageClassTransitionsCondition) UnmarshalJSON

type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeCondition

type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeCondition struct {
	MaxAge int64                                                                                      `json:"maxAge,required"`
	Type   BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType `json:"type,required"`
	JSON   bucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeConditionJSON `json:"-"`
}

Condition for lifecycle transitions to apply after an object reaches an age in seconds

func (*BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeCondition) UnmarshalJSON

type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType

type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType string
const (
	BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeConditionTypeAge BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType = "Age"
)

func (BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType) IsKnown

type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateCondition

type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateCondition struct {
	Date time.Time                                                                                   `json:"date,required" format:"date"`
	Type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateConditionType `json:"type,required"`
	JSON bucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateConditionJSON `json:"-"`
}

Condition for lifecycle transitions to apply on a specific date

func (*BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateCondition) UnmarshalJSON

type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateConditionType

type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateConditionType string
const (
	BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateConditionTypeDate BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateConditionType = "Date"
)

func (BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateConditionType) IsKnown

type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionType

type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionType string
const (
	BucketLifecycleGetResponseRulesStorageClassTransitionsConditionTypeAge  BucketLifecycleGetResponseRulesStorageClassTransitionsConditionType = "Age"
	BucketLifecycleGetResponseRulesStorageClassTransitionsConditionTypeDate BucketLifecycleGetResponseRulesStorageClassTransitionsConditionType = "Date"
)

func (BucketLifecycleGetResponseRulesStorageClassTransitionsConditionType) IsKnown

type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionUnion

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

Condition for lifecycle transitions to apply after an object reaches an age in seconds

Union satisfied by r2.BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeCondition or r2.BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateCondition.

type BucketLifecycleGetResponseRulesStorageClassTransitionsStorageClass

type BucketLifecycleGetResponseRulesStorageClassTransitionsStorageClass string
const (
	BucketLifecycleGetResponseRulesStorageClassTransitionsStorageClassInfrequentAccess BucketLifecycleGetResponseRulesStorageClassTransitionsStorageClass = "InfrequentAccess"
)

func (BucketLifecycleGetResponseRulesStorageClassTransitionsStorageClass) IsKnown

type BucketLifecycleService

type BucketLifecycleService struct {
	Options []option.RequestOption
}

BucketLifecycleService 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 NewBucketLifecycleService method instead.

func NewBucketLifecycleService

func NewBucketLifecycleService(opts ...option.RequestOption) (r *BucketLifecycleService)

NewBucketLifecycleService 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 (*BucketLifecycleService) Get

Get object lifecycle rules for a bucket

func (*BucketLifecycleService) Update

Set the object lifecycle rules for a bucket

type BucketLifecycleUpdateParams

type BucketLifecycleUpdateParams struct {
	// Account ID
	AccountID param.Field[string]                            `path:"account_id,required"`
	Rules     param.Field[[]BucketLifecycleUpdateParamsRule] `json:"rules"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketLifecycleUpdateParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

func (BucketLifecycleUpdateParams) MarshalJSON

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

type BucketLifecycleUpdateParamsCfR2Jurisdiction

type BucketLifecycleUpdateParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketLifecycleUpdateParamsCfR2JurisdictionDefault BucketLifecycleUpdateParamsCfR2Jurisdiction = "default"
	BucketLifecycleUpdateParamsCfR2JurisdictionEu      BucketLifecycleUpdateParamsCfR2Jurisdiction = "eu"
	BucketLifecycleUpdateParamsCfR2JurisdictionFedramp BucketLifecycleUpdateParamsCfR2Jurisdiction = "fedramp"
)

func (BucketLifecycleUpdateParamsCfR2Jurisdiction) IsKnown

type BucketLifecycleUpdateParamsRule

type BucketLifecycleUpdateParamsRule struct {
	// Unique identifier for this rule
	ID param.Field[string] `json:"id,required"`
	// Conditions that apply to all transitions of this rule
	Conditions param.Field[BucketLifecycleUpdateParamsRulesConditions] `json:"conditions,required"`
	// Whether or not this rule is in effect
	Enabled param.Field[bool] `json:"enabled,required"`
	// Transition to abort ongoing multipart uploads
	AbortMultipartUploadsTransition param.Field[BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransition] `json:"abortMultipartUploadsTransition"`
	// Transition to delete objects
	DeleteObjectsTransition param.Field[BucketLifecycleUpdateParamsRulesDeleteObjectsTransition] `json:"deleteObjectsTransition"`
	// Transitions to change the storage class of objects
	StorageClassTransitions param.Field[[]BucketLifecycleUpdateParamsRulesStorageClassTransition] `json:"storageClassTransitions"`
}

func (BucketLifecycleUpdateParamsRule) MarshalJSON

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

type BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransition

type BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransition struct {
	// Condition for lifecycle transitions to apply after an object reaches an age in
	// seconds
	Condition param.Field[BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionCondition] `json:"condition"`
}

Transition to abort ongoing multipart uploads

func (BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransition) MarshalJSON

type BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionCondition

type BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionCondition struct {
	MaxAge param.Field[int64]                                                                        `json:"maxAge,required"`
	Type   param.Field[BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionConditionType] `json:"type,required"`
}

Condition for lifecycle transitions to apply after an object reaches an age in seconds

func (BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionCondition) MarshalJSON

type BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionConditionType

type BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionConditionType string
const (
	BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionConditionTypeAge BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionConditionType = "Age"
)

func (BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionConditionType) IsKnown

type BucketLifecycleUpdateParamsRulesConditions

type BucketLifecycleUpdateParamsRulesConditions struct {
	// Transitions will only apply to objects/uploads in the bucket that start with the
	// given prefix, an empty prefix can be provided to scope rule to all
	// objects/uploads
	Prefix param.Field[string] `json:"prefix,required"`
}

Conditions that apply to all transitions of this rule

func (BucketLifecycleUpdateParamsRulesConditions) MarshalJSON

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

type BucketLifecycleUpdateParamsRulesDeleteObjectsTransition

type BucketLifecycleUpdateParamsRulesDeleteObjectsTransition struct {
	// Condition for lifecycle transitions to apply after an object reaches an age in
	// seconds
	Condition param.Field[BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionUnion] `json:"condition"`
}

Transition to delete objects

func (BucketLifecycleUpdateParamsRulesDeleteObjectsTransition) MarshalJSON

type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionCondition

type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionCondition struct {
	Type   param.Field[BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionType] `json:"type,required"`
	Date   param.Field[time.Time]                                                            `json:"date" format:"date"`
	MaxAge param.Field[int64]                                                                `json:"maxAge"`
}

Condition for lifecycle transitions to apply after an object reaches an age in seconds

func (BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionCondition) MarshalJSON

type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleAgeCondition

type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleAgeCondition struct {
	MaxAge param.Field[int64]                                                                                       `json:"maxAge,required"`
	Type   param.Field[BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType] `json:"type,required"`
}

Condition for lifecycle transitions to apply after an object reaches an age in seconds

func (BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleAgeCondition) MarshalJSON

type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType

type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType string
const (
	BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionTypeAge BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType = "Age"
)

func (BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType) IsKnown

type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleDateCondition

type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleDateCondition struct {
	Date param.Field[time.Time]                                                                                    `json:"date,required" format:"date"`
	Type param.Field[BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType] `json:"type,required"`
}

Condition for lifecycle transitions to apply on a specific date

func (BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleDateCondition) MarshalJSON

type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType

type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType string
const (
	BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionTypeDate BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType = "Date"
)

func (BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType) IsKnown

type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionType

type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionType string
const (
	BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionTypeAge  BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionType = "Age"
	BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionTypeDate BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionType = "Date"
)

func (BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionType) IsKnown

type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionUnion

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

Condition for lifecycle transitions to apply after an object reaches an age in seconds

Satisfied by r2.BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleAgeCondition, r2.BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleDateCondition, BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionCondition.

type BucketLifecycleUpdateParamsRulesStorageClassTransition

type BucketLifecycleUpdateParamsRulesStorageClassTransition struct {
	// Condition for lifecycle transitions to apply after an object reaches an age in
	// seconds
	Condition    param.Field[BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionUnion] `json:"condition,required"`
	StorageClass param.Field[BucketLifecycleUpdateParamsRulesStorageClassTransitionsStorageClass]   `json:"storageClass,required"`
}

func (BucketLifecycleUpdateParamsRulesStorageClassTransition) MarshalJSON

type BucketLifecycleUpdateParamsRulesStorageClassTransitionsCondition

type BucketLifecycleUpdateParamsRulesStorageClassTransitionsCondition struct {
	Type   param.Field[BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionType] `json:"type,required"`
	Date   param.Field[time.Time]                                                            `json:"date" format:"date"`
	MaxAge param.Field[int64]                                                                `json:"maxAge"`
}

Condition for lifecycle transitions to apply after an object reaches an age in seconds

func (BucketLifecycleUpdateParamsRulesStorageClassTransitionsCondition) MarshalJSON

type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleAgeCondition

type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleAgeCondition struct {
	MaxAge param.Field[int64]                                                                                       `json:"maxAge,required"`
	Type   param.Field[BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType] `json:"type,required"`
}

Condition for lifecycle transitions to apply after an object reaches an age in seconds

func (BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleAgeCondition) MarshalJSON

type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType

type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType string
const (
	BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleAgeConditionTypeAge BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType = "Age"
)

func (BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType) IsKnown

type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleDateCondition

type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleDateCondition struct {
	Date param.Field[time.Time]                                                                                    `json:"date,required" format:"date"`
	Type param.Field[BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleDateConditionType] `json:"type,required"`
}

Condition for lifecycle transitions to apply on a specific date

func (BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleDateCondition) MarshalJSON

type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleDateConditionType

type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleDateConditionType string
const (
	BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleDateConditionTypeDate BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleDateConditionType = "Date"
)

func (BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleDateConditionType) IsKnown

type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionType

type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionType string
const (
	BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionTypeAge  BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionType = "Age"
	BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionTypeDate BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionType = "Date"
)

func (BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionType) IsKnown

type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionUnion

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

Condition for lifecycle transitions to apply after an object reaches an age in seconds

Satisfied by r2.BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleAgeCondition, r2.BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleDateCondition, BucketLifecycleUpdateParamsRulesStorageClassTransitionsCondition.

type BucketLifecycleUpdateParamsRulesStorageClassTransitionsStorageClass

type BucketLifecycleUpdateParamsRulesStorageClassTransitionsStorageClass string
const (
	BucketLifecycleUpdateParamsRulesStorageClassTransitionsStorageClassInfrequentAccess BucketLifecycleUpdateParamsRulesStorageClassTransitionsStorageClass = "InfrequentAccess"
)

func (BucketLifecycleUpdateParamsRulesStorageClassTransitionsStorageClass) IsKnown

type BucketLifecycleUpdateResponse

type BucketLifecycleUpdateResponse = interface{}

type BucketLifecycleUpdateResponseEnvelope

type BucketLifecycleUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo         `json:"errors,required"`
	Messages []string                      `json:"messages,required"`
	Result   BucketLifecycleUpdateResponse `json:"result,required"`
	// Whether the API call was successful
	Success BucketLifecycleUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketLifecycleUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*BucketLifecycleUpdateResponseEnvelope) UnmarshalJSON

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

type BucketLifecycleUpdateResponseEnvelopeSuccess

type BucketLifecycleUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketLifecycleUpdateResponseEnvelopeSuccessTrue BucketLifecycleUpdateResponseEnvelopeSuccess = true
)

func (BucketLifecycleUpdateResponseEnvelopeSuccess) IsKnown

type BucketListParams

type BucketListParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// Pagination cursor received during the last List Buckets call. R2 buckets are
	// paginated using cursors instead of page numbers.
	Cursor param.Field[string] `query:"cursor"`
	// Direction to order buckets
	Direction param.Field[BucketListParamsDirection] `query:"direction"`
	// Bucket names to filter by. Only buckets with this phrase in their name will be
	// returned.
	NameContains param.Field[string] `query:"name_contains"`
	// Field to order buckets by
	Order param.Field[BucketListParamsOrder] `query:"order"`
	// Maximum number of buckets to return in a single call
	PerPage param.Field[float64] `query:"per_page"`
	// Bucket name to start searching after. Buckets are ordered lexicographically.
	StartAfter param.Field[string] `query:"start_after"`
	// Lists buckets in the provided jurisdiction
	Jurisdiction param.Field[BucketListParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

func (BucketListParams) URLQuery

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

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

type BucketListParamsCfR2Jurisdiction

type BucketListParamsCfR2Jurisdiction string

Lists buckets in the provided jurisdiction

const (
	BucketListParamsCfR2JurisdictionDefault BucketListParamsCfR2Jurisdiction = "default"
	BucketListParamsCfR2JurisdictionEu      BucketListParamsCfR2Jurisdiction = "eu"
	BucketListParamsCfR2JurisdictionFedramp BucketListParamsCfR2Jurisdiction = "fedramp"
)

func (BucketListParamsCfR2Jurisdiction) IsKnown

type BucketListParamsDirection

type BucketListParamsDirection string

Direction to order buckets

const (
	BucketListParamsDirectionAsc  BucketListParamsDirection = "asc"
	BucketListParamsDirectionDesc BucketListParamsDirection = "desc"
)

func (BucketListParamsDirection) IsKnown

func (r BucketListParamsDirection) IsKnown() bool

type BucketListParamsOrder

type BucketListParamsOrder string

Field to order buckets by

const (
	BucketListParamsOrderName BucketListParamsOrder = "name"
)

func (BucketListParamsOrder) IsKnown

func (r BucketListParamsOrder) IsKnown() bool

type BucketListResponse

type BucketListResponse struct {
	Buckets []Bucket               `json:"buckets"`
	JSON    bucketListResponseJSON `json:"-"`
}

func (*BucketListResponse) UnmarshalJSON

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

type BucketListResponseEnvelope

type BucketListResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []string              `json:"messages,required"`
	Result   BucketListResponse    `json:"result,required"`
	// Whether the API call was successful
	Success    BucketListResponseEnvelopeSuccess    `json:"success,required"`
	ResultInfo BucketListResponseEnvelopeResultInfo `json:"result_info"`
	JSON       bucketListResponseEnvelopeJSON       `json:"-"`
}

func (*BucketListResponseEnvelope) UnmarshalJSON

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

type BucketListResponseEnvelopeResultInfo

type BucketListResponseEnvelopeResultInfo struct {
	// A continuation token that should be used to fetch the next page of results
	Cursor string `json:"cursor"`
	// Maximum number of results on this page
	PerPage float64                                  `json:"per_page"`
	JSON    bucketListResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*BucketListResponseEnvelopeResultInfo) UnmarshalJSON

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

type BucketListResponseEnvelopeSuccess

type BucketListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketListResponseEnvelopeSuccessTrue BucketListResponseEnvelopeSuccess = true
)

func (BucketListResponseEnvelopeSuccess) IsKnown

type BucketLocation

type BucketLocation string

Location of the bucket

const (
	BucketLocationApac BucketLocation = "apac"
	BucketLocationEeur BucketLocation = "eeur"
	BucketLocationEnam BucketLocation = "enam"
	BucketLocationWeur BucketLocation = "weur"
	BucketLocationWnam BucketLocation = "wnam"
)

func (BucketLocation) IsKnown

func (r BucketLocation) IsKnown() bool

type BucketNewParams

type BucketNewParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// Name of the bucket
	Name param.Field[string] `json:"name,required"`
	// Location of the bucket
	LocationHint param.Field[BucketNewParamsLocationHint] `json:"locationHint"`
	// Storage class for newly uploaded objects, unless specified otherwise.
	StorageClass param.Field[BucketNewParamsStorageClass] `json:"storageClass"`
	// Creates the bucket in the provided jurisdiction
	Jurisdiction param.Field[BucketNewParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

func (BucketNewParams) MarshalJSON

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

type BucketNewParamsCfR2Jurisdiction

type BucketNewParamsCfR2Jurisdiction string

Creates the bucket in the provided jurisdiction

const (
	BucketNewParamsCfR2JurisdictionDefault BucketNewParamsCfR2Jurisdiction = "default"
	BucketNewParamsCfR2JurisdictionEu      BucketNewParamsCfR2Jurisdiction = "eu"
	BucketNewParamsCfR2JurisdictionFedramp BucketNewParamsCfR2Jurisdiction = "fedramp"
)

func (BucketNewParamsCfR2Jurisdiction) IsKnown

type BucketNewParamsLocationHint

type BucketNewParamsLocationHint string

Location of the bucket

const (
	BucketNewParamsLocationHintApac BucketNewParamsLocationHint = "apac"
	BucketNewParamsLocationHintEeur BucketNewParamsLocationHint = "eeur"
	BucketNewParamsLocationHintEnam BucketNewParamsLocationHint = "enam"
	BucketNewParamsLocationHintWeur BucketNewParamsLocationHint = "weur"
	BucketNewParamsLocationHintWnam BucketNewParamsLocationHint = "wnam"
)

func (BucketNewParamsLocationHint) IsKnown

func (r BucketNewParamsLocationHint) IsKnown() bool

type BucketNewParamsStorageClass

type BucketNewParamsStorageClass string

Storage class for newly uploaded objects, unless specified otherwise.

const (
	BucketNewParamsStorageClassStandard         BucketNewParamsStorageClass = "Standard"
	BucketNewParamsStorageClassInfrequentAccess BucketNewParamsStorageClass = "InfrequentAccess"
)

func (BucketNewParamsStorageClass) IsKnown

func (r BucketNewParamsStorageClass) IsKnown() bool

type BucketNewResponseEnvelope

type BucketNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []string              `json:"messages,required"`
	// A single R2 bucket
	Result Bucket `json:"result,required"`
	// Whether the API call was successful
	Success BucketNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketNewResponseEnvelopeJSON    `json:"-"`
}

func (*BucketNewResponseEnvelope) UnmarshalJSON

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

type BucketNewResponseEnvelopeSuccess

type BucketNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketNewResponseEnvelopeSuccessTrue BucketNewResponseEnvelopeSuccess = true
)

func (BucketNewResponseEnvelopeSuccess) IsKnown

type BucketService

type BucketService struct {
	Options            []option.RequestOption
	Lifecycle          *BucketLifecycleService
	CORS               *BucketCORSService
	Domains            *BucketDomainService
	EventNotifications *BucketEventNotificationService
	Sippy              *BucketSippyService
}

BucketService 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 NewBucketService method instead.

func NewBucketService

func NewBucketService(opts ...option.RequestOption) (r *BucketService)

NewBucketService 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 (*BucketService) Delete

func (r *BucketService) Delete(ctx context.Context, bucketName string, params BucketDeleteParams, opts ...option.RequestOption) (res *BucketDeleteResponse, err error)

Deletes an existing R2 bucket.

func (*BucketService) Get

func (r *BucketService) Get(ctx context.Context, bucketName string, params BucketGetParams, opts ...option.RequestOption) (res *Bucket, err error)

Gets metadata for an existing R2 bucket.

func (*BucketService) List

func (r *BucketService) List(ctx context.Context, params BucketListParams, opts ...option.RequestOption) (res *BucketListResponse, err error)

Lists all R2 buckets on your account

func (*BucketService) New

func (r *BucketService) New(ctx context.Context, params BucketNewParams, opts ...option.RequestOption) (res *Bucket, err error)

Creates a new R2 bucket.

type BucketSippyDeleteParams

type BucketSippyDeleteParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketSippyDeleteParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

type BucketSippyDeleteParamsCfR2Jurisdiction

type BucketSippyDeleteParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketSippyDeleteParamsCfR2JurisdictionDefault BucketSippyDeleteParamsCfR2Jurisdiction = "default"
	BucketSippyDeleteParamsCfR2JurisdictionEu      BucketSippyDeleteParamsCfR2Jurisdiction = "eu"
	BucketSippyDeleteParamsCfR2JurisdictionFedramp BucketSippyDeleteParamsCfR2Jurisdiction = "fedramp"
)

func (BucketSippyDeleteParamsCfR2Jurisdiction) IsKnown

type BucketSippyDeleteResponse

type BucketSippyDeleteResponse struct {
	Enabled BucketSippyDeleteResponseEnabled `json:"enabled"`
	JSON    bucketSippyDeleteResponseJSON    `json:"-"`
}

func (*BucketSippyDeleteResponse) UnmarshalJSON

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

type BucketSippyDeleteResponseEnabled

type BucketSippyDeleteResponseEnabled bool
const (
	BucketSippyDeleteResponseEnabledFalse BucketSippyDeleteResponseEnabled = false
)

func (BucketSippyDeleteResponseEnabled) IsKnown

type BucketSippyDeleteResponseEnvelope

type BucketSippyDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo     `json:"errors,required"`
	Messages []string                  `json:"messages,required"`
	Result   BucketSippyDeleteResponse `json:"result,required"`
	// Whether the API call was successful
	Success BucketSippyDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketSippyDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*BucketSippyDeleteResponseEnvelope) UnmarshalJSON

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

type BucketSippyDeleteResponseEnvelopeSuccess

type BucketSippyDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketSippyDeleteResponseEnvelopeSuccessTrue BucketSippyDeleteResponseEnvelopeSuccess = true
)

func (BucketSippyDeleteResponseEnvelopeSuccess) IsKnown

type BucketSippyGetParams

type BucketSippyGetParams struct {
	// Account ID
	AccountID param.Field[string] `path:"account_id,required"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketSippyGetParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

type BucketSippyGetParamsCfR2Jurisdiction

type BucketSippyGetParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketSippyGetParamsCfR2JurisdictionDefault BucketSippyGetParamsCfR2Jurisdiction = "default"
	BucketSippyGetParamsCfR2JurisdictionEu      BucketSippyGetParamsCfR2Jurisdiction = "eu"
	BucketSippyGetParamsCfR2JurisdictionFedramp BucketSippyGetParamsCfR2Jurisdiction = "fedramp"
)

func (BucketSippyGetParamsCfR2Jurisdiction) IsKnown

type BucketSippyGetResponseEnvelope

type BucketSippyGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []string              `json:"messages,required"`
	Result   Sippy                 `json:"result,required"`
	// Whether the API call was successful
	Success BucketSippyGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketSippyGetResponseEnvelopeJSON    `json:"-"`
}

func (*BucketSippyGetResponseEnvelope) UnmarshalJSON

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

type BucketSippyGetResponseEnvelopeSuccess

type BucketSippyGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketSippyGetResponseEnvelopeSuccessTrue BucketSippyGetResponseEnvelopeSuccess = true
)

func (BucketSippyGetResponseEnvelopeSuccess) IsKnown

type BucketSippyService

type BucketSippyService struct {
	Options []option.RequestOption
}

BucketSippyService 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 NewBucketSippyService method instead.

func NewBucketSippyService

func NewBucketSippyService(opts ...option.RequestOption) (r *BucketSippyService)

NewBucketSippyService 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 (*BucketSippyService) Delete

Disables Sippy on this bucket

func (*BucketSippyService) Get

func (r *BucketSippyService) Get(ctx context.Context, bucketName string, params BucketSippyGetParams, opts ...option.RequestOption) (res *Sippy, err error)

Gets configuration for Sippy for an existing R2 bucket.

func (*BucketSippyService) Update

func (r *BucketSippyService) Update(ctx context.Context, bucketName string, params BucketSippyUpdateParams, opts ...option.RequestOption) (res *Sippy, err error)

Sets configuration for Sippy for an existing R2 bucket.

type BucketSippyUpdateParams

type BucketSippyUpdateParams struct {
	// Account ID
	AccountID param.Field[string]              `path:"account_id,required"`
	Body      BucketSippyUpdateParamsBodyUnion `json:"body,required"`
	// The bucket jurisdiction
	Jurisdiction param.Field[BucketSippyUpdateParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"`
}

func (BucketSippyUpdateParams) MarshalJSON

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

type BucketSippyUpdateParamsBody

type BucketSippyUpdateParamsBody struct {
	Destination param.Field[interface{}] `json:"destination"`
	Source      param.Field[interface{}] `json:"source"`
}

func (BucketSippyUpdateParamsBody) MarshalJSON

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

type BucketSippyUpdateParamsBodyR2EnableSippyAws

type BucketSippyUpdateParamsBodyR2EnableSippyAws struct {
	// R2 bucket to copy objects to
	Destination param.Field[BucketSippyUpdateParamsBodyR2EnableSippyAwsDestination] `json:"destination"`
	// AWS S3 bucket to copy objects from
	Source param.Field[BucketSippyUpdateParamsBodyR2EnableSippyAwsSource] `json:"source"`
}

func (BucketSippyUpdateParamsBodyR2EnableSippyAws) MarshalJSON

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

type BucketSippyUpdateParamsBodyR2EnableSippyAwsDestination

type BucketSippyUpdateParamsBodyR2EnableSippyAwsDestination struct {
	// ID of a Cloudflare API token. This is the value labelled "Access Key ID" when
	// creating an API token from the
	// [R2 dashboard](https://dash.cloudflare.com/?to=/:account/r2/api-tokens).
	//
	// Sippy will use this token when writing objects to R2, so it is best to scope
	// this token to the bucket you're enabling Sippy for.
	AccessKeyID param.Field[string]   `json:"accessKeyId"`
	Provider    param.Field[Provider] `json:"provider"`
	// Value of a Cloudflare API token. This is the value labelled "Secret Access Key"
	// when creating an API token from the
	// [R2 dashboard](https://dash.cloudflare.com/?to=/:account/r2/api-tokens).
	//
	// Sippy will use this token when writing objects to R2, so it is best to scope
	// this token to the bucket you're enabling Sippy for.
	SecretAccessKey param.Field[string] `json:"secretAccessKey"`
}

R2 bucket to copy objects to

func (BucketSippyUpdateParamsBodyR2EnableSippyAwsDestination) MarshalJSON

type BucketSippyUpdateParamsBodyR2EnableSippyAwsSource

type BucketSippyUpdateParamsBodyR2EnableSippyAwsSource struct {
	// Access Key ID of an IAM credential (ideally scoped to a single S3 bucket)
	AccessKeyID param.Field[string] `json:"accessKeyId"`
	// Name of the AWS S3 bucket
	Bucket   param.Field[string]                                                    `json:"bucket"`
	Provider param.Field[BucketSippyUpdateParamsBodyR2EnableSippyAwsSourceProvider] `json:"provider"`
	// Name of the AWS availability zone
	Region param.Field[string] `json:"region"`
	// Secret Access Key of an IAM credential (ideally scoped to a single S3 bucket)
	SecretAccessKey param.Field[string] `json:"secretAccessKey"`
}

AWS S3 bucket to copy objects from

func (BucketSippyUpdateParamsBodyR2EnableSippyAwsSource) MarshalJSON

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

type BucketSippyUpdateParamsBodyR2EnableSippyAwsSourceProvider

type BucketSippyUpdateParamsBodyR2EnableSippyAwsSourceProvider string
const (
	BucketSippyUpdateParamsBodyR2EnableSippyAwsSourceProviderAws BucketSippyUpdateParamsBodyR2EnableSippyAwsSourceProvider = "aws"
)

func (BucketSippyUpdateParamsBodyR2EnableSippyAwsSourceProvider) IsKnown

type BucketSippyUpdateParamsBodyR2EnableSippyGcs

type BucketSippyUpdateParamsBodyR2EnableSippyGcs struct {
	// R2 bucket to copy objects to
	Destination param.Field[BucketSippyUpdateParamsBodyR2EnableSippyGcsDestination] `json:"destination"`
	// GCS bucket to copy objects from
	Source param.Field[BucketSippyUpdateParamsBodyR2EnableSippyGcsSource] `json:"source"`
}

func (BucketSippyUpdateParamsBodyR2EnableSippyGcs) MarshalJSON

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

type BucketSippyUpdateParamsBodyR2EnableSippyGcsDestination

type BucketSippyUpdateParamsBodyR2EnableSippyGcsDestination struct {
	// ID of a Cloudflare API token. This is the value labelled "Access Key ID" when
	// creating an API token from the
	// [R2 dashboard](https://dash.cloudflare.com/?to=/:account/r2/api-tokens).
	//
	// Sippy will use this token when writing objects to R2, so it is best to scope
	// this token to the bucket you're enabling Sippy for.
	AccessKeyID param.Field[string]   `json:"accessKeyId"`
	Provider    param.Field[Provider] `json:"provider"`
	// Value of a Cloudflare API token. This is the value labelled "Secret Access Key"
	// when creating an API token from the
	// [R2 dashboard](https://dash.cloudflare.com/?to=/:account/r2/api-tokens).
	//
	// Sippy will use this token when writing objects to R2, so it is best to scope
	// this token to the bucket you're enabling Sippy for.
	SecretAccessKey param.Field[string] `json:"secretAccessKey"`
}

R2 bucket to copy objects to

func (BucketSippyUpdateParamsBodyR2EnableSippyGcsDestination) MarshalJSON

type BucketSippyUpdateParamsBodyR2EnableSippyGcsSource

type BucketSippyUpdateParamsBodyR2EnableSippyGcsSource struct {
	// Name of the GCS bucket
	Bucket param.Field[string] `json:"bucket"`
	// Client email of an IAM credential (ideally scoped to a single GCS bucket)
	ClientEmail param.Field[string] `json:"clientEmail"`
	// Private Key of an IAM credential (ideally scoped to a single GCS bucket)
	PrivateKey param.Field[string]                                                    `json:"privateKey"`
	Provider   param.Field[BucketSippyUpdateParamsBodyR2EnableSippyGcsSourceProvider] `json:"provider"`
}

GCS bucket to copy objects from

func (BucketSippyUpdateParamsBodyR2EnableSippyGcsSource) MarshalJSON

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

type BucketSippyUpdateParamsBodyR2EnableSippyGcsSourceProvider

type BucketSippyUpdateParamsBodyR2EnableSippyGcsSourceProvider string
const (
	BucketSippyUpdateParamsBodyR2EnableSippyGcsSourceProviderGcs BucketSippyUpdateParamsBodyR2EnableSippyGcsSourceProvider = "gcs"
)

func (BucketSippyUpdateParamsBodyR2EnableSippyGcsSourceProvider) IsKnown

type BucketSippyUpdateParamsBodyUnion

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

Satisfied by r2.BucketSippyUpdateParamsBodyR2EnableSippyAws, r2.BucketSippyUpdateParamsBodyR2EnableSippyGcs, BucketSippyUpdateParamsBody.

type BucketSippyUpdateParamsCfR2Jurisdiction

type BucketSippyUpdateParamsCfR2Jurisdiction string

The bucket jurisdiction

const (
	BucketSippyUpdateParamsCfR2JurisdictionDefault BucketSippyUpdateParamsCfR2Jurisdiction = "default"
	BucketSippyUpdateParamsCfR2JurisdictionEu      BucketSippyUpdateParamsCfR2Jurisdiction = "eu"
	BucketSippyUpdateParamsCfR2JurisdictionFedramp BucketSippyUpdateParamsCfR2Jurisdiction = "fedramp"
)

func (BucketSippyUpdateParamsCfR2Jurisdiction) IsKnown

type BucketSippyUpdateResponseEnvelope

type BucketSippyUpdateResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []string              `json:"messages,required"`
	Result   Sippy                 `json:"result,required"`
	// Whether the API call was successful
	Success BucketSippyUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    bucketSippyUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*BucketSippyUpdateResponseEnvelope) UnmarshalJSON

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

type BucketSippyUpdateResponseEnvelopeSuccess

type BucketSippyUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BucketSippyUpdateResponseEnvelopeSuccessTrue BucketSippyUpdateResponseEnvelopeSuccess = true
)

func (BucketSippyUpdateResponseEnvelopeSuccess) IsKnown

type BucketStorageClass

type BucketStorageClass string

Storage class for newly uploaded objects, unless specified otherwise.

const (
	BucketStorageClassStandard         BucketStorageClass = "Standard"
	BucketStorageClassInfrequentAccess BucketStorageClass = "InfrequentAccess"
)

func (BucketStorageClass) IsKnown

func (r BucketStorageClass) IsKnown() bool

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

type Member = shared.Member

This is an alias to an internal type.

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 MemberStatus

type MemberStatus = shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

type MemberUser

type MemberUser = shared.MemberUser

Details of the user associated to the membership.

This is an alias to an internal type.

type 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 Provider

type Provider string
const (
	ProviderR2 Provider = "r2"
)

func (Provider) IsKnown

func (r Provider) IsKnown() bool

type R2Service

type R2Service struct {
	Options              []option.RequestOption
	Buckets              *BucketService
	TemporaryCredentials *TemporaryCredentialService
}

R2Service 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 NewR2Service method instead.

func NewR2Service

func NewR2Service(opts ...option.RequestOption) (r *R2Service)

NewR2Service 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 RatePlan

type RatePlan = shared.RatePlan

The rate plan applied to the subscription.

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 Role

type Role = shared.Role

This is an alias to an internal type.

type RoleParam

type RoleParam = shared.RoleParam

This is an alias to an internal type.

type RolePermissions

type RolePermissions = shared.RolePermissions

This is an alias to an internal type.

type RolePermissionsParam

type RolePermissionsParam = shared.RolePermissionsParam

This is an alias to an internal type.

type Sippy

type Sippy struct {
	// Details about the configured destination bucket
	Destination SippyDestination `json:"destination"`
	// State of Sippy for this bucket
	Enabled bool `json:"enabled"`
	// Details about the configured source bucket
	Source SippySource `json:"source"`
	JSON   sippyJSON   `json:"-"`
}

func (*Sippy) UnmarshalJSON

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

type SippyDestination

type SippyDestination struct {
	// ID of the Cloudflare API token used when writing objects to this bucket
	AccessKeyID string `json:"accessKeyId"`
	Account     string `json:"account"`
	// Name of the bucket on the provider
	Bucket   string               `json:"bucket"`
	Provider Provider             `json:"provider"`
	JSON     sippyDestinationJSON `json:"-"`
}

Details about the configured destination bucket

func (*SippyDestination) UnmarshalJSON

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

type SippySource

type SippySource struct {
	// Name of the bucket on the provider
	Bucket   string              `json:"bucket"`
	Provider SippySourceProvider `json:"provider"`
	// Region where the bucket resides (AWS only)
	Region string          `json:"region,nullable"`
	JSON   sippySourceJSON `json:"-"`
}

Details about the configured source bucket

func (*SippySource) UnmarshalJSON

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

type SippySourceProvider

type SippySourceProvider string
const (
	SippySourceProviderAws SippySourceProvider = "aws"
	SippySourceProviderGcs SippySourceProvider = "gcs"
)

func (SippySourceProvider) IsKnown

func (r SippySourceProvider) IsKnown() bool

type SortDirection

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

type Subscription

type Subscription = shared.Subscription

This is an alias to an internal type.

type SubscriptionFrequency

type SubscriptionFrequency = shared.SubscriptionFrequency

How often the subscription is renewed automatically.

This is an alias to an internal type.

type SubscriptionParam

type SubscriptionParam = shared.SubscriptionParam

This is an alias to an internal type.

type SubscriptionState

type SubscriptionState = shared.SubscriptionState

The state that the subscription is in.

This is an alias to an internal type.

type TemporaryCredentialNewParams

type TemporaryCredentialNewParams struct {
	// Account ID
	AccountID           param.Field[string]      `path:"account_id,required"`
	TemporaryCredential TemporaryCredentialParam `json:"temporary_credential,required"`
}

func (TemporaryCredentialNewParams) MarshalJSON

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

type TemporaryCredentialNewResponse

type TemporaryCredentialNewResponse struct {
	// ID for new access key
	AccessKeyID string `json:"accessKeyId"`
	// Secret access key
	SecretAccessKey string `json:"secretAccessKey"`
	// Security token
	SessionToken string                             `json:"sessionToken"`
	JSON         temporaryCredentialNewResponseJSON `json:"-"`
}

func (*TemporaryCredentialNewResponse) UnmarshalJSON

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

type TemporaryCredentialNewResponseEnvelope

type TemporaryCredentialNewResponseEnvelope struct {
	Errors   []shared.ResponseInfo          `json:"errors,required"`
	Messages []string                       `json:"messages,required"`
	Result   TemporaryCredentialNewResponse `json:"result,required"`
	// Whether the API call was successful
	Success TemporaryCredentialNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    temporaryCredentialNewResponseEnvelopeJSON    `json:"-"`
}

func (*TemporaryCredentialNewResponseEnvelope) UnmarshalJSON

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

type TemporaryCredentialNewResponseEnvelopeSuccess

type TemporaryCredentialNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	TemporaryCredentialNewResponseEnvelopeSuccessTrue TemporaryCredentialNewResponseEnvelopeSuccess = true
)

func (TemporaryCredentialNewResponseEnvelopeSuccess) IsKnown

type TemporaryCredentialParam

type TemporaryCredentialParam struct {
	// Name of the R2 bucket
	Bucket param.Field[string] `json:"bucket,required"`
	// The parent access key id to use for signing
	ParentAccessKeyID param.Field[string] `json:"parentAccessKeyId,required"`
	// Permissions allowed on the credentials
	Permission param.Field[TemporaryCredentialPermission] `json:"permission,required"`
	// How long the credentials will live for in seconds
	TTLSeconds param.Field[float64] `json:"ttlSeconds,required"`
	// Optional object paths to scope the credentials to
	Objects param.Field[[]string] `json:"objects"`
	// Optional prefix paths to scope the credentials to
	Prefixes param.Field[[]string] `json:"prefixes"`
}

func (TemporaryCredentialParam) MarshalJSON

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

type TemporaryCredentialPermission

type TemporaryCredentialPermission string

Permissions allowed on the credentials

const (
	TemporaryCredentialPermissionAdminReadWrite  TemporaryCredentialPermission = "admin-read-write"
	TemporaryCredentialPermissionAdminReadOnly   TemporaryCredentialPermission = "admin-read-only"
	TemporaryCredentialPermissionObjectReadWrite TemporaryCredentialPermission = "object-read-write"
	TemporaryCredentialPermissionObjectReadOnly  TemporaryCredentialPermission = "object-read-only"
)

func (TemporaryCredentialPermission) IsKnown

func (r TemporaryCredentialPermission) IsKnown() bool

type TemporaryCredentialService

type TemporaryCredentialService struct {
	Options []option.RequestOption
}

TemporaryCredentialService 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 NewTemporaryCredentialService method instead.

func NewTemporaryCredentialService

func NewTemporaryCredentialService(opts ...option.RequestOption) (r *TemporaryCredentialService)

NewTemporaryCredentialService 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 (*TemporaryCredentialService) New

Creates temporary access credentials on a bucket that can be optionally scoped to prefixes or objects.

type Token

type Token = shared.Token

This is an alias to an internal type.

type TokenCondition

type TokenCondition = shared.TokenCondition

This is an alias to an internal type.

type TokenConditionCIDRList

type TokenConditionCIDRList = shared.TokenConditionCIDRList

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionCIDRListParam

type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionParam

type TokenConditionParam = shared.TokenConditionParam

This is an alias to an internal type.

type TokenConditionRequestIP

type TokenConditionRequestIP = shared.TokenConditionRequestIP

Client IP restrictions.

This is an alias to an internal type.

type TokenConditionRequestIPParam

type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam

Client IP restrictions.

This is an alias to an internal type.

type TokenParam

type TokenParam = shared.TokenParam

This is an alias to an internal type.

type TokenPolicy

type TokenPolicy = shared.TokenPolicy

This is an alias to an internal type.

type TokenPolicyEffect

type TokenPolicyEffect = shared.TokenPolicyEffect

Allow or deny operations against the resources.

This is an alias to an internal type.

type TokenPolicyParam

type TokenPolicyParam = shared.TokenPolicyParam

This is an alias to an internal type.

type TokenPolicyPermissionGroup

type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup

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

This is an alias to an internal type.

type TokenPolicyPermissionGroupParam

type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam

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

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMeta

type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMetaParam

type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenStatus

type TokenStatus = shared.TokenStatus

Status of the token.

This is an alias to an internal type.

type TokenValue

type TokenValue = shared.TokenValue

The token value.

This is an alias to an internal type.

Jump to

Keyboard shortcuts

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