Documentation
¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type Bucket
- type BucketCORSDeleteParams
- type BucketCORSDeleteParamsCfR2Jurisdiction
- type BucketCORSDeleteResponse
- type BucketCORSDeleteResponseEnvelope
- type BucketCORSDeleteResponseEnvelopeSuccess
- type BucketCORSGetParams
- type BucketCORSGetParamsCfR2Jurisdiction
- type BucketCORSGetResponse
- type BucketCORSGetResponseEnvelope
- type BucketCORSGetResponseEnvelopeSuccess
- type BucketCORSGetResponseRule
- type BucketCORSGetResponseRulesAllowed
- type BucketCORSGetResponseRulesAllowedMethod
- type BucketCORSService
- func (r *BucketCORSService) Delete(ctx context.Context, bucketName string, params BucketCORSDeleteParams, ...) (res *BucketCORSDeleteResponse, err error)
- func (r *BucketCORSService) Get(ctx context.Context, bucketName string, params BucketCORSGetParams, ...) (res *BucketCORSGetResponse, err error)
- func (r *BucketCORSService) Update(ctx context.Context, bucketName string, params BucketCORSUpdateParams, ...) (res *BucketCORSUpdateResponse, err error)
- type BucketCORSUpdateParams
- type BucketCORSUpdateParamsCfR2Jurisdiction
- type BucketCORSUpdateParamsRule
- type BucketCORSUpdateParamsRulesAllowed
- type BucketCORSUpdateParamsRulesAllowedMethod
- type BucketCORSUpdateResponse
- type BucketCORSUpdateResponseEnvelope
- type BucketCORSUpdateResponseEnvelopeSuccess
- type BucketDeleteParams
- type BucketDeleteParamsCfR2Jurisdiction
- type BucketDeleteResponse
- type BucketDeleteResponseEnvelope
- type BucketDeleteResponseEnvelopeSuccess
- type BucketDomainCustomDeleteParams
- type BucketDomainCustomDeleteParamsCfR2Jurisdiction
- type BucketDomainCustomDeleteResponse
- type BucketDomainCustomDeleteResponseEnvelope
- type BucketDomainCustomDeleteResponseEnvelopeSuccess
- type BucketDomainCustomGetParams
- type BucketDomainCustomGetParamsCfR2Jurisdiction
- type BucketDomainCustomGetResponse
- type BucketDomainCustomGetResponseEnvelope
- type BucketDomainCustomGetResponseEnvelopeSuccess
- type BucketDomainCustomGetResponseMinTLS
- type BucketDomainCustomGetResponseStatus
- type BucketDomainCustomGetResponseStatusOwnership
- type BucketDomainCustomGetResponseStatusSSL
- type BucketDomainCustomListParams
- type BucketDomainCustomListParamsCfR2Jurisdiction
- type BucketDomainCustomListResponse
- type BucketDomainCustomListResponseDomain
- type BucketDomainCustomListResponseDomainsMinTLS
- type BucketDomainCustomListResponseDomainsStatus
- type BucketDomainCustomListResponseDomainsStatusOwnership
- type BucketDomainCustomListResponseDomainsStatusSSL
- type BucketDomainCustomListResponseEnvelope
- type BucketDomainCustomListResponseEnvelopeSuccess
- type BucketDomainCustomNewParams
- type BucketDomainCustomNewParamsCfR2Jurisdiction
- type BucketDomainCustomNewParamsMinTLS
- type BucketDomainCustomNewResponse
- type BucketDomainCustomNewResponseEnvelope
- type BucketDomainCustomNewResponseEnvelopeSuccess
- type BucketDomainCustomNewResponseMinTLS
- type BucketDomainCustomService
- func (r *BucketDomainCustomService) Delete(ctx context.Context, bucketName string, domainName string, ...) (res *BucketDomainCustomDeleteResponse, err error)
- func (r *BucketDomainCustomService) Get(ctx context.Context, bucketName string, domainName string, ...) (res *BucketDomainCustomGetResponse, err error)
- func (r *BucketDomainCustomService) List(ctx context.Context, bucketName string, params BucketDomainCustomListParams, ...) (res *BucketDomainCustomListResponse, err error)
- func (r *BucketDomainCustomService) New(ctx context.Context, bucketName string, params BucketDomainCustomNewParams, ...) (res *BucketDomainCustomNewResponse, err error)
- func (r *BucketDomainCustomService) Update(ctx context.Context, bucketName string, domainName string, ...) (res *BucketDomainCustomUpdateResponse, err error)
- type BucketDomainCustomUpdateParams
- type BucketDomainCustomUpdateParamsCfR2Jurisdiction
- type BucketDomainCustomUpdateParamsMinTLS
- type BucketDomainCustomUpdateResponse
- type BucketDomainCustomUpdateResponseEnvelope
- type BucketDomainCustomUpdateResponseEnvelopeSuccess
- type BucketDomainCustomUpdateResponseMinTLS
- type BucketDomainManagedListParams
- type BucketDomainManagedListParamsCfR2Jurisdiction
- type BucketDomainManagedListResponse
- type BucketDomainManagedListResponseEnvelope
- type BucketDomainManagedListResponseEnvelopeSuccess
- type BucketDomainManagedService
- func (r *BucketDomainManagedService) List(ctx context.Context, bucketName string, params BucketDomainManagedListParams, ...) (res *BucketDomainManagedListResponse, err error)
- func (r *BucketDomainManagedService) Update(ctx context.Context, bucketName string, params BucketDomainManagedUpdateParams, ...) (res *BucketDomainManagedUpdateResponse, err error)
- type BucketDomainManagedUpdateParams
- type BucketDomainManagedUpdateParamsCfR2Jurisdiction
- type BucketDomainManagedUpdateResponse
- type BucketDomainManagedUpdateResponseEnvelope
- type BucketDomainManagedUpdateResponseEnvelopeSuccess
- type BucketDomainService
- type BucketEventNotificationDeleteParams
- type BucketEventNotificationDeleteParamsCfR2Jurisdiction
- type BucketEventNotificationDeleteResponse
- type BucketEventNotificationDeleteResponseEnvelope
- type BucketEventNotificationDeleteResponseEnvelopeSuccess
- type BucketEventNotificationGetParams
- type BucketEventNotificationGetParamsCfR2Jurisdiction
- type BucketEventNotificationGetResponse
- type BucketEventNotificationGetResponseEnvelope
- type BucketEventNotificationGetResponseEnvelopeSuccess
- type BucketEventNotificationGetResponseQueue
- type BucketEventNotificationGetResponseQueuesRule
- type BucketEventNotificationGetResponseQueuesRulesAction
- type BucketEventNotificationService
- func (r *BucketEventNotificationService) Delete(ctx context.Context, bucketName string, queueID string, ...) (res *BucketEventNotificationDeleteResponse, err error)
- func (r *BucketEventNotificationService) Get(ctx context.Context, bucketName string, ...) (res *BucketEventNotificationGetResponse, err error)
- func (r *BucketEventNotificationService) Update(ctx context.Context, bucketName string, queueID string, ...) (res *BucketEventNotificationUpdateResponse, err error)
- type BucketEventNotificationUpdateParams
- type BucketEventNotificationUpdateParamsCfR2Jurisdiction
- type BucketEventNotificationUpdateParamsRule
- type BucketEventNotificationUpdateParamsRulesAction
- type BucketEventNotificationUpdateResponse
- type BucketEventNotificationUpdateResponseEnvelope
- type BucketEventNotificationUpdateResponseEnvelopeSuccess
- type BucketGetParams
- type BucketGetParamsCfR2Jurisdiction
- type BucketGetResponseEnvelope
- type BucketGetResponseEnvelopeSuccess
- type BucketLifecycleGetParams
- type BucketLifecycleGetParamsCfR2Jurisdiction
- type BucketLifecycleGetResponse
- type BucketLifecycleGetResponseEnvelope
- type BucketLifecycleGetResponseEnvelopeSuccess
- type BucketLifecycleGetResponseRule
- type BucketLifecycleGetResponseRulesAbortMultipartUploadsTransition
- type BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionCondition
- type BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionConditionType
- type BucketLifecycleGetResponseRulesConditions
- type BucketLifecycleGetResponseRulesDeleteObjectsTransition
- type BucketLifecycleGetResponseRulesDeleteObjectsTransitionCondition
- type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeCondition
- type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType
- type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateCondition
- type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType
- type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionType
- type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionUnion
- type BucketLifecycleGetResponseRulesStorageClassTransition
- type BucketLifecycleGetResponseRulesStorageClassTransitionsCondition
- type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeCondition
- type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType
- type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateCondition
- type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateConditionType
- type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionType
- type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionUnion
- type BucketLifecycleGetResponseRulesStorageClassTransitionsStorageClass
- type BucketLifecycleService
- func (r *BucketLifecycleService) Get(ctx context.Context, bucketName string, params BucketLifecycleGetParams, ...) (res *BucketLifecycleGetResponse, err error)
- func (r *BucketLifecycleService) Update(ctx context.Context, bucketName string, params BucketLifecycleUpdateParams, ...) (res *BucketLifecycleUpdateResponse, err error)
- type BucketLifecycleUpdateParams
- type BucketLifecycleUpdateParamsCfR2Jurisdiction
- type BucketLifecycleUpdateParamsRule
- type BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransition
- type BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionCondition
- type BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionConditionType
- type BucketLifecycleUpdateParamsRulesConditions
- type BucketLifecycleUpdateParamsRulesDeleteObjectsTransition
- type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionCondition
- type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleAgeCondition
- type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType
- type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleDateCondition
- type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType
- type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionType
- type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionUnion
- type BucketLifecycleUpdateParamsRulesStorageClassTransition
- type BucketLifecycleUpdateParamsRulesStorageClassTransitionsCondition
- type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleAgeCondition
- type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType
- type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleDateCondition
- type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleDateConditionType
- type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionType
- type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionUnion
- type BucketLifecycleUpdateParamsRulesStorageClassTransitionsStorageClass
- type BucketLifecycleUpdateResponse
- type BucketLifecycleUpdateResponseEnvelope
- type BucketLifecycleUpdateResponseEnvelopeSuccess
- type BucketListParams
- type BucketListParamsCfR2Jurisdiction
- type BucketListParamsDirection
- type BucketListParamsOrder
- type BucketListResponse
- type BucketListResponseEnvelope
- type BucketListResponseEnvelopeResultInfo
- type BucketListResponseEnvelopeSuccess
- type BucketLocation
- type BucketLockGetParams
- type BucketLockGetParamsCfR2Jurisdiction
- type BucketLockGetResponse
- type BucketLockGetResponseEnvelope
- type BucketLockGetResponseEnvelopeSuccess
- type BucketLockGetResponseRule
- type BucketLockGetResponseRulesCondition
- type BucketLockGetResponseRulesConditionR2LockRuleAgeCondition
- type BucketLockGetResponseRulesConditionR2LockRuleAgeConditionType
- type BucketLockGetResponseRulesConditionR2LockRuleDateCondition
- type BucketLockGetResponseRulesConditionR2LockRuleDateConditionType
- type BucketLockGetResponseRulesConditionR2LockRuleIndefiniteCondition
- type BucketLockGetResponseRulesConditionR2LockRuleIndefiniteConditionType
- type BucketLockGetResponseRulesConditionType
- type BucketLockGetResponseRulesConditionUnion
- type BucketLockService
- type BucketLockUpdateParams
- type BucketLockUpdateParamsCfR2Jurisdiction
- type BucketLockUpdateParamsRule
- type BucketLockUpdateParamsRulesCondition
- type BucketLockUpdateParamsRulesConditionR2LockRuleAgeCondition
- type BucketLockUpdateParamsRulesConditionR2LockRuleAgeConditionType
- type BucketLockUpdateParamsRulesConditionR2LockRuleDateCondition
- type BucketLockUpdateParamsRulesConditionR2LockRuleDateConditionType
- type BucketLockUpdateParamsRulesConditionR2LockRuleIndefiniteCondition
- type BucketLockUpdateParamsRulesConditionR2LockRuleIndefiniteConditionType
- type BucketLockUpdateParamsRulesConditionType
- type BucketLockUpdateParamsRulesConditionUnion
- type BucketLockUpdateResponse
- type BucketLockUpdateResponseEnvelope
- type BucketLockUpdateResponseEnvelopeSuccess
- type BucketMetricListParams
- type BucketMetricListResponse
- type BucketMetricListResponseEnvelope
- type BucketMetricListResponseEnvelopeSuccess
- type BucketMetricListResponseInfrequentAccess
- type BucketMetricListResponseInfrequentAccessPublished
- type BucketMetricListResponseInfrequentAccessUploaded
- type BucketMetricListResponseStandard
- type BucketMetricListResponseStandardPublished
- type BucketMetricListResponseStandardUploaded
- type BucketMetricService
- type BucketNewParams
- type BucketNewParamsCfR2Jurisdiction
- type BucketNewParamsLocationHint
- type BucketNewParamsStorageClass
- type BucketNewResponseEnvelope
- type BucketNewResponseEnvelopeSuccess
- type BucketService
- func (r *BucketService) Delete(ctx context.Context, bucketName string, params BucketDeleteParams, ...) (res *BucketDeleteResponse, err error)
- func (r *BucketService) Get(ctx context.Context, bucketName string, params BucketGetParams, ...) (res *Bucket, err error)
- func (r *BucketService) List(ctx context.Context, params BucketListParams, opts ...option.RequestOption) (res *BucketListResponse, err error)
- func (r *BucketService) New(ctx context.Context, params BucketNewParams, opts ...option.RequestOption) (res *Bucket, err error)
- type BucketSippyDeleteParams
- type BucketSippyDeleteParamsCfR2Jurisdiction
- type BucketSippyDeleteResponse
- type BucketSippyDeleteResponseEnabled
- type BucketSippyDeleteResponseEnvelope
- type BucketSippyDeleteResponseEnvelopeSuccess
- type BucketSippyGetParams
- type BucketSippyGetParamsCfR2Jurisdiction
- type BucketSippyGetResponseEnvelope
- type BucketSippyGetResponseEnvelopeSuccess
- type BucketSippyService
- func (r *BucketSippyService) Delete(ctx context.Context, bucketName string, params BucketSippyDeleteParams, ...) (res *BucketSippyDeleteResponse, err error)
- func (r *BucketSippyService) Get(ctx context.Context, bucketName string, params BucketSippyGetParams, ...) (res *Sippy, err error)
- func (r *BucketSippyService) Update(ctx context.Context, bucketName string, params BucketSippyUpdateParams, ...) (res *Sippy, err error)
- type BucketSippyUpdateParams
- type BucketSippyUpdateParamsBody
- type BucketSippyUpdateParamsBodyR2EnableSippyAws
- type BucketSippyUpdateParamsBodyR2EnableSippyAwsDestination
- type BucketSippyUpdateParamsBodyR2EnableSippyAwsSource
- type BucketSippyUpdateParamsBodyR2EnableSippyAwsSourceProvider
- type BucketSippyUpdateParamsBodyR2EnableSippyGcs
- type BucketSippyUpdateParamsBodyR2EnableSippyGcsDestination
- type BucketSippyUpdateParamsBodyR2EnableSippyGcsSource
- type BucketSippyUpdateParamsBodyR2EnableSippyGcsSourceProvider
- type BucketSippyUpdateParamsBodyUnion
- type BucketSippyUpdateParamsCfR2Jurisdiction
- type BucketSippyUpdateResponseEnvelope
- type BucketSippyUpdateResponseEnvelopeSuccess
- type BucketStorageClass
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type Error
- type ErrorData
- type Member
- type MemberPoliciesAccess
- type MemberPoliciesPermissionGroup
- type MemberPoliciesPermissionGroupsMeta
- type MemberPoliciesResourceGroup
- type MemberPoliciesResourceGroupsMeta
- type MemberPoliciesResourceGroupsScope
- type MemberPoliciesResourceGroupsScopeObject
- type MemberPolicy
- type MemberStatus
- type MemberUser
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type Provider
- type R2Service
- type RatePlan
- type RatePlanID
- type RatePlanParam
- type ResponseInfo
- type Role
- type RoleParam
- type RolePermissions
- type RolePermissionsParam
- type Sippy
- type SippyDestination
- type SippySource
- type SippySourceProvider
- type SortDirection
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- type TemporaryCredentialNewParams
- type TemporaryCredentialNewResponse
- type TemporaryCredentialNewResponseEnvelope
- type TemporaryCredentialNewResponseEnvelopeSuccess
- type TemporaryCredentialParam
- type TemporaryCredentialPermission
- type TemporaryCredentialService
- type Token
- type TokenCondition
- type TokenConditionCIDRList
- type TokenConditionCIDRListParam
- type TokenConditionParam
- type TokenConditionRequestIP
- type TokenConditionRequestIPParam
- type TokenParam
- type TokenPolicy
- type TokenPolicyEffect
- type TokenPolicyParam
- type TokenPolicyPermissionGroup
- type TokenPolicyPermissionGroupParam
- type TokenPolicyPermissionGroupsMeta
- type TokenPolicyPermissionGroupsMetaParam
- type TokenStatus
- type TokenValue
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateCASSLCom = shared.CertificateCASSLCom
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow
This is an alias to an internal value.
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny
This is an alias to an internal value.
const MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
This is an alias to an internal value.
const RatePlanIDBusiness = shared.RatePlanIDBusiness
This is an alias to an internal value.
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise
This is an alias to an internal value.
const RatePlanIDFree = shared.RatePlanIDFree
This is an alias to an internal value.
const RatePlanIDLite = shared.RatePlanIDLite
This is an alias to an internal value.
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness
This is an alias to an internal value.
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise
This is an alias to an internal value.
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree
This is an alias to an internal value.
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro
This is an alias to an internal value.
const RatePlanIDPro = shared.RatePlanIDPro
This is an alias to an internal value.
const RatePlanIDProPlus = shared.RatePlanIDProPlus
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly
This is an alias to an internal value.
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly
This is an alias to an internal value.
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly
This is an alias to an internal value.
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly
This is an alias to an internal value.
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment
This is an alias to an internal value.
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled
This is an alias to an internal value.
const SubscriptionStateExpired = shared.SubscriptionStateExpired
This is an alias to an internal value.
const SubscriptionStateFailed = shared.SubscriptionStateFailed
This is an alias to an internal value.
const SubscriptionStatePaid = shared.SubscriptionStatePaid
This is an alias to an internal value.
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned
This is an alias to an internal value.
const SubscriptionStateTrial = shared.SubscriptionStateTrial
This is an alias to an internal value.
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow
This is an alias to an internal value.
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny
This is an alias to an internal value.
const TokenStatusActive = shared.TokenStatusActive
This is an alias to an internal value.
const TokenStatusDisabled = shared.TokenStatusDisabled
This is an alias to an internal value.
const TokenStatusExpired = shared.TokenStatusExpired
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 ¶
type BucketCORSDeleteParams ¶
type BucketCORSDeleteParamsCfR2Jurisdiction ¶
type BucketCORSDeleteParamsCfR2Jurisdiction string
The bucket jurisdiction
const ( BucketCORSDeleteParamsCfR2JurisdictionDefault BucketCORSDeleteParamsCfR2Jurisdiction = "default" BucketCORSDeleteParamsCfR2JurisdictionEu BucketCORSDeleteParamsCfR2Jurisdiction = "eu" BucketCORSDeleteParamsCfR2JurisdictionFedramp BucketCORSDeleteParamsCfR2Jurisdiction = "fedramp" )
func (BucketCORSDeleteParamsCfR2Jurisdiction) IsKnown ¶
func (r BucketCORSDeleteParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketCORSDeleteResponseEnvelopeSuccess) IsKnown() bool
type BucketCORSGetParams ¶
type BucketCORSGetParamsCfR2Jurisdiction ¶
type BucketCORSGetParamsCfR2Jurisdiction string
The bucket jurisdiction
const ( BucketCORSGetParamsCfR2JurisdictionDefault BucketCORSGetParamsCfR2Jurisdiction = "default" BucketCORSGetParamsCfR2JurisdictionEu BucketCORSGetParamsCfR2Jurisdiction = "eu" BucketCORSGetParamsCfR2JurisdictionFedramp BucketCORSGetParamsCfR2Jurisdiction = "fedramp" )
func (BucketCORSGetParamsCfR2Jurisdiction) IsKnown ¶
func (r BucketCORSGetParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketCORSGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r BucketCORSGetResponseRulesAllowedMethod) IsKnown() bool
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 ¶
func (r BucketCORSUpdateParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketCORSUpdateParamsRulesAllowedMethod) IsKnown() bool
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 ¶
func (r BucketCORSUpdateResponseEnvelopeSuccess) IsKnown() bool
type BucketDeleteParams ¶
type BucketDeleteParamsCfR2Jurisdiction ¶
type BucketDeleteParamsCfR2Jurisdiction string
The bucket jurisdiction
const ( BucketDeleteParamsCfR2JurisdictionDefault BucketDeleteParamsCfR2Jurisdiction = "default" BucketDeleteParamsCfR2JurisdictionEu BucketDeleteParamsCfR2Jurisdiction = "eu" BucketDeleteParamsCfR2JurisdictionFedramp BucketDeleteParamsCfR2Jurisdiction = "fedramp" )
func (BucketDeleteParamsCfR2Jurisdiction) IsKnown ¶
func (r BucketDeleteParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketDeleteResponseEnvelopeSuccess) IsKnown() bool
type BucketDomainCustomDeleteParamsCfR2Jurisdiction ¶
type BucketDomainCustomDeleteParamsCfR2Jurisdiction string
The bucket jurisdiction
const ( BucketDomainCustomDeleteParamsCfR2JurisdictionDefault BucketDomainCustomDeleteParamsCfR2Jurisdiction = "default" BucketDomainCustomDeleteParamsCfR2JurisdictionEu BucketDomainCustomDeleteParamsCfR2Jurisdiction = "eu" BucketDomainCustomDeleteParamsCfR2JurisdictionFedramp BucketDomainCustomDeleteParamsCfR2Jurisdiction = "fedramp" )
func (BucketDomainCustomDeleteParamsCfR2Jurisdiction) IsKnown ¶
func (r BucketDomainCustomDeleteParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketDomainCustomDeleteResponseEnvelopeSuccess) IsKnown() bool
type BucketDomainCustomGetParamsCfR2Jurisdiction ¶
type BucketDomainCustomGetParamsCfR2Jurisdiction string
The bucket jurisdiction
const ( BucketDomainCustomGetParamsCfR2JurisdictionDefault BucketDomainCustomGetParamsCfR2Jurisdiction = "default" BucketDomainCustomGetParamsCfR2JurisdictionEu BucketDomainCustomGetParamsCfR2Jurisdiction = "eu" BucketDomainCustomGetParamsCfR2JurisdictionFedramp BucketDomainCustomGetParamsCfR2Jurisdiction = "fedramp" )
func (BucketDomainCustomGetParamsCfR2Jurisdiction) IsKnown ¶
func (r BucketDomainCustomGetParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketDomainCustomGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r BucketDomainCustomGetResponseMinTLS) IsKnown() bool
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 ¶
func (r BucketDomainCustomGetResponseStatusOwnership) IsKnown() bool
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 ¶
func (r BucketDomainCustomGetResponseStatusSSL) IsKnown() bool
type BucketDomainCustomListParamsCfR2Jurisdiction ¶
type BucketDomainCustomListParamsCfR2Jurisdiction string
The bucket jurisdiction
const ( BucketDomainCustomListParamsCfR2JurisdictionDefault BucketDomainCustomListParamsCfR2Jurisdiction = "default" BucketDomainCustomListParamsCfR2JurisdictionEu BucketDomainCustomListParamsCfR2Jurisdiction = "eu" BucketDomainCustomListParamsCfR2JurisdictionFedramp BucketDomainCustomListParamsCfR2Jurisdiction = "fedramp" )
func (BucketDomainCustomListParamsCfR2Jurisdiction) IsKnown ¶
func (r BucketDomainCustomListParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketDomainCustomListResponseDomainsMinTLS) IsKnown() bool
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 ¶
func (r BucketDomainCustomListResponseDomainsStatusOwnership) IsKnown() bool
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 ¶
func (r BucketDomainCustomListResponseDomainsStatusSSL) IsKnown() bool
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 ¶
func (r BucketDomainCustomListResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r BucketDomainCustomNewParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketDomainCustomNewParamsMinTLS) IsKnown() bool
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 ¶
func (r BucketDomainCustomNewResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r BucketDomainCustomNewResponseMinTLS) IsKnown() bool
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 ¶
func (r *BucketDomainCustomService) Delete(ctx context.Context, bucketName string, domainName string, params BucketDomainCustomDeleteParams, opts ...option.RequestOption) (res *BucketDomainCustomDeleteResponse, err error)
Remove custom domain registration from an existing R2 bucket
func (*BucketDomainCustomService) Get ¶
func (r *BucketDomainCustomService) Get(ctx context.Context, bucketName string, domainName string, params BucketDomainCustomGetParams, opts ...option.RequestOption) (res *BucketDomainCustomGetResponse, err error)
Get the configuration for a custom domain on an existing R2 bucket.
func (*BucketDomainCustomService) List ¶
func (r *BucketDomainCustomService) List(ctx context.Context, bucketName string, params BucketDomainCustomListParams, opts ...option.RequestOption) (res *BucketDomainCustomListResponse, err error)
Gets a list of all custom domains registered with an existing R2 bucket.
func (*BucketDomainCustomService) New ¶
func (r *BucketDomainCustomService) New(ctx context.Context, bucketName string, params BucketDomainCustomNewParams, opts ...option.RequestOption) (res *BucketDomainCustomNewResponse, err error)
Register a new custom domain for an existing R2 bucket.
func (*BucketDomainCustomService) Update ¶
func (r *BucketDomainCustomService) Update(ctx context.Context, bucketName string, domainName string, params BucketDomainCustomUpdateParams, opts ...option.RequestOption) (res *BucketDomainCustomUpdateResponse, err error)
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 ¶
func (r BucketDomainCustomUpdateParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketDomainCustomUpdateParamsMinTLS) IsKnown() bool
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 ¶
func (r BucketDomainCustomUpdateResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r BucketDomainCustomUpdateResponseMinTLS) IsKnown() bool
type BucketDomainManagedListParamsCfR2Jurisdiction ¶
type BucketDomainManagedListParamsCfR2Jurisdiction string
The bucket jurisdiction
const ( BucketDomainManagedListParamsCfR2JurisdictionDefault BucketDomainManagedListParamsCfR2Jurisdiction = "default" BucketDomainManagedListParamsCfR2JurisdictionEu BucketDomainManagedListParamsCfR2Jurisdiction = "eu" BucketDomainManagedListParamsCfR2JurisdictionFedramp BucketDomainManagedListParamsCfR2Jurisdiction = "fedramp" )
func (BucketDomainManagedListParamsCfR2Jurisdiction) IsKnown ¶
func (r BucketDomainManagedListParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketDomainManagedListResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *BucketDomainManagedService) List(ctx context.Context, bucketName string, params BucketDomainManagedListParams, opts ...option.RequestOption) (res *BucketDomainManagedListResponse, err error)
Gets state of public access over the bucket's R2-managed (r2.dev) domain.
func (*BucketDomainManagedService) Update ¶
func (r *BucketDomainManagedService) Update(ctx context.Context, bucketName string, params BucketDomainManagedUpdateParams, opts ...option.RequestOption) (res *BucketDomainManagedUpdateResponse, err error)
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 ¶
func (r BucketDomainManagedUpdateParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketDomainManagedUpdateResponseEnvelopeSuccess) IsKnown() bool
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 BucketEventNotificationDeleteParams ¶ added in v4.1.0
type BucketEventNotificationDeleteParamsCfR2Jurisdiction ¶ added in v4.1.0
type BucketEventNotificationDeleteParamsCfR2Jurisdiction string
The bucket jurisdiction
const ( BucketEventNotificationDeleteParamsCfR2JurisdictionDefault BucketEventNotificationDeleteParamsCfR2Jurisdiction = "default" BucketEventNotificationDeleteParamsCfR2JurisdictionEu BucketEventNotificationDeleteParamsCfR2Jurisdiction = "eu" BucketEventNotificationDeleteParamsCfR2JurisdictionFedramp BucketEventNotificationDeleteParamsCfR2Jurisdiction = "fedramp" )
func (BucketEventNotificationDeleteParamsCfR2Jurisdiction) IsKnown ¶ added in v4.1.0
func (r BucketEventNotificationDeleteParamsCfR2Jurisdiction) IsKnown() bool
type BucketEventNotificationDeleteResponse ¶ added in v4.1.0
type BucketEventNotificationDeleteResponse = interface{}
type BucketEventNotificationDeleteResponseEnvelope ¶ added in v4.1.0
type BucketEventNotificationDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` Result BucketEventNotificationDeleteResponse `json:"result,required"` // Whether the API call was successful Success BucketEventNotificationDeleteResponseEnvelopeSuccess `json:"success,required"` JSON bucketEventNotificationDeleteResponseEnvelopeJSON `json:"-"` }
func (*BucketEventNotificationDeleteResponseEnvelope) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketEventNotificationDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type BucketEventNotificationDeleteResponseEnvelopeSuccess ¶ added in v4.1.0
type BucketEventNotificationDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
BucketEventNotificationDeleteResponseEnvelopeSuccessTrue BucketEventNotificationDeleteResponseEnvelopeSuccess = true
)
func (BucketEventNotificationDeleteResponseEnvelopeSuccess) IsKnown ¶ added in v4.1.0
func (r BucketEventNotificationDeleteResponseEnvelopeSuccess) IsKnown() bool
type BucketEventNotificationGetParams ¶ added in v4.1.0
type BucketEventNotificationGetParamsCfR2Jurisdiction ¶ added in v4.1.0
type BucketEventNotificationGetParamsCfR2Jurisdiction string
The bucket jurisdiction
const ( BucketEventNotificationGetParamsCfR2JurisdictionDefault BucketEventNotificationGetParamsCfR2Jurisdiction = "default" BucketEventNotificationGetParamsCfR2JurisdictionEu BucketEventNotificationGetParamsCfR2Jurisdiction = "eu" BucketEventNotificationGetParamsCfR2JurisdictionFedramp BucketEventNotificationGetParamsCfR2Jurisdiction = "fedramp" )
func (BucketEventNotificationGetParamsCfR2Jurisdiction) IsKnown ¶ added in v4.1.0
func (r BucketEventNotificationGetParamsCfR2Jurisdiction) IsKnown() bool
type BucketEventNotificationGetResponse ¶ added in v4.1.0
type BucketEventNotificationGetResponse struct { // Name of the bucket. BucketName string `json:"bucketName"` // List of queues associated with the bucket. Queues []BucketEventNotificationGetResponseQueue `json:"queues"` JSON bucketEventNotificationGetResponseJSON `json:"-"` }
func (*BucketEventNotificationGetResponse) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketEventNotificationGetResponse) UnmarshalJSON(data []byte) (err error)
type BucketEventNotificationGetResponseEnvelope ¶ added in v4.1.0
type BucketEventNotificationGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` Result BucketEventNotificationGetResponse `json:"result,required"` // Whether the API call was successful Success BucketEventNotificationGetResponseEnvelopeSuccess `json:"success,required"` JSON bucketEventNotificationGetResponseEnvelopeJSON `json:"-"` }
func (*BucketEventNotificationGetResponseEnvelope) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketEventNotificationGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type BucketEventNotificationGetResponseEnvelopeSuccess ¶ added in v4.1.0
type BucketEventNotificationGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
BucketEventNotificationGetResponseEnvelopeSuccessTrue BucketEventNotificationGetResponseEnvelopeSuccess = true
)
func (BucketEventNotificationGetResponseEnvelopeSuccess) IsKnown ¶ added in v4.1.0
func (r BucketEventNotificationGetResponseEnvelopeSuccess) IsKnown() bool
type BucketEventNotificationGetResponseQueue ¶ added in v4.1.0
type BucketEventNotificationGetResponseQueue struct { // Queue ID QueueID string `json:"queueId"` // Name of the queue QueueName string `json:"queueName"` Rules []BucketEventNotificationGetResponseQueuesRule `json:"rules"` JSON bucketEventNotificationGetResponseQueueJSON `json:"-"` }
func (*BucketEventNotificationGetResponseQueue) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketEventNotificationGetResponseQueue) UnmarshalJSON(data []byte) (err error)
type BucketEventNotificationGetResponseQueuesRule ¶ added in v4.1.0
type BucketEventNotificationGetResponseQueuesRule struct { // Array of R2 object actions that will trigger notifications Actions []BucketEventNotificationGetResponseQueuesRulesAction `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 bucketEventNotificationGetResponseQueuesRuleJSON `json:"-"` }
func (*BucketEventNotificationGetResponseQueuesRule) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketEventNotificationGetResponseQueuesRule) UnmarshalJSON(data []byte) (err error)
type BucketEventNotificationGetResponseQueuesRulesAction ¶ added in v4.1.0
type BucketEventNotificationGetResponseQueuesRulesAction string
const ( BucketEventNotificationGetResponseQueuesRulesActionPutObject BucketEventNotificationGetResponseQueuesRulesAction = "PutObject" BucketEventNotificationGetResponseQueuesRulesActionCopyObject BucketEventNotificationGetResponseQueuesRulesAction = "CopyObject" BucketEventNotificationGetResponseQueuesRulesActionDeleteObject BucketEventNotificationGetResponseQueuesRulesAction = "DeleteObject" BucketEventNotificationGetResponseQueuesRulesActionCompleteMultipartUpload BucketEventNotificationGetResponseQueuesRulesAction = "CompleteMultipartUpload" BucketEventNotificationGetResponseQueuesRulesActionLifecycleDeletion BucketEventNotificationGetResponseQueuesRulesAction = "LifecycleDeletion" )
func (BucketEventNotificationGetResponseQueuesRulesAction) IsKnown ¶ added in v4.1.0
func (r BucketEventNotificationGetResponseQueuesRulesAction) IsKnown() bool
type BucketEventNotificationService ¶
type BucketEventNotificationService struct {
Options []option.RequestOption
}
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.
func (*BucketEventNotificationService) Delete ¶ added in v4.1.0
func (r *BucketEventNotificationService) Delete(ctx context.Context, bucketName string, queueID string, params BucketEventNotificationDeleteParams, opts ...option.RequestOption) (res *BucketEventNotificationDeleteResponse, err error)
Delete an event notification rule. **If no body is provided, all rules for specified queue will be deleted**.
func (*BucketEventNotificationService) Get ¶ added in v4.1.0
func (r *BucketEventNotificationService) Get(ctx context.Context, bucketName string, params BucketEventNotificationGetParams, opts ...option.RequestOption) (res *BucketEventNotificationGetResponse, err error)
List all event notification rules for a bucket.
func (*BucketEventNotificationService) Update ¶ added in v4.1.0
func (r *BucketEventNotificationService) Update(ctx context.Context, bucketName string, queueID string, params BucketEventNotificationUpdateParams, opts ...option.RequestOption) (res *BucketEventNotificationUpdateResponse, err error)
Create event notification rule.
type BucketEventNotificationUpdateParams ¶ added in v4.1.0
type BucketEventNotificationUpdateParams struct { // Account ID AccountID param.Field[string] `path:"account_id,required"` // Array of rules to drive notifications Rules param.Field[[]BucketEventNotificationUpdateParamsRule] `json:"rules"` // The bucket jurisdiction Jurisdiction param.Field[BucketEventNotificationUpdateParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"` }
func (BucketEventNotificationUpdateParams) MarshalJSON ¶ added in v4.1.0
func (r BucketEventNotificationUpdateParams) MarshalJSON() (data []byte, err error)
type BucketEventNotificationUpdateParamsCfR2Jurisdiction ¶ added in v4.1.0
type BucketEventNotificationUpdateParamsCfR2Jurisdiction string
The bucket jurisdiction
const ( BucketEventNotificationUpdateParamsCfR2JurisdictionDefault BucketEventNotificationUpdateParamsCfR2Jurisdiction = "default" BucketEventNotificationUpdateParamsCfR2JurisdictionEu BucketEventNotificationUpdateParamsCfR2Jurisdiction = "eu" BucketEventNotificationUpdateParamsCfR2JurisdictionFedramp BucketEventNotificationUpdateParamsCfR2Jurisdiction = "fedramp" )
func (BucketEventNotificationUpdateParamsCfR2Jurisdiction) IsKnown ¶ added in v4.1.0
func (r BucketEventNotificationUpdateParamsCfR2Jurisdiction) IsKnown() bool
type BucketEventNotificationUpdateParamsRule ¶ added in v4.1.0
type BucketEventNotificationUpdateParamsRule struct { // Array of R2 object actions that will trigger notifications Actions param.Field[[]BucketEventNotificationUpdateParamsRulesAction] `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 (BucketEventNotificationUpdateParamsRule) MarshalJSON ¶ added in v4.1.0
func (r BucketEventNotificationUpdateParamsRule) MarshalJSON() (data []byte, err error)
type BucketEventNotificationUpdateParamsRulesAction ¶ added in v4.1.0
type BucketEventNotificationUpdateParamsRulesAction string
const ( BucketEventNotificationUpdateParamsRulesActionPutObject BucketEventNotificationUpdateParamsRulesAction = "PutObject" BucketEventNotificationUpdateParamsRulesActionCopyObject BucketEventNotificationUpdateParamsRulesAction = "CopyObject" BucketEventNotificationUpdateParamsRulesActionDeleteObject BucketEventNotificationUpdateParamsRulesAction = "DeleteObject" BucketEventNotificationUpdateParamsRulesActionCompleteMultipartUpload BucketEventNotificationUpdateParamsRulesAction = "CompleteMultipartUpload" BucketEventNotificationUpdateParamsRulesActionLifecycleDeletion BucketEventNotificationUpdateParamsRulesAction = "LifecycleDeletion" )
func (BucketEventNotificationUpdateParamsRulesAction) IsKnown ¶ added in v4.1.0
func (r BucketEventNotificationUpdateParamsRulesAction) IsKnown() bool
type BucketEventNotificationUpdateResponse ¶ added in v4.1.0
type BucketEventNotificationUpdateResponse = interface{}
type BucketEventNotificationUpdateResponseEnvelope ¶ added in v4.1.0
type BucketEventNotificationUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` Result BucketEventNotificationUpdateResponse `json:"result,required"` // Whether the API call was successful Success BucketEventNotificationUpdateResponseEnvelopeSuccess `json:"success,required"` JSON bucketEventNotificationUpdateResponseEnvelopeJSON `json:"-"` }
func (*BucketEventNotificationUpdateResponseEnvelope) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketEventNotificationUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type BucketEventNotificationUpdateResponseEnvelopeSuccess ¶ added in v4.1.0
type BucketEventNotificationUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
BucketEventNotificationUpdateResponseEnvelopeSuccessTrue BucketEventNotificationUpdateResponseEnvelopeSuccess = true
)
func (BucketEventNotificationUpdateResponseEnvelopeSuccess) IsKnown ¶ added in v4.1.0
func (r BucketEventNotificationUpdateResponseEnvelopeSuccess) IsKnown() bool
type BucketGetParams ¶
type BucketGetParamsCfR2Jurisdiction ¶
type BucketGetParamsCfR2Jurisdiction string
The bucket jurisdiction
const ( BucketGetParamsCfR2JurisdictionDefault BucketGetParamsCfR2Jurisdiction = "default" BucketGetParamsCfR2JurisdictionEu BucketGetParamsCfR2Jurisdiction = "eu" BucketGetParamsCfR2JurisdictionFedramp BucketGetParamsCfR2Jurisdiction = "fedramp" )
func (BucketGetParamsCfR2Jurisdiction) IsKnown ¶
func (r BucketGetParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketGetResponseEnvelopeSuccess) IsKnown() bool
type BucketLifecycleGetParamsCfR2Jurisdiction ¶
type BucketLifecycleGetParamsCfR2Jurisdiction string
The bucket jurisdiction
const ( BucketLifecycleGetParamsCfR2JurisdictionDefault BucketLifecycleGetParamsCfR2Jurisdiction = "default" BucketLifecycleGetParamsCfR2JurisdictionEu BucketLifecycleGetParamsCfR2Jurisdiction = "eu" BucketLifecycleGetParamsCfR2JurisdictionFedramp BucketLifecycleGetParamsCfR2Jurisdiction = "fedramp" )
func (BucketLifecycleGetParamsCfR2Jurisdiction) IsKnown ¶
func (r BucketLifecycleGetParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketLifecycleGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *BucketLifecycleGetResponseRulesAbortMultipartUploadsTransition) UnmarshalJSON(data []byte) (err error)
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 ¶
func (r *BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionCondition) UnmarshalJSON(data []byte) (err error)
type BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionConditionType ¶
type BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionConditionType string
const (
BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionConditionTypeAge BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionConditionType = "Age"
)
func (BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionConditionType) IsKnown ¶
func (r BucketLifecycleGetResponseRulesAbortMultipartUploadsTransitionConditionType) IsKnown() bool
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) AsUnion ¶
func (r BucketLifecycleGetResponseRulesDeleteObjectsTransitionCondition) AsUnion() BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionUnion
AsUnion returns a BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are r2.BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeCondition, r2.BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateCondition.
func (*BucketLifecycleGetResponseRulesDeleteObjectsTransitionCondition) UnmarshalJSON ¶
func (r *BucketLifecycleGetResponseRulesDeleteObjectsTransitionCondition) UnmarshalJSON(data []byte) (err error)
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 ¶
func (r *BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeCondition) UnmarshalJSON(data []byte) (err error)
type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType ¶
type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType string
const (
BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionTypeAge BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType = "Age"
)
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 ¶
func (r *BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateCondition) UnmarshalJSON(data []byte) (err error)
type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType ¶
type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType string
const (
BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionTypeDate BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType = "Date"
)
type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionType ¶
type BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionType string
const ( BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionTypeAge BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionType = "Age" BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionTypeDate BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionType = "Date" )
func (BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionType) IsKnown ¶
func (r BucketLifecycleGetResponseRulesDeleteObjectsTransitionConditionType) IsKnown() bool
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) AsUnion ¶
func (r BucketLifecycleGetResponseRulesStorageClassTransitionsCondition) AsUnion() BucketLifecycleGetResponseRulesStorageClassTransitionsConditionUnion
AsUnion returns a BucketLifecycleGetResponseRulesStorageClassTransitionsConditionUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are r2.BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeCondition, r2.BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateCondition.
func (*BucketLifecycleGetResponseRulesStorageClassTransitionsCondition) UnmarshalJSON ¶
func (r *BucketLifecycleGetResponseRulesStorageClassTransitionsCondition) UnmarshalJSON(data []byte) (err error)
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 ¶
func (r *BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeCondition) UnmarshalJSON(data []byte) (err error)
type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType ¶
type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType string
const (
BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeConditionTypeAge BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType = "Age"
)
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 ¶
func (r *BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateCondition) UnmarshalJSON(data []byte) (err error)
type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateConditionType ¶
type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateConditionType string
const (
BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateConditionTypeDate BucketLifecycleGetResponseRulesStorageClassTransitionsConditionR2LifecycleDateConditionType = "Date"
)
type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionType ¶
type BucketLifecycleGetResponseRulesStorageClassTransitionsConditionType string
const ( BucketLifecycleGetResponseRulesStorageClassTransitionsConditionTypeAge BucketLifecycleGetResponseRulesStorageClassTransitionsConditionType = "Age" BucketLifecycleGetResponseRulesStorageClassTransitionsConditionTypeDate BucketLifecycleGetResponseRulesStorageClassTransitionsConditionType = "Date" )
func (BucketLifecycleGetResponseRulesStorageClassTransitionsConditionType) IsKnown ¶
func (r BucketLifecycleGetResponseRulesStorageClassTransitionsConditionType) IsKnown() bool
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 ¶
func (r BucketLifecycleGetResponseRulesStorageClassTransitionsStorageClass) IsKnown() bool
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 ¶
func (r *BucketLifecycleService) Get(ctx context.Context, bucketName string, params BucketLifecycleGetParams, opts ...option.RequestOption) (res *BucketLifecycleGetResponse, err error)
Get object lifecycle rules for a bucket
func (*BucketLifecycleService) Update ¶
func (r *BucketLifecycleService) Update(ctx context.Context, bucketName string, params BucketLifecycleUpdateParams, opts ...option.RequestOption) (res *BucketLifecycleUpdateResponse, err error)
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 ¶
func (r BucketLifecycleUpdateParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransition) MarshalJSON() (data []byte, err error)
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 ¶
func (r BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionCondition) MarshalJSON() (data []byte, err error)
type BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionConditionType ¶
type BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionConditionType string
const (
BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionConditionTypeAge BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionConditionType = "Age"
)
func (BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionConditionType) IsKnown ¶
func (r BucketLifecycleUpdateParamsRulesAbortMultipartUploadsTransitionConditionType) IsKnown() bool
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 ¶
func (r BucketLifecycleUpdateParamsRulesDeleteObjectsTransition) MarshalJSON() (data []byte, err error)
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 ¶
func (r BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionCondition) MarshalJSON() (data []byte, err error)
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 ¶
func (r BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleAgeCondition) MarshalJSON() (data []byte, err error)
type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType ¶
type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType string
const (
BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionTypeAge BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleAgeConditionType = "Age"
)
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 ¶
func (r BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleDateCondition) MarshalJSON() (data []byte, err error)
type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType ¶
type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType string
const (
BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionTypeDate BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionR2LifecycleDateConditionType = "Date"
)
type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionType ¶
type BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionType string
const ( BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionTypeAge BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionType = "Age" BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionTypeDate BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionType = "Date" )
func (BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionType) IsKnown ¶
func (r BucketLifecycleUpdateParamsRulesDeleteObjectsTransitionConditionType) IsKnown() bool
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 ¶
func (r BucketLifecycleUpdateParamsRulesStorageClassTransition) MarshalJSON() (data []byte, err error)
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 ¶
func (r BucketLifecycleUpdateParamsRulesStorageClassTransitionsCondition) MarshalJSON() (data []byte, err error)
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 ¶
func (r BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleAgeCondition) MarshalJSON() (data []byte, err error)
type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType ¶
type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType string
const (
BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleAgeConditionTypeAge BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleAgeConditionType = "Age"
)
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 ¶
func (r BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleDateCondition) MarshalJSON() (data []byte, err error)
type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleDateConditionType ¶
type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleDateConditionType string
const (
BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleDateConditionTypeDate BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionR2LifecycleDateConditionType = "Date"
)
type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionType ¶
type BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionType string
const ( BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionTypeAge BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionType = "Age" BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionTypeDate BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionType = "Date" )
func (BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionType) IsKnown ¶
func (r BucketLifecycleUpdateParamsRulesStorageClassTransitionsConditionType) IsKnown() bool
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 ¶
func (r BucketLifecycleUpdateParamsRulesStorageClassTransitionsStorageClass) IsKnown() bool
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 ¶
func (r BucketLifecycleUpdateResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r BucketListParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketListResponseEnvelopeSuccess) IsKnown() bool
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 BucketLockGetParams ¶ added in v4.1.0
type BucketLockGetParamsCfR2Jurisdiction ¶ added in v4.1.0
type BucketLockGetParamsCfR2Jurisdiction string
The bucket jurisdiction
const ( BucketLockGetParamsCfR2JurisdictionDefault BucketLockGetParamsCfR2Jurisdiction = "default" BucketLockGetParamsCfR2JurisdictionEu BucketLockGetParamsCfR2Jurisdiction = "eu" BucketLockGetParamsCfR2JurisdictionFedramp BucketLockGetParamsCfR2Jurisdiction = "fedramp" )
func (BucketLockGetParamsCfR2Jurisdiction) IsKnown ¶ added in v4.1.0
func (r BucketLockGetParamsCfR2Jurisdiction) IsKnown() bool
type BucketLockGetResponse ¶ added in v4.1.0
type BucketLockGetResponse struct { Rules []BucketLockGetResponseRule `json:"rules"` JSON bucketLockGetResponseJSON `json:"-"` }
func (*BucketLockGetResponse) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketLockGetResponse) UnmarshalJSON(data []byte) (err error)
type BucketLockGetResponseEnvelope ¶ added in v4.1.0
type BucketLockGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` Result BucketLockGetResponse `json:"result,required"` // Whether the API call was successful Success BucketLockGetResponseEnvelopeSuccess `json:"success,required"` JSON bucketLockGetResponseEnvelopeJSON `json:"-"` }
func (*BucketLockGetResponseEnvelope) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketLockGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type BucketLockGetResponseEnvelopeSuccess ¶ added in v4.1.0
type BucketLockGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
BucketLockGetResponseEnvelopeSuccessTrue BucketLockGetResponseEnvelopeSuccess = true
)
func (BucketLockGetResponseEnvelopeSuccess) IsKnown ¶ added in v4.1.0
func (r BucketLockGetResponseEnvelopeSuccess) IsKnown() bool
type BucketLockGetResponseRule ¶ added in v4.1.0
type BucketLockGetResponseRule struct { // Unique identifier for this rule ID string `json:"id,required"` // Condition to apply a lock rule to an object for how long in seconds Condition BucketLockGetResponseRulesCondition `json:"condition,required"` // Whether or not this rule is in effect Enabled bool `json:"enabled,required"` // Rule 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"` JSON bucketLockGetResponseRuleJSON `json:"-"` }
func (*BucketLockGetResponseRule) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketLockGetResponseRule) UnmarshalJSON(data []byte) (err error)
type BucketLockGetResponseRulesCondition ¶ added in v4.1.0
type BucketLockGetResponseRulesCondition struct { Type BucketLockGetResponseRulesConditionType `json:"type,required"` Date time.Time `json:"date" format:"date"` MaxAgeSeconds int64 `json:"maxAgeSeconds"` JSON bucketLockGetResponseRulesConditionJSON `json:"-"` // contains filtered or unexported fields }
Condition to apply a lock rule to an object for how long in seconds
func (BucketLockGetResponseRulesCondition) AsUnion ¶ added in v4.1.0
func (r BucketLockGetResponseRulesCondition) AsUnion() BucketLockGetResponseRulesConditionUnion
AsUnion returns a BucketLockGetResponseRulesConditionUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are r2.BucketLockGetResponseRulesConditionR2LockRuleAgeCondition, r2.BucketLockGetResponseRulesConditionR2LockRuleDateCondition, r2.BucketLockGetResponseRulesConditionR2LockRuleIndefiniteCondition.
func (*BucketLockGetResponseRulesCondition) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketLockGetResponseRulesCondition) UnmarshalJSON(data []byte) (err error)
type BucketLockGetResponseRulesConditionR2LockRuleAgeCondition ¶ added in v4.1.0
type BucketLockGetResponseRulesConditionR2LockRuleAgeCondition struct { MaxAgeSeconds int64 `json:"maxAgeSeconds,required"` Type BucketLockGetResponseRulesConditionR2LockRuleAgeConditionType `json:"type,required"` JSON bucketLockGetResponseRulesConditionR2LockRuleAgeConditionJSON `json:"-"` }
Condition to apply a lock rule to an object for how long in seconds
func (*BucketLockGetResponseRulesConditionR2LockRuleAgeCondition) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketLockGetResponseRulesConditionR2LockRuleAgeCondition) UnmarshalJSON(data []byte) (err error)
type BucketLockGetResponseRulesConditionR2LockRuleAgeConditionType ¶ added in v4.1.0
type BucketLockGetResponseRulesConditionR2LockRuleAgeConditionType string
const (
BucketLockGetResponseRulesConditionR2LockRuleAgeConditionTypeAge BucketLockGetResponseRulesConditionR2LockRuleAgeConditionType = "Age"
)
func (BucketLockGetResponseRulesConditionR2LockRuleAgeConditionType) IsKnown ¶ added in v4.1.0
func (r BucketLockGetResponseRulesConditionR2LockRuleAgeConditionType) IsKnown() bool
type BucketLockGetResponseRulesConditionR2LockRuleDateCondition ¶ added in v4.1.0
type BucketLockGetResponseRulesConditionR2LockRuleDateCondition struct { Date time.Time `json:"date,required" format:"date"` Type BucketLockGetResponseRulesConditionR2LockRuleDateConditionType `json:"type,required"` JSON bucketLockGetResponseRulesConditionR2LockRuleDateConditionJSON `json:"-"` }
Condition to apply a lock rule to an object until a specific date
func (*BucketLockGetResponseRulesConditionR2LockRuleDateCondition) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketLockGetResponseRulesConditionR2LockRuleDateCondition) UnmarshalJSON(data []byte) (err error)
type BucketLockGetResponseRulesConditionR2LockRuleDateConditionType ¶ added in v4.1.0
type BucketLockGetResponseRulesConditionR2LockRuleDateConditionType string
const (
BucketLockGetResponseRulesConditionR2LockRuleDateConditionTypeDate BucketLockGetResponseRulesConditionR2LockRuleDateConditionType = "Date"
)
func (BucketLockGetResponseRulesConditionR2LockRuleDateConditionType) IsKnown ¶ added in v4.1.0
func (r BucketLockGetResponseRulesConditionR2LockRuleDateConditionType) IsKnown() bool
type BucketLockGetResponseRulesConditionR2LockRuleIndefiniteCondition ¶ added in v4.1.0
type BucketLockGetResponseRulesConditionR2LockRuleIndefiniteCondition struct { Type BucketLockGetResponseRulesConditionR2LockRuleIndefiniteConditionType `json:"type,required"` JSON bucketLockGetResponseRulesConditionR2LockRuleIndefiniteConditionJSON `json:"-"` }
Condition to apply a lock rule indefinitely
func (*BucketLockGetResponseRulesConditionR2LockRuleIndefiniteCondition) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketLockGetResponseRulesConditionR2LockRuleIndefiniteCondition) UnmarshalJSON(data []byte) (err error)
type BucketLockGetResponseRulesConditionR2LockRuleIndefiniteConditionType ¶ added in v4.1.0
type BucketLockGetResponseRulesConditionR2LockRuleIndefiniteConditionType string
const (
BucketLockGetResponseRulesConditionR2LockRuleIndefiniteConditionTypeIndefinite BucketLockGetResponseRulesConditionR2LockRuleIndefiniteConditionType = "Indefinite"
)
func (BucketLockGetResponseRulesConditionR2LockRuleIndefiniteConditionType) IsKnown ¶ added in v4.1.0
func (r BucketLockGetResponseRulesConditionR2LockRuleIndefiniteConditionType) IsKnown() bool
type BucketLockGetResponseRulesConditionType ¶ added in v4.1.0
type BucketLockGetResponseRulesConditionType string
const ( BucketLockGetResponseRulesConditionTypeAge BucketLockGetResponseRulesConditionType = "Age" BucketLockGetResponseRulesConditionTypeDate BucketLockGetResponseRulesConditionType = "Date" BucketLockGetResponseRulesConditionTypeIndefinite BucketLockGetResponseRulesConditionType = "Indefinite" )
func (BucketLockGetResponseRulesConditionType) IsKnown ¶ added in v4.1.0
func (r BucketLockGetResponseRulesConditionType) IsKnown() bool
type BucketLockGetResponseRulesConditionUnion ¶ added in v4.1.0
type BucketLockGetResponseRulesConditionUnion interface {
// contains filtered or unexported methods
}
Condition to apply a lock rule to an object for how long in seconds
Union satisfied by r2.BucketLockGetResponseRulesConditionR2LockRuleAgeCondition, r2.BucketLockGetResponseRulesConditionR2LockRuleDateCondition or r2.BucketLockGetResponseRulesConditionR2LockRuleIndefiniteCondition.
type BucketLockService ¶ added in v4.1.0
type BucketLockService struct {
Options []option.RequestOption
}
BucketLockService 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 NewBucketLockService method instead.
func NewBucketLockService ¶ added in v4.1.0
func NewBucketLockService(opts ...option.RequestOption) (r *BucketLockService)
NewBucketLockService 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 (*BucketLockService) Get ¶ added in v4.1.0
func (r *BucketLockService) Get(ctx context.Context, bucketName string, params BucketLockGetParams, opts ...option.RequestOption) (res *BucketLockGetResponse, err error)
Get lock rules for a bucket
func (*BucketLockService) Update ¶ added in v4.1.0
func (r *BucketLockService) Update(ctx context.Context, bucketName string, params BucketLockUpdateParams, opts ...option.RequestOption) (res *BucketLockUpdateResponse, err error)
Set lock rules for a bucket
type BucketLockUpdateParams ¶ added in v4.1.0
type BucketLockUpdateParams struct { // Account ID AccountID param.Field[string] `path:"account_id,required"` Rules param.Field[[]BucketLockUpdateParamsRule] `json:"rules"` // The bucket jurisdiction Jurisdiction param.Field[BucketLockUpdateParamsCfR2Jurisdiction] `header:"cf-r2-jurisdiction"` }
func (BucketLockUpdateParams) MarshalJSON ¶ added in v4.1.0
func (r BucketLockUpdateParams) MarshalJSON() (data []byte, err error)
type BucketLockUpdateParamsCfR2Jurisdiction ¶ added in v4.1.0
type BucketLockUpdateParamsCfR2Jurisdiction string
The bucket jurisdiction
const ( BucketLockUpdateParamsCfR2JurisdictionDefault BucketLockUpdateParamsCfR2Jurisdiction = "default" BucketLockUpdateParamsCfR2JurisdictionEu BucketLockUpdateParamsCfR2Jurisdiction = "eu" BucketLockUpdateParamsCfR2JurisdictionFedramp BucketLockUpdateParamsCfR2Jurisdiction = "fedramp" )
func (BucketLockUpdateParamsCfR2Jurisdiction) IsKnown ¶ added in v4.1.0
func (r BucketLockUpdateParamsCfR2Jurisdiction) IsKnown() bool
type BucketLockUpdateParamsRule ¶ added in v4.1.0
type BucketLockUpdateParamsRule struct { // Unique identifier for this rule ID param.Field[string] `json:"id,required"` // Condition to apply a lock rule to an object for how long in seconds Condition param.Field[BucketLockUpdateParamsRulesConditionUnion] `json:"condition,required"` // Whether or not this rule is in effect Enabled param.Field[bool] `json:"enabled,required"` // Rule 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"` }
func (BucketLockUpdateParamsRule) MarshalJSON ¶ added in v4.1.0
func (r BucketLockUpdateParamsRule) MarshalJSON() (data []byte, err error)
type BucketLockUpdateParamsRulesCondition ¶ added in v4.1.0
type BucketLockUpdateParamsRulesCondition struct { Type param.Field[BucketLockUpdateParamsRulesConditionType] `json:"type,required"` Date param.Field[time.Time] `json:"date" format:"date"` MaxAgeSeconds param.Field[int64] `json:"maxAgeSeconds"` }
Condition to apply a lock rule to an object for how long in seconds
func (BucketLockUpdateParamsRulesCondition) MarshalJSON ¶ added in v4.1.0
func (r BucketLockUpdateParamsRulesCondition) MarshalJSON() (data []byte, err error)
type BucketLockUpdateParamsRulesConditionR2LockRuleAgeCondition ¶ added in v4.1.0
type BucketLockUpdateParamsRulesConditionR2LockRuleAgeCondition struct { MaxAgeSeconds param.Field[int64] `json:"maxAgeSeconds,required"` Type param.Field[BucketLockUpdateParamsRulesConditionR2LockRuleAgeConditionType] `json:"type,required"` }
Condition to apply a lock rule to an object for how long in seconds
func (BucketLockUpdateParamsRulesConditionR2LockRuleAgeCondition) MarshalJSON ¶ added in v4.1.0
func (r BucketLockUpdateParamsRulesConditionR2LockRuleAgeCondition) MarshalJSON() (data []byte, err error)
type BucketLockUpdateParamsRulesConditionR2LockRuleAgeConditionType ¶ added in v4.1.0
type BucketLockUpdateParamsRulesConditionR2LockRuleAgeConditionType string
const (
BucketLockUpdateParamsRulesConditionR2LockRuleAgeConditionTypeAge BucketLockUpdateParamsRulesConditionR2LockRuleAgeConditionType = "Age"
)
func (BucketLockUpdateParamsRulesConditionR2LockRuleAgeConditionType) IsKnown ¶ added in v4.1.0
func (r BucketLockUpdateParamsRulesConditionR2LockRuleAgeConditionType) IsKnown() bool
type BucketLockUpdateParamsRulesConditionR2LockRuleDateCondition ¶ added in v4.1.0
type BucketLockUpdateParamsRulesConditionR2LockRuleDateCondition struct { Date param.Field[time.Time] `json:"date,required" format:"date"` Type param.Field[BucketLockUpdateParamsRulesConditionR2LockRuleDateConditionType] `json:"type,required"` }
Condition to apply a lock rule to an object until a specific date
func (BucketLockUpdateParamsRulesConditionR2LockRuleDateCondition) MarshalJSON ¶ added in v4.1.0
func (r BucketLockUpdateParamsRulesConditionR2LockRuleDateCondition) MarshalJSON() (data []byte, err error)
type BucketLockUpdateParamsRulesConditionR2LockRuleDateConditionType ¶ added in v4.1.0
type BucketLockUpdateParamsRulesConditionR2LockRuleDateConditionType string
const (
BucketLockUpdateParamsRulesConditionR2LockRuleDateConditionTypeDate BucketLockUpdateParamsRulesConditionR2LockRuleDateConditionType = "Date"
)
func (BucketLockUpdateParamsRulesConditionR2LockRuleDateConditionType) IsKnown ¶ added in v4.1.0
func (r BucketLockUpdateParamsRulesConditionR2LockRuleDateConditionType) IsKnown() bool
type BucketLockUpdateParamsRulesConditionR2LockRuleIndefiniteCondition ¶ added in v4.1.0
type BucketLockUpdateParamsRulesConditionR2LockRuleIndefiniteCondition struct {
Type param.Field[BucketLockUpdateParamsRulesConditionR2LockRuleIndefiniteConditionType] `json:"type,required"`
}
Condition to apply a lock rule indefinitely
func (BucketLockUpdateParamsRulesConditionR2LockRuleIndefiniteCondition) MarshalJSON ¶ added in v4.1.0
func (r BucketLockUpdateParamsRulesConditionR2LockRuleIndefiniteCondition) MarshalJSON() (data []byte, err error)
type BucketLockUpdateParamsRulesConditionR2LockRuleIndefiniteConditionType ¶ added in v4.1.0
type BucketLockUpdateParamsRulesConditionR2LockRuleIndefiniteConditionType string
const (
BucketLockUpdateParamsRulesConditionR2LockRuleIndefiniteConditionTypeIndefinite BucketLockUpdateParamsRulesConditionR2LockRuleIndefiniteConditionType = "Indefinite"
)
func (BucketLockUpdateParamsRulesConditionR2LockRuleIndefiniteConditionType) IsKnown ¶ added in v4.1.0
func (r BucketLockUpdateParamsRulesConditionR2LockRuleIndefiniteConditionType) IsKnown() bool
type BucketLockUpdateParamsRulesConditionType ¶ added in v4.1.0
type BucketLockUpdateParamsRulesConditionType string
const ( BucketLockUpdateParamsRulesConditionTypeAge BucketLockUpdateParamsRulesConditionType = "Age" BucketLockUpdateParamsRulesConditionTypeDate BucketLockUpdateParamsRulesConditionType = "Date" BucketLockUpdateParamsRulesConditionTypeIndefinite BucketLockUpdateParamsRulesConditionType = "Indefinite" )
func (BucketLockUpdateParamsRulesConditionType) IsKnown ¶ added in v4.1.0
func (r BucketLockUpdateParamsRulesConditionType) IsKnown() bool
type BucketLockUpdateParamsRulesConditionUnion ¶ added in v4.1.0
type BucketLockUpdateParamsRulesConditionUnion interface {
// contains filtered or unexported methods
}
Condition to apply a lock rule to an object for how long in seconds
Satisfied by r2.BucketLockUpdateParamsRulesConditionR2LockRuleAgeCondition, r2.BucketLockUpdateParamsRulesConditionR2LockRuleDateCondition, r2.BucketLockUpdateParamsRulesConditionR2LockRuleIndefiniteCondition, BucketLockUpdateParamsRulesCondition.
type BucketLockUpdateResponse ¶ added in v4.1.0
type BucketLockUpdateResponse = interface{}
type BucketLockUpdateResponseEnvelope ¶ added in v4.1.0
type BucketLockUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` Result BucketLockUpdateResponse `json:"result,required"` // Whether the API call was successful Success BucketLockUpdateResponseEnvelopeSuccess `json:"success,required"` JSON bucketLockUpdateResponseEnvelopeJSON `json:"-"` }
func (*BucketLockUpdateResponseEnvelope) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketLockUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type BucketLockUpdateResponseEnvelopeSuccess ¶ added in v4.1.0
type BucketLockUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
BucketLockUpdateResponseEnvelopeSuccessTrue BucketLockUpdateResponseEnvelopeSuccess = true
)
func (BucketLockUpdateResponseEnvelopeSuccess) IsKnown ¶ added in v4.1.0
func (r BucketLockUpdateResponseEnvelopeSuccess) IsKnown() bool
type BucketMetricListParams ¶ added in v4.1.0
type BucketMetricListResponse ¶ added in v4.1.0
type BucketMetricListResponse struct { // Metrics based on what state they are in(uploaded or published) InfrequentAccess BucketMetricListResponseInfrequentAccess `json:"infrequentAccess"` // Metrics based on what state they are in(uploaded or published) Standard BucketMetricListResponseStandard `json:"standard"` JSON bucketMetricListResponseJSON `json:"-"` }
Metrics based on the class they belong to
func (*BucketMetricListResponse) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketMetricListResponse) UnmarshalJSON(data []byte) (err error)
type BucketMetricListResponseEnvelope ¶ added in v4.1.0
type BucketMetricListResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` // Metrics based on the class they belong to Result BucketMetricListResponse `json:"result,required"` // Whether the API call was successful Success BucketMetricListResponseEnvelopeSuccess `json:"success,required"` JSON bucketMetricListResponseEnvelopeJSON `json:"-"` }
func (*BucketMetricListResponseEnvelope) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketMetricListResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type BucketMetricListResponseEnvelopeSuccess ¶ added in v4.1.0
type BucketMetricListResponseEnvelopeSuccess bool
Whether the API call was successful
const (
BucketMetricListResponseEnvelopeSuccessTrue BucketMetricListResponseEnvelopeSuccess = true
)
func (BucketMetricListResponseEnvelopeSuccess) IsKnown ¶ added in v4.1.0
func (r BucketMetricListResponseEnvelopeSuccess) IsKnown() bool
type BucketMetricListResponseInfrequentAccess ¶ added in v4.1.0
type BucketMetricListResponseInfrequentAccess struct { // Metrics on number of objects/amount of storage used Published BucketMetricListResponseInfrequentAccessPublished `json:"published"` // Metrics on number of objects/amount of storage used Uploaded BucketMetricListResponseInfrequentAccessUploaded `json:"uploaded"` JSON bucketMetricListResponseInfrequentAccessJSON `json:"-"` }
Metrics based on what state they are in(uploaded or published)
func (*BucketMetricListResponseInfrequentAccess) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketMetricListResponseInfrequentAccess) UnmarshalJSON(data []byte) (err error)
type BucketMetricListResponseInfrequentAccessPublished ¶ added in v4.1.0
type BucketMetricListResponseInfrequentAccessPublished struct { // Amount of MetadataSize float64 `json:"metadataSize"` // Number of objects stored Objects float64 `json:"objects"` // Amount of storage used by object data PayloadSize float64 `json:"payloadSize"` JSON bucketMetricListResponseInfrequentAccessPublishedJSON `json:"-"` }
Metrics on number of objects/amount of storage used
func (*BucketMetricListResponseInfrequentAccessPublished) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketMetricListResponseInfrequentAccessPublished) UnmarshalJSON(data []byte) (err error)
type BucketMetricListResponseInfrequentAccessUploaded ¶ added in v4.1.0
type BucketMetricListResponseInfrequentAccessUploaded struct { // Amount of MetadataSize float64 `json:"metadataSize"` // Number of objects stored Objects float64 `json:"objects"` // Amount of storage used by object data PayloadSize float64 `json:"payloadSize"` JSON bucketMetricListResponseInfrequentAccessUploadedJSON `json:"-"` }
Metrics on number of objects/amount of storage used
func (*BucketMetricListResponseInfrequentAccessUploaded) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketMetricListResponseInfrequentAccessUploaded) UnmarshalJSON(data []byte) (err error)
type BucketMetricListResponseStandard ¶ added in v4.1.0
type BucketMetricListResponseStandard struct { // Metrics on number of objects/amount of storage used Published BucketMetricListResponseStandardPublished `json:"published"` // Metrics on number of objects/amount of storage used Uploaded BucketMetricListResponseStandardUploaded `json:"uploaded"` JSON bucketMetricListResponseStandardJSON `json:"-"` }
Metrics based on what state they are in(uploaded or published)
func (*BucketMetricListResponseStandard) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketMetricListResponseStandard) UnmarshalJSON(data []byte) (err error)
type BucketMetricListResponseStandardPublished ¶ added in v4.1.0
type BucketMetricListResponseStandardPublished struct { // Amount of MetadataSize float64 `json:"metadataSize"` // Number of objects stored Objects float64 `json:"objects"` // Amount of storage used by object data PayloadSize float64 `json:"payloadSize"` JSON bucketMetricListResponseStandardPublishedJSON `json:"-"` }
Metrics on number of objects/amount of storage used
func (*BucketMetricListResponseStandardPublished) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketMetricListResponseStandardPublished) UnmarshalJSON(data []byte) (err error)
type BucketMetricListResponseStandardUploaded ¶ added in v4.1.0
type BucketMetricListResponseStandardUploaded struct { // Amount of MetadataSize float64 `json:"metadataSize"` // Number of objects stored Objects float64 `json:"objects"` // Amount of storage used by object data PayloadSize float64 `json:"payloadSize"` JSON bucketMetricListResponseStandardUploadedJSON `json:"-"` }
Metrics on number of objects/amount of storage used
func (*BucketMetricListResponseStandardUploaded) UnmarshalJSON ¶ added in v4.1.0
func (r *BucketMetricListResponseStandardUploaded) UnmarshalJSON(data []byte) (err error)
type BucketMetricService ¶ added in v4.1.0
type BucketMetricService struct {
Options []option.RequestOption
}
BucketMetricService 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 NewBucketMetricService method instead.
func NewBucketMetricService ¶ added in v4.1.0
func NewBucketMetricService(opts ...option.RequestOption) (r *BucketMetricService)
NewBucketMetricService 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 (*BucketMetricService) List ¶ added in v4.1.0
func (r *BucketMetricService) List(ctx context.Context, query BucketMetricListParams, opts ...option.RequestOption) (res *BucketMetricListResponse, err error)
Get Storage/Object Count Metrics across all buckets in your account. Note that Account-Level Metrics may not immediately reflect the latest data.
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 ¶
func (r BucketNewParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketNewResponseEnvelopeSuccess) IsKnown() bool
type BucketService ¶
type BucketService struct { Options []option.RequestOption Lifecycle *BucketLifecycleService CORS *BucketCORSService Domains *BucketDomainService EventNotifications *BucketEventNotificationService Locks *BucketLockService Metrics *BucketMetricService 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 BucketSippyDeleteParamsCfR2Jurisdiction ¶
type BucketSippyDeleteParamsCfR2Jurisdiction string
The bucket jurisdiction
const ( BucketSippyDeleteParamsCfR2JurisdictionDefault BucketSippyDeleteParamsCfR2Jurisdiction = "default" BucketSippyDeleteParamsCfR2JurisdictionEu BucketSippyDeleteParamsCfR2Jurisdiction = "eu" BucketSippyDeleteParamsCfR2JurisdictionFedramp BucketSippyDeleteParamsCfR2Jurisdiction = "fedramp" )
func (BucketSippyDeleteParamsCfR2Jurisdiction) IsKnown ¶
func (r BucketSippyDeleteParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketSippyDeleteResponseEnabled) IsKnown() bool
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 ¶
func (r BucketSippyDeleteResponseEnvelopeSuccess) IsKnown() bool
type BucketSippyGetParams ¶
type BucketSippyGetParamsCfR2Jurisdiction ¶
type BucketSippyGetParamsCfR2Jurisdiction string
The bucket jurisdiction
const ( BucketSippyGetParamsCfR2JurisdictionDefault BucketSippyGetParamsCfR2Jurisdiction = "default" BucketSippyGetParamsCfR2JurisdictionEu BucketSippyGetParamsCfR2Jurisdiction = "eu" BucketSippyGetParamsCfR2JurisdictionFedramp BucketSippyGetParamsCfR2Jurisdiction = "fedramp" )
func (BucketSippyGetParamsCfR2Jurisdiction) IsKnown ¶
func (r BucketSippyGetParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketSippyGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *BucketSippyService) Delete(ctx context.Context, bucketName string, params BucketSippyDeleteParams, opts ...option.RequestOption) (res *BucketSippyDeleteResponse, err error)
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 ¶
func (r BucketSippyUpdateParamsBodyR2EnableSippyAwsDestination) MarshalJSON() (data []byte, err error)
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 ¶
func (r BucketSippyUpdateParamsBodyR2EnableSippyAwsSourceProvider) IsKnown() bool
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 ¶
func (r BucketSippyUpdateParamsBodyR2EnableSippyGcsDestination) MarshalJSON() (data []byte, err error)
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 ¶
func (r BucketSippyUpdateParamsBodyR2EnableSippyGcsSourceProvider) IsKnown() bool
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 ¶
func (r BucketSippyUpdateParamsCfR2Jurisdiction) IsKnown() bool
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 ¶
func (r BucketSippyUpdateResponseEnvelopeSuccess) IsKnown() bool
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 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 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 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 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 RatePlanID ¶ added in v4.1.0
type RatePlanID = shared.RatePlanID
The ID of the rate plan.
This is an alias to an internal type.
type RatePlanParam ¶
type RatePlanParam = shared.RatePlanParam
The rate plan applied to the subscription.
This is an alias to an internal type.
type 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 ¶
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 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 ¶
func (r TemporaryCredentialNewResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *TemporaryCredentialService) New(ctx context.Context, params TemporaryCredentialNewParams, opts ...option.RequestOption) (res *TemporaryCredentialNewResponse, err error)
Creates temporary access credentials on a bucket that can be optionally scoped to prefixes or objects.
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 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.