Documentation
¶
Index ¶
- type AuditLogListParams
- type AuditLogListParamsAction
- type AuditLogListParamsActor
- type AuditLogListParamsDirection
- type AuditLogListParamsZone
- type AuditLogListResponse
- type AuditLogListResponseAction
- type AuditLogListResponseActor
- type AuditLogListResponseActorType
- type AuditLogListResponseOwner
- type AuditLogListResponseResource
- type AuditLogService
- func (r *AuditLogService) List(ctx context.Context, query AuditLogListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[AuditLogListResponse], err error)
- func (r *AuditLogService) ListAutoPaging(ctx context.Context, query AuditLogListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[AuditLogListResponse]
- type BillingHistory
- type BillingHistoryGetParams
- type BillingHistoryGetParamsOrder
- type BillingHistoryGetResponseEnvelope
- type BillingHistoryGetResponseEnvelopeErrors
- type BillingHistoryGetResponseEnvelopeMessages
- type BillingHistoryGetResponseEnvelopeResultInfo
- type BillingHistoryGetResponseEnvelopeSuccess
- type BillingHistoryService
- type BillingHistoryZone
- type BillingProfileGetResponse
- type BillingProfileGetResponseEnvelope
- type BillingProfileGetResponseEnvelopeErrors
- type BillingProfileGetResponseEnvelopeMessages
- type BillingProfileGetResponseEnvelopeSuccess
- type BillingProfileService
- type BillingService
- type Error
- type ErrorData
- type FirewallAccessRuleDeleteResponse
- type FirewallAccessRuleDeleteResponseEnvelope
- type FirewallAccessRuleDeleteResponseEnvelopeErrors
- type FirewallAccessRuleDeleteResponseEnvelopeMessages
- type FirewallAccessRuleDeleteResponseEnvelopeSuccess
- type FirewallAccessRuleEditParams
- type FirewallAccessRuleEditParamsMode
- type FirewallAccessRuleEditResponseEnvelope
- type FirewallAccessRuleEditResponseEnvelopeErrors
- type FirewallAccessRuleEditResponseEnvelopeMessages
- type FirewallAccessRuleEditResponseEnvelopeSuccess
- type FirewallAccessRuleListParams
- type FirewallAccessRuleListParamsDirection
- type FirewallAccessRuleListParamsEgsPagination
- type FirewallAccessRuleListParamsEgsPaginationJson
- type FirewallAccessRuleListParamsFilters
- type FirewallAccessRuleListParamsFiltersConfigurationTarget
- type FirewallAccessRuleListParamsFiltersMatch
- type FirewallAccessRuleListParamsFiltersMode
- type FirewallAccessRuleListParamsOrder
- type FirewallAccessRuleNewParams
- type FirewallAccessRuleNewParamsConfiguration
- type FirewallAccessRuleNewParamsConfigurationLegacyJhsASNConfiguration
- type FirewallAccessRuleNewParamsConfigurationLegacyJhsASNConfigurationTarget
- type FirewallAccessRuleNewParamsConfigurationLegacyJhsCIDRConfiguration
- type FirewallAccessRuleNewParamsConfigurationLegacyJhsCIDRConfigurationTarget
- type FirewallAccessRuleNewParamsConfigurationLegacyJhsCountryConfiguration
- type FirewallAccessRuleNewParamsConfigurationLegacyJhsCountryConfigurationTarget
- type FirewallAccessRuleNewParamsConfigurationLegacyJhsIPConfiguration
- type FirewallAccessRuleNewParamsConfigurationLegacyJhsIPConfigurationTarget
- type FirewallAccessRuleNewParamsConfigurationLegacyJhsIPV6Configuration
- type FirewallAccessRuleNewParamsConfigurationLegacyJhsIPV6ConfigurationTarget
- type FirewallAccessRuleNewParamsMode
- type FirewallAccessRuleNewResponseEnvelope
- type FirewallAccessRuleNewResponseEnvelopeErrors
- type FirewallAccessRuleNewResponseEnvelopeMessages
- type FirewallAccessRuleNewResponseEnvelopeSuccess
- type FirewallAccessRuleService
- func (r *FirewallAccessRuleService) Delete(ctx context.Context, identifier string, opts ...option.RequestOption) (res *FirewallAccessRuleDeleteResponse, err error)
- func (r *FirewallAccessRuleService) Edit(ctx context.Context, identifier string, body FirewallAccessRuleEditParams, ...) (res *FirewallRule, err error)
- func (r *FirewallAccessRuleService) List(ctx context.Context, query FirewallAccessRuleListParams, ...) (res *pagination.V4PagePaginationArray[FirewallRule], err error)
- func (r *FirewallAccessRuleService) ListAutoPaging(ctx context.Context, query FirewallAccessRuleListParams, ...) *pagination.V4PagePaginationArrayAutoPager[FirewallRule]
- func (r *FirewallAccessRuleService) New(ctx context.Context, body FirewallAccessRuleNewParams, ...) (res *FirewallRule, err error)
- type FirewallRule
- type FirewallRuleAllowedMode
- type FirewallRuleConfiguration
- type FirewallRuleConfigurationLegacyJhsASNConfiguration
- type FirewallRuleConfigurationLegacyJhsASNConfigurationTarget
- type FirewallRuleConfigurationLegacyJhsCIDRConfiguration
- type FirewallRuleConfigurationLegacyJhsCIDRConfigurationTarget
- type FirewallRuleConfigurationLegacyJhsCountryConfiguration
- type FirewallRuleConfigurationLegacyJhsCountryConfigurationTarget
- type FirewallRuleConfigurationLegacyJhsIPConfiguration
- type FirewallRuleConfigurationLegacyJhsIPConfigurationTarget
- type FirewallRuleConfigurationLegacyJhsIPV6Configuration
- type FirewallRuleConfigurationLegacyJhsIPV6ConfigurationTarget
- type FirewallRuleMode
- type FirewallService
- type InviteEditParams
- type InviteEditParamsStatus
- type InviteEditResponse
- type InviteEditResponseEnvelope
- type InviteEditResponseEnvelopeErrors
- type InviteEditResponseEnvelopeMessages
- type InviteEditResponseEnvelopeSuccess
- type InviteGetResponse
- type InviteGetResponseEnvelope
- type InviteGetResponseEnvelopeErrors
- type InviteGetResponseEnvelopeMessages
- type InviteGetResponseEnvelopeSuccess
- type InviteListResponse
- type InviteListResponseStatus
- type InviteService
- func (r *InviteService) Edit(ctx context.Context, inviteID string, body InviteEditParams, ...) (res *InviteEditResponse, err error)
- func (r *InviteService) Get(ctx context.Context, inviteID string, opts ...option.RequestOption) (res *InviteGetResponse, err error)
- func (r *InviteService) List(ctx context.Context, opts ...option.RequestOption) (res *pagination.SinglePage[InviteListResponse], err error)
- func (r *InviteService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *pagination.SinglePageAutoPager[InviteListResponse]
- type LoadBalancerAnalyticsEventListParams
- type LoadBalancerAnalyticsEventService
- func (r *LoadBalancerAnalyticsEventService) List(ctx context.Context, query LoadBalancerAnalyticsEventListParams, ...) (res *pagination.SinglePage[LoadBalancingAnalytics], err error)
- func (r *LoadBalancerAnalyticsEventService) ListAutoPaging(ctx context.Context, query LoadBalancerAnalyticsEventListParams, ...) *pagination.SinglePageAutoPager[LoadBalancingAnalytics]
- type LoadBalancerAnalyticsService
- type LoadBalancerMonitorDeleteResponse
- type LoadBalancerMonitorDeleteResponseEnvelope
- type LoadBalancerMonitorDeleteResponseEnvelopeErrors
- type LoadBalancerMonitorDeleteResponseEnvelopeMessages
- type LoadBalancerMonitorDeleteResponseEnvelopeSuccess
- type LoadBalancerMonitorEditParams
- type LoadBalancerMonitorEditParamsType
- type LoadBalancerMonitorEditResponseEnvelope
- type LoadBalancerMonitorEditResponseEnvelopeErrors
- type LoadBalancerMonitorEditResponseEnvelopeMessages
- type LoadBalancerMonitorEditResponseEnvelopeSuccess
- type LoadBalancerMonitorGetResponseEnvelope
- type LoadBalancerMonitorGetResponseEnvelopeErrors
- type LoadBalancerMonitorGetResponseEnvelopeMessages
- type LoadBalancerMonitorGetResponseEnvelopeSuccess
- type LoadBalancerMonitorNewParams
- type LoadBalancerMonitorNewParamsType
- type LoadBalancerMonitorNewResponseEnvelope
- type LoadBalancerMonitorNewResponseEnvelopeErrors
- type LoadBalancerMonitorNewResponseEnvelopeMessages
- type LoadBalancerMonitorNewResponseEnvelopeSuccess
- type LoadBalancerMonitorPreviewParams
- type LoadBalancerMonitorPreviewParamsType
- type LoadBalancerMonitorPreviewResponse
- type LoadBalancerMonitorPreviewResponseEnvelope
- type LoadBalancerMonitorPreviewResponseEnvelopeErrors
- type LoadBalancerMonitorPreviewResponseEnvelopeMessages
- type LoadBalancerMonitorPreviewResponseEnvelopeSuccess
- type LoadBalancerMonitorReferencesResponse
- type LoadBalancerMonitorReferencesResponseEnvelope
- type LoadBalancerMonitorReferencesResponseEnvelopeErrors
- type LoadBalancerMonitorReferencesResponseEnvelopeMessages
- type LoadBalancerMonitorReferencesResponseEnvelopeResultInfo
- type LoadBalancerMonitorReferencesResponseEnvelopeSuccess
- type LoadBalancerMonitorReferencesResponseReferenceType
- type LoadBalancerMonitorService
- func (r *LoadBalancerMonitorService) Delete(ctx context.Context, monitorID string, opts ...option.RequestOption) (res *LoadBalancerMonitorDeleteResponse, err error)
- func (r *LoadBalancerMonitorService) Edit(ctx context.Context, monitorID string, body LoadBalancerMonitorEditParams, ...) (res *LoadBalancingMonitor, err error)
- func (r *LoadBalancerMonitorService) Get(ctx context.Context, monitorID string, opts ...option.RequestOption) (res *LoadBalancingMonitor, err error)
- func (r *LoadBalancerMonitorService) List(ctx context.Context, opts ...option.RequestOption) (res *pagination.SinglePage[LoadBalancingMonitor], err error)
- func (r *LoadBalancerMonitorService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *pagination.SinglePageAutoPager[LoadBalancingMonitor]
- func (r *LoadBalancerMonitorService) New(ctx context.Context, body LoadBalancerMonitorNewParams, ...) (res *LoadBalancingMonitor, err error)
- func (r *LoadBalancerMonitorService) Preview(ctx context.Context, monitorID string, body LoadBalancerMonitorPreviewParams, ...) (res *LoadBalancerMonitorPreviewResponse, err error)
- func (r *LoadBalancerMonitorService) References(ctx context.Context, monitorID string, opts ...option.RequestOption) (res *[]LoadBalancerMonitorReferencesResponse, err error)
- func (r *LoadBalancerMonitorService) Update(ctx context.Context, monitorID string, body LoadBalancerMonitorUpdateParams, ...) (res *LoadBalancingMonitor, err error)
- type LoadBalancerMonitorUpdateParams
- type LoadBalancerMonitorUpdateParamsType
- type LoadBalancerMonitorUpdateResponseEnvelope
- type LoadBalancerMonitorUpdateResponseEnvelopeErrors
- type LoadBalancerMonitorUpdateResponseEnvelopeMessages
- type LoadBalancerMonitorUpdateResponseEnvelopeSuccess
- type LoadBalancerPoolDeleteResponse
- type LoadBalancerPoolDeleteResponseEnvelope
- type LoadBalancerPoolDeleteResponseEnvelopeErrors
- type LoadBalancerPoolDeleteResponseEnvelopeMessages
- type LoadBalancerPoolDeleteResponseEnvelopeSuccess
- type LoadBalancerPoolEditParams
- type LoadBalancerPoolEditParamsCheckRegion
- type LoadBalancerPoolEditParamsLoadShedding
- type LoadBalancerPoolEditParamsLoadSheddingDefaultPolicy
- type LoadBalancerPoolEditParamsLoadSheddingSessionPolicy
- type LoadBalancerPoolEditParamsNotificationFilter
- type LoadBalancerPoolEditParamsNotificationFilterOrigin
- type LoadBalancerPoolEditParamsNotificationFilterPool
- type LoadBalancerPoolEditParamsOrigin
- type LoadBalancerPoolEditParamsOriginSteering
- type LoadBalancerPoolEditParamsOriginSteeringPolicy
- type LoadBalancerPoolEditParamsOriginsHeader
- type LoadBalancerPoolEditResponseEnvelope
- type LoadBalancerPoolEditResponseEnvelopeErrors
- type LoadBalancerPoolEditResponseEnvelopeMessages
- type LoadBalancerPoolEditResponseEnvelopeSuccess
- type LoadBalancerPoolGetResponseEnvelope
- type LoadBalancerPoolGetResponseEnvelopeErrors
- type LoadBalancerPoolGetResponseEnvelopeMessages
- type LoadBalancerPoolGetResponseEnvelopeSuccess
- type LoadBalancerPoolHealthResponse
- type LoadBalancerPoolHealthResponseEnvelope
- type LoadBalancerPoolHealthResponseEnvelopeErrors
- type LoadBalancerPoolHealthResponseEnvelopeMessages
- type LoadBalancerPoolHealthResponseEnvelopeSuccess
- type LoadBalancerPoolListParams
- type LoadBalancerPoolNewParams
- type LoadBalancerPoolNewParamsCheckRegion
- type LoadBalancerPoolNewParamsLoadShedding
- type LoadBalancerPoolNewParamsLoadSheddingDefaultPolicy
- type LoadBalancerPoolNewParamsLoadSheddingSessionPolicy
- type LoadBalancerPoolNewParamsNotificationFilter
- type LoadBalancerPoolNewParamsNotificationFilterOrigin
- type LoadBalancerPoolNewParamsNotificationFilterPool
- type LoadBalancerPoolNewParamsOrigin
- type LoadBalancerPoolNewParamsOriginSteering
- type LoadBalancerPoolNewParamsOriginSteeringPolicy
- type LoadBalancerPoolNewParamsOriginsHeader
- type LoadBalancerPoolNewResponseEnvelope
- type LoadBalancerPoolNewResponseEnvelopeErrors
- type LoadBalancerPoolNewResponseEnvelopeMessages
- type LoadBalancerPoolNewResponseEnvelopeSuccess
- type LoadBalancerPoolPreviewParams
- type LoadBalancerPoolPreviewParamsType
- type LoadBalancerPoolPreviewResponse
- type LoadBalancerPoolPreviewResponseEnvelope
- type LoadBalancerPoolPreviewResponseEnvelopeErrors
- type LoadBalancerPoolPreviewResponseEnvelopeMessages
- type LoadBalancerPoolPreviewResponseEnvelopeSuccess
- type LoadBalancerPoolReferencesResponse
- type LoadBalancerPoolReferencesResponseEnvelope
- type LoadBalancerPoolReferencesResponseEnvelopeErrors
- type LoadBalancerPoolReferencesResponseEnvelopeMessages
- type LoadBalancerPoolReferencesResponseEnvelopeResultInfo
- type LoadBalancerPoolReferencesResponseEnvelopeSuccess
- type LoadBalancerPoolReferencesResponseReferenceType
- type LoadBalancerPoolService
- func (r *LoadBalancerPoolService) Delete(ctx context.Context, poolID string, opts ...option.RequestOption) (res *LoadBalancerPoolDeleteResponse, err error)
- func (r *LoadBalancerPoolService) Edit(ctx context.Context, poolID string, body LoadBalancerPoolEditParams, ...) (res *LoadBalancingPool, err error)
- func (r *LoadBalancerPoolService) Get(ctx context.Context, poolID string, opts ...option.RequestOption) (res *LoadBalancingPool, err error)
- func (r *LoadBalancerPoolService) Health(ctx context.Context, poolID string, opts ...option.RequestOption) (res *LoadBalancerPoolHealthResponse, err error)
- func (r *LoadBalancerPoolService) List(ctx context.Context, query LoadBalancerPoolListParams, ...) (res *pagination.SinglePage[LoadBalancingPool], err error)
- func (r *LoadBalancerPoolService) ListAutoPaging(ctx context.Context, query LoadBalancerPoolListParams, ...) *pagination.SinglePageAutoPager[LoadBalancingPool]
- func (r *LoadBalancerPoolService) New(ctx context.Context, body LoadBalancerPoolNewParams, ...) (res *LoadBalancingPool, err error)
- func (r *LoadBalancerPoolService) Preview(ctx context.Context, poolID string, body LoadBalancerPoolPreviewParams, ...) (res *LoadBalancerPoolPreviewResponse, err error)
- func (r *LoadBalancerPoolService) References(ctx context.Context, poolID string, opts ...option.RequestOption) (res *[]LoadBalancerPoolReferencesResponse, err error)
- func (r *LoadBalancerPoolService) Update(ctx context.Context, poolID string, body LoadBalancerPoolUpdateParams, ...) (res *LoadBalancingPool, err error)
- type LoadBalancerPoolUpdateParams
- type LoadBalancerPoolUpdateParamsCheckRegion
- type LoadBalancerPoolUpdateParamsLoadShedding
- type LoadBalancerPoolUpdateParamsLoadSheddingDefaultPolicy
- type LoadBalancerPoolUpdateParamsLoadSheddingSessionPolicy
- type LoadBalancerPoolUpdateParamsNotificationFilter
- type LoadBalancerPoolUpdateParamsNotificationFilterOrigin
- type LoadBalancerPoolUpdateParamsNotificationFilterPool
- type LoadBalancerPoolUpdateParamsOrigin
- type LoadBalancerPoolUpdateParamsOriginSteering
- type LoadBalancerPoolUpdateParamsOriginSteeringPolicy
- type LoadBalancerPoolUpdateParamsOriginsHeader
- type LoadBalancerPoolUpdateResponseEnvelope
- type LoadBalancerPoolUpdateResponseEnvelopeErrors
- type LoadBalancerPoolUpdateResponseEnvelopeMessages
- type LoadBalancerPoolUpdateResponseEnvelopeSuccess
- type LoadBalancerPreviewGetResponseEnvelope
- type LoadBalancerPreviewGetResponseEnvelopeErrors
- type LoadBalancerPreviewGetResponseEnvelopeMessages
- type LoadBalancerPreviewGetResponseEnvelopeSuccess
- type LoadBalancerPreviewService
- type LoadBalancerService
- type LoadBalancingAnalytics
- type LoadBalancingMonitor
- type LoadBalancingMonitorType
- type LoadBalancingPool
- type LoadBalancingPoolCheckRegion
- type LoadBalancingPoolLoadShedding
- type LoadBalancingPoolLoadSheddingDefaultPolicy
- type LoadBalancingPoolLoadSheddingSessionPolicy
- type LoadBalancingPoolNotificationFilter
- type LoadBalancingPoolNotificationFilterOrigin
- type LoadBalancingPoolNotificationFilterPool
- type LoadBalancingPoolOrigin
- type LoadBalancingPoolOriginSteering
- type LoadBalancingPoolOriginSteeringPolicy
- type LoadBalancingPoolOriginsHeader
- type LoadBalancingPreview
- type LoadBalancingPreviewItem
- type LoadBalancingPreviewOrigin
- type Organization
- type OrganizationDeleteResponse
- type OrganizationGetResponse
- type OrganizationGetResponseEnvelope
- type OrganizationGetResponseEnvelopeErrors
- type OrganizationGetResponseEnvelopeMessages
- type OrganizationGetResponseEnvelopeSuccess
- type OrganizationListParams
- type OrganizationListParamsDirection
- type OrganizationListParamsMatch
- type OrganizationListParamsOrder
- type OrganizationListParamsStatus
- type OrganizationService
- func (r *OrganizationService) Delete(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationDeleteResponse, err error)
- func (r *OrganizationService) Get(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationGetResponse, err error)
- func (r *OrganizationService) List(ctx context.Context, query OrganizationListParams, ...) (res *pagination.V4PagePaginationArray[Organization], err error)
- func (r *OrganizationService) ListAutoPaging(ctx context.Context, query OrganizationListParams, ...) *pagination.V4PagePaginationArrayAutoPager[Organization]
- type OrganizationStatus
- type SubscriptionDeleteResponse
- type SubscriptionEditParams
- type SubscriptionEditParamsApp
- type SubscriptionEditParamsComponentValue
- type SubscriptionEditParamsFrequency
- type SubscriptionEditParamsRatePlan
- type SubscriptionEditParamsZone
- type SubscriptionEditResponse
- type SubscriptionEditResponseEnvelope
- type SubscriptionEditResponseEnvelopeErrors
- type SubscriptionEditResponseEnvelopeMessages
- type SubscriptionEditResponseEnvelopeSuccess
- type SubscriptionGetResponse
- type SubscriptionGetResponseApp
- type SubscriptionGetResponseComponentValue
- type SubscriptionGetResponseEnvelope
- type SubscriptionGetResponseEnvelopeErrors
- type SubscriptionGetResponseEnvelopeMessages
- type SubscriptionGetResponseEnvelopeResultInfo
- type SubscriptionGetResponseEnvelopeSuccess
- type SubscriptionGetResponseFrequency
- type SubscriptionGetResponseRatePlan
- type SubscriptionGetResponseState
- type SubscriptionGetResponseZone
- type SubscriptionService
- func (r *SubscriptionService) Delete(ctx context.Context, identifier string, opts ...option.RequestOption) (res *SubscriptionDeleteResponse, err error)
- func (r *SubscriptionService) Edit(ctx context.Context, identifier string, body SubscriptionEditParams, ...) (res *SubscriptionEditResponse, err error)
- func (r *SubscriptionService) Get(ctx context.Context, opts ...option.RequestOption) (res *[]SubscriptionGetResponse, err error)
- func (r *SubscriptionService) Update(ctx context.Context, identifier string, body SubscriptionUpdateParams, ...) (res *SubscriptionUpdateResponse, err error)
- type SubscriptionUpdateParams
- type SubscriptionUpdateParamsApp
- type SubscriptionUpdateParamsComponentValue
- type SubscriptionUpdateParamsFrequency
- type SubscriptionUpdateParamsRatePlan
- type SubscriptionUpdateParamsZone
- type SubscriptionUpdateResponse
- type SubscriptionUpdateResponseEnvelope
- type SubscriptionUpdateResponseEnvelopeErrors
- type SubscriptionUpdateResponseEnvelopeMessages
- type SubscriptionUpdateResponseEnvelopeSuccess
- type TokenDeleteResponse
- type TokenDeleteResponseEnvelope
- type TokenDeleteResponseEnvelopeErrors
- type TokenDeleteResponseEnvelopeMessages
- type TokenDeleteResponseEnvelopeSuccess
- type TokenGetResponse
- type TokenGetResponseEnvelope
- type TokenGetResponseEnvelopeErrors
- type TokenGetResponseEnvelopeMessages
- type TokenGetResponseEnvelopeSuccess
- type TokenListParams
- type TokenListParamsDirection
- type TokenListResponse
- type TokenNewParams
- type TokenNewParamsCondition
- type TokenNewParamsConditionRequestIP
- type TokenNewParamsPoliciesEffect
- type TokenNewParamsPoliciesPermissionGroup
- type TokenNewParamsPolicy
- type TokenNewResponse
- type TokenNewResponseEnvelope
- type TokenNewResponseEnvelopeErrors
- type TokenNewResponseEnvelopeMessages
- type TokenNewResponseEnvelopeSuccess
- type TokenPermissionGroupListResponse
- type TokenPermissionGroupService
- func (r *TokenPermissionGroupService) List(ctx context.Context, opts ...option.RequestOption) (res *pagination.SinglePage[TokenPermissionGroupListResponse], err error)
- func (r *TokenPermissionGroupService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *pagination.SinglePageAutoPager[TokenPermissionGroupListResponse]
- type TokenService
- func (r *TokenService) Delete(ctx context.Context, tokenID interface{}, opts ...option.RequestOption) (res *TokenDeleteResponse, err error)
- func (r *TokenService) Get(ctx context.Context, tokenID interface{}, opts ...option.RequestOption) (res *TokenGetResponse, err error)
- func (r *TokenService) List(ctx context.Context, query TokenListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[TokenListResponse], err error)
- func (r *TokenService) ListAutoPaging(ctx context.Context, query TokenListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[TokenListResponse]
- func (r *TokenService) New(ctx context.Context, body TokenNewParams, opts ...option.RequestOption) (res *TokenNewResponse, err error)
- func (r *TokenService) Update(ctx context.Context, tokenID interface{}, body TokenUpdateParams, ...) (res *TokenUpdateResponse, err error)
- func (r *TokenService) Verify(ctx context.Context, opts ...option.RequestOption) (res *TokenVerifyResponse, err error)
- type TokenUpdateParams
- type TokenUpdateParamsCondition
- type TokenUpdateParamsConditionRequestIP
- type TokenUpdateParamsPoliciesEffect
- type TokenUpdateParamsPoliciesPermissionGroup
- type TokenUpdateParamsPolicy
- type TokenUpdateParamsStatus
- type TokenUpdateResponse
- type TokenUpdateResponseEnvelope
- type TokenUpdateResponseEnvelopeErrors
- type TokenUpdateResponseEnvelopeMessages
- type TokenUpdateResponseEnvelopeSuccess
- type TokenValue
- type TokenValueService
- type TokenValueUpdateParams
- type TokenValueUpdateResponseEnvelope
- type TokenValueUpdateResponseEnvelopeErrors
- type TokenValueUpdateResponseEnvelopeMessages
- type TokenValueUpdateResponseEnvelopeSuccess
- type TokenVerifyResponse
- type TokenVerifyResponseEnvelope
- type TokenVerifyResponseEnvelopeErrors
- type TokenVerifyResponseEnvelopeMessages
- type TokenVerifyResponseEnvelopeSuccess
- type TokenVerifyResponseStatus
- type UserEditParams
- type UserEditResponse
- type UserEditResponseEnvelope
- type UserEditResponseEnvelopeErrors
- type UserEditResponseEnvelopeMessages
- type UserEditResponseEnvelopeSuccess
- type UserGetResponse
- type UserGetResponseEnvelope
- type UserGetResponseEnvelopeErrors
- type UserGetResponseEnvelopeMessages
- type UserGetResponseEnvelopeSuccess
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditLogListParams ¶
type AuditLogListParams struct { // Finds a specific log by its ID. ID param.Field[string] `query:"id"` Action param.Field[AuditLogListParamsAction] `query:"action"` Actor param.Field[AuditLogListParamsActor] `query:"actor"` // Limits the returned results to logs older than the specified date. This can be a // date string `2019-04-30` or an absolute timestamp that conforms to RFC3339. Before param.Field[time.Time] `query:"before" format:"date-time"` // Changes the direction of the chronological sorting. Direction param.Field[AuditLogListParamsDirection] `query:"direction"` // Indicates that this request is an export of logs in CSV format. Export param.Field[bool] `query:"export"` // Indicates whether or not to hide user level audit logs. HideUserLogs param.Field[bool] `query:"hide_user_logs"` // Defines which page of results to return. Page param.Field[float64] `query:"page"` // Sets the number of results to return per page. PerPage param.Field[float64] `query:"per_page"` // Limits the returned results to logs newer than the specified date. This can be a // date string `2019-04-30` or an absolute timestamp that conforms to RFC3339. Since param.Field[time.Time] `query:"since" format:"date-time"` Zone param.Field[AuditLogListParamsZone] `query:"zone"` }
func (AuditLogListParams) URLQuery ¶
func (r AuditLogListParams) URLQuery() (v url.Values)
URLQuery serializes AuditLogListParams's query parameters as `url.Values`.
type AuditLogListParamsAction ¶
type AuditLogListParamsAction struct { // Filters by the action type. Type param.Field[string] `query:"type"` }
func (AuditLogListParamsAction) URLQuery ¶
func (r AuditLogListParamsAction) URLQuery() (v url.Values)
URLQuery serializes AuditLogListParamsAction's query parameters as `url.Values`.
type AuditLogListParamsActor ¶
type AuditLogListParamsActor struct { // Filters by the email address of the actor that made the change. Email param.Field[string] `query:"email" format:"email"` // Filters by the IP address of the request that made the change by specific IP // address or valid CIDR Range. IP param.Field[string] `query:"ip"` }
func (AuditLogListParamsActor) URLQuery ¶
func (r AuditLogListParamsActor) URLQuery() (v url.Values)
URLQuery serializes AuditLogListParamsActor's query parameters as `url.Values`.
type AuditLogListParamsDirection ¶
type AuditLogListParamsDirection string
Changes the direction of the chronological sorting.
const ( AuditLogListParamsDirectionDesc AuditLogListParamsDirection = "desc" AuditLogListParamsDirectionAsc AuditLogListParamsDirection = "asc" )
func (AuditLogListParamsDirection) IsKnown ¶
func (r AuditLogListParamsDirection) IsKnown() bool
type AuditLogListParamsZone ¶
type AuditLogListParamsZone struct { // Filters by the name of the zone associated to the change. Name param.Field[string] `query:"name"` }
func (AuditLogListParamsZone) URLQuery ¶
func (r AuditLogListParamsZone) URLQuery() (v url.Values)
URLQuery serializes AuditLogListParamsZone's query parameters as `url.Values`.
type AuditLogListResponse ¶
type AuditLogListResponse struct { // A string that uniquely identifies the audit log. ID string `json:"id"` Action AuditLogListResponseAction `json:"action"` Actor AuditLogListResponseActor `json:"actor"` // The source of the event. Interface string `json:"interface"` // An object which can lend more context to the action being logged. This is a // flexible value and varies between different actions. Metadata interface{} `json:"metadata"` // The new value of the resource that was modified. NewValue string `json:"newValue"` // The value of the resource before it was modified. OldValue string `json:"oldValue"` Owner AuditLogListResponseOwner `json:"owner"` Resource AuditLogListResponseResource `json:"resource"` // A UTC RFC3339 timestamp that specifies when the action being logged occured. When time.Time `json:"when" format:"date-time"` JSON auditLogListResponseJSON `json:"-"` }
func (*AuditLogListResponse) UnmarshalJSON ¶
func (r *AuditLogListResponse) UnmarshalJSON(data []byte) (err error)
type AuditLogListResponseAction ¶
type AuditLogListResponseAction struct { // A boolean that indicates if the action attempted was successful. Result bool `json:"result"` // A short string that describes the action that was performed. Type string `json:"type"` JSON auditLogListResponseActionJSON `json:"-"` }
func (*AuditLogListResponseAction) UnmarshalJSON ¶
func (r *AuditLogListResponseAction) UnmarshalJSON(data []byte) (err error)
type AuditLogListResponseActor ¶
type AuditLogListResponseActor struct { // The ID of the actor that performed the action. If a user performed the action, // this will be their User ID. ID string `json:"id"` // The email of the user that performed the action. Email string `json:"email" format:"email"` // The IP address of the request that performed the action. IP string `json:"ip"` // The type of actor, whether a User, Cloudflare Admin, or an Automated System. Type AuditLogListResponseActorType `json:"type"` JSON auditLogListResponseActorJSON `json:"-"` }
func (*AuditLogListResponseActor) UnmarshalJSON ¶
func (r *AuditLogListResponseActor) UnmarshalJSON(data []byte) (err error)
type AuditLogListResponseActorType ¶
type AuditLogListResponseActorType string
The type of actor, whether a User, Cloudflare Admin, or an Automated System.
const ( AuditLogListResponseActorTypeUser AuditLogListResponseActorType = "user" AuditLogListResponseActorTypeAdmin AuditLogListResponseActorType = "admin" AuditLogListResponseActorTypeCloudflare AuditLogListResponseActorType = "Cloudflare" )
func (AuditLogListResponseActorType) IsKnown ¶
func (r AuditLogListResponseActorType) IsKnown() bool
type AuditLogListResponseOwner ¶
type AuditLogListResponseOwner struct { // Identifier ID string `json:"id"` JSON auditLogListResponseOwnerJSON `json:"-"` }
func (*AuditLogListResponseOwner) UnmarshalJSON ¶
func (r *AuditLogListResponseOwner) UnmarshalJSON(data []byte) (err error)
type AuditLogListResponseResource ¶
type AuditLogListResponseResource struct { // An identifier for the resource that was affected by the action. ID string `json:"id"` // A short string that describes the resource that was affected by the action. Type string `json:"type"` JSON auditLogListResponseResourceJSON `json:"-"` }
func (*AuditLogListResponseResource) UnmarshalJSON ¶
func (r *AuditLogListResponseResource) UnmarshalJSON(data []byte) (err error)
type AuditLogService ¶
type AuditLogService struct {
Options []option.RequestOption
}
AuditLogService 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 NewAuditLogService method instead.
func NewAuditLogService ¶
func NewAuditLogService(opts ...option.RequestOption) (r *AuditLogService)
NewAuditLogService 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 (*AuditLogService) List ¶
func (r *AuditLogService) List(ctx context.Context, query AuditLogListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[AuditLogListResponse], err error)
Gets a list of audit logs for a user account. Can be filtered by who made the change, on which zone, and the timeframe of the change.
func (*AuditLogService) ListAutoPaging ¶
func (r *AuditLogService) ListAutoPaging(ctx context.Context, query AuditLogListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[AuditLogListResponse]
Gets a list of audit logs for a user account. Can be filtered by who made the change, on which zone, and the timeframe of the change.
type BillingHistory ¶
type BillingHistory struct { // Billing item identifier tag. ID string `json:"id,required"` // The billing item action. Action string `json:"action,required"` // The amount associated with this billing item. Amount float64 `json:"amount,required"` // The monetary unit in which pricing information is displayed. Currency string `json:"currency,required"` // The billing item description. Description string `json:"description,required"` // When the billing item was created. OccurredAt time.Time `json:"occurred_at,required" format:"date-time"` // The billing item type. Type string `json:"type,required"` Zone BillingHistoryZone `json:"zone,required"` JSON billingHistoryJSON `json:"-"` }
func (*BillingHistory) UnmarshalJSON ¶
func (r *BillingHistory) UnmarshalJSON(data []byte) (err error)
type BillingHistoryGetParams ¶
type BillingHistoryGetParams struct { // Field to order billing history by. Order param.Field[BillingHistoryGetParamsOrder] `query:"order"` // Page number of paginated results. Page param.Field[float64] `query:"page"` // Number of items per page. PerPage param.Field[float64] `query:"per_page"` }
func (BillingHistoryGetParams) URLQuery ¶
func (r BillingHistoryGetParams) URLQuery() (v url.Values)
URLQuery serializes BillingHistoryGetParams's query parameters as `url.Values`.
type BillingHistoryGetParamsOrder ¶
type BillingHistoryGetParamsOrder string
Field to order billing history by.
const ( BillingHistoryGetParamsOrderType BillingHistoryGetParamsOrder = "type" BillingHistoryGetParamsOrderOccuredAt BillingHistoryGetParamsOrder = "occured_at" BillingHistoryGetParamsOrderAction BillingHistoryGetParamsOrder = "action" )
func (BillingHistoryGetParamsOrder) IsKnown ¶
func (r BillingHistoryGetParamsOrder) IsKnown() bool
type BillingHistoryGetResponseEnvelope ¶
type BillingHistoryGetResponseEnvelope struct { Errors []BillingHistoryGetResponseEnvelopeErrors `json:"errors,required"` Messages []BillingHistoryGetResponseEnvelopeMessages `json:"messages,required"` Result []BillingHistory `json:"result,required,nullable"` // Whether the API call was successful Success BillingHistoryGetResponseEnvelopeSuccess `json:"success,required"` ResultInfo BillingHistoryGetResponseEnvelopeResultInfo `json:"result_info"` JSON billingHistoryGetResponseEnvelopeJSON `json:"-"` }
func (*BillingHistoryGetResponseEnvelope) UnmarshalJSON ¶
func (r *BillingHistoryGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type BillingHistoryGetResponseEnvelopeErrors ¶
type BillingHistoryGetResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON billingHistoryGetResponseEnvelopeErrorsJSON `json:"-"` }
func (*BillingHistoryGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *BillingHistoryGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type BillingHistoryGetResponseEnvelopeMessages ¶
type BillingHistoryGetResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON billingHistoryGetResponseEnvelopeMessagesJSON `json:"-"` }
func (*BillingHistoryGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *BillingHistoryGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type BillingHistoryGetResponseEnvelopeResultInfo ¶
type BillingHistoryGetResponseEnvelopeResultInfo struct { // Total number of results for the requested service Count float64 `json:"count"` // Current page within paginated list of results Page float64 `json:"page"` // Number of results per page of results PerPage float64 `json:"per_page"` // Total results available without any search parameters TotalCount float64 `json:"total_count"` JSON billingHistoryGetResponseEnvelopeResultInfoJSON `json:"-"` }
func (*BillingHistoryGetResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *BillingHistoryGetResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type BillingHistoryGetResponseEnvelopeSuccess ¶
type BillingHistoryGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
BillingHistoryGetResponseEnvelopeSuccessTrue BillingHistoryGetResponseEnvelopeSuccess = true
)
func (BillingHistoryGetResponseEnvelopeSuccess) IsKnown ¶
func (r BillingHistoryGetResponseEnvelopeSuccess) IsKnown() bool
type BillingHistoryService ¶
type BillingHistoryService struct {
Options []option.RequestOption
}
BillingHistoryService 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 NewBillingHistoryService method instead.
func NewBillingHistoryService ¶
func NewBillingHistoryService(opts ...option.RequestOption) (r *BillingHistoryService)
NewBillingHistoryService 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 (*BillingHistoryService) Get ¶
func (r *BillingHistoryService) Get(ctx context.Context, query BillingHistoryGetParams, opts ...option.RequestOption) (res *[]BillingHistory, err error)
Accesses your billing history object.
type BillingHistoryZone ¶
type BillingHistoryZone struct { Name interface{} `json:"name"` JSON billingHistoryZoneJSON `json:"-"` }
func (*BillingHistoryZone) UnmarshalJSON ¶
func (r *BillingHistoryZone) UnmarshalJSON(data []byte) (err error)
type BillingProfileGetResponse ¶
type BillingProfileGetResponse interface {
ImplementsUserBillingProfileGetResponse()
}
Union satisfied by user.BillingProfileGetResponseUnknown or shared.UnionString.
type BillingProfileGetResponseEnvelope ¶
type BillingProfileGetResponseEnvelope struct { Errors []BillingProfileGetResponseEnvelopeErrors `json:"errors,required"` Messages []BillingProfileGetResponseEnvelopeMessages `json:"messages,required"` Result BillingProfileGetResponse `json:"result,required"` // Whether the API call was successful Success BillingProfileGetResponseEnvelopeSuccess `json:"success,required"` JSON billingProfileGetResponseEnvelopeJSON `json:"-"` }
func (*BillingProfileGetResponseEnvelope) UnmarshalJSON ¶
func (r *BillingProfileGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type BillingProfileGetResponseEnvelopeErrors ¶
type BillingProfileGetResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON billingProfileGetResponseEnvelopeErrorsJSON `json:"-"` }
func (*BillingProfileGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *BillingProfileGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type BillingProfileGetResponseEnvelopeMessages ¶
type BillingProfileGetResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON billingProfileGetResponseEnvelopeMessagesJSON `json:"-"` }
func (*BillingProfileGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *BillingProfileGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type BillingProfileGetResponseEnvelopeSuccess ¶
type BillingProfileGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
BillingProfileGetResponseEnvelopeSuccessTrue BillingProfileGetResponseEnvelopeSuccess = true
)
func (BillingProfileGetResponseEnvelopeSuccess) IsKnown ¶
func (r BillingProfileGetResponseEnvelopeSuccess) IsKnown() bool
type BillingProfileService ¶
type BillingProfileService struct {
Options []option.RequestOption
}
BillingProfileService 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 NewBillingProfileService method instead.
func NewBillingProfileService ¶
func NewBillingProfileService(opts ...option.RequestOption) (r *BillingProfileService)
NewBillingProfileService 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 (*BillingProfileService) Get ¶
func (r *BillingProfileService) Get(ctx context.Context, opts ...option.RequestOption) (res *BillingProfileGetResponse, err error)
Accesses your billing profile object.
type BillingService ¶
type BillingService struct { Options []option.RequestOption History *BillingHistoryService Profile *BillingProfileService }
BillingService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBillingService method instead.
func NewBillingService ¶
func NewBillingService(opts ...option.RequestOption) (r *BillingService)
NewBillingService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
type FirewallAccessRuleDeleteResponse ¶
type FirewallAccessRuleDeleteResponse struct { // The unique identifier of the IP Access rule. ID string `json:"id"` JSON firewallAccessRuleDeleteResponseJSON `json:"-"` }
func (*FirewallAccessRuleDeleteResponse) UnmarshalJSON ¶
func (r *FirewallAccessRuleDeleteResponse) UnmarshalJSON(data []byte) (err error)
type FirewallAccessRuleDeleteResponseEnvelope ¶
type FirewallAccessRuleDeleteResponseEnvelope struct { Errors []FirewallAccessRuleDeleteResponseEnvelopeErrors `json:"errors,required"` Messages []FirewallAccessRuleDeleteResponseEnvelopeMessages `json:"messages,required"` Result FirewallAccessRuleDeleteResponse `json:"result,required,nullable"` // Whether the API call was successful Success FirewallAccessRuleDeleteResponseEnvelopeSuccess `json:"success,required"` JSON firewallAccessRuleDeleteResponseEnvelopeJSON `json:"-"` }
func (*FirewallAccessRuleDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *FirewallAccessRuleDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type FirewallAccessRuleDeleteResponseEnvelopeErrors ¶
type FirewallAccessRuleDeleteResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON firewallAccessRuleDeleteResponseEnvelopeErrorsJSON `json:"-"` }
func (*FirewallAccessRuleDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *FirewallAccessRuleDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type FirewallAccessRuleDeleteResponseEnvelopeMessages ¶
type FirewallAccessRuleDeleteResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON firewallAccessRuleDeleteResponseEnvelopeMessagesJSON `json:"-"` }
func (*FirewallAccessRuleDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *FirewallAccessRuleDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type FirewallAccessRuleDeleteResponseEnvelopeSuccess ¶
type FirewallAccessRuleDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
FirewallAccessRuleDeleteResponseEnvelopeSuccessTrue FirewallAccessRuleDeleteResponseEnvelopeSuccess = true
)
func (FirewallAccessRuleDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r FirewallAccessRuleDeleteResponseEnvelopeSuccess) IsKnown() bool
type FirewallAccessRuleEditParams ¶
type FirewallAccessRuleEditParams struct { // The action to apply to a matched request. Mode param.Field[FirewallAccessRuleEditParamsMode] `json:"mode"` // An informative summary of the rule, typically used as a reminder or explanation. Notes param.Field[string] `json:"notes"` }
func (FirewallAccessRuleEditParams) MarshalJSON ¶
func (r FirewallAccessRuleEditParams) MarshalJSON() (data []byte, err error)
type FirewallAccessRuleEditParamsMode ¶
type FirewallAccessRuleEditParamsMode string
The action to apply to a matched request.
const ( FirewallAccessRuleEditParamsModeBlock FirewallAccessRuleEditParamsMode = "block" FirewallAccessRuleEditParamsModeChallenge FirewallAccessRuleEditParamsMode = "challenge" FirewallAccessRuleEditParamsModeWhitelist FirewallAccessRuleEditParamsMode = "whitelist" FirewallAccessRuleEditParamsModeJsChallenge FirewallAccessRuleEditParamsMode = "js_challenge" FirewallAccessRuleEditParamsModeManagedChallenge FirewallAccessRuleEditParamsMode = "managed_challenge" )
func (FirewallAccessRuleEditParamsMode) IsKnown ¶
func (r FirewallAccessRuleEditParamsMode) IsKnown() bool
type FirewallAccessRuleEditResponseEnvelope ¶
type FirewallAccessRuleEditResponseEnvelope struct { Errors []FirewallAccessRuleEditResponseEnvelopeErrors `json:"errors,required"` Messages []FirewallAccessRuleEditResponseEnvelopeMessages `json:"messages,required"` Result FirewallRule `json:"result,required,nullable"` // Whether the API call was successful Success FirewallAccessRuleEditResponseEnvelopeSuccess `json:"success,required"` JSON firewallAccessRuleEditResponseEnvelopeJSON `json:"-"` }
func (*FirewallAccessRuleEditResponseEnvelope) UnmarshalJSON ¶
func (r *FirewallAccessRuleEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type FirewallAccessRuleEditResponseEnvelopeErrors ¶
type FirewallAccessRuleEditResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON firewallAccessRuleEditResponseEnvelopeErrorsJSON `json:"-"` }
func (*FirewallAccessRuleEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *FirewallAccessRuleEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type FirewallAccessRuleEditResponseEnvelopeMessages ¶
type FirewallAccessRuleEditResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON firewallAccessRuleEditResponseEnvelopeMessagesJSON `json:"-"` }
func (*FirewallAccessRuleEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *FirewallAccessRuleEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type FirewallAccessRuleEditResponseEnvelopeSuccess ¶
type FirewallAccessRuleEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
FirewallAccessRuleEditResponseEnvelopeSuccessTrue FirewallAccessRuleEditResponseEnvelopeSuccess = true
)
func (FirewallAccessRuleEditResponseEnvelopeSuccess) IsKnown ¶
func (r FirewallAccessRuleEditResponseEnvelopeSuccess) IsKnown() bool
type FirewallAccessRuleListParams ¶
type FirewallAccessRuleListParams struct { // The direction used to sort returned rules. Direction param.Field[FirewallAccessRuleListParamsDirection] `query:"direction"` EgsPagination param.Field[FirewallAccessRuleListParamsEgsPagination] `query:"egs-pagination"` Filters param.Field[FirewallAccessRuleListParamsFilters] `query:"filters"` // The field used to sort returned rules. Order param.Field[FirewallAccessRuleListParamsOrder] `query:"order"` // Requested page within paginated list of results. Page param.Field[float64] `query:"page"` // Maximum number of results requested. PerPage param.Field[float64] `query:"per_page"` }
func (FirewallAccessRuleListParams) URLQuery ¶
func (r FirewallAccessRuleListParams) URLQuery() (v url.Values)
URLQuery serializes FirewallAccessRuleListParams's query parameters as `url.Values`.
type FirewallAccessRuleListParamsDirection ¶
type FirewallAccessRuleListParamsDirection string
The direction used to sort returned rules.
const ( FirewallAccessRuleListParamsDirectionAsc FirewallAccessRuleListParamsDirection = "asc" FirewallAccessRuleListParamsDirectionDesc FirewallAccessRuleListParamsDirection = "desc" )
func (FirewallAccessRuleListParamsDirection) IsKnown ¶
func (r FirewallAccessRuleListParamsDirection) IsKnown() bool
type FirewallAccessRuleListParamsEgsPagination ¶
type FirewallAccessRuleListParamsEgsPagination struct {
Json param.Field[FirewallAccessRuleListParamsEgsPaginationJson] `query:"json"`
}
func (FirewallAccessRuleListParamsEgsPagination) URLQuery ¶
func (r FirewallAccessRuleListParamsEgsPagination) URLQuery() (v url.Values)
URLQuery serializes FirewallAccessRuleListParamsEgsPagination's query parameters as `url.Values`.
type FirewallAccessRuleListParamsEgsPaginationJson ¶
type FirewallAccessRuleListParamsEgsPaginationJson struct { // The page number of paginated results. Page param.Field[float64] `query:"page"` // The maximum number of results per page. You can only set the value to `1` or to // a multiple of 5 such as `5`, `10`, `15`, or `20`. PerPage param.Field[float64] `query:"per_page"` }
func (FirewallAccessRuleListParamsEgsPaginationJson) URLQuery ¶
func (r FirewallAccessRuleListParamsEgsPaginationJson) URLQuery() (v url.Values)
URLQuery serializes FirewallAccessRuleListParamsEgsPaginationJson's query parameters as `url.Values`.
type FirewallAccessRuleListParamsFilters ¶
type FirewallAccessRuleListParamsFilters struct { // The target to search in existing rules. ConfigurationTarget param.Field[FirewallAccessRuleListParamsFiltersConfigurationTarget] `query:"configuration.target"` // The target value to search for in existing rules: an IP address, an IP address // range, or a country code, depending on the provided `configuration.target`. // Notes: You can search for a single IPv4 address, an IP address range with a // subnet of '/16' or '/24', or a two-letter ISO-3166-1 alpha-2 country code. ConfigurationValue param.Field[string] `query:"configuration.value"` // When set to `all`, all the search requirements must match. When set to `any`, // only one of the search requirements has to match. Match param.Field[FirewallAccessRuleListParamsFiltersMatch] `query:"match"` // The action to apply to a matched request. Mode param.Field[FirewallAccessRuleListParamsFiltersMode] `query:"mode"` // The string to search for in the notes of existing IP Access rules. Notes: For // example, the string 'attack' would match IP Access rules with notes 'Attack // 26/02' and 'Attack 27/02'. The search is case insensitive. Notes param.Field[string] `query:"notes"` }
func (FirewallAccessRuleListParamsFilters) URLQuery ¶
func (r FirewallAccessRuleListParamsFilters) URLQuery() (v url.Values)
URLQuery serializes FirewallAccessRuleListParamsFilters's query parameters as `url.Values`.
type FirewallAccessRuleListParamsFiltersConfigurationTarget ¶
type FirewallAccessRuleListParamsFiltersConfigurationTarget string
The target to search in existing rules.
const ( FirewallAccessRuleListParamsFiltersConfigurationTargetIP FirewallAccessRuleListParamsFiltersConfigurationTarget = "ip" FirewallAccessRuleListParamsFiltersConfigurationTargetIPRange FirewallAccessRuleListParamsFiltersConfigurationTarget = "ip_range" FirewallAccessRuleListParamsFiltersConfigurationTargetASN FirewallAccessRuleListParamsFiltersConfigurationTarget = "asn" FirewallAccessRuleListParamsFiltersConfigurationTargetCountry FirewallAccessRuleListParamsFiltersConfigurationTarget = "country" )
func (FirewallAccessRuleListParamsFiltersConfigurationTarget) IsKnown ¶
func (r FirewallAccessRuleListParamsFiltersConfigurationTarget) IsKnown() bool
type FirewallAccessRuleListParamsFiltersMatch ¶
type FirewallAccessRuleListParamsFiltersMatch string
When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.
const ( FirewallAccessRuleListParamsFiltersMatchAny FirewallAccessRuleListParamsFiltersMatch = "any" FirewallAccessRuleListParamsFiltersMatchAll FirewallAccessRuleListParamsFiltersMatch = "all" )
func (FirewallAccessRuleListParamsFiltersMatch) IsKnown ¶
func (r FirewallAccessRuleListParamsFiltersMatch) IsKnown() bool
type FirewallAccessRuleListParamsFiltersMode ¶
type FirewallAccessRuleListParamsFiltersMode string
The action to apply to a matched request.
const ( FirewallAccessRuleListParamsFiltersModeBlock FirewallAccessRuleListParamsFiltersMode = "block" FirewallAccessRuleListParamsFiltersModeChallenge FirewallAccessRuleListParamsFiltersMode = "challenge" FirewallAccessRuleListParamsFiltersModeWhitelist FirewallAccessRuleListParamsFiltersMode = "whitelist" FirewallAccessRuleListParamsFiltersModeJsChallenge FirewallAccessRuleListParamsFiltersMode = "js_challenge" FirewallAccessRuleListParamsFiltersModeManagedChallenge FirewallAccessRuleListParamsFiltersMode = "managed_challenge" )
func (FirewallAccessRuleListParamsFiltersMode) IsKnown ¶
func (r FirewallAccessRuleListParamsFiltersMode) IsKnown() bool
type FirewallAccessRuleListParamsOrder ¶
type FirewallAccessRuleListParamsOrder string
The field used to sort returned rules.
const ( FirewallAccessRuleListParamsOrderConfigurationTarget FirewallAccessRuleListParamsOrder = "configuration.target" FirewallAccessRuleListParamsOrderConfigurationValue FirewallAccessRuleListParamsOrder = "configuration.value" FirewallAccessRuleListParamsOrderMode FirewallAccessRuleListParamsOrder = "mode" )
func (FirewallAccessRuleListParamsOrder) IsKnown ¶
func (r FirewallAccessRuleListParamsOrder) IsKnown() bool
type FirewallAccessRuleNewParams ¶
type FirewallAccessRuleNewParams struct { // The rule configuration. Configuration param.Field[FirewallAccessRuleNewParamsConfiguration] `json:"configuration,required"` // The action to apply to a matched request. Mode param.Field[FirewallAccessRuleNewParamsMode] `json:"mode,required"` // An informative summary of the rule, typically used as a reminder or explanation. Notes param.Field[string] `json:"notes"` }
func (FirewallAccessRuleNewParams) MarshalJSON ¶
func (r FirewallAccessRuleNewParams) MarshalJSON() (data []byte, err error)
type FirewallAccessRuleNewParamsConfiguration ¶
type FirewallAccessRuleNewParamsConfiguration interface {
// contains filtered or unexported methods
}
The rule configuration.
Satisfied by user.FirewallAccessRuleNewParamsConfigurationLegacyJhsIPConfiguration, user.FirewallAccessRuleNewParamsConfigurationLegacyJhsIPV6Configuration, user.FirewallAccessRuleNewParamsConfigurationLegacyJhsCIDRConfiguration, user.FirewallAccessRuleNewParamsConfigurationLegacyJhsASNConfiguration, user.FirewallAccessRuleNewParamsConfigurationLegacyJhsCountryConfiguration.
type FirewallAccessRuleNewParamsConfigurationLegacyJhsASNConfiguration ¶
type FirewallAccessRuleNewParamsConfigurationLegacyJhsASNConfiguration struct { // The configuration target. You must set the target to `asn` when specifying an // Autonomous System Number (ASN) in the rule. Target param.Field[FirewallAccessRuleNewParamsConfigurationLegacyJhsASNConfigurationTarget] `json:"target"` // The AS number to match. Value param.Field[string] `json:"value"` }
func (FirewallAccessRuleNewParamsConfigurationLegacyJhsASNConfiguration) MarshalJSON ¶
func (r FirewallAccessRuleNewParamsConfigurationLegacyJhsASNConfiguration) MarshalJSON() (data []byte, err error)
type FirewallAccessRuleNewParamsConfigurationLegacyJhsASNConfigurationTarget ¶
type FirewallAccessRuleNewParamsConfigurationLegacyJhsASNConfigurationTarget string
The configuration target. You must set the target to `asn` when specifying an Autonomous System Number (ASN) in the rule.
const (
FirewallAccessRuleNewParamsConfigurationLegacyJhsASNConfigurationTargetASN FirewallAccessRuleNewParamsConfigurationLegacyJhsASNConfigurationTarget = "asn"
)
func (FirewallAccessRuleNewParamsConfigurationLegacyJhsASNConfigurationTarget) IsKnown ¶
func (r FirewallAccessRuleNewParamsConfigurationLegacyJhsASNConfigurationTarget) IsKnown() bool
type FirewallAccessRuleNewParamsConfigurationLegacyJhsCIDRConfiguration ¶
type FirewallAccessRuleNewParamsConfigurationLegacyJhsCIDRConfiguration struct { // The configuration target. You must set the target to `ip_range` when specifying // an IP address range in the rule. Target param.Field[FirewallAccessRuleNewParamsConfigurationLegacyJhsCIDRConfigurationTarget] `json:"target"` // The IP address range to match. You can only use prefix lengths `/16` and `/24` // for IPv4 ranges, and prefix lengths `/32`, `/48`, and `/64` for IPv6 ranges. Value param.Field[string] `json:"value"` }
func (FirewallAccessRuleNewParamsConfigurationLegacyJhsCIDRConfiguration) MarshalJSON ¶
func (r FirewallAccessRuleNewParamsConfigurationLegacyJhsCIDRConfiguration) MarshalJSON() (data []byte, err error)
type FirewallAccessRuleNewParamsConfigurationLegacyJhsCIDRConfigurationTarget ¶
type FirewallAccessRuleNewParamsConfigurationLegacyJhsCIDRConfigurationTarget string
The configuration target. You must set the target to `ip_range` when specifying an IP address range in the rule.
const (
FirewallAccessRuleNewParamsConfigurationLegacyJhsCIDRConfigurationTargetIPRange FirewallAccessRuleNewParamsConfigurationLegacyJhsCIDRConfigurationTarget = "ip_range"
)
func (FirewallAccessRuleNewParamsConfigurationLegacyJhsCIDRConfigurationTarget) IsKnown ¶
func (r FirewallAccessRuleNewParamsConfigurationLegacyJhsCIDRConfigurationTarget) IsKnown() bool
type FirewallAccessRuleNewParamsConfigurationLegacyJhsCountryConfiguration ¶
type FirewallAccessRuleNewParamsConfigurationLegacyJhsCountryConfiguration struct { // The configuration target. You must set the target to `country` when specifying a // country code in the rule. Target param.Field[FirewallAccessRuleNewParamsConfigurationLegacyJhsCountryConfigurationTarget] `json:"target"` // The two-letter ISO-3166-1 alpha-2 code to match. For more information, refer to // [IP Access rules: Parameters](https://developers.cloudflare.com/waf/tools/ip-access-rules/parameters/#country). Value param.Field[string] `json:"value"` }
func (FirewallAccessRuleNewParamsConfigurationLegacyJhsCountryConfiguration) MarshalJSON ¶
func (r FirewallAccessRuleNewParamsConfigurationLegacyJhsCountryConfiguration) MarshalJSON() (data []byte, err error)
type FirewallAccessRuleNewParamsConfigurationLegacyJhsCountryConfigurationTarget ¶
type FirewallAccessRuleNewParamsConfigurationLegacyJhsCountryConfigurationTarget string
The configuration target. You must set the target to `country` when specifying a country code in the rule.
const (
FirewallAccessRuleNewParamsConfigurationLegacyJhsCountryConfigurationTargetCountry FirewallAccessRuleNewParamsConfigurationLegacyJhsCountryConfigurationTarget = "country"
)
func (FirewallAccessRuleNewParamsConfigurationLegacyJhsCountryConfigurationTarget) IsKnown ¶
func (r FirewallAccessRuleNewParamsConfigurationLegacyJhsCountryConfigurationTarget) IsKnown() bool
type FirewallAccessRuleNewParamsConfigurationLegacyJhsIPConfiguration ¶
type FirewallAccessRuleNewParamsConfigurationLegacyJhsIPConfiguration struct { // The configuration target. You must set the target to `ip` when specifying an IP // address in the rule. Target param.Field[FirewallAccessRuleNewParamsConfigurationLegacyJhsIPConfigurationTarget] `json:"target"` // The IP address to match. This address will be compared to the IP address of // incoming requests. Value param.Field[string] `json:"value"` }
func (FirewallAccessRuleNewParamsConfigurationLegacyJhsIPConfiguration) MarshalJSON ¶
func (r FirewallAccessRuleNewParamsConfigurationLegacyJhsIPConfiguration) MarshalJSON() (data []byte, err error)
type FirewallAccessRuleNewParamsConfigurationLegacyJhsIPConfigurationTarget ¶
type FirewallAccessRuleNewParamsConfigurationLegacyJhsIPConfigurationTarget string
The configuration target. You must set the target to `ip` when specifying an IP address in the rule.
const (
FirewallAccessRuleNewParamsConfigurationLegacyJhsIPConfigurationTargetIP FirewallAccessRuleNewParamsConfigurationLegacyJhsIPConfigurationTarget = "ip"
)
func (FirewallAccessRuleNewParamsConfigurationLegacyJhsIPConfigurationTarget) IsKnown ¶
func (r FirewallAccessRuleNewParamsConfigurationLegacyJhsIPConfigurationTarget) IsKnown() bool
type FirewallAccessRuleNewParamsConfigurationLegacyJhsIPV6Configuration ¶
type FirewallAccessRuleNewParamsConfigurationLegacyJhsIPV6Configuration struct { // The configuration target. You must set the target to `ip6` when specifying an // IPv6 address in the rule. Target param.Field[FirewallAccessRuleNewParamsConfigurationLegacyJhsIPV6ConfigurationTarget] `json:"target"` // The IPv6 address to match. Value param.Field[string] `json:"value"` }
func (FirewallAccessRuleNewParamsConfigurationLegacyJhsIPV6Configuration) MarshalJSON ¶
func (r FirewallAccessRuleNewParamsConfigurationLegacyJhsIPV6Configuration) MarshalJSON() (data []byte, err error)
type FirewallAccessRuleNewParamsConfigurationLegacyJhsIPV6ConfigurationTarget ¶
type FirewallAccessRuleNewParamsConfigurationLegacyJhsIPV6ConfigurationTarget string
The configuration target. You must set the target to `ip6` when specifying an IPv6 address in the rule.
const (
FirewallAccessRuleNewParamsConfigurationLegacyJhsIPV6ConfigurationTargetIp6 FirewallAccessRuleNewParamsConfigurationLegacyJhsIPV6ConfigurationTarget = "ip6"
)
func (FirewallAccessRuleNewParamsConfigurationLegacyJhsIPV6ConfigurationTarget) IsKnown ¶
func (r FirewallAccessRuleNewParamsConfigurationLegacyJhsIPV6ConfigurationTarget) IsKnown() bool
type FirewallAccessRuleNewParamsMode ¶
type FirewallAccessRuleNewParamsMode string
The action to apply to a matched request.
const ( FirewallAccessRuleNewParamsModeBlock FirewallAccessRuleNewParamsMode = "block" FirewallAccessRuleNewParamsModeChallenge FirewallAccessRuleNewParamsMode = "challenge" FirewallAccessRuleNewParamsModeWhitelist FirewallAccessRuleNewParamsMode = "whitelist" FirewallAccessRuleNewParamsModeJsChallenge FirewallAccessRuleNewParamsMode = "js_challenge" FirewallAccessRuleNewParamsModeManagedChallenge FirewallAccessRuleNewParamsMode = "managed_challenge" )
func (FirewallAccessRuleNewParamsMode) IsKnown ¶
func (r FirewallAccessRuleNewParamsMode) IsKnown() bool
type FirewallAccessRuleNewResponseEnvelope ¶
type FirewallAccessRuleNewResponseEnvelope struct { Errors []FirewallAccessRuleNewResponseEnvelopeErrors `json:"errors,required"` Messages []FirewallAccessRuleNewResponseEnvelopeMessages `json:"messages,required"` Result FirewallRule `json:"result,required,nullable"` // Whether the API call was successful Success FirewallAccessRuleNewResponseEnvelopeSuccess `json:"success,required"` JSON firewallAccessRuleNewResponseEnvelopeJSON `json:"-"` }
func (*FirewallAccessRuleNewResponseEnvelope) UnmarshalJSON ¶
func (r *FirewallAccessRuleNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type FirewallAccessRuleNewResponseEnvelopeErrors ¶
type FirewallAccessRuleNewResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON firewallAccessRuleNewResponseEnvelopeErrorsJSON `json:"-"` }
func (*FirewallAccessRuleNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *FirewallAccessRuleNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type FirewallAccessRuleNewResponseEnvelopeMessages ¶
type FirewallAccessRuleNewResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON firewallAccessRuleNewResponseEnvelopeMessagesJSON `json:"-"` }
func (*FirewallAccessRuleNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *FirewallAccessRuleNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type FirewallAccessRuleNewResponseEnvelopeSuccess ¶
type FirewallAccessRuleNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
FirewallAccessRuleNewResponseEnvelopeSuccessTrue FirewallAccessRuleNewResponseEnvelopeSuccess = true
)
func (FirewallAccessRuleNewResponseEnvelopeSuccess) IsKnown ¶
func (r FirewallAccessRuleNewResponseEnvelopeSuccess) IsKnown() bool
type FirewallAccessRuleService ¶
type FirewallAccessRuleService struct {
Options []option.RequestOption
}
FirewallAccessRuleService 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 NewFirewallAccessRuleService method instead.
func NewFirewallAccessRuleService ¶
func NewFirewallAccessRuleService(opts ...option.RequestOption) (r *FirewallAccessRuleService)
NewFirewallAccessRuleService 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 (*FirewallAccessRuleService) Delete ¶
func (r *FirewallAccessRuleService) Delete(ctx context.Context, identifier string, opts ...option.RequestOption) (res *FirewallAccessRuleDeleteResponse, err error)
Deletes an IP Access rule at the user level.
Note: Deleting a user-level rule will affect all zones owned by the user.
func (*FirewallAccessRuleService) Edit ¶
func (r *FirewallAccessRuleService) Edit(ctx context.Context, identifier string, body FirewallAccessRuleEditParams, opts ...option.RequestOption) (res *FirewallRule, err error)
Updates an IP Access rule defined at the user level. You can only update the rule action (`mode` parameter) and notes.
func (*FirewallAccessRuleService) List ¶
func (r *FirewallAccessRuleService) List(ctx context.Context, query FirewallAccessRuleListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[FirewallRule], err error)
Fetches IP Access rules of the user. You can filter the results using several optional parameters.
func (*FirewallAccessRuleService) ListAutoPaging ¶
func (r *FirewallAccessRuleService) ListAutoPaging(ctx context.Context, query FirewallAccessRuleListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[FirewallRule]
Fetches IP Access rules of the user. You can filter the results using several optional parameters.
func (*FirewallAccessRuleService) New ¶
func (r *FirewallAccessRuleService) New(ctx context.Context, body FirewallAccessRuleNewParams, opts ...option.RequestOption) (res *FirewallRule, err error)
Creates a new IP Access rule for all zones owned by the current user.
Note: To create an IP Access rule that applies to a specific zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.
type FirewallRule ¶
type FirewallRule struct { // The unique identifier of the IP Access rule. ID string `json:"id,required"` // The available actions that a rule can apply to a matched request. AllowedModes []FirewallRuleAllowedMode `json:"allowed_modes,required"` // The rule configuration. Configuration FirewallRuleConfiguration `json:"configuration,required"` // The action to apply to a matched request. Mode FirewallRuleMode `json:"mode,required"` // The timestamp of when the rule was created. CreatedOn time.Time `json:"created_on" format:"date-time"` // The timestamp of when the rule was last modified. ModifiedOn time.Time `json:"modified_on" format:"date-time"` // An informative summary of the rule, typically used as a reminder or explanation. Notes string `json:"notes"` JSON firewallRuleJSON `json:"-"` }
func (*FirewallRule) UnmarshalJSON ¶
func (r *FirewallRule) UnmarshalJSON(data []byte) (err error)
type FirewallRuleAllowedMode ¶
type FirewallRuleAllowedMode string
The action to apply to a matched request.
const ( FirewallRuleAllowedModeBlock FirewallRuleAllowedMode = "block" FirewallRuleAllowedModeChallenge FirewallRuleAllowedMode = "challenge" FirewallRuleAllowedModeWhitelist FirewallRuleAllowedMode = "whitelist" FirewallRuleAllowedModeJsChallenge FirewallRuleAllowedMode = "js_challenge" FirewallRuleAllowedModeManagedChallenge FirewallRuleAllowedMode = "managed_challenge" )
func (FirewallRuleAllowedMode) IsKnown ¶
func (r FirewallRuleAllowedMode) IsKnown() bool
type FirewallRuleConfiguration ¶
type FirewallRuleConfiguration interface {
// contains filtered or unexported methods
}
The rule configuration.
Union satisfied by user.FirewallRuleConfigurationLegacyJhsIPConfiguration, user.FirewallRuleConfigurationLegacyJhsIPV6Configuration, user.FirewallRuleConfigurationLegacyJhsCIDRConfiguration, user.FirewallRuleConfigurationLegacyJhsASNConfiguration or user.FirewallRuleConfigurationLegacyJhsCountryConfiguration.
type FirewallRuleConfigurationLegacyJhsASNConfiguration ¶
type FirewallRuleConfigurationLegacyJhsASNConfiguration struct { // The configuration target. You must set the target to `asn` when specifying an // Autonomous System Number (ASN) in the rule. Target FirewallRuleConfigurationLegacyJhsASNConfigurationTarget `json:"target"` // The AS number to match. Value string `json:"value"` JSON firewallRuleConfigurationLegacyJhsASNConfigurationJSON `json:"-"` }
func (*FirewallRuleConfigurationLegacyJhsASNConfiguration) UnmarshalJSON ¶
func (r *FirewallRuleConfigurationLegacyJhsASNConfiguration) UnmarshalJSON(data []byte) (err error)
type FirewallRuleConfigurationLegacyJhsASNConfigurationTarget ¶
type FirewallRuleConfigurationLegacyJhsASNConfigurationTarget string
The configuration target. You must set the target to `asn` when specifying an Autonomous System Number (ASN) in the rule.
const (
FirewallRuleConfigurationLegacyJhsASNConfigurationTargetASN FirewallRuleConfigurationLegacyJhsASNConfigurationTarget = "asn"
)
func (FirewallRuleConfigurationLegacyJhsASNConfigurationTarget) IsKnown ¶
func (r FirewallRuleConfigurationLegacyJhsASNConfigurationTarget) IsKnown() bool
type FirewallRuleConfigurationLegacyJhsCIDRConfiguration ¶
type FirewallRuleConfigurationLegacyJhsCIDRConfiguration struct { // The configuration target. You must set the target to `ip_range` when specifying // an IP address range in the rule. Target FirewallRuleConfigurationLegacyJhsCIDRConfigurationTarget `json:"target"` // The IP address range to match. You can only use prefix lengths `/16` and `/24` // for IPv4 ranges, and prefix lengths `/32`, `/48`, and `/64` for IPv6 ranges. Value string `json:"value"` JSON firewallRuleConfigurationLegacyJhsCIDRConfigurationJSON `json:"-"` }
func (*FirewallRuleConfigurationLegacyJhsCIDRConfiguration) UnmarshalJSON ¶
func (r *FirewallRuleConfigurationLegacyJhsCIDRConfiguration) UnmarshalJSON(data []byte) (err error)
type FirewallRuleConfigurationLegacyJhsCIDRConfigurationTarget ¶
type FirewallRuleConfigurationLegacyJhsCIDRConfigurationTarget string
The configuration target. You must set the target to `ip_range` when specifying an IP address range in the rule.
const (
FirewallRuleConfigurationLegacyJhsCIDRConfigurationTargetIPRange FirewallRuleConfigurationLegacyJhsCIDRConfigurationTarget = "ip_range"
)
func (FirewallRuleConfigurationLegacyJhsCIDRConfigurationTarget) IsKnown ¶
func (r FirewallRuleConfigurationLegacyJhsCIDRConfigurationTarget) IsKnown() bool
type FirewallRuleConfigurationLegacyJhsCountryConfiguration ¶
type FirewallRuleConfigurationLegacyJhsCountryConfiguration struct { // The configuration target. You must set the target to `country` when specifying a // country code in the rule. Target FirewallRuleConfigurationLegacyJhsCountryConfigurationTarget `json:"target"` // The two-letter ISO-3166-1 alpha-2 code to match. For more information, refer to // [IP Access rules: Parameters](https://developers.cloudflare.com/waf/tools/ip-access-rules/parameters/#country). Value string `json:"value"` JSON firewallRuleConfigurationLegacyJhsCountryConfigurationJSON `json:"-"` }
func (*FirewallRuleConfigurationLegacyJhsCountryConfiguration) UnmarshalJSON ¶
func (r *FirewallRuleConfigurationLegacyJhsCountryConfiguration) UnmarshalJSON(data []byte) (err error)
type FirewallRuleConfigurationLegacyJhsCountryConfigurationTarget ¶
type FirewallRuleConfigurationLegacyJhsCountryConfigurationTarget string
The configuration target. You must set the target to `country` when specifying a country code in the rule.
const (
FirewallRuleConfigurationLegacyJhsCountryConfigurationTargetCountry FirewallRuleConfigurationLegacyJhsCountryConfigurationTarget = "country"
)
func (FirewallRuleConfigurationLegacyJhsCountryConfigurationTarget) IsKnown ¶
func (r FirewallRuleConfigurationLegacyJhsCountryConfigurationTarget) IsKnown() bool
type FirewallRuleConfigurationLegacyJhsIPConfiguration ¶
type FirewallRuleConfigurationLegacyJhsIPConfiguration struct { // The configuration target. You must set the target to `ip` when specifying an IP // address in the rule. Target FirewallRuleConfigurationLegacyJhsIPConfigurationTarget `json:"target"` // The IP address to match. This address will be compared to the IP address of // incoming requests. Value string `json:"value"` JSON firewallRuleConfigurationLegacyJhsIPConfigurationJSON `json:"-"` }
func (*FirewallRuleConfigurationLegacyJhsIPConfiguration) UnmarshalJSON ¶
func (r *FirewallRuleConfigurationLegacyJhsIPConfiguration) UnmarshalJSON(data []byte) (err error)
type FirewallRuleConfigurationLegacyJhsIPConfigurationTarget ¶
type FirewallRuleConfigurationLegacyJhsIPConfigurationTarget string
The configuration target. You must set the target to `ip` when specifying an IP address in the rule.
const (
FirewallRuleConfigurationLegacyJhsIPConfigurationTargetIP FirewallRuleConfigurationLegacyJhsIPConfigurationTarget = "ip"
)
func (FirewallRuleConfigurationLegacyJhsIPConfigurationTarget) IsKnown ¶
func (r FirewallRuleConfigurationLegacyJhsIPConfigurationTarget) IsKnown() bool
type FirewallRuleConfigurationLegacyJhsIPV6Configuration ¶
type FirewallRuleConfigurationLegacyJhsIPV6Configuration struct { // The configuration target. You must set the target to `ip6` when specifying an // IPv6 address in the rule. Target FirewallRuleConfigurationLegacyJhsIPV6ConfigurationTarget `json:"target"` // The IPv6 address to match. Value string `json:"value"` JSON firewallRuleConfigurationLegacyJhsIPV6ConfigurationJSON `json:"-"` }
func (*FirewallRuleConfigurationLegacyJhsIPV6Configuration) UnmarshalJSON ¶
func (r *FirewallRuleConfigurationLegacyJhsIPV6Configuration) UnmarshalJSON(data []byte) (err error)
type FirewallRuleConfigurationLegacyJhsIPV6ConfigurationTarget ¶
type FirewallRuleConfigurationLegacyJhsIPV6ConfigurationTarget string
The configuration target. You must set the target to `ip6` when specifying an IPv6 address in the rule.
const (
FirewallRuleConfigurationLegacyJhsIPV6ConfigurationTargetIp6 FirewallRuleConfigurationLegacyJhsIPV6ConfigurationTarget = "ip6"
)
func (FirewallRuleConfigurationLegacyJhsIPV6ConfigurationTarget) IsKnown ¶
func (r FirewallRuleConfigurationLegacyJhsIPV6ConfigurationTarget) IsKnown() bool
type FirewallRuleMode ¶
type FirewallRuleMode string
The action to apply to a matched request.
const ( FirewallRuleModeBlock FirewallRuleMode = "block" FirewallRuleModeChallenge FirewallRuleMode = "challenge" FirewallRuleModeWhitelist FirewallRuleMode = "whitelist" FirewallRuleModeJsChallenge FirewallRuleMode = "js_challenge" FirewallRuleModeManagedChallenge FirewallRuleMode = "managed_challenge" )
func (FirewallRuleMode) IsKnown ¶
func (r FirewallRuleMode) IsKnown() bool
type FirewallService ¶
type FirewallService struct { Options []option.RequestOption AccessRules *FirewallAccessRuleService }
FirewallService 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 NewFirewallService method instead.
func NewFirewallService ¶
func NewFirewallService(opts ...option.RequestOption) (r *FirewallService)
NewFirewallService 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 InviteEditParams ¶
type InviteEditParams struct { // Status of your response to the invitation (rejected or accepted). Status param.Field[InviteEditParamsStatus] `json:"status,required"` }
func (InviteEditParams) MarshalJSON ¶
func (r InviteEditParams) MarshalJSON() (data []byte, err error)
type InviteEditParamsStatus ¶
type InviteEditParamsStatus string
Status of your response to the invitation (rejected or accepted).
const ( InviteEditParamsStatusAccepted InviteEditParamsStatus = "accepted" InviteEditParamsStatusRejected InviteEditParamsStatus = "rejected" )
func (InviteEditParamsStatus) IsKnown ¶
func (r InviteEditParamsStatus) IsKnown() bool
type InviteEditResponse ¶ added in v2.3.0
type InviteEditResponse interface {
ImplementsUserInviteEditResponse()
}
Union satisfied by user.InviteEditResponseUnknown or shared.UnionString.
type InviteEditResponseEnvelope ¶
type InviteEditResponseEnvelope struct { Errors []InviteEditResponseEnvelopeErrors `json:"errors,required"` Messages []InviteEditResponseEnvelopeMessages `json:"messages,required"` Result InviteEditResponse `json:"result,required"` // Whether the API call was successful Success InviteEditResponseEnvelopeSuccess `json:"success,required"` JSON inviteEditResponseEnvelopeJSON `json:"-"` }
func (*InviteEditResponseEnvelope) UnmarshalJSON ¶
func (r *InviteEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type InviteEditResponseEnvelopeErrors ¶
type InviteEditResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON inviteEditResponseEnvelopeErrorsJSON `json:"-"` }
func (*InviteEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *InviteEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type InviteEditResponseEnvelopeMessages ¶
type InviteEditResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON inviteEditResponseEnvelopeMessagesJSON `json:"-"` }
func (*InviteEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *InviteEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type InviteEditResponseEnvelopeSuccess ¶
type InviteEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
InviteEditResponseEnvelopeSuccessTrue InviteEditResponseEnvelopeSuccess = true
)
func (InviteEditResponseEnvelopeSuccess) IsKnown ¶
func (r InviteEditResponseEnvelopeSuccess) IsKnown() bool
type InviteGetResponse ¶ added in v2.3.0
type InviteGetResponse interface {
ImplementsUserInviteGetResponse()
}
Union satisfied by user.InviteGetResponseUnknown or shared.UnionString.
type InviteGetResponseEnvelope ¶
type InviteGetResponseEnvelope struct { Errors []InviteGetResponseEnvelopeErrors `json:"errors,required"` Messages []InviteGetResponseEnvelopeMessages `json:"messages,required"` Result InviteGetResponse `json:"result,required"` // Whether the API call was successful Success InviteGetResponseEnvelopeSuccess `json:"success,required"` JSON inviteGetResponseEnvelopeJSON `json:"-"` }
func (*InviteGetResponseEnvelope) UnmarshalJSON ¶
func (r *InviteGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type InviteGetResponseEnvelopeErrors ¶
type InviteGetResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON inviteGetResponseEnvelopeErrorsJSON `json:"-"` }
func (*InviteGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *InviteGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type InviteGetResponseEnvelopeMessages ¶
type InviteGetResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON inviteGetResponseEnvelopeMessagesJSON `json:"-"` }
func (*InviteGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *InviteGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type InviteGetResponseEnvelopeSuccess ¶
type InviteGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
InviteGetResponseEnvelopeSuccessTrue InviteGetResponseEnvelopeSuccess = true
)
func (InviteGetResponseEnvelopeSuccess) IsKnown ¶
func (r InviteGetResponseEnvelopeSuccess) IsKnown() bool
type InviteListResponse ¶
type InviteListResponse struct { // ID of the user to add to the organization. InvitedMemberID string `json:"invited_member_id,required,nullable"` // ID of the organization the user will be added to. OrganizationID string `json:"organization_id,required"` // Invite identifier tag. ID string `json:"id"` // When the invite is no longer active. ExpiresOn time.Time `json:"expires_on" format:"date-time"` // The email address of the user who created the invite. InvitedBy string `json:"invited_by"` // Email address of the user to add to the organization. InvitedMemberEmail string `json:"invited_member_email"` // When the invite was sent. InvitedOn time.Time `json:"invited_on" format:"date-time"` // Organization name. OrganizationName string `json:"organization_name"` // Roles to be assigned to this user. Roles []accounts.Role `json:"roles"` // Current status of the invitation. Status InviteListResponseStatus `json:"status"` JSON inviteListResponseJSON `json:"-"` }
func (*InviteListResponse) UnmarshalJSON ¶
func (r *InviteListResponse) UnmarshalJSON(data []byte) (err error)
type InviteListResponseStatus ¶
type InviteListResponseStatus string
Current status of the invitation.
const ( InviteListResponseStatusPending InviteListResponseStatus = "pending" InviteListResponseStatusAccepted InviteListResponseStatus = "accepted" InviteListResponseStatusRejected InviteListResponseStatus = "rejected" InviteListResponseStatusExpired InviteListResponseStatus = "expired" )
func (InviteListResponseStatus) IsKnown ¶
func (r InviteListResponseStatus) IsKnown() bool
type InviteService ¶
type InviteService struct {
Options []option.RequestOption
}
InviteService 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 NewInviteService method instead.
func NewInviteService ¶
func NewInviteService(opts ...option.RequestOption) (r *InviteService)
NewInviteService 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 (*InviteService) Edit ¶
func (r *InviteService) Edit(ctx context.Context, inviteID string, body InviteEditParams, opts ...option.RequestOption) (res *InviteEditResponse, err error)
Responds to an invitation.
func (*InviteService) Get ¶
func (r *InviteService) Get(ctx context.Context, inviteID string, opts ...option.RequestOption) (res *InviteGetResponse, err error)
Gets the details of an invitation.
func (*InviteService) List ¶
func (r *InviteService) List(ctx context.Context, opts ...option.RequestOption) (res *pagination.SinglePage[InviteListResponse], err error)
Lists all invitations associated with my user.
func (*InviteService) ListAutoPaging ¶
func (r *InviteService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *pagination.SinglePageAutoPager[InviteListResponse]
Lists all invitations associated with my user.
type LoadBalancerAnalyticsEventListParams ¶
type LoadBalancerAnalyticsEventListParams struct { // If true, filter events where the origin status is healthy. If false, filter // events where the origin status is unhealthy. OriginHealthy param.Field[bool] `query:"origin_healthy"` // The name for the origin to filter. OriginName param.Field[string] `query:"origin_name"` // If true, filter events where the pool status is healthy. If false, filter events // where the pool status is unhealthy. PoolHealthy param.Field[bool] `query:"pool_healthy"` PoolID param.Field[string] `query:"pool_id"` // The name for the pool to filter. PoolName param.Field[string] `query:"pool_name"` // Start date and time of requesting data period in the ISO8601 format. Since param.Field[time.Time] `query:"since" format:"date-time"` // End date and time of requesting data period in the ISO8601 format. Until param.Field[time.Time] `query:"until" format:"date-time"` }
func (LoadBalancerAnalyticsEventListParams) URLQuery ¶
func (r LoadBalancerAnalyticsEventListParams) URLQuery() (v url.Values)
URLQuery serializes LoadBalancerAnalyticsEventListParams's query parameters as `url.Values`.
type LoadBalancerAnalyticsEventService ¶
type LoadBalancerAnalyticsEventService struct {
Options []option.RequestOption
}
LoadBalancerAnalyticsEventService 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 NewLoadBalancerAnalyticsEventService method instead.
func NewLoadBalancerAnalyticsEventService ¶
func NewLoadBalancerAnalyticsEventService(opts ...option.RequestOption) (r *LoadBalancerAnalyticsEventService)
NewLoadBalancerAnalyticsEventService 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 (*LoadBalancerAnalyticsEventService) List ¶
func (r *LoadBalancerAnalyticsEventService) List(ctx context.Context, query LoadBalancerAnalyticsEventListParams, opts ...option.RequestOption) (res *pagination.SinglePage[LoadBalancingAnalytics], err error)
List origin health changes.
func (*LoadBalancerAnalyticsEventService) ListAutoPaging ¶
func (r *LoadBalancerAnalyticsEventService) ListAutoPaging(ctx context.Context, query LoadBalancerAnalyticsEventListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[LoadBalancingAnalytics]
List origin health changes.
type LoadBalancerAnalyticsService ¶
type LoadBalancerAnalyticsService struct { Options []option.RequestOption Events *LoadBalancerAnalyticsEventService }
LoadBalancerAnalyticsService 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 NewLoadBalancerAnalyticsService method instead.
func NewLoadBalancerAnalyticsService ¶
func NewLoadBalancerAnalyticsService(opts ...option.RequestOption) (r *LoadBalancerAnalyticsService)
NewLoadBalancerAnalyticsService 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 LoadBalancerMonitorDeleteResponse ¶
type LoadBalancerMonitorDeleteResponse struct { ID string `json:"id"` JSON loadBalancerMonitorDeleteResponseJSON `json:"-"` }
func (*LoadBalancerMonitorDeleteResponse) UnmarshalJSON ¶
func (r *LoadBalancerMonitorDeleteResponse) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorDeleteResponseEnvelope ¶
type LoadBalancerMonitorDeleteResponseEnvelope struct { Errors []LoadBalancerMonitorDeleteResponseEnvelopeErrors `json:"errors,required"` Messages []LoadBalancerMonitorDeleteResponseEnvelopeMessages `json:"messages,required"` Result LoadBalancerMonitorDeleteResponse `json:"result,required"` // Whether the API call was successful Success LoadBalancerMonitorDeleteResponseEnvelopeSuccess `json:"success,required"` JSON loadBalancerMonitorDeleteResponseEnvelopeJSON `json:"-"` }
func (*LoadBalancerMonitorDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *LoadBalancerMonitorDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorDeleteResponseEnvelopeErrors ¶
type LoadBalancerMonitorDeleteResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerMonitorDeleteResponseEnvelopeErrorsJSON `json:"-"` }
func (*LoadBalancerMonitorDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LoadBalancerMonitorDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorDeleteResponseEnvelopeMessages ¶
type LoadBalancerMonitorDeleteResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerMonitorDeleteResponseEnvelopeMessagesJSON `json:"-"` }
func (*LoadBalancerMonitorDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LoadBalancerMonitorDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorDeleteResponseEnvelopeSuccess ¶
type LoadBalancerMonitorDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LoadBalancerMonitorDeleteResponseEnvelopeSuccessTrue LoadBalancerMonitorDeleteResponseEnvelopeSuccess = true
)
func (LoadBalancerMonitorDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r LoadBalancerMonitorDeleteResponseEnvelopeSuccess) IsKnown() bool
type LoadBalancerMonitorEditParams ¶
type LoadBalancerMonitorEditParams struct { // The expected HTTP response code or code range of the health check. This // parameter is only valid for HTTP and HTTPS monitors. ExpectedCodes param.Field[string] `json:"expected_codes,required"` // Do not validate the certificate when monitor use HTTPS. This parameter is // currently only valid for HTTP and HTTPS monitors. AllowInsecure param.Field[bool] `json:"allow_insecure"` // To be marked unhealthy the monitored origin must fail this healthcheck N // consecutive times. ConsecutiveDown param.Field[int64] `json:"consecutive_down"` // To be marked healthy the monitored origin must pass this healthcheck N // consecutive times. ConsecutiveUp param.Field[int64] `json:"consecutive_up"` // Object description. Description param.Field[string] `json:"description"` // A case-insensitive sub-string to look for in the response body. If this string // is not found, the origin will be marked as unhealthy. This parameter is only // valid for HTTP and HTTPS monitors. ExpectedBody param.Field[string] `json:"expected_body"` // Follow redirects if returned by the origin. This parameter is only valid for // HTTP and HTTPS monitors. FollowRedirects param.Field[bool] `json:"follow_redirects"` // The HTTP request headers to send in the health check. It is recommended you set // a Host header by default. The User-Agent header cannot be overridden. This // parameter is only valid for HTTP and HTTPS monitors. Header param.Field[interface{}] `json:"header"` // The interval between each health check. Shorter intervals may improve failover // time, but will increase load on the origins as we check from multiple locations. Interval param.Field[int64] `json:"interval"` // The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS // based checks and 'connection_established' for TCP based health checks. Method param.Field[string] `json:"method"` // The endpoint path you want to conduct a health check against. This parameter is // only valid for HTTP and HTTPS monitors. Path param.Field[string] `json:"path"` // The port number to connect to for the health check. Required for TCP, UDP, and // SMTP checks. HTTP and HTTPS checks should only define the port when using a // non-standard port (HTTP: default 80, HTTPS: default 443). Port param.Field[int64] `json:"port"` // Assign this monitor to emulate the specified zone while probing. This parameter // is only valid for HTTP and HTTPS monitors. ProbeZone param.Field[string] `json:"probe_zone"` // The number of retries to attempt in case of a timeout before marking the origin // as unhealthy. Retries are attempted immediately. Retries param.Field[int64] `json:"retries"` // The timeout (in seconds) before marking the health check as failed. Timeout param.Field[int64] `json:"timeout"` // The protocol to use for the health check. Currently supported protocols are // 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Type param.Field[LoadBalancerMonitorEditParamsType] `json:"type"` }
func (LoadBalancerMonitorEditParams) MarshalJSON ¶
func (r LoadBalancerMonitorEditParams) MarshalJSON() (data []byte, err error)
type LoadBalancerMonitorEditParamsType ¶
type LoadBalancerMonitorEditParamsType string
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
const ( LoadBalancerMonitorEditParamsTypeHTTP LoadBalancerMonitorEditParamsType = "http" LoadBalancerMonitorEditParamsTypeHTTPS LoadBalancerMonitorEditParamsType = "https" LoadBalancerMonitorEditParamsTypeTcp LoadBalancerMonitorEditParamsType = "tcp" LoadBalancerMonitorEditParamsTypeUdpIcmp LoadBalancerMonitorEditParamsType = "udp_icmp" LoadBalancerMonitorEditParamsTypeIcmpPing LoadBalancerMonitorEditParamsType = "icmp_ping" LoadBalancerMonitorEditParamsTypeSmtp LoadBalancerMonitorEditParamsType = "smtp" )
func (LoadBalancerMonitorEditParamsType) IsKnown ¶
func (r LoadBalancerMonitorEditParamsType) IsKnown() bool
type LoadBalancerMonitorEditResponseEnvelope ¶
type LoadBalancerMonitorEditResponseEnvelope struct { Errors []LoadBalancerMonitorEditResponseEnvelopeErrors `json:"errors,required"` Messages []LoadBalancerMonitorEditResponseEnvelopeMessages `json:"messages,required"` Result LoadBalancingMonitor `json:"result,required"` // Whether the API call was successful Success LoadBalancerMonitorEditResponseEnvelopeSuccess `json:"success,required"` JSON loadBalancerMonitorEditResponseEnvelopeJSON `json:"-"` }
func (*LoadBalancerMonitorEditResponseEnvelope) UnmarshalJSON ¶
func (r *LoadBalancerMonitorEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorEditResponseEnvelopeErrors ¶
type LoadBalancerMonitorEditResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerMonitorEditResponseEnvelopeErrorsJSON `json:"-"` }
func (*LoadBalancerMonitorEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LoadBalancerMonitorEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorEditResponseEnvelopeMessages ¶
type LoadBalancerMonitorEditResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerMonitorEditResponseEnvelopeMessagesJSON `json:"-"` }
func (*LoadBalancerMonitorEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LoadBalancerMonitorEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorEditResponseEnvelopeSuccess ¶
type LoadBalancerMonitorEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LoadBalancerMonitorEditResponseEnvelopeSuccessTrue LoadBalancerMonitorEditResponseEnvelopeSuccess = true
)
func (LoadBalancerMonitorEditResponseEnvelopeSuccess) IsKnown ¶
func (r LoadBalancerMonitorEditResponseEnvelopeSuccess) IsKnown() bool
type LoadBalancerMonitorGetResponseEnvelope ¶
type LoadBalancerMonitorGetResponseEnvelope struct { Errors []LoadBalancerMonitorGetResponseEnvelopeErrors `json:"errors,required"` Messages []LoadBalancerMonitorGetResponseEnvelopeMessages `json:"messages,required"` Result LoadBalancingMonitor `json:"result,required"` // Whether the API call was successful Success LoadBalancerMonitorGetResponseEnvelopeSuccess `json:"success,required"` JSON loadBalancerMonitorGetResponseEnvelopeJSON `json:"-"` }
func (*LoadBalancerMonitorGetResponseEnvelope) UnmarshalJSON ¶
func (r *LoadBalancerMonitorGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorGetResponseEnvelopeErrors ¶
type LoadBalancerMonitorGetResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerMonitorGetResponseEnvelopeErrorsJSON `json:"-"` }
func (*LoadBalancerMonitorGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LoadBalancerMonitorGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorGetResponseEnvelopeMessages ¶
type LoadBalancerMonitorGetResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerMonitorGetResponseEnvelopeMessagesJSON `json:"-"` }
func (*LoadBalancerMonitorGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LoadBalancerMonitorGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorGetResponseEnvelopeSuccess ¶
type LoadBalancerMonitorGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LoadBalancerMonitorGetResponseEnvelopeSuccessTrue LoadBalancerMonitorGetResponseEnvelopeSuccess = true
)
func (LoadBalancerMonitorGetResponseEnvelopeSuccess) IsKnown ¶
func (r LoadBalancerMonitorGetResponseEnvelopeSuccess) IsKnown() bool
type LoadBalancerMonitorNewParams ¶
type LoadBalancerMonitorNewParams struct { // The expected HTTP response code or code range of the health check. This // parameter is only valid for HTTP and HTTPS monitors. ExpectedCodes param.Field[string] `json:"expected_codes,required"` // Do not validate the certificate when monitor use HTTPS. This parameter is // currently only valid for HTTP and HTTPS monitors. AllowInsecure param.Field[bool] `json:"allow_insecure"` // To be marked unhealthy the monitored origin must fail this healthcheck N // consecutive times. ConsecutiveDown param.Field[int64] `json:"consecutive_down"` // To be marked healthy the monitored origin must pass this healthcheck N // consecutive times. ConsecutiveUp param.Field[int64] `json:"consecutive_up"` // Object description. Description param.Field[string] `json:"description"` // A case-insensitive sub-string to look for in the response body. If this string // is not found, the origin will be marked as unhealthy. This parameter is only // valid for HTTP and HTTPS monitors. ExpectedBody param.Field[string] `json:"expected_body"` // Follow redirects if returned by the origin. This parameter is only valid for // HTTP and HTTPS monitors. FollowRedirects param.Field[bool] `json:"follow_redirects"` // The HTTP request headers to send in the health check. It is recommended you set // a Host header by default. The User-Agent header cannot be overridden. This // parameter is only valid for HTTP and HTTPS monitors. Header param.Field[interface{}] `json:"header"` // The interval between each health check. Shorter intervals may improve failover // time, but will increase load on the origins as we check from multiple locations. Interval param.Field[int64] `json:"interval"` // The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS // based checks and 'connection_established' for TCP based health checks. Method param.Field[string] `json:"method"` // The endpoint path you want to conduct a health check against. This parameter is // only valid for HTTP and HTTPS monitors. Path param.Field[string] `json:"path"` // The port number to connect to for the health check. Required for TCP, UDP, and // SMTP checks. HTTP and HTTPS checks should only define the port when using a // non-standard port (HTTP: default 80, HTTPS: default 443). Port param.Field[int64] `json:"port"` // Assign this monitor to emulate the specified zone while probing. This parameter // is only valid for HTTP and HTTPS monitors. ProbeZone param.Field[string] `json:"probe_zone"` // The number of retries to attempt in case of a timeout before marking the origin // as unhealthy. Retries are attempted immediately. Retries param.Field[int64] `json:"retries"` // The timeout (in seconds) before marking the health check as failed. Timeout param.Field[int64] `json:"timeout"` // The protocol to use for the health check. Currently supported protocols are // 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Type param.Field[LoadBalancerMonitorNewParamsType] `json:"type"` }
func (LoadBalancerMonitorNewParams) MarshalJSON ¶
func (r LoadBalancerMonitorNewParams) MarshalJSON() (data []byte, err error)
type LoadBalancerMonitorNewParamsType ¶
type LoadBalancerMonitorNewParamsType string
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
const ( LoadBalancerMonitorNewParamsTypeHTTP LoadBalancerMonitorNewParamsType = "http" LoadBalancerMonitorNewParamsTypeHTTPS LoadBalancerMonitorNewParamsType = "https" LoadBalancerMonitorNewParamsTypeTcp LoadBalancerMonitorNewParamsType = "tcp" LoadBalancerMonitorNewParamsTypeUdpIcmp LoadBalancerMonitorNewParamsType = "udp_icmp" LoadBalancerMonitorNewParamsTypeIcmpPing LoadBalancerMonitorNewParamsType = "icmp_ping" LoadBalancerMonitorNewParamsTypeSmtp LoadBalancerMonitorNewParamsType = "smtp" )
func (LoadBalancerMonitorNewParamsType) IsKnown ¶
func (r LoadBalancerMonitorNewParamsType) IsKnown() bool
type LoadBalancerMonitorNewResponseEnvelope ¶
type LoadBalancerMonitorNewResponseEnvelope struct { Errors []LoadBalancerMonitorNewResponseEnvelopeErrors `json:"errors,required"` Messages []LoadBalancerMonitorNewResponseEnvelopeMessages `json:"messages,required"` Result LoadBalancingMonitor `json:"result,required"` // Whether the API call was successful Success LoadBalancerMonitorNewResponseEnvelopeSuccess `json:"success,required"` JSON loadBalancerMonitorNewResponseEnvelopeJSON `json:"-"` }
func (*LoadBalancerMonitorNewResponseEnvelope) UnmarshalJSON ¶
func (r *LoadBalancerMonitorNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorNewResponseEnvelopeErrors ¶
type LoadBalancerMonitorNewResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerMonitorNewResponseEnvelopeErrorsJSON `json:"-"` }
func (*LoadBalancerMonitorNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LoadBalancerMonitorNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorNewResponseEnvelopeMessages ¶
type LoadBalancerMonitorNewResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerMonitorNewResponseEnvelopeMessagesJSON `json:"-"` }
func (*LoadBalancerMonitorNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LoadBalancerMonitorNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorNewResponseEnvelopeSuccess ¶
type LoadBalancerMonitorNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LoadBalancerMonitorNewResponseEnvelopeSuccessTrue LoadBalancerMonitorNewResponseEnvelopeSuccess = true
)
func (LoadBalancerMonitorNewResponseEnvelopeSuccess) IsKnown ¶
func (r LoadBalancerMonitorNewResponseEnvelopeSuccess) IsKnown() bool
type LoadBalancerMonitorPreviewParams ¶
type LoadBalancerMonitorPreviewParams struct { // The expected HTTP response code or code range of the health check. This // parameter is only valid for HTTP and HTTPS monitors. ExpectedCodes param.Field[string] `json:"expected_codes,required"` // Do not validate the certificate when monitor use HTTPS. This parameter is // currently only valid for HTTP and HTTPS monitors. AllowInsecure param.Field[bool] `json:"allow_insecure"` // To be marked unhealthy the monitored origin must fail this healthcheck N // consecutive times. ConsecutiveDown param.Field[int64] `json:"consecutive_down"` // To be marked healthy the monitored origin must pass this healthcheck N // consecutive times. ConsecutiveUp param.Field[int64] `json:"consecutive_up"` // Object description. Description param.Field[string] `json:"description"` // A case-insensitive sub-string to look for in the response body. If this string // is not found, the origin will be marked as unhealthy. This parameter is only // valid for HTTP and HTTPS monitors. ExpectedBody param.Field[string] `json:"expected_body"` // Follow redirects if returned by the origin. This parameter is only valid for // HTTP and HTTPS monitors. FollowRedirects param.Field[bool] `json:"follow_redirects"` // The HTTP request headers to send in the health check. It is recommended you set // a Host header by default. The User-Agent header cannot be overridden. This // parameter is only valid for HTTP and HTTPS monitors. Header param.Field[interface{}] `json:"header"` // The interval between each health check. Shorter intervals may improve failover // time, but will increase load on the origins as we check from multiple locations. Interval param.Field[int64] `json:"interval"` // The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS // based checks and 'connection_established' for TCP based health checks. Method param.Field[string] `json:"method"` // The endpoint path you want to conduct a health check against. This parameter is // only valid for HTTP and HTTPS monitors. Path param.Field[string] `json:"path"` // The port number to connect to for the health check. Required for TCP, UDP, and // SMTP checks. HTTP and HTTPS checks should only define the port when using a // non-standard port (HTTP: default 80, HTTPS: default 443). Port param.Field[int64] `json:"port"` // Assign this monitor to emulate the specified zone while probing. This parameter // is only valid for HTTP and HTTPS monitors. ProbeZone param.Field[string] `json:"probe_zone"` // The number of retries to attempt in case of a timeout before marking the origin // as unhealthy. Retries are attempted immediately. Retries param.Field[int64] `json:"retries"` // The timeout (in seconds) before marking the health check as failed. Timeout param.Field[int64] `json:"timeout"` // The protocol to use for the health check. Currently supported protocols are // 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Type param.Field[LoadBalancerMonitorPreviewParamsType] `json:"type"` }
func (LoadBalancerMonitorPreviewParams) MarshalJSON ¶
func (r LoadBalancerMonitorPreviewParams) MarshalJSON() (data []byte, err error)
type LoadBalancerMonitorPreviewParamsType ¶
type LoadBalancerMonitorPreviewParamsType string
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
const ( LoadBalancerMonitorPreviewParamsTypeHTTP LoadBalancerMonitorPreviewParamsType = "http" LoadBalancerMonitorPreviewParamsTypeHTTPS LoadBalancerMonitorPreviewParamsType = "https" LoadBalancerMonitorPreviewParamsTypeTcp LoadBalancerMonitorPreviewParamsType = "tcp" LoadBalancerMonitorPreviewParamsTypeUdpIcmp LoadBalancerMonitorPreviewParamsType = "udp_icmp" LoadBalancerMonitorPreviewParamsTypeIcmpPing LoadBalancerMonitorPreviewParamsType = "icmp_ping" LoadBalancerMonitorPreviewParamsTypeSmtp LoadBalancerMonitorPreviewParamsType = "smtp" )
func (LoadBalancerMonitorPreviewParamsType) IsKnown ¶
func (r LoadBalancerMonitorPreviewParamsType) IsKnown() bool
type LoadBalancerMonitorPreviewResponse ¶
type LoadBalancerMonitorPreviewResponse struct { // Monitored pool IDs mapped to their respective names. Pools map[string]string `json:"pools"` PreviewID string `json:"preview_id"` JSON loadBalancerMonitorPreviewResponseJSON `json:"-"` }
func (*LoadBalancerMonitorPreviewResponse) UnmarshalJSON ¶
func (r *LoadBalancerMonitorPreviewResponse) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorPreviewResponseEnvelope ¶
type LoadBalancerMonitorPreviewResponseEnvelope struct { Errors []LoadBalancerMonitorPreviewResponseEnvelopeErrors `json:"errors,required"` Messages []LoadBalancerMonitorPreviewResponseEnvelopeMessages `json:"messages,required"` Result LoadBalancerMonitorPreviewResponse `json:"result,required"` // Whether the API call was successful Success LoadBalancerMonitorPreviewResponseEnvelopeSuccess `json:"success,required"` JSON loadBalancerMonitorPreviewResponseEnvelopeJSON `json:"-"` }
func (*LoadBalancerMonitorPreviewResponseEnvelope) UnmarshalJSON ¶
func (r *LoadBalancerMonitorPreviewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorPreviewResponseEnvelopeErrors ¶
type LoadBalancerMonitorPreviewResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerMonitorPreviewResponseEnvelopeErrorsJSON `json:"-"` }
func (*LoadBalancerMonitorPreviewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LoadBalancerMonitorPreviewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorPreviewResponseEnvelopeMessages ¶
type LoadBalancerMonitorPreviewResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerMonitorPreviewResponseEnvelopeMessagesJSON `json:"-"` }
func (*LoadBalancerMonitorPreviewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LoadBalancerMonitorPreviewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorPreviewResponseEnvelopeSuccess ¶
type LoadBalancerMonitorPreviewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LoadBalancerMonitorPreviewResponseEnvelopeSuccessTrue LoadBalancerMonitorPreviewResponseEnvelopeSuccess = true
)
func (LoadBalancerMonitorPreviewResponseEnvelopeSuccess) IsKnown ¶
func (r LoadBalancerMonitorPreviewResponseEnvelopeSuccess) IsKnown() bool
type LoadBalancerMonitorReferencesResponse ¶
type LoadBalancerMonitorReferencesResponse struct { ReferenceType LoadBalancerMonitorReferencesResponseReferenceType `json:"reference_type"` ResourceID string `json:"resource_id"` ResourceName string `json:"resource_name"` ResourceType string `json:"resource_type"` JSON loadBalancerMonitorReferencesResponseJSON `json:"-"` }
func (*LoadBalancerMonitorReferencesResponse) UnmarshalJSON ¶
func (r *LoadBalancerMonitorReferencesResponse) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorReferencesResponseEnvelope ¶
type LoadBalancerMonitorReferencesResponseEnvelope struct { Errors []LoadBalancerMonitorReferencesResponseEnvelopeErrors `json:"errors,required"` Messages []LoadBalancerMonitorReferencesResponseEnvelopeMessages `json:"messages,required"` // List of resources that reference a given monitor. Result []LoadBalancerMonitorReferencesResponse `json:"result,required,nullable"` // Whether the API call was successful Success LoadBalancerMonitorReferencesResponseEnvelopeSuccess `json:"success,required"` ResultInfo LoadBalancerMonitorReferencesResponseEnvelopeResultInfo `json:"result_info"` JSON loadBalancerMonitorReferencesResponseEnvelopeJSON `json:"-"` }
func (*LoadBalancerMonitorReferencesResponseEnvelope) UnmarshalJSON ¶
func (r *LoadBalancerMonitorReferencesResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorReferencesResponseEnvelopeErrors ¶
type LoadBalancerMonitorReferencesResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerMonitorReferencesResponseEnvelopeErrorsJSON `json:"-"` }
func (*LoadBalancerMonitorReferencesResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LoadBalancerMonitorReferencesResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorReferencesResponseEnvelopeMessages ¶
type LoadBalancerMonitorReferencesResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerMonitorReferencesResponseEnvelopeMessagesJSON `json:"-"` }
func (*LoadBalancerMonitorReferencesResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LoadBalancerMonitorReferencesResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorReferencesResponseEnvelopeResultInfo ¶
type LoadBalancerMonitorReferencesResponseEnvelopeResultInfo struct { // Total number of results for the requested service Count float64 `json:"count"` // Current page within paginated list of results Page float64 `json:"page"` // Number of results per page of results PerPage float64 `json:"per_page"` // Total results available without any search parameters TotalCount float64 `json:"total_count"` JSON loadBalancerMonitorReferencesResponseEnvelopeResultInfoJSON `json:"-"` }
func (*LoadBalancerMonitorReferencesResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *LoadBalancerMonitorReferencesResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorReferencesResponseEnvelopeSuccess ¶
type LoadBalancerMonitorReferencesResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LoadBalancerMonitorReferencesResponseEnvelopeSuccessTrue LoadBalancerMonitorReferencesResponseEnvelopeSuccess = true
)
func (LoadBalancerMonitorReferencesResponseEnvelopeSuccess) IsKnown ¶
func (r LoadBalancerMonitorReferencesResponseEnvelopeSuccess) IsKnown() bool
type LoadBalancerMonitorReferencesResponseReferenceType ¶
type LoadBalancerMonitorReferencesResponseReferenceType string
const ( LoadBalancerMonitorReferencesResponseReferenceTypeStar LoadBalancerMonitorReferencesResponseReferenceType = "*" LoadBalancerMonitorReferencesResponseReferenceTypeReferral LoadBalancerMonitorReferencesResponseReferenceType = "referral" LoadBalancerMonitorReferencesResponseReferenceTypeReferrer LoadBalancerMonitorReferencesResponseReferenceType = "referrer" )
func (LoadBalancerMonitorReferencesResponseReferenceType) IsKnown ¶
func (r LoadBalancerMonitorReferencesResponseReferenceType) IsKnown() bool
type LoadBalancerMonitorService ¶
type LoadBalancerMonitorService struct {
Options []option.RequestOption
}
LoadBalancerMonitorService 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 NewLoadBalancerMonitorService method instead.
func NewLoadBalancerMonitorService ¶
func NewLoadBalancerMonitorService(opts ...option.RequestOption) (r *LoadBalancerMonitorService)
NewLoadBalancerMonitorService 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 (*LoadBalancerMonitorService) Delete ¶
func (r *LoadBalancerMonitorService) Delete(ctx context.Context, monitorID string, opts ...option.RequestOption) (res *LoadBalancerMonitorDeleteResponse, err error)
Delete a configured monitor.
func (*LoadBalancerMonitorService) Edit ¶
func (r *LoadBalancerMonitorService) Edit(ctx context.Context, monitorID string, body LoadBalancerMonitorEditParams, opts ...option.RequestOption) (res *LoadBalancingMonitor, err error)
Apply changes to an existing monitor, overwriting the supplied properties.
func (*LoadBalancerMonitorService) Get ¶
func (r *LoadBalancerMonitorService) Get(ctx context.Context, monitorID string, opts ...option.RequestOption) (res *LoadBalancingMonitor, err error)
List a single configured monitor for a user.
func (*LoadBalancerMonitorService) List ¶
func (r *LoadBalancerMonitorService) List(ctx context.Context, opts ...option.RequestOption) (res *pagination.SinglePage[LoadBalancingMonitor], err error)
List configured monitors for a user.
func (*LoadBalancerMonitorService) ListAutoPaging ¶
func (r *LoadBalancerMonitorService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *pagination.SinglePageAutoPager[LoadBalancingMonitor]
List configured monitors for a user.
func (*LoadBalancerMonitorService) New ¶
func (r *LoadBalancerMonitorService) New(ctx context.Context, body LoadBalancerMonitorNewParams, opts ...option.RequestOption) (res *LoadBalancingMonitor, err error)
Create a configured monitor.
func (*LoadBalancerMonitorService) Preview ¶
func (r *LoadBalancerMonitorService) Preview(ctx context.Context, monitorID string, body LoadBalancerMonitorPreviewParams, opts ...option.RequestOption) (res *LoadBalancerMonitorPreviewResponse, err error)
Preview pools using the specified monitor with provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results.
func (*LoadBalancerMonitorService) References ¶
func (r *LoadBalancerMonitorService) References(ctx context.Context, monitorID string, opts ...option.RequestOption) (res *[]LoadBalancerMonitorReferencesResponse, err error)
Get the list of resources that reference the provided monitor.
func (*LoadBalancerMonitorService) Update ¶
func (r *LoadBalancerMonitorService) Update(ctx context.Context, monitorID string, body LoadBalancerMonitorUpdateParams, opts ...option.RequestOption) (res *LoadBalancingMonitor, err error)
Modify a configured monitor.
type LoadBalancerMonitorUpdateParams ¶
type LoadBalancerMonitorUpdateParams struct { // The expected HTTP response code or code range of the health check. This // parameter is only valid for HTTP and HTTPS monitors. ExpectedCodes param.Field[string] `json:"expected_codes,required"` // Do not validate the certificate when monitor use HTTPS. This parameter is // currently only valid for HTTP and HTTPS monitors. AllowInsecure param.Field[bool] `json:"allow_insecure"` // To be marked unhealthy the monitored origin must fail this healthcheck N // consecutive times. ConsecutiveDown param.Field[int64] `json:"consecutive_down"` // To be marked healthy the monitored origin must pass this healthcheck N // consecutive times. ConsecutiveUp param.Field[int64] `json:"consecutive_up"` // Object description. Description param.Field[string] `json:"description"` // A case-insensitive sub-string to look for in the response body. If this string // is not found, the origin will be marked as unhealthy. This parameter is only // valid for HTTP and HTTPS monitors. ExpectedBody param.Field[string] `json:"expected_body"` // Follow redirects if returned by the origin. This parameter is only valid for // HTTP and HTTPS monitors. FollowRedirects param.Field[bool] `json:"follow_redirects"` // The HTTP request headers to send in the health check. It is recommended you set // a Host header by default. The User-Agent header cannot be overridden. This // parameter is only valid for HTTP and HTTPS monitors. Header param.Field[interface{}] `json:"header"` // The interval between each health check. Shorter intervals may improve failover // time, but will increase load on the origins as we check from multiple locations. Interval param.Field[int64] `json:"interval"` // The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS // based checks and 'connection_established' for TCP based health checks. Method param.Field[string] `json:"method"` // The endpoint path you want to conduct a health check against. This parameter is // only valid for HTTP and HTTPS monitors. Path param.Field[string] `json:"path"` // The port number to connect to for the health check. Required for TCP, UDP, and // SMTP checks. HTTP and HTTPS checks should only define the port when using a // non-standard port (HTTP: default 80, HTTPS: default 443). Port param.Field[int64] `json:"port"` // Assign this monitor to emulate the specified zone while probing. This parameter // is only valid for HTTP and HTTPS monitors. ProbeZone param.Field[string] `json:"probe_zone"` // The number of retries to attempt in case of a timeout before marking the origin // as unhealthy. Retries are attempted immediately. Retries param.Field[int64] `json:"retries"` // The timeout (in seconds) before marking the health check as failed. Timeout param.Field[int64] `json:"timeout"` // The protocol to use for the health check. Currently supported protocols are // 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Type param.Field[LoadBalancerMonitorUpdateParamsType] `json:"type"` }
func (LoadBalancerMonitorUpdateParams) MarshalJSON ¶
func (r LoadBalancerMonitorUpdateParams) MarshalJSON() (data []byte, err error)
type LoadBalancerMonitorUpdateParamsType ¶
type LoadBalancerMonitorUpdateParamsType string
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
const ( LoadBalancerMonitorUpdateParamsTypeHTTP LoadBalancerMonitorUpdateParamsType = "http" LoadBalancerMonitorUpdateParamsTypeHTTPS LoadBalancerMonitorUpdateParamsType = "https" LoadBalancerMonitorUpdateParamsTypeTcp LoadBalancerMonitorUpdateParamsType = "tcp" LoadBalancerMonitorUpdateParamsTypeUdpIcmp LoadBalancerMonitorUpdateParamsType = "udp_icmp" LoadBalancerMonitorUpdateParamsTypeIcmpPing LoadBalancerMonitorUpdateParamsType = "icmp_ping" LoadBalancerMonitorUpdateParamsTypeSmtp LoadBalancerMonitorUpdateParamsType = "smtp" )
func (LoadBalancerMonitorUpdateParamsType) IsKnown ¶
func (r LoadBalancerMonitorUpdateParamsType) IsKnown() bool
type LoadBalancerMonitorUpdateResponseEnvelope ¶
type LoadBalancerMonitorUpdateResponseEnvelope struct { Errors []LoadBalancerMonitorUpdateResponseEnvelopeErrors `json:"errors,required"` Messages []LoadBalancerMonitorUpdateResponseEnvelopeMessages `json:"messages,required"` Result LoadBalancingMonitor `json:"result,required"` // Whether the API call was successful Success LoadBalancerMonitorUpdateResponseEnvelopeSuccess `json:"success,required"` JSON loadBalancerMonitorUpdateResponseEnvelopeJSON `json:"-"` }
func (*LoadBalancerMonitorUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *LoadBalancerMonitorUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorUpdateResponseEnvelopeErrors ¶
type LoadBalancerMonitorUpdateResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerMonitorUpdateResponseEnvelopeErrorsJSON `json:"-"` }
func (*LoadBalancerMonitorUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LoadBalancerMonitorUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorUpdateResponseEnvelopeMessages ¶
type LoadBalancerMonitorUpdateResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerMonitorUpdateResponseEnvelopeMessagesJSON `json:"-"` }
func (*LoadBalancerMonitorUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LoadBalancerMonitorUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LoadBalancerMonitorUpdateResponseEnvelopeSuccess ¶
type LoadBalancerMonitorUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LoadBalancerMonitorUpdateResponseEnvelopeSuccessTrue LoadBalancerMonitorUpdateResponseEnvelopeSuccess = true
)
func (LoadBalancerMonitorUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r LoadBalancerMonitorUpdateResponseEnvelopeSuccess) IsKnown() bool
type LoadBalancerPoolDeleteResponse ¶
type LoadBalancerPoolDeleteResponse struct { ID string `json:"id"` JSON loadBalancerPoolDeleteResponseJSON `json:"-"` }
func (*LoadBalancerPoolDeleteResponse) UnmarshalJSON ¶
func (r *LoadBalancerPoolDeleteResponse) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolDeleteResponseEnvelope ¶
type LoadBalancerPoolDeleteResponseEnvelope struct { Errors []LoadBalancerPoolDeleteResponseEnvelopeErrors `json:"errors,required"` Messages []LoadBalancerPoolDeleteResponseEnvelopeMessages `json:"messages,required"` Result LoadBalancerPoolDeleteResponse `json:"result,required"` // Whether the API call was successful Success LoadBalancerPoolDeleteResponseEnvelopeSuccess `json:"success,required"` JSON loadBalancerPoolDeleteResponseEnvelopeJSON `json:"-"` }
func (*LoadBalancerPoolDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *LoadBalancerPoolDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolDeleteResponseEnvelopeErrors ¶
type LoadBalancerPoolDeleteResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPoolDeleteResponseEnvelopeErrorsJSON `json:"-"` }
func (*LoadBalancerPoolDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LoadBalancerPoolDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolDeleteResponseEnvelopeMessages ¶
type LoadBalancerPoolDeleteResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPoolDeleteResponseEnvelopeMessagesJSON `json:"-"` }
func (*LoadBalancerPoolDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LoadBalancerPoolDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolDeleteResponseEnvelopeSuccess ¶
type LoadBalancerPoolDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LoadBalancerPoolDeleteResponseEnvelopeSuccessTrue LoadBalancerPoolDeleteResponseEnvelopeSuccess = true
)
func (LoadBalancerPoolDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r LoadBalancerPoolDeleteResponseEnvelopeSuccess) IsKnown() bool
type LoadBalancerPoolEditParams ¶
type LoadBalancerPoolEditParams struct { // A list of regions from which to run health checks. Null means every Cloudflare // data center. CheckRegions param.Field[[]LoadBalancerPoolEditParamsCheckRegion] `json:"check_regions"` // A human-readable description of the pool. Description param.Field[string] `json:"description"` // Whether to enable (the default) or disable this pool. Disabled pools will not // receive traffic and are excluded from health checks. Disabling a pool will cause // any load balancers using it to failover to the next pool (if any). Enabled param.Field[bool] `json:"enabled"` // The latitude of the data center containing the origins used in this pool in // decimal degrees. If this is set, longitude must also be set. Latitude param.Field[float64] `json:"latitude"` // Configures load shedding policies and percentages for the pool. LoadShedding param.Field[LoadBalancerPoolEditParamsLoadShedding] `json:"load_shedding"` // The longitude of the data center containing the origins used in this pool in // decimal degrees. If this is set, latitude must also be set. Longitude param.Field[float64] `json:"longitude"` // The minimum number of origins that must be healthy for this pool to serve // traffic. If the number of healthy origins falls below this number, the pool will // be marked unhealthy and will failover to the next available pool. MinimumOrigins param.Field[int64] `json:"minimum_origins"` // The ID of the Monitor to use for checking the health of origins within this // pool. Monitor param.Field[interface{}] `json:"monitor"` // A short name (tag) for the pool. Only alphanumeric characters, hyphens, and // underscores are allowed. Name param.Field[string] `json:"name"` // This field is now deprecated. It has been moved to Cloudflare's Centralized // Notification service // https://developers.cloudflare.com/fundamentals/notifications/. The email address // to send health status notifications to. This can be an individual mailbox or a // mailing list. Multiple emails can be supplied as a comma delimited list. NotificationEmail param.Field[string] `json:"notification_email"` // Filter pool and origin health notifications by resource type or health status. // Use null to reset. NotificationFilter param.Field[LoadBalancerPoolEditParamsNotificationFilter] `json:"notification_filter"` // Configures origin steering for the pool. Controls how origins are selected for // new sessions and traffic without session affinity. OriginSteering param.Field[LoadBalancerPoolEditParamsOriginSteering] `json:"origin_steering"` // The list of origins within this pool. Traffic directed at this pool is balanced // across all currently healthy origins, provided the pool itself is healthy. Origins param.Field[[]LoadBalancerPoolEditParamsOrigin] `json:"origins"` }
func (LoadBalancerPoolEditParams) MarshalJSON ¶
func (r LoadBalancerPoolEditParams) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolEditParamsCheckRegion ¶
type LoadBalancerPoolEditParamsCheckRegion string
WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS: Southern Asia, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all regions (ENTERPRISE customers only).
const ( LoadBalancerPoolEditParamsCheckRegionWnam LoadBalancerPoolEditParamsCheckRegion = "WNAM" LoadBalancerPoolEditParamsCheckRegionEnam LoadBalancerPoolEditParamsCheckRegion = "ENAM" LoadBalancerPoolEditParamsCheckRegionWeu LoadBalancerPoolEditParamsCheckRegion = "WEU" LoadBalancerPoolEditParamsCheckRegionEeu LoadBalancerPoolEditParamsCheckRegion = "EEU" LoadBalancerPoolEditParamsCheckRegionNsam LoadBalancerPoolEditParamsCheckRegion = "NSAM" LoadBalancerPoolEditParamsCheckRegionSsam LoadBalancerPoolEditParamsCheckRegion = "SSAM" LoadBalancerPoolEditParamsCheckRegionOc LoadBalancerPoolEditParamsCheckRegion = "OC" LoadBalancerPoolEditParamsCheckRegionMe LoadBalancerPoolEditParamsCheckRegion = "ME" LoadBalancerPoolEditParamsCheckRegionNaf LoadBalancerPoolEditParamsCheckRegion = "NAF" LoadBalancerPoolEditParamsCheckRegionSaf LoadBalancerPoolEditParamsCheckRegion = "SAF" LoadBalancerPoolEditParamsCheckRegionSas LoadBalancerPoolEditParamsCheckRegion = "SAS" LoadBalancerPoolEditParamsCheckRegionSeas LoadBalancerPoolEditParamsCheckRegion = "SEAS" LoadBalancerPoolEditParamsCheckRegionNeas LoadBalancerPoolEditParamsCheckRegion = "NEAS" LoadBalancerPoolEditParamsCheckRegionAllRegions LoadBalancerPoolEditParamsCheckRegion = "ALL_REGIONS" )
func (LoadBalancerPoolEditParamsCheckRegion) IsKnown ¶
func (r LoadBalancerPoolEditParamsCheckRegion) IsKnown() bool
type LoadBalancerPoolEditParamsLoadShedding ¶
type LoadBalancerPoolEditParamsLoadShedding struct { // The percent of traffic to shed from the pool, according to the default policy. // Applies to new sessions and traffic without session affinity. DefaultPercent param.Field[float64] `json:"default_percent"` // The default policy to use when load shedding. A random policy randomly sheds a // given percent of requests. A hash policy computes a hash over the // CF-Connecting-IP address and sheds all requests originating from a percent of // IPs. DefaultPolicy param.Field[LoadBalancerPoolEditParamsLoadSheddingDefaultPolicy] `json:"default_policy"` // The percent of existing sessions to shed from the pool, according to the session // policy. SessionPercent param.Field[float64] `json:"session_percent"` // Only the hash policy is supported for existing sessions (to avoid exponential // decay). SessionPolicy param.Field[LoadBalancerPoolEditParamsLoadSheddingSessionPolicy] `json:"session_policy"` }
Configures load shedding policies and percentages for the pool.
func (LoadBalancerPoolEditParamsLoadShedding) MarshalJSON ¶
func (r LoadBalancerPoolEditParamsLoadShedding) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolEditParamsLoadSheddingDefaultPolicy ¶
type LoadBalancerPoolEditParamsLoadSheddingDefaultPolicy string
The default policy to use when load shedding. A random policy randomly sheds a given percent of requests. A hash policy computes a hash over the CF-Connecting-IP address and sheds all requests originating from a percent of IPs.
const ( LoadBalancerPoolEditParamsLoadSheddingDefaultPolicyRandom LoadBalancerPoolEditParamsLoadSheddingDefaultPolicy = "random" LoadBalancerPoolEditParamsLoadSheddingDefaultPolicyHash LoadBalancerPoolEditParamsLoadSheddingDefaultPolicy = "hash" )
func (LoadBalancerPoolEditParamsLoadSheddingDefaultPolicy) IsKnown ¶
func (r LoadBalancerPoolEditParamsLoadSheddingDefaultPolicy) IsKnown() bool
type LoadBalancerPoolEditParamsLoadSheddingSessionPolicy ¶
type LoadBalancerPoolEditParamsLoadSheddingSessionPolicy string
Only the hash policy is supported for existing sessions (to avoid exponential decay).
const (
LoadBalancerPoolEditParamsLoadSheddingSessionPolicyHash LoadBalancerPoolEditParamsLoadSheddingSessionPolicy = "hash"
)
func (LoadBalancerPoolEditParamsLoadSheddingSessionPolicy) IsKnown ¶
func (r LoadBalancerPoolEditParamsLoadSheddingSessionPolicy) IsKnown() bool
type LoadBalancerPoolEditParamsNotificationFilter ¶
type LoadBalancerPoolEditParamsNotificationFilter struct { // Filter options for a particular resource type (pool or origin). Use null to // reset. Origin param.Field[LoadBalancerPoolEditParamsNotificationFilterOrigin] `json:"origin"` // Filter options for a particular resource type (pool or origin). Use null to // reset. Pool param.Field[LoadBalancerPoolEditParamsNotificationFilterPool] `json:"pool"` }
Filter pool and origin health notifications by resource type or health status. Use null to reset.
func (LoadBalancerPoolEditParamsNotificationFilter) MarshalJSON ¶
func (r LoadBalancerPoolEditParamsNotificationFilter) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolEditParamsNotificationFilterOrigin ¶
type LoadBalancerPoolEditParamsNotificationFilterOrigin struct { // If set true, disable notifications for this type of resource (pool or origin). Disable param.Field[bool] `json:"disable"` // If present, send notifications only for this health status (e.g. false for only // DOWN events). Use null to reset (all events). Healthy param.Field[bool] `json:"healthy"` }
Filter options for a particular resource type (pool or origin). Use null to reset.
func (LoadBalancerPoolEditParamsNotificationFilterOrigin) MarshalJSON ¶
func (r LoadBalancerPoolEditParamsNotificationFilterOrigin) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolEditParamsNotificationFilterPool ¶
type LoadBalancerPoolEditParamsNotificationFilterPool struct { // If set true, disable notifications for this type of resource (pool or origin). Disable param.Field[bool] `json:"disable"` // If present, send notifications only for this health status (e.g. false for only // DOWN events). Use null to reset (all events). Healthy param.Field[bool] `json:"healthy"` }
Filter options for a particular resource type (pool or origin). Use null to reset.
func (LoadBalancerPoolEditParamsNotificationFilterPool) MarshalJSON ¶
func (r LoadBalancerPoolEditParamsNotificationFilterPool) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolEditParamsOrigin ¶
type LoadBalancerPoolEditParamsOrigin struct { // The IP address (IPv4 or IPv6) of the origin, or its publicly addressable // hostname. Hostnames entered here should resolve directly to the origin, and not // be a hostname proxied by Cloudflare. To set an internal/reserved address, // virtual_network_id must also be set. Address param.Field[string] `json:"address"` // Whether to enable (the default) this origin within the pool. Disabled origins // will not receive traffic and are excluded from health checks. The origin will // only be disabled for the current pool. Enabled param.Field[bool] `json:"enabled"` // The request header is used to pass additional information with an HTTP request. // Currently supported header is 'Host'. Header param.Field[LoadBalancerPoolEditParamsOriginsHeader] `json:"header"` // A human-identifiable name for the origin. Name param.Field[string] `json:"name"` // The virtual network subnet ID the origin belongs in. Virtual network must also // belong to the account. VirtualNetworkID param.Field[string] `json:"virtual_network_id"` // The weight of this origin relative to other origins in the pool. Based on the // configured weight the total traffic is distributed among origins within the // pool. // // - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the // origin's outstanding requests. // - `origin_steering.policy="least_connections"`: Use weight to scale the origin's // open connections. Weight param.Field[float64] `json:"weight"` }
func (LoadBalancerPoolEditParamsOrigin) MarshalJSON ¶
func (r LoadBalancerPoolEditParamsOrigin) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolEditParamsOriginSteering ¶
type LoadBalancerPoolEditParamsOriginSteering struct { // The type of origin steering policy to use. // // - `"random"`: Select an origin randomly. // - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP // address. // - `"least_outstanding_requests"`: Select an origin by taking into consideration // origin weights, as well as each origin's number of outstanding requests. // Origins with more pending requests are weighted proportionately less relative // to others. // - `"least_connections"`: Select an origin by taking into consideration origin // weights, as well as each origin's number of open connections. Origins with // more open connections are weighted proportionately less relative to others. // Supported for HTTP/1 and HTTP/2 connections. Policy param.Field[LoadBalancerPoolEditParamsOriginSteeringPolicy] `json:"policy"` }
Configures origin steering for the pool. Controls how origins are selected for new sessions and traffic without session affinity.
func (LoadBalancerPoolEditParamsOriginSteering) MarshalJSON ¶
func (r LoadBalancerPoolEditParamsOriginSteering) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolEditParamsOriginSteeringPolicy ¶
type LoadBalancerPoolEditParamsOriginSteeringPolicy string
The type of origin steering policy to use.
- `"random"`: Select an origin randomly.
- `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP address.
- `"least_outstanding_requests"`: Select an origin by taking into consideration origin weights, as well as each origin's number of outstanding requests. Origins with more pending requests are weighted proportionately less relative to others.
- `"least_connections"`: Select an origin by taking into consideration origin weights, as well as each origin's number of open connections. Origins with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.
const ( LoadBalancerPoolEditParamsOriginSteeringPolicyRandom LoadBalancerPoolEditParamsOriginSteeringPolicy = "random" LoadBalancerPoolEditParamsOriginSteeringPolicyHash LoadBalancerPoolEditParamsOriginSteeringPolicy = "hash" LoadBalancerPoolEditParamsOriginSteeringPolicyLeastOutstandingRequests LoadBalancerPoolEditParamsOriginSteeringPolicy = "least_outstanding_requests" LoadBalancerPoolEditParamsOriginSteeringPolicyLeastConnections LoadBalancerPoolEditParamsOriginSteeringPolicy = "least_connections" )
func (LoadBalancerPoolEditParamsOriginSteeringPolicy) IsKnown ¶
func (r LoadBalancerPoolEditParamsOriginSteeringPolicy) IsKnown() bool
type LoadBalancerPoolEditParamsOriginsHeader ¶
type LoadBalancerPoolEditParamsOriginsHeader struct { // The 'Host' header allows to override the hostname set in the HTTP request. // Current support is 1 'Host' header override per origin. Host param.Field[[]string] `json:"Host"` }
The request header is used to pass additional information with an HTTP request. Currently supported header is 'Host'.
func (LoadBalancerPoolEditParamsOriginsHeader) MarshalJSON ¶
func (r LoadBalancerPoolEditParamsOriginsHeader) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolEditResponseEnvelope ¶
type LoadBalancerPoolEditResponseEnvelope struct { Errors []LoadBalancerPoolEditResponseEnvelopeErrors `json:"errors,required"` Messages []LoadBalancerPoolEditResponseEnvelopeMessages `json:"messages,required"` Result LoadBalancingPool `json:"result,required"` // Whether the API call was successful Success LoadBalancerPoolEditResponseEnvelopeSuccess `json:"success,required"` JSON loadBalancerPoolEditResponseEnvelopeJSON `json:"-"` }
func (*LoadBalancerPoolEditResponseEnvelope) UnmarshalJSON ¶
func (r *LoadBalancerPoolEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolEditResponseEnvelopeErrors ¶
type LoadBalancerPoolEditResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPoolEditResponseEnvelopeErrorsJSON `json:"-"` }
func (*LoadBalancerPoolEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LoadBalancerPoolEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolEditResponseEnvelopeMessages ¶
type LoadBalancerPoolEditResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPoolEditResponseEnvelopeMessagesJSON `json:"-"` }
func (*LoadBalancerPoolEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LoadBalancerPoolEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolEditResponseEnvelopeSuccess ¶
type LoadBalancerPoolEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LoadBalancerPoolEditResponseEnvelopeSuccessTrue LoadBalancerPoolEditResponseEnvelopeSuccess = true
)
func (LoadBalancerPoolEditResponseEnvelopeSuccess) IsKnown ¶
func (r LoadBalancerPoolEditResponseEnvelopeSuccess) IsKnown() bool
type LoadBalancerPoolGetResponseEnvelope ¶
type LoadBalancerPoolGetResponseEnvelope struct { Errors []LoadBalancerPoolGetResponseEnvelopeErrors `json:"errors,required"` Messages []LoadBalancerPoolGetResponseEnvelopeMessages `json:"messages,required"` Result LoadBalancingPool `json:"result,required"` // Whether the API call was successful Success LoadBalancerPoolGetResponseEnvelopeSuccess `json:"success,required"` JSON loadBalancerPoolGetResponseEnvelopeJSON `json:"-"` }
func (*LoadBalancerPoolGetResponseEnvelope) UnmarshalJSON ¶
func (r *LoadBalancerPoolGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolGetResponseEnvelopeErrors ¶
type LoadBalancerPoolGetResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPoolGetResponseEnvelopeErrorsJSON `json:"-"` }
func (*LoadBalancerPoolGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LoadBalancerPoolGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolGetResponseEnvelopeMessages ¶
type LoadBalancerPoolGetResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPoolGetResponseEnvelopeMessagesJSON `json:"-"` }
func (*LoadBalancerPoolGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LoadBalancerPoolGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolGetResponseEnvelopeSuccess ¶
type LoadBalancerPoolGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LoadBalancerPoolGetResponseEnvelopeSuccessTrue LoadBalancerPoolGetResponseEnvelopeSuccess = true
)
func (LoadBalancerPoolGetResponseEnvelopeSuccess) IsKnown ¶
func (r LoadBalancerPoolGetResponseEnvelopeSuccess) IsKnown() bool
type LoadBalancerPoolHealthResponse ¶
type LoadBalancerPoolHealthResponse interface {
ImplementsUserLoadBalancerPoolHealthResponse()
}
A list of regions from which to run health checks. Null means every Cloudflare data center.
Union satisfied by user.LoadBalancerPoolHealthResponseUnknown or shared.UnionString.
type LoadBalancerPoolHealthResponseEnvelope ¶
type LoadBalancerPoolHealthResponseEnvelope struct { Errors []LoadBalancerPoolHealthResponseEnvelopeErrors `json:"errors,required"` Messages []LoadBalancerPoolHealthResponseEnvelopeMessages `json:"messages,required"` // A list of regions from which to run health checks. Null means every Cloudflare // data center. Result LoadBalancerPoolHealthResponse `json:"result,required"` // Whether the API call was successful Success LoadBalancerPoolHealthResponseEnvelopeSuccess `json:"success,required"` JSON loadBalancerPoolHealthResponseEnvelopeJSON `json:"-"` }
func (*LoadBalancerPoolHealthResponseEnvelope) UnmarshalJSON ¶
func (r *LoadBalancerPoolHealthResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolHealthResponseEnvelopeErrors ¶
type LoadBalancerPoolHealthResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPoolHealthResponseEnvelopeErrorsJSON `json:"-"` }
func (*LoadBalancerPoolHealthResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LoadBalancerPoolHealthResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolHealthResponseEnvelopeMessages ¶
type LoadBalancerPoolHealthResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPoolHealthResponseEnvelopeMessagesJSON `json:"-"` }
func (*LoadBalancerPoolHealthResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LoadBalancerPoolHealthResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolHealthResponseEnvelopeSuccess ¶
type LoadBalancerPoolHealthResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LoadBalancerPoolHealthResponseEnvelopeSuccessTrue LoadBalancerPoolHealthResponseEnvelopeSuccess = true
)
func (LoadBalancerPoolHealthResponseEnvelopeSuccess) IsKnown ¶
func (r LoadBalancerPoolHealthResponseEnvelopeSuccess) IsKnown() bool
type LoadBalancerPoolListParams ¶
type LoadBalancerPoolListParams struct { // The ID of the Monitor to use for checking the health of origins within this // pool. Monitor param.Field[interface{}] `query:"monitor"` }
func (LoadBalancerPoolListParams) URLQuery ¶
func (r LoadBalancerPoolListParams) URLQuery() (v url.Values)
URLQuery serializes LoadBalancerPoolListParams's query parameters as `url.Values`.
type LoadBalancerPoolNewParams ¶
type LoadBalancerPoolNewParams struct { // A short name (tag) for the pool. Only alphanumeric characters, hyphens, and // underscores are allowed. Name param.Field[string] `json:"name,required"` // The list of origins within this pool. Traffic directed at this pool is balanced // across all currently healthy origins, provided the pool itself is healthy. Origins param.Field[[]LoadBalancerPoolNewParamsOrigin] `json:"origins,required"` // A list of regions from which to run health checks. Null means every Cloudflare // data center. CheckRegions param.Field[[]LoadBalancerPoolNewParamsCheckRegion] `json:"check_regions"` // A human-readable description of the pool. Description param.Field[string] `json:"description"` // Whether to enable (the default) or disable this pool. Disabled pools will not // receive traffic and are excluded from health checks. Disabling a pool will cause // any load balancers using it to failover to the next pool (if any). Enabled param.Field[bool] `json:"enabled"` // The latitude of the data center containing the origins used in this pool in // decimal degrees. If this is set, longitude must also be set. Latitude param.Field[float64] `json:"latitude"` // Configures load shedding policies and percentages for the pool. LoadShedding param.Field[LoadBalancerPoolNewParamsLoadShedding] `json:"load_shedding"` // The longitude of the data center containing the origins used in this pool in // decimal degrees. If this is set, latitude must also be set. Longitude param.Field[float64] `json:"longitude"` // The minimum number of origins that must be healthy for this pool to serve // traffic. If the number of healthy origins falls below this number, the pool will // be marked unhealthy and will failover to the next available pool. MinimumOrigins param.Field[int64] `json:"minimum_origins"` // The ID of the Monitor to use for checking the health of origins within this // pool. Monitor param.Field[interface{}] `json:"monitor"` // This field is now deprecated. It has been moved to Cloudflare's Centralized // Notification service // https://developers.cloudflare.com/fundamentals/notifications/. The email address // to send health status notifications to. This can be an individual mailbox or a // mailing list. Multiple emails can be supplied as a comma delimited list. NotificationEmail param.Field[string] `json:"notification_email"` // Filter pool and origin health notifications by resource type or health status. // Use null to reset. NotificationFilter param.Field[LoadBalancerPoolNewParamsNotificationFilter] `json:"notification_filter"` // Configures origin steering for the pool. Controls how origins are selected for // new sessions and traffic without session affinity. OriginSteering param.Field[LoadBalancerPoolNewParamsOriginSteering] `json:"origin_steering"` }
func (LoadBalancerPoolNewParams) MarshalJSON ¶
func (r LoadBalancerPoolNewParams) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolNewParamsCheckRegion ¶
type LoadBalancerPoolNewParamsCheckRegion string
WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS: Southern Asia, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all regions (ENTERPRISE customers only).
const ( LoadBalancerPoolNewParamsCheckRegionWnam LoadBalancerPoolNewParamsCheckRegion = "WNAM" LoadBalancerPoolNewParamsCheckRegionEnam LoadBalancerPoolNewParamsCheckRegion = "ENAM" LoadBalancerPoolNewParamsCheckRegionWeu LoadBalancerPoolNewParamsCheckRegion = "WEU" LoadBalancerPoolNewParamsCheckRegionEeu LoadBalancerPoolNewParamsCheckRegion = "EEU" LoadBalancerPoolNewParamsCheckRegionNsam LoadBalancerPoolNewParamsCheckRegion = "NSAM" LoadBalancerPoolNewParamsCheckRegionSsam LoadBalancerPoolNewParamsCheckRegion = "SSAM" LoadBalancerPoolNewParamsCheckRegionOc LoadBalancerPoolNewParamsCheckRegion = "OC" LoadBalancerPoolNewParamsCheckRegionMe LoadBalancerPoolNewParamsCheckRegion = "ME" LoadBalancerPoolNewParamsCheckRegionNaf LoadBalancerPoolNewParamsCheckRegion = "NAF" LoadBalancerPoolNewParamsCheckRegionSaf LoadBalancerPoolNewParamsCheckRegion = "SAF" LoadBalancerPoolNewParamsCheckRegionSas LoadBalancerPoolNewParamsCheckRegion = "SAS" LoadBalancerPoolNewParamsCheckRegionSeas LoadBalancerPoolNewParamsCheckRegion = "SEAS" LoadBalancerPoolNewParamsCheckRegionNeas LoadBalancerPoolNewParamsCheckRegion = "NEAS" LoadBalancerPoolNewParamsCheckRegionAllRegions LoadBalancerPoolNewParamsCheckRegion = "ALL_REGIONS" )
func (LoadBalancerPoolNewParamsCheckRegion) IsKnown ¶
func (r LoadBalancerPoolNewParamsCheckRegion) IsKnown() bool
type LoadBalancerPoolNewParamsLoadShedding ¶
type LoadBalancerPoolNewParamsLoadShedding struct { // The percent of traffic to shed from the pool, according to the default policy. // Applies to new sessions and traffic without session affinity. DefaultPercent param.Field[float64] `json:"default_percent"` // The default policy to use when load shedding. A random policy randomly sheds a // given percent of requests. A hash policy computes a hash over the // CF-Connecting-IP address and sheds all requests originating from a percent of // IPs. DefaultPolicy param.Field[LoadBalancerPoolNewParamsLoadSheddingDefaultPolicy] `json:"default_policy"` // The percent of existing sessions to shed from the pool, according to the session // policy. SessionPercent param.Field[float64] `json:"session_percent"` // Only the hash policy is supported for existing sessions (to avoid exponential // decay). SessionPolicy param.Field[LoadBalancerPoolNewParamsLoadSheddingSessionPolicy] `json:"session_policy"` }
Configures load shedding policies and percentages for the pool.
func (LoadBalancerPoolNewParamsLoadShedding) MarshalJSON ¶
func (r LoadBalancerPoolNewParamsLoadShedding) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolNewParamsLoadSheddingDefaultPolicy ¶
type LoadBalancerPoolNewParamsLoadSheddingDefaultPolicy string
The default policy to use when load shedding. A random policy randomly sheds a given percent of requests. A hash policy computes a hash over the CF-Connecting-IP address and sheds all requests originating from a percent of IPs.
const ( LoadBalancerPoolNewParamsLoadSheddingDefaultPolicyRandom LoadBalancerPoolNewParamsLoadSheddingDefaultPolicy = "random" LoadBalancerPoolNewParamsLoadSheddingDefaultPolicyHash LoadBalancerPoolNewParamsLoadSheddingDefaultPolicy = "hash" )
func (LoadBalancerPoolNewParamsLoadSheddingDefaultPolicy) IsKnown ¶
func (r LoadBalancerPoolNewParamsLoadSheddingDefaultPolicy) IsKnown() bool
type LoadBalancerPoolNewParamsLoadSheddingSessionPolicy ¶
type LoadBalancerPoolNewParamsLoadSheddingSessionPolicy string
Only the hash policy is supported for existing sessions (to avoid exponential decay).
const (
LoadBalancerPoolNewParamsLoadSheddingSessionPolicyHash LoadBalancerPoolNewParamsLoadSheddingSessionPolicy = "hash"
)
func (LoadBalancerPoolNewParamsLoadSheddingSessionPolicy) IsKnown ¶
func (r LoadBalancerPoolNewParamsLoadSheddingSessionPolicy) IsKnown() bool
type LoadBalancerPoolNewParamsNotificationFilter ¶
type LoadBalancerPoolNewParamsNotificationFilter struct { // Filter options for a particular resource type (pool or origin). Use null to // reset. Origin param.Field[LoadBalancerPoolNewParamsNotificationFilterOrigin] `json:"origin"` // Filter options for a particular resource type (pool or origin). Use null to // reset. Pool param.Field[LoadBalancerPoolNewParamsNotificationFilterPool] `json:"pool"` }
Filter pool and origin health notifications by resource type or health status. Use null to reset.
func (LoadBalancerPoolNewParamsNotificationFilter) MarshalJSON ¶
func (r LoadBalancerPoolNewParamsNotificationFilter) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolNewParamsNotificationFilterOrigin ¶
type LoadBalancerPoolNewParamsNotificationFilterOrigin struct { // If set true, disable notifications for this type of resource (pool or origin). Disable param.Field[bool] `json:"disable"` // If present, send notifications only for this health status (e.g. false for only // DOWN events). Use null to reset (all events). Healthy param.Field[bool] `json:"healthy"` }
Filter options for a particular resource type (pool or origin). Use null to reset.
func (LoadBalancerPoolNewParamsNotificationFilterOrigin) MarshalJSON ¶
func (r LoadBalancerPoolNewParamsNotificationFilterOrigin) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolNewParamsNotificationFilterPool ¶
type LoadBalancerPoolNewParamsNotificationFilterPool struct { // If set true, disable notifications for this type of resource (pool or origin). Disable param.Field[bool] `json:"disable"` // If present, send notifications only for this health status (e.g. false for only // DOWN events). Use null to reset (all events). Healthy param.Field[bool] `json:"healthy"` }
Filter options for a particular resource type (pool or origin). Use null to reset.
func (LoadBalancerPoolNewParamsNotificationFilterPool) MarshalJSON ¶
func (r LoadBalancerPoolNewParamsNotificationFilterPool) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolNewParamsOrigin ¶
type LoadBalancerPoolNewParamsOrigin struct { // The IP address (IPv4 or IPv6) of the origin, or its publicly addressable // hostname. Hostnames entered here should resolve directly to the origin, and not // be a hostname proxied by Cloudflare. To set an internal/reserved address, // virtual_network_id must also be set. Address param.Field[string] `json:"address"` // Whether to enable (the default) this origin within the pool. Disabled origins // will not receive traffic and are excluded from health checks. The origin will // only be disabled for the current pool. Enabled param.Field[bool] `json:"enabled"` // The request header is used to pass additional information with an HTTP request. // Currently supported header is 'Host'. Header param.Field[LoadBalancerPoolNewParamsOriginsHeader] `json:"header"` // A human-identifiable name for the origin. Name param.Field[string] `json:"name"` // The virtual network subnet ID the origin belongs in. Virtual network must also // belong to the account. VirtualNetworkID param.Field[string] `json:"virtual_network_id"` // The weight of this origin relative to other origins in the pool. Based on the // configured weight the total traffic is distributed among origins within the // pool. // // - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the // origin's outstanding requests. // - `origin_steering.policy="least_connections"`: Use weight to scale the origin's // open connections. Weight param.Field[float64] `json:"weight"` }
func (LoadBalancerPoolNewParamsOrigin) MarshalJSON ¶
func (r LoadBalancerPoolNewParamsOrigin) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolNewParamsOriginSteering ¶
type LoadBalancerPoolNewParamsOriginSteering struct { // The type of origin steering policy to use. // // - `"random"`: Select an origin randomly. // - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP // address. // - `"least_outstanding_requests"`: Select an origin by taking into consideration // origin weights, as well as each origin's number of outstanding requests. // Origins with more pending requests are weighted proportionately less relative // to others. // - `"least_connections"`: Select an origin by taking into consideration origin // weights, as well as each origin's number of open connections. Origins with // more open connections are weighted proportionately less relative to others. // Supported for HTTP/1 and HTTP/2 connections. Policy param.Field[LoadBalancerPoolNewParamsOriginSteeringPolicy] `json:"policy"` }
Configures origin steering for the pool. Controls how origins are selected for new sessions and traffic without session affinity.
func (LoadBalancerPoolNewParamsOriginSteering) MarshalJSON ¶
func (r LoadBalancerPoolNewParamsOriginSteering) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolNewParamsOriginSteeringPolicy ¶
type LoadBalancerPoolNewParamsOriginSteeringPolicy string
The type of origin steering policy to use.
- `"random"`: Select an origin randomly.
- `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP address.
- `"least_outstanding_requests"`: Select an origin by taking into consideration origin weights, as well as each origin's number of outstanding requests. Origins with more pending requests are weighted proportionately less relative to others.
- `"least_connections"`: Select an origin by taking into consideration origin weights, as well as each origin's number of open connections. Origins with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.
const ( LoadBalancerPoolNewParamsOriginSteeringPolicyRandom LoadBalancerPoolNewParamsOriginSteeringPolicy = "random" LoadBalancerPoolNewParamsOriginSteeringPolicyHash LoadBalancerPoolNewParamsOriginSteeringPolicy = "hash" LoadBalancerPoolNewParamsOriginSteeringPolicyLeastOutstandingRequests LoadBalancerPoolNewParamsOriginSteeringPolicy = "least_outstanding_requests" LoadBalancerPoolNewParamsOriginSteeringPolicyLeastConnections LoadBalancerPoolNewParamsOriginSteeringPolicy = "least_connections" )
func (LoadBalancerPoolNewParamsOriginSteeringPolicy) IsKnown ¶
func (r LoadBalancerPoolNewParamsOriginSteeringPolicy) IsKnown() bool
type LoadBalancerPoolNewParamsOriginsHeader ¶
type LoadBalancerPoolNewParamsOriginsHeader struct { // The 'Host' header allows to override the hostname set in the HTTP request. // Current support is 1 'Host' header override per origin. Host param.Field[[]string] `json:"Host"` }
The request header is used to pass additional information with an HTTP request. Currently supported header is 'Host'.
func (LoadBalancerPoolNewParamsOriginsHeader) MarshalJSON ¶
func (r LoadBalancerPoolNewParamsOriginsHeader) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolNewResponseEnvelope ¶
type LoadBalancerPoolNewResponseEnvelope struct { Errors []LoadBalancerPoolNewResponseEnvelopeErrors `json:"errors,required"` Messages []LoadBalancerPoolNewResponseEnvelopeMessages `json:"messages,required"` Result LoadBalancingPool `json:"result,required"` // Whether the API call was successful Success LoadBalancerPoolNewResponseEnvelopeSuccess `json:"success,required"` JSON loadBalancerPoolNewResponseEnvelopeJSON `json:"-"` }
func (*LoadBalancerPoolNewResponseEnvelope) UnmarshalJSON ¶
func (r *LoadBalancerPoolNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolNewResponseEnvelopeErrors ¶
type LoadBalancerPoolNewResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPoolNewResponseEnvelopeErrorsJSON `json:"-"` }
func (*LoadBalancerPoolNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LoadBalancerPoolNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolNewResponseEnvelopeMessages ¶
type LoadBalancerPoolNewResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPoolNewResponseEnvelopeMessagesJSON `json:"-"` }
func (*LoadBalancerPoolNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LoadBalancerPoolNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolNewResponseEnvelopeSuccess ¶
type LoadBalancerPoolNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LoadBalancerPoolNewResponseEnvelopeSuccessTrue LoadBalancerPoolNewResponseEnvelopeSuccess = true
)
func (LoadBalancerPoolNewResponseEnvelopeSuccess) IsKnown ¶
func (r LoadBalancerPoolNewResponseEnvelopeSuccess) IsKnown() bool
type LoadBalancerPoolPreviewParams ¶
type LoadBalancerPoolPreviewParams struct { // The expected HTTP response code or code range of the health check. This // parameter is only valid for HTTP and HTTPS monitors. ExpectedCodes param.Field[string] `json:"expected_codes,required"` // Do not validate the certificate when monitor use HTTPS. This parameter is // currently only valid for HTTP and HTTPS monitors. AllowInsecure param.Field[bool] `json:"allow_insecure"` // To be marked unhealthy the monitored origin must fail this healthcheck N // consecutive times. ConsecutiveDown param.Field[int64] `json:"consecutive_down"` // To be marked healthy the monitored origin must pass this healthcheck N // consecutive times. ConsecutiveUp param.Field[int64] `json:"consecutive_up"` // Object description. Description param.Field[string] `json:"description"` // A case-insensitive sub-string to look for in the response body. If this string // is not found, the origin will be marked as unhealthy. This parameter is only // valid for HTTP and HTTPS monitors. ExpectedBody param.Field[string] `json:"expected_body"` // Follow redirects if returned by the origin. This parameter is only valid for // HTTP and HTTPS monitors. FollowRedirects param.Field[bool] `json:"follow_redirects"` // The HTTP request headers to send in the health check. It is recommended you set // a Host header by default. The User-Agent header cannot be overridden. This // parameter is only valid for HTTP and HTTPS monitors. Header param.Field[interface{}] `json:"header"` // The interval between each health check. Shorter intervals may improve failover // time, but will increase load on the origins as we check from multiple locations. Interval param.Field[int64] `json:"interval"` // The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS // based checks and 'connection_established' for TCP based health checks. Method param.Field[string] `json:"method"` // The endpoint path you want to conduct a health check against. This parameter is // only valid for HTTP and HTTPS monitors. Path param.Field[string] `json:"path"` // The port number to connect to for the health check. Required for TCP, UDP, and // SMTP checks. HTTP and HTTPS checks should only define the port when using a // non-standard port (HTTP: default 80, HTTPS: default 443). Port param.Field[int64] `json:"port"` // Assign this monitor to emulate the specified zone while probing. This parameter // is only valid for HTTP and HTTPS monitors. ProbeZone param.Field[string] `json:"probe_zone"` // The number of retries to attempt in case of a timeout before marking the origin // as unhealthy. Retries are attempted immediately. Retries param.Field[int64] `json:"retries"` // The timeout (in seconds) before marking the health check as failed. Timeout param.Field[int64] `json:"timeout"` // The protocol to use for the health check. Currently supported protocols are // 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Type param.Field[LoadBalancerPoolPreviewParamsType] `json:"type"` }
func (LoadBalancerPoolPreviewParams) MarshalJSON ¶
func (r LoadBalancerPoolPreviewParams) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolPreviewParamsType ¶
type LoadBalancerPoolPreviewParamsType string
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
const ( LoadBalancerPoolPreviewParamsTypeHTTP LoadBalancerPoolPreviewParamsType = "http" LoadBalancerPoolPreviewParamsTypeHTTPS LoadBalancerPoolPreviewParamsType = "https" LoadBalancerPoolPreviewParamsTypeTcp LoadBalancerPoolPreviewParamsType = "tcp" LoadBalancerPoolPreviewParamsTypeUdpIcmp LoadBalancerPoolPreviewParamsType = "udp_icmp" LoadBalancerPoolPreviewParamsTypeIcmpPing LoadBalancerPoolPreviewParamsType = "icmp_ping" LoadBalancerPoolPreviewParamsTypeSmtp LoadBalancerPoolPreviewParamsType = "smtp" )
func (LoadBalancerPoolPreviewParamsType) IsKnown ¶
func (r LoadBalancerPoolPreviewParamsType) IsKnown() bool
type LoadBalancerPoolPreviewResponse ¶
type LoadBalancerPoolPreviewResponse struct { // Monitored pool IDs mapped to their respective names. Pools map[string]string `json:"pools"` PreviewID string `json:"preview_id"` JSON loadBalancerPoolPreviewResponseJSON `json:"-"` }
func (*LoadBalancerPoolPreviewResponse) UnmarshalJSON ¶
func (r *LoadBalancerPoolPreviewResponse) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolPreviewResponseEnvelope ¶
type LoadBalancerPoolPreviewResponseEnvelope struct { Errors []LoadBalancerPoolPreviewResponseEnvelopeErrors `json:"errors,required"` Messages []LoadBalancerPoolPreviewResponseEnvelopeMessages `json:"messages,required"` Result LoadBalancerPoolPreviewResponse `json:"result,required"` // Whether the API call was successful Success LoadBalancerPoolPreviewResponseEnvelopeSuccess `json:"success,required"` JSON loadBalancerPoolPreviewResponseEnvelopeJSON `json:"-"` }
func (*LoadBalancerPoolPreviewResponseEnvelope) UnmarshalJSON ¶
func (r *LoadBalancerPoolPreviewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolPreviewResponseEnvelopeErrors ¶
type LoadBalancerPoolPreviewResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPoolPreviewResponseEnvelopeErrorsJSON `json:"-"` }
func (*LoadBalancerPoolPreviewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LoadBalancerPoolPreviewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolPreviewResponseEnvelopeMessages ¶
type LoadBalancerPoolPreviewResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPoolPreviewResponseEnvelopeMessagesJSON `json:"-"` }
func (*LoadBalancerPoolPreviewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LoadBalancerPoolPreviewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolPreviewResponseEnvelopeSuccess ¶
type LoadBalancerPoolPreviewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LoadBalancerPoolPreviewResponseEnvelopeSuccessTrue LoadBalancerPoolPreviewResponseEnvelopeSuccess = true
)
func (LoadBalancerPoolPreviewResponseEnvelopeSuccess) IsKnown ¶
func (r LoadBalancerPoolPreviewResponseEnvelopeSuccess) IsKnown() bool
type LoadBalancerPoolReferencesResponse ¶
type LoadBalancerPoolReferencesResponse struct { ReferenceType LoadBalancerPoolReferencesResponseReferenceType `json:"reference_type"` ResourceID string `json:"resource_id"` ResourceName string `json:"resource_name"` ResourceType string `json:"resource_type"` JSON loadBalancerPoolReferencesResponseJSON `json:"-"` }
func (*LoadBalancerPoolReferencesResponse) UnmarshalJSON ¶
func (r *LoadBalancerPoolReferencesResponse) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolReferencesResponseEnvelope ¶
type LoadBalancerPoolReferencesResponseEnvelope struct { Errors []LoadBalancerPoolReferencesResponseEnvelopeErrors `json:"errors,required"` Messages []LoadBalancerPoolReferencesResponseEnvelopeMessages `json:"messages,required"` // List of resources that reference a given pool. Result []LoadBalancerPoolReferencesResponse `json:"result,required,nullable"` // Whether the API call was successful Success LoadBalancerPoolReferencesResponseEnvelopeSuccess `json:"success,required"` ResultInfo LoadBalancerPoolReferencesResponseEnvelopeResultInfo `json:"result_info"` JSON loadBalancerPoolReferencesResponseEnvelopeJSON `json:"-"` }
func (*LoadBalancerPoolReferencesResponseEnvelope) UnmarshalJSON ¶
func (r *LoadBalancerPoolReferencesResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolReferencesResponseEnvelopeErrors ¶
type LoadBalancerPoolReferencesResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPoolReferencesResponseEnvelopeErrorsJSON `json:"-"` }
func (*LoadBalancerPoolReferencesResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LoadBalancerPoolReferencesResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolReferencesResponseEnvelopeMessages ¶
type LoadBalancerPoolReferencesResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPoolReferencesResponseEnvelopeMessagesJSON `json:"-"` }
func (*LoadBalancerPoolReferencesResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LoadBalancerPoolReferencesResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolReferencesResponseEnvelopeResultInfo ¶
type LoadBalancerPoolReferencesResponseEnvelopeResultInfo struct { // Total number of results for the requested service Count float64 `json:"count"` // Current page within paginated list of results Page float64 `json:"page"` // Number of results per page of results PerPage float64 `json:"per_page"` // Total results available without any search parameters TotalCount float64 `json:"total_count"` JSON loadBalancerPoolReferencesResponseEnvelopeResultInfoJSON `json:"-"` }
func (*LoadBalancerPoolReferencesResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *LoadBalancerPoolReferencesResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolReferencesResponseEnvelopeSuccess ¶
type LoadBalancerPoolReferencesResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LoadBalancerPoolReferencesResponseEnvelopeSuccessTrue LoadBalancerPoolReferencesResponseEnvelopeSuccess = true
)
func (LoadBalancerPoolReferencesResponseEnvelopeSuccess) IsKnown ¶
func (r LoadBalancerPoolReferencesResponseEnvelopeSuccess) IsKnown() bool
type LoadBalancerPoolReferencesResponseReferenceType ¶
type LoadBalancerPoolReferencesResponseReferenceType string
const ( LoadBalancerPoolReferencesResponseReferenceTypeStar LoadBalancerPoolReferencesResponseReferenceType = "*" LoadBalancerPoolReferencesResponseReferenceTypeReferral LoadBalancerPoolReferencesResponseReferenceType = "referral" LoadBalancerPoolReferencesResponseReferenceTypeReferrer LoadBalancerPoolReferencesResponseReferenceType = "referrer" )
func (LoadBalancerPoolReferencesResponseReferenceType) IsKnown ¶
func (r LoadBalancerPoolReferencesResponseReferenceType) IsKnown() bool
type LoadBalancerPoolService ¶
type LoadBalancerPoolService struct {
Options []option.RequestOption
}
LoadBalancerPoolService 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 NewLoadBalancerPoolService method instead.
func NewLoadBalancerPoolService ¶
func NewLoadBalancerPoolService(opts ...option.RequestOption) (r *LoadBalancerPoolService)
NewLoadBalancerPoolService 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 (*LoadBalancerPoolService) Delete ¶
func (r *LoadBalancerPoolService) Delete(ctx context.Context, poolID string, opts ...option.RequestOption) (res *LoadBalancerPoolDeleteResponse, err error)
Delete a configured pool.
func (*LoadBalancerPoolService) Edit ¶
func (r *LoadBalancerPoolService) Edit(ctx context.Context, poolID string, body LoadBalancerPoolEditParams, opts ...option.RequestOption) (res *LoadBalancingPool, err error)
Apply changes to an existing pool, overwriting the supplied properties.
func (*LoadBalancerPoolService) Get ¶
func (r *LoadBalancerPoolService) Get(ctx context.Context, poolID string, opts ...option.RequestOption) (res *LoadBalancingPool, err error)
Fetch a single configured pool.
func (*LoadBalancerPoolService) Health ¶
func (r *LoadBalancerPoolService) Health(ctx context.Context, poolID string, opts ...option.RequestOption) (res *LoadBalancerPoolHealthResponse, err error)
Fetch the latest pool health status for a single pool.
func (*LoadBalancerPoolService) List ¶
func (r *LoadBalancerPoolService) List(ctx context.Context, query LoadBalancerPoolListParams, opts ...option.RequestOption) (res *pagination.SinglePage[LoadBalancingPool], err error)
List configured pools.
func (*LoadBalancerPoolService) ListAutoPaging ¶
func (r *LoadBalancerPoolService) ListAutoPaging(ctx context.Context, query LoadBalancerPoolListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[LoadBalancingPool]
List configured pools.
func (*LoadBalancerPoolService) New ¶
func (r *LoadBalancerPoolService) New(ctx context.Context, body LoadBalancerPoolNewParams, opts ...option.RequestOption) (res *LoadBalancingPool, err error)
Create a new pool.
func (*LoadBalancerPoolService) Preview ¶
func (r *LoadBalancerPoolService) Preview(ctx context.Context, poolID string, body LoadBalancerPoolPreviewParams, opts ...option.RequestOption) (res *LoadBalancerPoolPreviewResponse, err error)
Preview pool health using provided monitor details. The returned preview_id can be used in the preview endpoint to retrieve the results.
func (*LoadBalancerPoolService) References ¶
func (r *LoadBalancerPoolService) References(ctx context.Context, poolID string, opts ...option.RequestOption) (res *[]LoadBalancerPoolReferencesResponse, err error)
Get the list of resources that reference the provided pool.
func (*LoadBalancerPoolService) Update ¶
func (r *LoadBalancerPoolService) Update(ctx context.Context, poolID string, body LoadBalancerPoolUpdateParams, opts ...option.RequestOption) (res *LoadBalancingPool, err error)
Modify a configured pool.
type LoadBalancerPoolUpdateParams ¶
type LoadBalancerPoolUpdateParams struct { // A short name (tag) for the pool. Only alphanumeric characters, hyphens, and // underscores are allowed. Name param.Field[string] `json:"name,required"` // The list of origins within this pool. Traffic directed at this pool is balanced // across all currently healthy origins, provided the pool itself is healthy. Origins param.Field[[]LoadBalancerPoolUpdateParamsOrigin] `json:"origins,required"` // A list of regions from which to run health checks. Null means every Cloudflare // data center. CheckRegions param.Field[[]LoadBalancerPoolUpdateParamsCheckRegion] `json:"check_regions"` // A human-readable description of the pool. Description param.Field[string] `json:"description"` // Whether to enable (the default) or disable this pool. Disabled pools will not // receive traffic and are excluded from health checks. Disabling a pool will cause // any load balancers using it to failover to the next pool (if any). Enabled param.Field[bool] `json:"enabled"` // The latitude of the data center containing the origins used in this pool in // decimal degrees. If this is set, longitude must also be set. Latitude param.Field[float64] `json:"latitude"` // Configures load shedding policies and percentages for the pool. LoadShedding param.Field[LoadBalancerPoolUpdateParamsLoadShedding] `json:"load_shedding"` // The longitude of the data center containing the origins used in this pool in // decimal degrees. If this is set, latitude must also be set. Longitude param.Field[float64] `json:"longitude"` // The minimum number of origins that must be healthy for this pool to serve // traffic. If the number of healthy origins falls below this number, the pool will // be marked unhealthy and will failover to the next available pool. MinimumOrigins param.Field[int64] `json:"minimum_origins"` // The ID of the Monitor to use for checking the health of origins within this // pool. Monitor param.Field[interface{}] `json:"monitor"` // This field is now deprecated. It has been moved to Cloudflare's Centralized // Notification service // https://developers.cloudflare.com/fundamentals/notifications/. The email address // to send health status notifications to. This can be an individual mailbox or a // mailing list. Multiple emails can be supplied as a comma delimited list. NotificationEmail param.Field[string] `json:"notification_email"` // Filter pool and origin health notifications by resource type or health status. // Use null to reset. NotificationFilter param.Field[LoadBalancerPoolUpdateParamsNotificationFilter] `json:"notification_filter"` // Configures origin steering for the pool. Controls how origins are selected for // new sessions and traffic without session affinity. OriginSteering param.Field[LoadBalancerPoolUpdateParamsOriginSteering] `json:"origin_steering"` }
func (LoadBalancerPoolUpdateParams) MarshalJSON ¶
func (r LoadBalancerPoolUpdateParams) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolUpdateParamsCheckRegion ¶
type LoadBalancerPoolUpdateParamsCheckRegion string
WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS: Southern Asia, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all regions (ENTERPRISE customers only).
const ( LoadBalancerPoolUpdateParamsCheckRegionWnam LoadBalancerPoolUpdateParamsCheckRegion = "WNAM" LoadBalancerPoolUpdateParamsCheckRegionEnam LoadBalancerPoolUpdateParamsCheckRegion = "ENAM" LoadBalancerPoolUpdateParamsCheckRegionWeu LoadBalancerPoolUpdateParamsCheckRegion = "WEU" LoadBalancerPoolUpdateParamsCheckRegionEeu LoadBalancerPoolUpdateParamsCheckRegion = "EEU" LoadBalancerPoolUpdateParamsCheckRegionNsam LoadBalancerPoolUpdateParamsCheckRegion = "NSAM" LoadBalancerPoolUpdateParamsCheckRegionSsam LoadBalancerPoolUpdateParamsCheckRegion = "SSAM" LoadBalancerPoolUpdateParamsCheckRegionOc LoadBalancerPoolUpdateParamsCheckRegion = "OC" LoadBalancerPoolUpdateParamsCheckRegionMe LoadBalancerPoolUpdateParamsCheckRegion = "ME" LoadBalancerPoolUpdateParamsCheckRegionNaf LoadBalancerPoolUpdateParamsCheckRegion = "NAF" LoadBalancerPoolUpdateParamsCheckRegionSaf LoadBalancerPoolUpdateParamsCheckRegion = "SAF" LoadBalancerPoolUpdateParamsCheckRegionSas LoadBalancerPoolUpdateParamsCheckRegion = "SAS" LoadBalancerPoolUpdateParamsCheckRegionSeas LoadBalancerPoolUpdateParamsCheckRegion = "SEAS" LoadBalancerPoolUpdateParamsCheckRegionNeas LoadBalancerPoolUpdateParamsCheckRegion = "NEAS" LoadBalancerPoolUpdateParamsCheckRegionAllRegions LoadBalancerPoolUpdateParamsCheckRegion = "ALL_REGIONS" )
func (LoadBalancerPoolUpdateParamsCheckRegion) IsKnown ¶
func (r LoadBalancerPoolUpdateParamsCheckRegion) IsKnown() bool
type LoadBalancerPoolUpdateParamsLoadShedding ¶
type LoadBalancerPoolUpdateParamsLoadShedding struct { // The percent of traffic to shed from the pool, according to the default policy. // Applies to new sessions and traffic without session affinity. DefaultPercent param.Field[float64] `json:"default_percent"` // The default policy to use when load shedding. A random policy randomly sheds a // given percent of requests. A hash policy computes a hash over the // CF-Connecting-IP address and sheds all requests originating from a percent of // IPs. DefaultPolicy param.Field[LoadBalancerPoolUpdateParamsLoadSheddingDefaultPolicy] `json:"default_policy"` // The percent of existing sessions to shed from the pool, according to the session // policy. SessionPercent param.Field[float64] `json:"session_percent"` // Only the hash policy is supported for existing sessions (to avoid exponential // decay). SessionPolicy param.Field[LoadBalancerPoolUpdateParamsLoadSheddingSessionPolicy] `json:"session_policy"` }
Configures load shedding policies and percentages for the pool.
func (LoadBalancerPoolUpdateParamsLoadShedding) MarshalJSON ¶
func (r LoadBalancerPoolUpdateParamsLoadShedding) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolUpdateParamsLoadSheddingDefaultPolicy ¶
type LoadBalancerPoolUpdateParamsLoadSheddingDefaultPolicy string
The default policy to use when load shedding. A random policy randomly sheds a given percent of requests. A hash policy computes a hash over the CF-Connecting-IP address and sheds all requests originating from a percent of IPs.
const ( LoadBalancerPoolUpdateParamsLoadSheddingDefaultPolicyRandom LoadBalancerPoolUpdateParamsLoadSheddingDefaultPolicy = "random" LoadBalancerPoolUpdateParamsLoadSheddingDefaultPolicyHash LoadBalancerPoolUpdateParamsLoadSheddingDefaultPolicy = "hash" )
func (LoadBalancerPoolUpdateParamsLoadSheddingDefaultPolicy) IsKnown ¶
func (r LoadBalancerPoolUpdateParamsLoadSheddingDefaultPolicy) IsKnown() bool
type LoadBalancerPoolUpdateParamsLoadSheddingSessionPolicy ¶
type LoadBalancerPoolUpdateParamsLoadSheddingSessionPolicy string
Only the hash policy is supported for existing sessions (to avoid exponential decay).
const (
LoadBalancerPoolUpdateParamsLoadSheddingSessionPolicyHash LoadBalancerPoolUpdateParamsLoadSheddingSessionPolicy = "hash"
)
func (LoadBalancerPoolUpdateParamsLoadSheddingSessionPolicy) IsKnown ¶
func (r LoadBalancerPoolUpdateParamsLoadSheddingSessionPolicy) IsKnown() bool
type LoadBalancerPoolUpdateParamsNotificationFilter ¶
type LoadBalancerPoolUpdateParamsNotificationFilter struct { // Filter options for a particular resource type (pool or origin). Use null to // reset. Origin param.Field[LoadBalancerPoolUpdateParamsNotificationFilterOrigin] `json:"origin"` // Filter options for a particular resource type (pool or origin). Use null to // reset. Pool param.Field[LoadBalancerPoolUpdateParamsNotificationFilterPool] `json:"pool"` }
Filter pool and origin health notifications by resource type or health status. Use null to reset.
func (LoadBalancerPoolUpdateParamsNotificationFilter) MarshalJSON ¶
func (r LoadBalancerPoolUpdateParamsNotificationFilter) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolUpdateParamsNotificationFilterOrigin ¶
type LoadBalancerPoolUpdateParamsNotificationFilterOrigin struct { // If set true, disable notifications for this type of resource (pool or origin). Disable param.Field[bool] `json:"disable"` // If present, send notifications only for this health status (e.g. false for only // DOWN events). Use null to reset (all events). Healthy param.Field[bool] `json:"healthy"` }
Filter options for a particular resource type (pool or origin). Use null to reset.
func (LoadBalancerPoolUpdateParamsNotificationFilterOrigin) MarshalJSON ¶
func (r LoadBalancerPoolUpdateParamsNotificationFilterOrigin) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolUpdateParamsNotificationFilterPool ¶
type LoadBalancerPoolUpdateParamsNotificationFilterPool struct { // If set true, disable notifications for this type of resource (pool or origin). Disable param.Field[bool] `json:"disable"` // If present, send notifications only for this health status (e.g. false for only // DOWN events). Use null to reset (all events). Healthy param.Field[bool] `json:"healthy"` }
Filter options for a particular resource type (pool or origin). Use null to reset.
func (LoadBalancerPoolUpdateParamsNotificationFilterPool) MarshalJSON ¶
func (r LoadBalancerPoolUpdateParamsNotificationFilterPool) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolUpdateParamsOrigin ¶
type LoadBalancerPoolUpdateParamsOrigin struct { // The IP address (IPv4 or IPv6) of the origin, or its publicly addressable // hostname. Hostnames entered here should resolve directly to the origin, and not // be a hostname proxied by Cloudflare. To set an internal/reserved address, // virtual_network_id must also be set. Address param.Field[string] `json:"address"` // Whether to enable (the default) this origin within the pool. Disabled origins // will not receive traffic and are excluded from health checks. The origin will // only be disabled for the current pool. Enabled param.Field[bool] `json:"enabled"` // The request header is used to pass additional information with an HTTP request. // Currently supported header is 'Host'. Header param.Field[LoadBalancerPoolUpdateParamsOriginsHeader] `json:"header"` // A human-identifiable name for the origin. Name param.Field[string] `json:"name"` // The virtual network subnet ID the origin belongs in. Virtual network must also // belong to the account. VirtualNetworkID param.Field[string] `json:"virtual_network_id"` // The weight of this origin relative to other origins in the pool. Based on the // configured weight the total traffic is distributed among origins within the // pool. // // - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the // origin's outstanding requests. // - `origin_steering.policy="least_connections"`: Use weight to scale the origin's // open connections. Weight param.Field[float64] `json:"weight"` }
func (LoadBalancerPoolUpdateParamsOrigin) MarshalJSON ¶
func (r LoadBalancerPoolUpdateParamsOrigin) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolUpdateParamsOriginSteering ¶
type LoadBalancerPoolUpdateParamsOriginSteering struct { // The type of origin steering policy to use. // // - `"random"`: Select an origin randomly. // - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP // address. // - `"least_outstanding_requests"`: Select an origin by taking into consideration // origin weights, as well as each origin's number of outstanding requests. // Origins with more pending requests are weighted proportionately less relative // to others. // - `"least_connections"`: Select an origin by taking into consideration origin // weights, as well as each origin's number of open connections. Origins with // more open connections are weighted proportionately less relative to others. // Supported for HTTP/1 and HTTP/2 connections. Policy param.Field[LoadBalancerPoolUpdateParamsOriginSteeringPolicy] `json:"policy"` }
Configures origin steering for the pool. Controls how origins are selected for new sessions and traffic without session affinity.
func (LoadBalancerPoolUpdateParamsOriginSteering) MarshalJSON ¶
func (r LoadBalancerPoolUpdateParamsOriginSteering) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolUpdateParamsOriginSteeringPolicy ¶
type LoadBalancerPoolUpdateParamsOriginSteeringPolicy string
The type of origin steering policy to use.
- `"random"`: Select an origin randomly.
- `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP address.
- `"least_outstanding_requests"`: Select an origin by taking into consideration origin weights, as well as each origin's number of outstanding requests. Origins with more pending requests are weighted proportionately less relative to others.
- `"least_connections"`: Select an origin by taking into consideration origin weights, as well as each origin's number of open connections. Origins with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.
const ( LoadBalancerPoolUpdateParamsOriginSteeringPolicyRandom LoadBalancerPoolUpdateParamsOriginSteeringPolicy = "random" LoadBalancerPoolUpdateParamsOriginSteeringPolicyHash LoadBalancerPoolUpdateParamsOriginSteeringPolicy = "hash" LoadBalancerPoolUpdateParamsOriginSteeringPolicyLeastOutstandingRequests LoadBalancerPoolUpdateParamsOriginSteeringPolicy = "least_outstanding_requests" LoadBalancerPoolUpdateParamsOriginSteeringPolicyLeastConnections LoadBalancerPoolUpdateParamsOriginSteeringPolicy = "least_connections" )
func (LoadBalancerPoolUpdateParamsOriginSteeringPolicy) IsKnown ¶
func (r LoadBalancerPoolUpdateParamsOriginSteeringPolicy) IsKnown() bool
type LoadBalancerPoolUpdateParamsOriginsHeader ¶
type LoadBalancerPoolUpdateParamsOriginsHeader struct { // The 'Host' header allows to override the hostname set in the HTTP request. // Current support is 1 'Host' header override per origin. Host param.Field[[]string] `json:"Host"` }
The request header is used to pass additional information with an HTTP request. Currently supported header is 'Host'.
func (LoadBalancerPoolUpdateParamsOriginsHeader) MarshalJSON ¶
func (r LoadBalancerPoolUpdateParamsOriginsHeader) MarshalJSON() (data []byte, err error)
type LoadBalancerPoolUpdateResponseEnvelope ¶
type LoadBalancerPoolUpdateResponseEnvelope struct { Errors []LoadBalancerPoolUpdateResponseEnvelopeErrors `json:"errors,required"` Messages []LoadBalancerPoolUpdateResponseEnvelopeMessages `json:"messages,required"` Result LoadBalancingPool `json:"result,required"` // Whether the API call was successful Success LoadBalancerPoolUpdateResponseEnvelopeSuccess `json:"success,required"` JSON loadBalancerPoolUpdateResponseEnvelopeJSON `json:"-"` }
func (*LoadBalancerPoolUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *LoadBalancerPoolUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolUpdateResponseEnvelopeErrors ¶
type LoadBalancerPoolUpdateResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPoolUpdateResponseEnvelopeErrorsJSON `json:"-"` }
func (*LoadBalancerPoolUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LoadBalancerPoolUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolUpdateResponseEnvelopeMessages ¶
type LoadBalancerPoolUpdateResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPoolUpdateResponseEnvelopeMessagesJSON `json:"-"` }
func (*LoadBalancerPoolUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LoadBalancerPoolUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPoolUpdateResponseEnvelopeSuccess ¶
type LoadBalancerPoolUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LoadBalancerPoolUpdateResponseEnvelopeSuccessTrue LoadBalancerPoolUpdateResponseEnvelopeSuccess = true
)
func (LoadBalancerPoolUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r LoadBalancerPoolUpdateResponseEnvelopeSuccess) IsKnown() bool
type LoadBalancerPreviewGetResponseEnvelope ¶
type LoadBalancerPreviewGetResponseEnvelope struct { Errors []LoadBalancerPreviewGetResponseEnvelopeErrors `json:"errors,required"` Messages []LoadBalancerPreviewGetResponseEnvelopeMessages `json:"messages,required"` // Resulting health data from a preview operation. Result LoadBalancingPreview `json:"result,required"` // Whether the API call was successful Success LoadBalancerPreviewGetResponseEnvelopeSuccess `json:"success,required"` JSON loadBalancerPreviewGetResponseEnvelopeJSON `json:"-"` }
func (*LoadBalancerPreviewGetResponseEnvelope) UnmarshalJSON ¶
func (r *LoadBalancerPreviewGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPreviewGetResponseEnvelopeErrors ¶
type LoadBalancerPreviewGetResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPreviewGetResponseEnvelopeErrorsJSON `json:"-"` }
func (*LoadBalancerPreviewGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *LoadBalancerPreviewGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPreviewGetResponseEnvelopeMessages ¶
type LoadBalancerPreviewGetResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON loadBalancerPreviewGetResponseEnvelopeMessagesJSON `json:"-"` }
func (*LoadBalancerPreviewGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *LoadBalancerPreviewGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type LoadBalancerPreviewGetResponseEnvelopeSuccess ¶
type LoadBalancerPreviewGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
LoadBalancerPreviewGetResponseEnvelopeSuccessTrue LoadBalancerPreviewGetResponseEnvelopeSuccess = true
)
func (LoadBalancerPreviewGetResponseEnvelopeSuccess) IsKnown ¶
func (r LoadBalancerPreviewGetResponseEnvelopeSuccess) IsKnown() bool
type LoadBalancerPreviewService ¶
type LoadBalancerPreviewService struct {
Options []option.RequestOption
}
LoadBalancerPreviewService 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 NewLoadBalancerPreviewService method instead.
func NewLoadBalancerPreviewService ¶
func NewLoadBalancerPreviewService(opts ...option.RequestOption) (r *LoadBalancerPreviewService)
NewLoadBalancerPreviewService 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 (*LoadBalancerPreviewService) Get ¶
func (r *LoadBalancerPreviewService) Get(ctx context.Context, previewID string, opts ...option.RequestOption) (res *LoadBalancingPreview, err error)
Get the result of a previous preview operation using the provided preview_id.
type LoadBalancerService ¶
type LoadBalancerService struct { Options []option.RequestOption Monitors *LoadBalancerMonitorService Pools *LoadBalancerPoolService Preview *LoadBalancerPreviewService Analytics *LoadBalancerAnalyticsService }
LoadBalancerService 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 NewLoadBalancerService method instead.
func NewLoadBalancerService ¶
func NewLoadBalancerService(opts ...option.RequestOption) (r *LoadBalancerService)
NewLoadBalancerService 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 LoadBalancingAnalytics ¶
type LoadBalancingAnalytics struct { ID int64 `json:"id"` Origins []interface{} `json:"origins"` Pool interface{} `json:"pool"` Timestamp time.Time `json:"timestamp" format:"date-time"` JSON loadBalancingAnalyticsJSON `json:"-"` }
func (*LoadBalancingAnalytics) UnmarshalJSON ¶
func (r *LoadBalancingAnalytics) UnmarshalJSON(data []byte) (err error)
type LoadBalancingMonitor ¶
type LoadBalancingMonitor struct { ID string `json:"id"` // Do not validate the certificate when monitor use HTTPS. This parameter is // currently only valid for HTTP and HTTPS monitors. AllowInsecure bool `json:"allow_insecure"` // To be marked unhealthy the monitored origin must fail this healthcheck N // consecutive times. ConsecutiveDown int64 `json:"consecutive_down"` // To be marked healthy the monitored origin must pass this healthcheck N // consecutive times. ConsecutiveUp int64 `json:"consecutive_up"` CreatedOn time.Time `json:"created_on" format:"date-time"` // Object description. Description string `json:"description"` // A case-insensitive sub-string to look for in the response body. If this string // is not found, the origin will be marked as unhealthy. This parameter is only // valid for HTTP and HTTPS monitors. ExpectedBody string `json:"expected_body"` // The expected HTTP response code or code range of the health check. This // parameter is only valid for HTTP and HTTPS monitors. ExpectedCodes string `json:"expected_codes"` // Follow redirects if returned by the origin. This parameter is only valid for // HTTP and HTTPS monitors. FollowRedirects bool `json:"follow_redirects"` // The HTTP request headers to send in the health check. It is recommended you set // a Host header by default. The User-Agent header cannot be overridden. This // parameter is only valid for HTTP and HTTPS monitors. Header interface{} `json:"header"` // The interval between each health check. Shorter intervals may improve failover // time, but will increase load on the origins as we check from multiple locations. Interval int64 `json:"interval"` // The method to use for the health check. This defaults to 'GET' for HTTP/HTTPS // based checks and 'connection_established' for TCP based health checks. Method string `json:"method"` ModifiedOn time.Time `json:"modified_on" format:"date-time"` // The endpoint path you want to conduct a health check against. This parameter is // only valid for HTTP and HTTPS monitors. Path string `json:"path"` // The port number to connect to for the health check. Required for TCP, UDP, and // SMTP checks. HTTP and HTTPS checks should only define the port when using a // non-standard port (HTTP: default 80, HTTPS: default 443). Port int64 `json:"port"` // Assign this monitor to emulate the specified zone while probing. This parameter // is only valid for HTTP and HTTPS monitors. ProbeZone string `json:"probe_zone"` // The number of retries to attempt in case of a timeout before marking the origin // as unhealthy. Retries are attempted immediately. Retries int64 `json:"retries"` // The timeout (in seconds) before marking the health check as failed. Timeout int64 `json:"timeout"` // The protocol to use for the health check. Currently supported protocols are // 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'. Type LoadBalancingMonitorType `json:"type"` JSON loadBalancingMonitorJSON `json:"-"` }
func (*LoadBalancingMonitor) UnmarshalJSON ¶
func (r *LoadBalancingMonitor) UnmarshalJSON(data []byte) (err error)
type LoadBalancingMonitorType ¶
type LoadBalancingMonitorType string
The protocol to use for the health check. Currently supported protocols are 'HTTP','HTTPS', 'TCP', 'ICMP-PING', 'UDP-ICMP', and 'SMTP'.
const ( LoadBalancingMonitorTypeHTTP LoadBalancingMonitorType = "http" LoadBalancingMonitorTypeHTTPS LoadBalancingMonitorType = "https" LoadBalancingMonitorTypeTcp LoadBalancingMonitorType = "tcp" LoadBalancingMonitorTypeUdpIcmp LoadBalancingMonitorType = "udp_icmp" LoadBalancingMonitorTypeIcmpPing LoadBalancingMonitorType = "icmp_ping" LoadBalancingMonitorTypeSmtp LoadBalancingMonitorType = "smtp" )
func (LoadBalancingMonitorType) IsKnown ¶
func (r LoadBalancingMonitorType) IsKnown() bool
type LoadBalancingPool ¶
type LoadBalancingPool struct { ID string `json:"id"` // A list of regions from which to run health checks. Null means every Cloudflare // data center. CheckRegions []LoadBalancingPoolCheckRegion `json:"check_regions,nullable"` CreatedOn time.Time `json:"created_on" format:"date-time"` // A human-readable description of the pool. Description string `json:"description"` // This field shows up only if the pool is disabled. This field is set with the // time the pool was disabled at. DisabledAt time.Time `json:"disabled_at" format:"date-time"` // Whether to enable (the default) or disable this pool. Disabled pools will not // receive traffic and are excluded from health checks. Disabling a pool will cause // any load balancers using it to failover to the next pool (if any). Enabled bool `json:"enabled"` // The latitude of the data center containing the origins used in this pool in // decimal degrees. If this is set, longitude must also be set. Latitude float64 `json:"latitude"` // Configures load shedding policies and percentages for the pool. LoadShedding LoadBalancingPoolLoadShedding `json:"load_shedding"` // The longitude of the data center containing the origins used in this pool in // decimal degrees. If this is set, latitude must also be set. Longitude float64 `json:"longitude"` // The minimum number of origins that must be healthy for this pool to serve // traffic. If the number of healthy origins falls below this number, the pool will // be marked unhealthy and will failover to the next available pool. MinimumOrigins int64 `json:"minimum_origins"` ModifiedOn time.Time `json:"modified_on" format:"date-time"` // The ID of the Monitor to use for checking the health of origins within this // pool. Monitor interface{} `json:"monitor"` // A short name (tag) for the pool. Only alphanumeric characters, hyphens, and // underscores are allowed. Name string `json:"name"` // This field is now deprecated. It has been moved to Cloudflare's Centralized // Notification service // https://developers.cloudflare.com/fundamentals/notifications/. The email address // to send health status notifications to. This can be an individual mailbox or a // mailing list. Multiple emails can be supplied as a comma delimited list. NotificationEmail string `json:"notification_email"` // Filter pool and origin health notifications by resource type or health status. // Use null to reset. NotificationFilter LoadBalancingPoolNotificationFilter `json:"notification_filter,nullable"` // Configures origin steering for the pool. Controls how origins are selected for // new sessions and traffic without session affinity. OriginSteering LoadBalancingPoolOriginSteering `json:"origin_steering"` // The list of origins within this pool. Traffic directed at this pool is balanced // across all currently healthy origins, provided the pool itself is healthy. Origins []LoadBalancingPoolOrigin `json:"origins"` JSON loadBalancingPoolJSON `json:"-"` }
func (*LoadBalancingPool) UnmarshalJSON ¶
func (r *LoadBalancingPool) UnmarshalJSON(data []byte) (err error)
type LoadBalancingPoolCheckRegion ¶
type LoadBalancingPoolCheckRegion string
WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, SAS: Southern Asia, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all regions (ENTERPRISE customers only).
const ( LoadBalancingPoolCheckRegionWnam LoadBalancingPoolCheckRegion = "WNAM" LoadBalancingPoolCheckRegionEnam LoadBalancingPoolCheckRegion = "ENAM" LoadBalancingPoolCheckRegionWeu LoadBalancingPoolCheckRegion = "WEU" LoadBalancingPoolCheckRegionEeu LoadBalancingPoolCheckRegion = "EEU" LoadBalancingPoolCheckRegionNsam LoadBalancingPoolCheckRegion = "NSAM" LoadBalancingPoolCheckRegionSsam LoadBalancingPoolCheckRegion = "SSAM" LoadBalancingPoolCheckRegionOc LoadBalancingPoolCheckRegion = "OC" LoadBalancingPoolCheckRegionMe LoadBalancingPoolCheckRegion = "ME" LoadBalancingPoolCheckRegionNaf LoadBalancingPoolCheckRegion = "NAF" LoadBalancingPoolCheckRegionSaf LoadBalancingPoolCheckRegion = "SAF" LoadBalancingPoolCheckRegionSas LoadBalancingPoolCheckRegion = "SAS" LoadBalancingPoolCheckRegionSeas LoadBalancingPoolCheckRegion = "SEAS" LoadBalancingPoolCheckRegionNeas LoadBalancingPoolCheckRegion = "NEAS" LoadBalancingPoolCheckRegionAllRegions LoadBalancingPoolCheckRegion = "ALL_REGIONS" )
func (LoadBalancingPoolCheckRegion) IsKnown ¶
func (r LoadBalancingPoolCheckRegion) IsKnown() bool
type LoadBalancingPoolLoadShedding ¶
type LoadBalancingPoolLoadShedding struct { // The percent of traffic to shed from the pool, according to the default policy. // Applies to new sessions and traffic without session affinity. DefaultPercent float64 `json:"default_percent"` // The default policy to use when load shedding. A random policy randomly sheds a // given percent of requests. A hash policy computes a hash over the // CF-Connecting-IP address and sheds all requests originating from a percent of // IPs. DefaultPolicy LoadBalancingPoolLoadSheddingDefaultPolicy `json:"default_policy"` // The percent of existing sessions to shed from the pool, according to the session // policy. SessionPercent float64 `json:"session_percent"` // Only the hash policy is supported for existing sessions (to avoid exponential // decay). SessionPolicy LoadBalancingPoolLoadSheddingSessionPolicy `json:"session_policy"` JSON loadBalancingPoolLoadSheddingJSON `json:"-"` }
Configures load shedding policies and percentages for the pool.
func (*LoadBalancingPoolLoadShedding) UnmarshalJSON ¶
func (r *LoadBalancingPoolLoadShedding) UnmarshalJSON(data []byte) (err error)
type LoadBalancingPoolLoadSheddingDefaultPolicy ¶
type LoadBalancingPoolLoadSheddingDefaultPolicy string
The default policy to use when load shedding. A random policy randomly sheds a given percent of requests. A hash policy computes a hash over the CF-Connecting-IP address and sheds all requests originating from a percent of IPs.
const ( LoadBalancingPoolLoadSheddingDefaultPolicyRandom LoadBalancingPoolLoadSheddingDefaultPolicy = "random" LoadBalancingPoolLoadSheddingDefaultPolicyHash LoadBalancingPoolLoadSheddingDefaultPolicy = "hash" )
func (LoadBalancingPoolLoadSheddingDefaultPolicy) IsKnown ¶
func (r LoadBalancingPoolLoadSheddingDefaultPolicy) IsKnown() bool
type LoadBalancingPoolLoadSheddingSessionPolicy ¶
type LoadBalancingPoolLoadSheddingSessionPolicy string
Only the hash policy is supported for existing sessions (to avoid exponential decay).
const (
LoadBalancingPoolLoadSheddingSessionPolicyHash LoadBalancingPoolLoadSheddingSessionPolicy = "hash"
)
func (LoadBalancingPoolLoadSheddingSessionPolicy) IsKnown ¶
func (r LoadBalancingPoolLoadSheddingSessionPolicy) IsKnown() bool
type LoadBalancingPoolNotificationFilter ¶
type LoadBalancingPoolNotificationFilter struct { // Filter options for a particular resource type (pool or origin). Use null to // reset. Origin LoadBalancingPoolNotificationFilterOrigin `json:"origin,nullable"` // Filter options for a particular resource type (pool or origin). Use null to // reset. Pool LoadBalancingPoolNotificationFilterPool `json:"pool,nullable"` JSON loadBalancingPoolNotificationFilterJSON `json:"-"` }
Filter pool and origin health notifications by resource type or health status. Use null to reset.
func (*LoadBalancingPoolNotificationFilter) UnmarshalJSON ¶
func (r *LoadBalancingPoolNotificationFilter) UnmarshalJSON(data []byte) (err error)
type LoadBalancingPoolNotificationFilterOrigin ¶
type LoadBalancingPoolNotificationFilterOrigin struct { // If set true, disable notifications for this type of resource (pool or origin). Disable bool `json:"disable"` // If present, send notifications only for this health status (e.g. false for only // DOWN events). Use null to reset (all events). Healthy bool `json:"healthy,nullable"` JSON loadBalancingPoolNotificationFilterOriginJSON `json:"-"` }
Filter options for a particular resource type (pool or origin). Use null to reset.
func (*LoadBalancingPoolNotificationFilterOrigin) UnmarshalJSON ¶
func (r *LoadBalancingPoolNotificationFilterOrigin) UnmarshalJSON(data []byte) (err error)
type LoadBalancingPoolNotificationFilterPool ¶
type LoadBalancingPoolNotificationFilterPool struct { // If set true, disable notifications for this type of resource (pool or origin). Disable bool `json:"disable"` // If present, send notifications only for this health status (e.g. false for only // DOWN events). Use null to reset (all events). Healthy bool `json:"healthy,nullable"` JSON loadBalancingPoolNotificationFilterPoolJSON `json:"-"` }
Filter options for a particular resource type (pool or origin). Use null to reset.
func (*LoadBalancingPoolNotificationFilterPool) UnmarshalJSON ¶
func (r *LoadBalancingPoolNotificationFilterPool) UnmarshalJSON(data []byte) (err error)
type LoadBalancingPoolOrigin ¶
type LoadBalancingPoolOrigin struct { // The IP address (IPv4 or IPv6) of the origin, or its publicly addressable // hostname. Hostnames entered here should resolve directly to the origin, and not // be a hostname proxied by Cloudflare. To set an internal/reserved address, // virtual_network_id must also be set. Address string `json:"address"` // This field shows up only if the origin is disabled. This field is set with the // time the origin was disabled. DisabledAt time.Time `json:"disabled_at" format:"date-time"` // Whether to enable (the default) this origin within the pool. Disabled origins // will not receive traffic and are excluded from health checks. The origin will // only be disabled for the current pool. Enabled bool `json:"enabled"` // The request header is used to pass additional information with an HTTP request. // Currently supported header is 'Host'. Header LoadBalancingPoolOriginsHeader `json:"header"` // A human-identifiable name for the origin. Name string `json:"name"` // The virtual network subnet ID the origin belongs in. Virtual network must also // belong to the account. VirtualNetworkID string `json:"virtual_network_id"` // The weight of this origin relative to other origins in the pool. Based on the // configured weight the total traffic is distributed among origins within the // pool. // // - `origin_steering.policy="least_outstanding_requests"`: Use weight to scale the // origin's outstanding requests. // - `origin_steering.policy="least_connections"`: Use weight to scale the origin's // open connections. Weight float64 `json:"weight"` JSON loadBalancingPoolOriginJSON `json:"-"` }
func (*LoadBalancingPoolOrigin) UnmarshalJSON ¶
func (r *LoadBalancingPoolOrigin) UnmarshalJSON(data []byte) (err error)
type LoadBalancingPoolOriginSteering ¶
type LoadBalancingPoolOriginSteering struct { // The type of origin steering policy to use. // // - `"random"`: Select an origin randomly. // - `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP // address. // - `"least_outstanding_requests"`: Select an origin by taking into consideration // origin weights, as well as each origin's number of outstanding requests. // Origins with more pending requests are weighted proportionately less relative // to others. // - `"least_connections"`: Select an origin by taking into consideration origin // weights, as well as each origin's number of open connections. Origins with // more open connections are weighted proportionately less relative to others. // Supported for HTTP/1 and HTTP/2 connections. Policy LoadBalancingPoolOriginSteeringPolicy `json:"policy"` JSON loadBalancingPoolOriginSteeringJSON `json:"-"` }
Configures origin steering for the pool. Controls how origins are selected for new sessions and traffic without session affinity.
func (*LoadBalancingPoolOriginSteering) UnmarshalJSON ¶
func (r *LoadBalancingPoolOriginSteering) UnmarshalJSON(data []byte) (err error)
type LoadBalancingPoolOriginSteeringPolicy ¶
type LoadBalancingPoolOriginSteeringPolicy string
The type of origin steering policy to use.
- `"random"`: Select an origin randomly.
- `"hash"`: Select an origin by computing a hash over the CF-Connecting-IP address.
- `"least_outstanding_requests"`: Select an origin by taking into consideration origin weights, as well as each origin's number of outstanding requests. Origins with more pending requests are weighted proportionately less relative to others.
- `"least_connections"`: Select an origin by taking into consideration origin weights, as well as each origin's number of open connections. Origins with more open connections are weighted proportionately less relative to others. Supported for HTTP/1 and HTTP/2 connections.
const ( LoadBalancingPoolOriginSteeringPolicyRandom LoadBalancingPoolOriginSteeringPolicy = "random" LoadBalancingPoolOriginSteeringPolicyHash LoadBalancingPoolOriginSteeringPolicy = "hash" LoadBalancingPoolOriginSteeringPolicyLeastOutstandingRequests LoadBalancingPoolOriginSteeringPolicy = "least_outstanding_requests" LoadBalancingPoolOriginSteeringPolicyLeastConnections LoadBalancingPoolOriginSteeringPolicy = "least_connections" )
func (LoadBalancingPoolOriginSteeringPolicy) IsKnown ¶
func (r LoadBalancingPoolOriginSteeringPolicy) IsKnown() bool
type LoadBalancingPoolOriginsHeader ¶
type LoadBalancingPoolOriginsHeader struct { // The 'Host' header allows to override the hostname set in the HTTP request. // Current support is 1 'Host' header override per origin. Host []string `json:"Host"` JSON loadBalancingPoolOriginsHeaderJSON `json:"-"` }
The request header is used to pass additional information with an HTTP request. Currently supported header is 'Host'.
func (*LoadBalancingPoolOriginsHeader) UnmarshalJSON ¶
func (r *LoadBalancingPoolOriginsHeader) UnmarshalJSON(data []byte) (err error)
type LoadBalancingPreview ¶
type LoadBalancingPreview map[string]LoadBalancingPreviewItem
type LoadBalancingPreviewItem ¶
type LoadBalancingPreviewItem struct { Healthy bool `json:"healthy"` Origins []map[string]LoadBalancingPreviewOrigin `json:"origins"` JSON loadBalancingPreviewItemJSON `json:"-"` }
func (*LoadBalancingPreviewItem) UnmarshalJSON ¶
func (r *LoadBalancingPreviewItem) UnmarshalJSON(data []byte) (err error)
type LoadBalancingPreviewOrigin ¶
type LoadBalancingPreviewOrigin struct { FailureReason string `json:"failure_reason"` Healthy bool `json:"healthy"` ResponseCode float64 `json:"response_code"` RTT string `json:"rtt"` JSON loadBalancingPreviewOriginJSON `json:"-"` }
The origin ipv4/ipv6 address or domain name mapped to it's health data.
func (*LoadBalancingPreviewOrigin) UnmarshalJSON ¶
func (r *LoadBalancingPreviewOrigin) UnmarshalJSON(data []byte) (err error)
type Organization ¶
type Organization struct { // Identifier ID string `json:"id"` // Organization name. Name string `json:"name"` // Access permissions for this User. Permissions []string `json:"permissions"` // List of roles that a user has within an organization. Roles []string `json:"roles"` // Whether the user is a member of the organization or has an inivitation pending. Status OrganizationStatus `json:"status"` JSON organizationJSON `json:"-"` }
func (*Organization) UnmarshalJSON ¶
func (r *Organization) UnmarshalJSON(data []byte) (err error)
type OrganizationDeleteResponse ¶
type OrganizationDeleteResponse struct { // Identifier ID string `json:"id"` JSON organizationDeleteResponseJSON `json:"-"` }
func (*OrganizationDeleteResponse) UnmarshalJSON ¶
func (r *OrganizationDeleteResponse) UnmarshalJSON(data []byte) (err error)
type OrganizationGetResponse ¶ added in v2.3.0
type OrganizationGetResponse interface {
ImplementsUserOrganizationGetResponse()
}
Union satisfied by user.OrganizationGetResponseUnknown or shared.UnionString.
type OrganizationGetResponseEnvelope ¶
type OrganizationGetResponseEnvelope struct { Errors []OrganizationGetResponseEnvelopeErrors `json:"errors,required"` Messages []OrganizationGetResponseEnvelopeMessages `json:"messages,required"` Result OrganizationGetResponse `json:"result,required"` // Whether the API call was successful Success OrganizationGetResponseEnvelopeSuccess `json:"success,required"` JSON organizationGetResponseEnvelopeJSON `json:"-"` }
func (*OrganizationGetResponseEnvelope) UnmarshalJSON ¶
func (r *OrganizationGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type OrganizationGetResponseEnvelopeErrors ¶
type OrganizationGetResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON organizationGetResponseEnvelopeErrorsJSON `json:"-"` }
func (*OrganizationGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *OrganizationGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type OrganizationGetResponseEnvelopeMessages ¶
type OrganizationGetResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON organizationGetResponseEnvelopeMessagesJSON `json:"-"` }
func (*OrganizationGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *OrganizationGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type OrganizationGetResponseEnvelopeSuccess ¶
type OrganizationGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
OrganizationGetResponseEnvelopeSuccessTrue OrganizationGetResponseEnvelopeSuccess = true
)
func (OrganizationGetResponseEnvelopeSuccess) IsKnown ¶
func (r OrganizationGetResponseEnvelopeSuccess) IsKnown() bool
type OrganizationListParams ¶
type OrganizationListParams struct { // Direction to order organizations. Direction param.Field[OrganizationListParamsDirection] `query:"direction"` // Whether to match all search requirements or at least one (any). Match param.Field[OrganizationListParamsMatch] `query:"match"` // Organization name. Name param.Field[string] `query:"name"` // Field to order organizations by. Order param.Field[OrganizationListParamsOrder] `query:"order"` // Page number of paginated results. Page param.Field[float64] `query:"page"` // Number of organizations per page. PerPage param.Field[float64] `query:"per_page"` // Whether the user is a member of the organization or has an inivitation pending. Status param.Field[OrganizationListParamsStatus] `query:"status"` }
func (OrganizationListParams) URLQuery ¶
func (r OrganizationListParams) URLQuery() (v url.Values)
URLQuery serializes OrganizationListParams's query parameters as `url.Values`.
type OrganizationListParamsDirection ¶
type OrganizationListParamsDirection string
Direction to order organizations.
const ( OrganizationListParamsDirectionAsc OrganizationListParamsDirection = "asc" OrganizationListParamsDirectionDesc OrganizationListParamsDirection = "desc" )
func (OrganizationListParamsDirection) IsKnown ¶
func (r OrganizationListParamsDirection) IsKnown() bool
type OrganizationListParamsMatch ¶
type OrganizationListParamsMatch string
Whether to match all search requirements or at least one (any).
const ( OrganizationListParamsMatchAny OrganizationListParamsMatch = "any" OrganizationListParamsMatchAll OrganizationListParamsMatch = "all" )
func (OrganizationListParamsMatch) IsKnown ¶
func (r OrganizationListParamsMatch) IsKnown() bool
type OrganizationListParamsOrder ¶
type OrganizationListParamsOrder string
Field to order organizations by.
const ( OrganizationListParamsOrderID OrganizationListParamsOrder = "id" OrganizationListParamsOrderName OrganizationListParamsOrder = "name" OrganizationListParamsOrderStatus OrganizationListParamsOrder = "status" )
func (OrganizationListParamsOrder) IsKnown ¶
func (r OrganizationListParamsOrder) IsKnown() bool
type OrganizationListParamsStatus ¶
type OrganizationListParamsStatus string
Whether the user is a member of the organization or has an inivitation pending.
const ( OrganizationListParamsStatusMember OrganizationListParamsStatus = "member" OrganizationListParamsStatusInvited OrganizationListParamsStatus = "invited" )
func (OrganizationListParamsStatus) IsKnown ¶
func (r OrganizationListParamsStatus) IsKnown() bool
type OrganizationService ¶
type OrganizationService struct {
Options []option.RequestOption
}
OrganizationService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewOrganizationService method instead.
func NewOrganizationService ¶
func NewOrganizationService(opts ...option.RequestOption) (r *OrganizationService)
NewOrganizationService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*OrganizationService) Delete ¶
func (r *OrganizationService) Delete(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationDeleteResponse, err error)
Removes association to an organization.
func (*OrganizationService) Get ¶
func (r *OrganizationService) Get(ctx context.Context, organizationID string, opts ...option.RequestOption) (res *OrganizationGetResponse, err error)
Gets a specific organization the user is associated with.
func (*OrganizationService) List ¶
func (r *OrganizationService) List(ctx context.Context, query OrganizationListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[Organization], err error)
Lists organizations the user is associated with.
func (*OrganizationService) ListAutoPaging ¶
func (r *OrganizationService) ListAutoPaging(ctx context.Context, query OrganizationListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[Organization]
Lists organizations the user is associated with.
type OrganizationStatus ¶
type OrganizationStatus string
Whether the user is a member of the organization or has an inivitation pending.
const ( OrganizationStatusMember OrganizationStatus = "member" OrganizationStatusInvited OrganizationStatus = "invited" )
func (OrganizationStatus) IsKnown ¶
func (r OrganizationStatus) IsKnown() bool
type SubscriptionDeleteResponse ¶
type SubscriptionDeleteResponse struct { // Subscription identifier tag. SubscriptionID string `json:"subscription_id"` JSON subscriptionDeleteResponseJSON `json:"-"` }
func (*SubscriptionDeleteResponse) UnmarshalJSON ¶
func (r *SubscriptionDeleteResponse) UnmarshalJSON(data []byte) (err error)
type SubscriptionEditParams ¶
type SubscriptionEditParams struct { App param.Field[SubscriptionEditParamsApp] `json:"app"` // The list of add-ons subscribed to. ComponentValues param.Field[[]SubscriptionEditParamsComponentValue] `json:"component_values"` // How often the subscription is renewed automatically. Frequency param.Field[SubscriptionEditParamsFrequency] `json:"frequency"` // The rate plan applied to the subscription. RatePlan param.Field[SubscriptionEditParamsRatePlan] `json:"rate_plan"` // A simple zone object. May have null properties if not a zone subscription. Zone param.Field[SubscriptionEditParamsZone] `json:"zone"` }
func (SubscriptionEditParams) MarshalJSON ¶
func (r SubscriptionEditParams) MarshalJSON() (data []byte, err error)
type SubscriptionEditParamsApp ¶
type SubscriptionEditParamsApp struct { // app install id. InstallID param.Field[string] `json:"install_id"` }
func (SubscriptionEditParamsApp) MarshalJSON ¶
func (r SubscriptionEditParamsApp) MarshalJSON() (data []byte, err error)
type SubscriptionEditParamsComponentValue ¶
type SubscriptionEditParamsComponentValue struct { // The default amount assigned. Default param.Field[float64] `json:"default"` // The name of the component value. Name param.Field[string] `json:"name"` // The unit price for the component value. Price param.Field[float64] `json:"price"` // The amount of the component value assigned. Value param.Field[float64] `json:"value"` }
A component value for a subscription.
func (SubscriptionEditParamsComponentValue) MarshalJSON ¶
func (r SubscriptionEditParamsComponentValue) MarshalJSON() (data []byte, err error)
type SubscriptionEditParamsFrequency ¶
type SubscriptionEditParamsFrequency string
How often the subscription is renewed automatically.
const ( SubscriptionEditParamsFrequencyWeekly SubscriptionEditParamsFrequency = "weekly" SubscriptionEditParamsFrequencyMonthly SubscriptionEditParamsFrequency = "monthly" SubscriptionEditParamsFrequencyQuarterly SubscriptionEditParamsFrequency = "quarterly" SubscriptionEditParamsFrequencyYearly SubscriptionEditParamsFrequency = "yearly" )
func (SubscriptionEditParamsFrequency) IsKnown ¶
func (r SubscriptionEditParamsFrequency) IsKnown() bool
type SubscriptionEditParamsRatePlan ¶
type SubscriptionEditParamsRatePlan struct { // The ID of the rate plan. ID param.Field[string] `json:"id"` // The currency applied to the rate plan subscription. Currency param.Field[string] `json:"currency"` // Whether this rate plan is managed externally from Cloudflare. ExternallyManaged param.Field[bool] `json:"externally_managed"` // Whether a rate plan is enterprise-based (or newly adopted term contract). IsContract param.Field[bool] `json:"is_contract"` // The full name of the rate plan. PublicName param.Field[string] `json:"public_name"` // The scope that this rate plan applies to. Scope param.Field[string] `json:"scope"` // The list of sets this rate plan applies to. Sets param.Field[[]string] `json:"sets"` }
The rate plan applied to the subscription.
func (SubscriptionEditParamsRatePlan) MarshalJSON ¶
func (r SubscriptionEditParamsRatePlan) MarshalJSON() (data []byte, err error)
type SubscriptionEditParamsZone ¶
type SubscriptionEditParamsZone struct { }
A simple zone object. May have null properties if not a zone subscription.
func (SubscriptionEditParamsZone) MarshalJSON ¶
func (r SubscriptionEditParamsZone) MarshalJSON() (data []byte, err error)
type SubscriptionEditResponse ¶
type SubscriptionEditResponse interface {
ImplementsUserSubscriptionEditResponse()
}
Union satisfied by user.SubscriptionEditResponseUnknown or shared.UnionString.
type SubscriptionEditResponseEnvelope ¶
type SubscriptionEditResponseEnvelope struct { Errors []SubscriptionEditResponseEnvelopeErrors `json:"errors,required"` Messages []SubscriptionEditResponseEnvelopeMessages `json:"messages,required"` Result SubscriptionEditResponse `json:"result,required"` // Whether the API call was successful Success SubscriptionEditResponseEnvelopeSuccess `json:"success,required"` JSON subscriptionEditResponseEnvelopeJSON `json:"-"` }
func (*SubscriptionEditResponseEnvelope) UnmarshalJSON ¶
func (r *SubscriptionEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type SubscriptionEditResponseEnvelopeErrors ¶
type SubscriptionEditResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON subscriptionEditResponseEnvelopeErrorsJSON `json:"-"` }
func (*SubscriptionEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *SubscriptionEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type SubscriptionEditResponseEnvelopeMessages ¶
type SubscriptionEditResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON subscriptionEditResponseEnvelopeMessagesJSON `json:"-"` }
func (*SubscriptionEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *SubscriptionEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type SubscriptionEditResponseEnvelopeSuccess ¶
type SubscriptionEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
SubscriptionEditResponseEnvelopeSuccessTrue SubscriptionEditResponseEnvelopeSuccess = true
)
func (SubscriptionEditResponseEnvelopeSuccess) IsKnown ¶
func (r SubscriptionEditResponseEnvelopeSuccess) IsKnown() bool
type SubscriptionGetResponse ¶
type SubscriptionGetResponse struct { // Subscription identifier tag. ID string `json:"id"` App SubscriptionGetResponseApp `json:"app"` // The list of add-ons subscribed to. ComponentValues []SubscriptionGetResponseComponentValue `json:"component_values"` // The monetary unit in which pricing information is displayed. Currency string `json:"currency"` // The end of the current period and also when the next billing is due. CurrentPeriodEnd time.Time `json:"current_period_end" format:"date-time"` // When the current billing period started. May match initial_period_start if this // is the first period. CurrentPeriodStart time.Time `json:"current_period_start" format:"date-time"` // How often the subscription is renewed automatically. Frequency SubscriptionGetResponseFrequency `json:"frequency"` // The price of the subscription that will be billed, in US dollars. Price float64 `json:"price"` // The rate plan applied to the subscription. RatePlan SubscriptionGetResponseRatePlan `json:"rate_plan"` // The state that the subscription is in. State SubscriptionGetResponseState `json:"state"` // A simple zone object. May have null properties if not a zone subscription. Zone SubscriptionGetResponseZone `json:"zone"` JSON subscriptionGetResponseJSON `json:"-"` }
func (*SubscriptionGetResponse) UnmarshalJSON ¶
func (r *SubscriptionGetResponse) UnmarshalJSON(data []byte) (err error)
type SubscriptionGetResponseApp ¶
type SubscriptionGetResponseApp struct { // app install id. InstallID string `json:"install_id"` JSON subscriptionGetResponseAppJSON `json:"-"` }
func (*SubscriptionGetResponseApp) UnmarshalJSON ¶
func (r *SubscriptionGetResponseApp) UnmarshalJSON(data []byte) (err error)
type SubscriptionGetResponseComponentValue ¶
type SubscriptionGetResponseComponentValue struct { // The default amount assigned. Default float64 `json:"default"` // The name of the component value. Name string `json:"name"` // The unit price for the component value. Price float64 `json:"price"` // The amount of the component value assigned. Value float64 `json:"value"` JSON subscriptionGetResponseComponentValueJSON `json:"-"` }
A component value for a subscription.
func (*SubscriptionGetResponseComponentValue) UnmarshalJSON ¶
func (r *SubscriptionGetResponseComponentValue) UnmarshalJSON(data []byte) (err error)
type SubscriptionGetResponseEnvelope ¶
type SubscriptionGetResponseEnvelope struct { Errors []SubscriptionGetResponseEnvelopeErrors `json:"errors,required"` Messages []SubscriptionGetResponseEnvelopeMessages `json:"messages,required"` Result []SubscriptionGetResponse `json:"result,required,nullable"` // Whether the API call was successful Success SubscriptionGetResponseEnvelopeSuccess `json:"success,required"` ResultInfo SubscriptionGetResponseEnvelopeResultInfo `json:"result_info"` JSON subscriptionGetResponseEnvelopeJSON `json:"-"` }
func (*SubscriptionGetResponseEnvelope) UnmarshalJSON ¶
func (r *SubscriptionGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type SubscriptionGetResponseEnvelopeErrors ¶
type SubscriptionGetResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON subscriptionGetResponseEnvelopeErrorsJSON `json:"-"` }
func (*SubscriptionGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *SubscriptionGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type SubscriptionGetResponseEnvelopeMessages ¶
type SubscriptionGetResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON subscriptionGetResponseEnvelopeMessagesJSON `json:"-"` }
func (*SubscriptionGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *SubscriptionGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type SubscriptionGetResponseEnvelopeResultInfo ¶
type SubscriptionGetResponseEnvelopeResultInfo struct { // Total number of results for the requested service Count float64 `json:"count"` // Current page within paginated list of results Page float64 `json:"page"` // Number of results per page of results PerPage float64 `json:"per_page"` // Total results available without any search parameters TotalCount float64 `json:"total_count"` JSON subscriptionGetResponseEnvelopeResultInfoJSON `json:"-"` }
func (*SubscriptionGetResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *SubscriptionGetResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type SubscriptionGetResponseEnvelopeSuccess ¶
type SubscriptionGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
SubscriptionGetResponseEnvelopeSuccessTrue SubscriptionGetResponseEnvelopeSuccess = true
)
func (SubscriptionGetResponseEnvelopeSuccess) IsKnown ¶
func (r SubscriptionGetResponseEnvelopeSuccess) IsKnown() bool
type SubscriptionGetResponseFrequency ¶
type SubscriptionGetResponseFrequency string
How often the subscription is renewed automatically.
const ( SubscriptionGetResponseFrequencyWeekly SubscriptionGetResponseFrequency = "weekly" SubscriptionGetResponseFrequencyMonthly SubscriptionGetResponseFrequency = "monthly" SubscriptionGetResponseFrequencyQuarterly SubscriptionGetResponseFrequency = "quarterly" SubscriptionGetResponseFrequencyYearly SubscriptionGetResponseFrequency = "yearly" )
func (SubscriptionGetResponseFrequency) IsKnown ¶
func (r SubscriptionGetResponseFrequency) IsKnown() bool
type SubscriptionGetResponseRatePlan ¶
type SubscriptionGetResponseRatePlan struct { // The ID of the rate plan. ID string `json:"id"` // The currency applied to the rate plan subscription. Currency string `json:"currency"` // Whether this rate plan is managed externally from Cloudflare. ExternallyManaged bool `json:"externally_managed"` // Whether a rate plan is enterprise-based (or newly adopted term contract). IsContract bool `json:"is_contract"` // The full name of the rate plan. PublicName string `json:"public_name"` // The scope that this rate plan applies to. Scope string `json:"scope"` // The list of sets this rate plan applies to. Sets []string `json:"sets"` JSON subscriptionGetResponseRatePlanJSON `json:"-"` }
The rate plan applied to the subscription.
func (*SubscriptionGetResponseRatePlan) UnmarshalJSON ¶
func (r *SubscriptionGetResponseRatePlan) UnmarshalJSON(data []byte) (err error)
type SubscriptionGetResponseState ¶
type SubscriptionGetResponseState string
The state that the subscription is in.
const ( SubscriptionGetResponseStateTrial SubscriptionGetResponseState = "Trial" SubscriptionGetResponseStateProvisioned SubscriptionGetResponseState = "Provisioned" SubscriptionGetResponseStatePaid SubscriptionGetResponseState = "Paid" SubscriptionGetResponseStateAwaitingPayment SubscriptionGetResponseState = "AwaitingPayment" SubscriptionGetResponseStateCancelled SubscriptionGetResponseState = "Cancelled" SubscriptionGetResponseStateFailed SubscriptionGetResponseState = "Failed" SubscriptionGetResponseStateExpired SubscriptionGetResponseState = "Expired" )
func (SubscriptionGetResponseState) IsKnown ¶
func (r SubscriptionGetResponseState) IsKnown() bool
type SubscriptionGetResponseZone ¶
type SubscriptionGetResponseZone struct { // Identifier ID string `json:"id"` // The domain name Name string `json:"name"` JSON subscriptionGetResponseZoneJSON `json:"-"` }
A simple zone object. May have null properties if not a zone subscription.
func (*SubscriptionGetResponseZone) UnmarshalJSON ¶
func (r *SubscriptionGetResponseZone) UnmarshalJSON(data []byte) (err error)
type SubscriptionService ¶
type SubscriptionService struct {
Options []option.RequestOption
}
SubscriptionService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSubscriptionService method instead.
func NewSubscriptionService ¶
func NewSubscriptionService(opts ...option.RequestOption) (r *SubscriptionService)
NewSubscriptionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*SubscriptionService) Delete ¶
func (r *SubscriptionService) Delete(ctx context.Context, identifier string, opts ...option.RequestOption) (res *SubscriptionDeleteResponse, err error)
Deletes a user's subscription.
func (*SubscriptionService) Edit ¶
func (r *SubscriptionService) Edit(ctx context.Context, identifier string, body SubscriptionEditParams, opts ...option.RequestOption) (res *SubscriptionEditResponse, err error)
Updates zone subscriptions, either plan or add-ons.
func (*SubscriptionService) Get ¶
func (r *SubscriptionService) Get(ctx context.Context, opts ...option.RequestOption) (res *[]SubscriptionGetResponse, err error)
Lists all of a user's subscriptions.
func (*SubscriptionService) Update ¶
func (r *SubscriptionService) Update(ctx context.Context, identifier string, body SubscriptionUpdateParams, opts ...option.RequestOption) (res *SubscriptionUpdateResponse, err error)
Updates a user's subscriptions.
type SubscriptionUpdateParams ¶
type SubscriptionUpdateParams struct { App param.Field[SubscriptionUpdateParamsApp] `json:"app"` // The list of add-ons subscribed to. ComponentValues param.Field[[]SubscriptionUpdateParamsComponentValue] `json:"component_values"` // How often the subscription is renewed automatically. Frequency param.Field[SubscriptionUpdateParamsFrequency] `json:"frequency"` // The rate plan applied to the subscription. RatePlan param.Field[SubscriptionUpdateParamsRatePlan] `json:"rate_plan"` // A simple zone object. May have null properties if not a zone subscription. Zone param.Field[SubscriptionUpdateParamsZone] `json:"zone"` }
func (SubscriptionUpdateParams) MarshalJSON ¶
func (r SubscriptionUpdateParams) MarshalJSON() (data []byte, err error)
type SubscriptionUpdateParamsApp ¶
type SubscriptionUpdateParamsApp struct { // app install id. InstallID param.Field[string] `json:"install_id"` }
func (SubscriptionUpdateParamsApp) MarshalJSON ¶
func (r SubscriptionUpdateParamsApp) MarshalJSON() (data []byte, err error)
type SubscriptionUpdateParamsComponentValue ¶
type SubscriptionUpdateParamsComponentValue struct { // The default amount assigned. Default param.Field[float64] `json:"default"` // The name of the component value. Name param.Field[string] `json:"name"` // The unit price for the component value. Price param.Field[float64] `json:"price"` // The amount of the component value assigned. Value param.Field[float64] `json:"value"` }
A component value for a subscription.
func (SubscriptionUpdateParamsComponentValue) MarshalJSON ¶
func (r SubscriptionUpdateParamsComponentValue) MarshalJSON() (data []byte, err error)
type SubscriptionUpdateParamsFrequency ¶
type SubscriptionUpdateParamsFrequency string
How often the subscription is renewed automatically.
const ( SubscriptionUpdateParamsFrequencyWeekly SubscriptionUpdateParamsFrequency = "weekly" SubscriptionUpdateParamsFrequencyMonthly SubscriptionUpdateParamsFrequency = "monthly" SubscriptionUpdateParamsFrequencyQuarterly SubscriptionUpdateParamsFrequency = "quarterly" SubscriptionUpdateParamsFrequencyYearly SubscriptionUpdateParamsFrequency = "yearly" )
func (SubscriptionUpdateParamsFrequency) IsKnown ¶
func (r SubscriptionUpdateParamsFrequency) IsKnown() bool
type SubscriptionUpdateParamsRatePlan ¶
type SubscriptionUpdateParamsRatePlan struct { // The ID of the rate plan. ID param.Field[string] `json:"id"` // The currency applied to the rate plan subscription. Currency param.Field[string] `json:"currency"` // Whether this rate plan is managed externally from Cloudflare. ExternallyManaged param.Field[bool] `json:"externally_managed"` // Whether a rate plan is enterprise-based (or newly adopted term contract). IsContract param.Field[bool] `json:"is_contract"` // The full name of the rate plan. PublicName param.Field[string] `json:"public_name"` // The scope that this rate plan applies to. Scope param.Field[string] `json:"scope"` // The list of sets this rate plan applies to. Sets param.Field[[]string] `json:"sets"` }
The rate plan applied to the subscription.
func (SubscriptionUpdateParamsRatePlan) MarshalJSON ¶
func (r SubscriptionUpdateParamsRatePlan) MarshalJSON() (data []byte, err error)
type SubscriptionUpdateParamsZone ¶
type SubscriptionUpdateParamsZone struct { }
A simple zone object. May have null properties if not a zone subscription.
func (SubscriptionUpdateParamsZone) MarshalJSON ¶
func (r SubscriptionUpdateParamsZone) MarshalJSON() (data []byte, err error)
type SubscriptionUpdateResponse ¶
type SubscriptionUpdateResponse interface {
ImplementsUserSubscriptionUpdateResponse()
}
Union satisfied by user.SubscriptionUpdateResponseUnknown or shared.UnionString.
type SubscriptionUpdateResponseEnvelope ¶
type SubscriptionUpdateResponseEnvelope struct { Errors []SubscriptionUpdateResponseEnvelopeErrors `json:"errors,required"` Messages []SubscriptionUpdateResponseEnvelopeMessages `json:"messages,required"` Result SubscriptionUpdateResponse `json:"result,required"` // Whether the API call was successful Success SubscriptionUpdateResponseEnvelopeSuccess `json:"success,required"` JSON subscriptionUpdateResponseEnvelopeJSON `json:"-"` }
func (*SubscriptionUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *SubscriptionUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type SubscriptionUpdateResponseEnvelopeErrors ¶
type SubscriptionUpdateResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON subscriptionUpdateResponseEnvelopeErrorsJSON `json:"-"` }
func (*SubscriptionUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *SubscriptionUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type SubscriptionUpdateResponseEnvelopeMessages ¶
type SubscriptionUpdateResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON subscriptionUpdateResponseEnvelopeMessagesJSON `json:"-"` }
func (*SubscriptionUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *SubscriptionUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type SubscriptionUpdateResponseEnvelopeSuccess ¶
type SubscriptionUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
SubscriptionUpdateResponseEnvelopeSuccessTrue SubscriptionUpdateResponseEnvelopeSuccess = true
)
func (SubscriptionUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r SubscriptionUpdateResponseEnvelopeSuccess) IsKnown() bool
type TokenDeleteResponse ¶
type TokenDeleteResponse struct { // Identifier ID string `json:"id,required"` JSON tokenDeleteResponseJSON `json:"-"` }
func (*TokenDeleteResponse) UnmarshalJSON ¶
func (r *TokenDeleteResponse) UnmarshalJSON(data []byte) (err error)
type TokenDeleteResponseEnvelope ¶
type TokenDeleteResponseEnvelope struct { Errors []TokenDeleteResponseEnvelopeErrors `json:"errors,required"` Messages []TokenDeleteResponseEnvelopeMessages `json:"messages,required"` Result TokenDeleteResponse `json:"result,required,nullable"` // Whether the API call was successful Success TokenDeleteResponseEnvelopeSuccess `json:"success,required"` JSON tokenDeleteResponseEnvelopeJSON `json:"-"` }
func (*TokenDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *TokenDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenDeleteResponseEnvelopeErrors ¶
type TokenDeleteResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON tokenDeleteResponseEnvelopeErrorsJSON `json:"-"` }
func (*TokenDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *TokenDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TokenDeleteResponseEnvelopeMessages ¶
type TokenDeleteResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON tokenDeleteResponseEnvelopeMessagesJSON `json:"-"` }
func (*TokenDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *TokenDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TokenDeleteResponseEnvelopeSuccess ¶
type TokenDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
TokenDeleteResponseEnvelopeSuccessTrue TokenDeleteResponseEnvelopeSuccess = true
)
func (TokenDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r TokenDeleteResponseEnvelopeSuccess) IsKnown() bool
type TokenGetResponse ¶ added in v2.3.0
type TokenGetResponse interface {
ImplementsUserTokenGetResponse()
}
Union satisfied by user.TokenGetResponseUnknown or shared.UnionString.
type TokenGetResponseEnvelope ¶
type TokenGetResponseEnvelope struct { Errors []TokenGetResponseEnvelopeErrors `json:"errors,required"` Messages []TokenGetResponseEnvelopeMessages `json:"messages,required"` Result TokenGetResponse `json:"result,required"` // Whether the API call was successful Success TokenGetResponseEnvelopeSuccess `json:"success,required"` JSON tokenGetResponseEnvelopeJSON `json:"-"` }
func (*TokenGetResponseEnvelope) UnmarshalJSON ¶
func (r *TokenGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenGetResponseEnvelopeErrors ¶
type TokenGetResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON tokenGetResponseEnvelopeErrorsJSON `json:"-"` }
func (*TokenGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *TokenGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TokenGetResponseEnvelopeMessages ¶
type TokenGetResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON tokenGetResponseEnvelopeMessagesJSON `json:"-"` }
func (*TokenGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *TokenGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TokenGetResponseEnvelopeSuccess ¶
type TokenGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
TokenGetResponseEnvelopeSuccessTrue TokenGetResponseEnvelopeSuccess = true
)
func (TokenGetResponseEnvelopeSuccess) IsKnown ¶
func (r TokenGetResponseEnvelopeSuccess) IsKnown() bool
type TokenListParams ¶
type TokenListParams struct { // Direction to order results. Direction param.Field[TokenListParamsDirection] `query:"direction"` // Page number of paginated results. Page param.Field[float64] `query:"page"` // Maximum number of results per page. PerPage param.Field[float64] `query:"per_page"` }
func (TokenListParams) URLQuery ¶
func (r TokenListParams) URLQuery() (v url.Values)
URLQuery serializes TokenListParams's query parameters as `url.Values`.
type TokenListParamsDirection ¶
type TokenListParamsDirection string
Direction to order results.
const ( TokenListParamsDirectionAsc TokenListParamsDirection = "asc" TokenListParamsDirectionDesc TokenListParamsDirection = "desc" )
func (TokenListParamsDirection) IsKnown ¶
func (r TokenListParamsDirection) IsKnown() bool
type TokenListResponse ¶
type TokenListResponse = interface{}
type TokenNewParams ¶
type TokenNewParams struct { // Token name. Name param.Field[string] `json:"name,required"` // List of access policies assigned to the token. Policies param.Field[[]TokenNewParamsPolicy] `json:"policies,required"` Condition param.Field[TokenNewParamsCondition] `json:"condition"` // The expiration time on or after which the JWT MUST NOT be accepted for // processing. ExpiresOn param.Field[time.Time] `json:"expires_on" format:"date-time"` // The time before which the token MUST NOT be accepted for processing. NotBefore param.Field[time.Time] `json:"not_before" format:"date-time"` }
func (TokenNewParams) MarshalJSON ¶
func (r TokenNewParams) MarshalJSON() (data []byte, err error)
type TokenNewParamsCondition ¶
type TokenNewParamsCondition struct { // Client IP restrictions. RequestIP param.Field[TokenNewParamsConditionRequestIP] `json:"request_ip"` }
func (TokenNewParamsCondition) MarshalJSON ¶
func (r TokenNewParamsCondition) MarshalJSON() (data []byte, err error)
type TokenNewParamsConditionRequestIP ¶
type TokenNewParamsConditionRequestIP struct { // List of IPv4/IPv6 CIDR addresses. In param.Field[[]string] `json:"in"` // List of IPv4/IPv6 CIDR addresses. NotIn param.Field[[]string] `json:"not_in"` }
Client IP restrictions.
func (TokenNewParamsConditionRequestIP) MarshalJSON ¶
func (r TokenNewParamsConditionRequestIP) MarshalJSON() (data []byte, err error)
type TokenNewParamsPoliciesEffect ¶
type TokenNewParamsPoliciesEffect string
Allow or deny operations against the resources.
const ( TokenNewParamsPoliciesEffectAllow TokenNewParamsPoliciesEffect = "allow" TokenNewParamsPoliciesEffectDeny TokenNewParamsPoliciesEffect = "deny" )
func (TokenNewParamsPoliciesEffect) IsKnown ¶
func (r TokenNewParamsPoliciesEffect) IsKnown() bool
type TokenNewParamsPoliciesPermissionGroup ¶
type TokenNewParamsPoliciesPermissionGroup struct { }
A named group of permissions that map to a group of operations against resources.
func (TokenNewParamsPoliciesPermissionGroup) MarshalJSON ¶
func (r TokenNewParamsPoliciesPermissionGroup) MarshalJSON() (data []byte, err error)
type TokenNewParamsPolicy ¶
type TokenNewParamsPolicy struct { // Allow or deny operations against the resources. Effect param.Field[TokenNewParamsPoliciesEffect] `json:"effect,required"` // A set of permission groups that are specified to the policy. PermissionGroups param.Field[[]TokenNewParamsPoliciesPermissionGroup] `json:"permission_groups,required"` // A list of resource names that the policy applies to. Resources param.Field[interface{}] `json:"resources,required"` }
func (TokenNewParamsPolicy) MarshalJSON ¶
func (r TokenNewParamsPolicy) MarshalJSON() (data []byte, err error)
type TokenNewResponse ¶
type TokenNewResponse struct { // The token value. Value TokenValue `json:"value"` JSON tokenNewResponseJSON `json:"-"` }
func (*TokenNewResponse) UnmarshalJSON ¶
func (r *TokenNewResponse) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseEnvelope ¶
type TokenNewResponseEnvelope struct { Errors []TokenNewResponseEnvelopeErrors `json:"errors,required"` Messages []TokenNewResponseEnvelopeMessages `json:"messages,required"` Result TokenNewResponse `json:"result,required"` // Whether the API call was successful Success TokenNewResponseEnvelopeSuccess `json:"success,required"` JSON tokenNewResponseEnvelopeJSON `json:"-"` }
func (*TokenNewResponseEnvelope) UnmarshalJSON ¶
func (r *TokenNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseEnvelopeErrors ¶
type TokenNewResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON tokenNewResponseEnvelopeErrorsJSON `json:"-"` }
func (*TokenNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *TokenNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseEnvelopeMessages ¶
type TokenNewResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON tokenNewResponseEnvelopeMessagesJSON `json:"-"` }
func (*TokenNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *TokenNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TokenNewResponseEnvelopeSuccess ¶
type TokenNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
TokenNewResponseEnvelopeSuccessTrue TokenNewResponseEnvelopeSuccess = true
)
func (TokenNewResponseEnvelopeSuccess) IsKnown ¶
func (r TokenNewResponseEnvelopeSuccess) IsKnown() bool
type TokenPermissionGroupListResponse ¶
type TokenPermissionGroupListResponse = interface{}
type TokenPermissionGroupService ¶
type TokenPermissionGroupService struct {
Options []option.RequestOption
}
TokenPermissionGroupService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTokenPermissionGroupService method instead.
func NewTokenPermissionGroupService ¶
func NewTokenPermissionGroupService(opts ...option.RequestOption) (r *TokenPermissionGroupService)
NewTokenPermissionGroupService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TokenPermissionGroupService) List ¶
func (r *TokenPermissionGroupService) List(ctx context.Context, opts ...option.RequestOption) (res *pagination.SinglePage[TokenPermissionGroupListResponse], err error)
Find all available permission groups.
func (*TokenPermissionGroupService) ListAutoPaging ¶
func (r *TokenPermissionGroupService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *pagination.SinglePageAutoPager[TokenPermissionGroupListResponse]
Find all available permission groups.
type TokenService ¶
type TokenService struct { Options []option.RequestOption PermissionGroups *TokenPermissionGroupService Value *TokenValueService }
TokenService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTokenService method instead.
func NewTokenService ¶
func NewTokenService(opts ...option.RequestOption) (r *TokenService)
NewTokenService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TokenService) Delete ¶
func (r *TokenService) Delete(ctx context.Context, tokenID interface{}, opts ...option.RequestOption) (res *TokenDeleteResponse, err error)
Destroy a token.
func (*TokenService) Get ¶
func (r *TokenService) Get(ctx context.Context, tokenID interface{}, opts ...option.RequestOption) (res *TokenGetResponse, err error)
Get information about a specific token.
func (*TokenService) List ¶
func (r *TokenService) List(ctx context.Context, query TokenListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[TokenListResponse], err error)
List all access tokens you created.
func (*TokenService) ListAutoPaging ¶
func (r *TokenService) ListAutoPaging(ctx context.Context, query TokenListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[TokenListResponse]
List all access tokens you created.
func (*TokenService) New ¶
func (r *TokenService) New(ctx context.Context, body TokenNewParams, opts ...option.RequestOption) (res *TokenNewResponse, err error)
Create a new access token.
func (*TokenService) Update ¶
func (r *TokenService) Update(ctx context.Context, tokenID interface{}, body TokenUpdateParams, opts ...option.RequestOption) (res *TokenUpdateResponse, err error)
Update an existing token.
func (*TokenService) Verify ¶
func (r *TokenService) Verify(ctx context.Context, opts ...option.RequestOption) (res *TokenVerifyResponse, err error)
Test whether a token works.
type TokenUpdateParams ¶
type TokenUpdateParams struct { // Token name. Name param.Field[string] `json:"name,required"` // List of access policies assigned to the token. Policies param.Field[[]TokenUpdateParamsPolicy] `json:"policies,required"` // Status of the token. Status param.Field[TokenUpdateParamsStatus] `json:"status,required"` Condition param.Field[TokenUpdateParamsCondition] `json:"condition"` // The expiration time on or after which the JWT MUST NOT be accepted for // processing. ExpiresOn param.Field[time.Time] `json:"expires_on" format:"date-time"` // The time before which the token MUST NOT be accepted for processing. NotBefore param.Field[time.Time] `json:"not_before" format:"date-time"` }
func (TokenUpdateParams) MarshalJSON ¶
func (r TokenUpdateParams) MarshalJSON() (data []byte, err error)
type TokenUpdateParamsCondition ¶
type TokenUpdateParamsCondition struct { // Client IP restrictions. RequestIP param.Field[TokenUpdateParamsConditionRequestIP] `json:"request_ip"` }
func (TokenUpdateParamsCondition) MarshalJSON ¶
func (r TokenUpdateParamsCondition) MarshalJSON() (data []byte, err error)
type TokenUpdateParamsConditionRequestIP ¶
type TokenUpdateParamsConditionRequestIP struct { // List of IPv4/IPv6 CIDR addresses. In param.Field[[]string] `json:"in"` // List of IPv4/IPv6 CIDR addresses. NotIn param.Field[[]string] `json:"not_in"` }
Client IP restrictions.
func (TokenUpdateParamsConditionRequestIP) MarshalJSON ¶
func (r TokenUpdateParamsConditionRequestIP) MarshalJSON() (data []byte, err error)
type TokenUpdateParamsPoliciesEffect ¶
type TokenUpdateParamsPoliciesEffect string
Allow or deny operations against the resources.
const ( TokenUpdateParamsPoliciesEffectAllow TokenUpdateParamsPoliciesEffect = "allow" TokenUpdateParamsPoliciesEffectDeny TokenUpdateParamsPoliciesEffect = "deny" )
func (TokenUpdateParamsPoliciesEffect) IsKnown ¶
func (r TokenUpdateParamsPoliciesEffect) IsKnown() bool
type TokenUpdateParamsPoliciesPermissionGroup ¶
type TokenUpdateParamsPoliciesPermissionGroup struct { }
A named group of permissions that map to a group of operations against resources.
func (TokenUpdateParamsPoliciesPermissionGroup) MarshalJSON ¶
func (r TokenUpdateParamsPoliciesPermissionGroup) MarshalJSON() (data []byte, err error)
type TokenUpdateParamsPolicy ¶
type TokenUpdateParamsPolicy struct { // Allow or deny operations against the resources. Effect param.Field[TokenUpdateParamsPoliciesEffect] `json:"effect,required"` // A set of permission groups that are specified to the policy. PermissionGroups param.Field[[]TokenUpdateParamsPoliciesPermissionGroup] `json:"permission_groups,required"` // A list of resource names that the policy applies to. Resources param.Field[interface{}] `json:"resources,required"` }
func (TokenUpdateParamsPolicy) MarshalJSON ¶
func (r TokenUpdateParamsPolicy) MarshalJSON() (data []byte, err error)
type TokenUpdateParamsStatus ¶
type TokenUpdateParamsStatus string
Status of the token.
const ( TokenUpdateParamsStatusActive TokenUpdateParamsStatus = "active" TokenUpdateParamsStatusDisabled TokenUpdateParamsStatus = "disabled" TokenUpdateParamsStatusExpired TokenUpdateParamsStatus = "expired" )
func (TokenUpdateParamsStatus) IsKnown ¶
func (r TokenUpdateParamsStatus) IsKnown() bool
type TokenUpdateResponse ¶ added in v2.3.0
type TokenUpdateResponse interface {
ImplementsUserTokenUpdateResponse()
}
Union satisfied by user.TokenUpdateResponseUnknown or shared.UnionString.
type TokenUpdateResponseEnvelope ¶
type TokenUpdateResponseEnvelope struct { Errors []TokenUpdateResponseEnvelopeErrors `json:"errors,required"` Messages []TokenUpdateResponseEnvelopeMessages `json:"messages,required"` Result TokenUpdateResponse `json:"result,required"` // Whether the API call was successful Success TokenUpdateResponseEnvelopeSuccess `json:"success,required"` JSON tokenUpdateResponseEnvelopeJSON `json:"-"` }
func (*TokenUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *TokenUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenUpdateResponseEnvelopeErrors ¶
type TokenUpdateResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON tokenUpdateResponseEnvelopeErrorsJSON `json:"-"` }
func (*TokenUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *TokenUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TokenUpdateResponseEnvelopeMessages ¶
type TokenUpdateResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON tokenUpdateResponseEnvelopeMessagesJSON `json:"-"` }
func (*TokenUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *TokenUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TokenUpdateResponseEnvelopeSuccess ¶
type TokenUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
TokenUpdateResponseEnvelopeSuccessTrue TokenUpdateResponseEnvelopeSuccess = true
)
func (TokenUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r TokenUpdateResponseEnvelopeSuccess) IsKnown() bool
type TokenValue ¶
type TokenValue = string
type TokenValueService ¶
type TokenValueService struct {
Options []option.RequestOption
}
TokenValueService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewTokenValueService method instead.
func NewTokenValueService ¶
func NewTokenValueService(opts ...option.RequestOption) (r *TokenValueService)
NewTokenValueService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*TokenValueService) Update ¶
func (r *TokenValueService) Update(ctx context.Context, tokenID interface{}, body TokenValueUpdateParams, opts ...option.RequestOption) (res *TokenValue, err error)
Roll the token secret.
type TokenValueUpdateParams ¶
func (TokenValueUpdateParams) MarshalJSON ¶
func (r TokenValueUpdateParams) MarshalJSON() (data []byte, err error)
type TokenValueUpdateResponseEnvelope ¶
type TokenValueUpdateResponseEnvelope struct { Errors []TokenValueUpdateResponseEnvelopeErrors `json:"errors,required"` Messages []TokenValueUpdateResponseEnvelopeMessages `json:"messages,required"` // The token value. Result TokenValue `json:"result,required"` // Whether the API call was successful Success TokenValueUpdateResponseEnvelopeSuccess `json:"success,required"` JSON tokenValueUpdateResponseEnvelopeJSON `json:"-"` }
func (*TokenValueUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *TokenValueUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenValueUpdateResponseEnvelopeErrors ¶
type TokenValueUpdateResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON tokenValueUpdateResponseEnvelopeErrorsJSON `json:"-"` }
func (*TokenValueUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *TokenValueUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TokenValueUpdateResponseEnvelopeMessages ¶
type TokenValueUpdateResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON tokenValueUpdateResponseEnvelopeMessagesJSON `json:"-"` }
func (*TokenValueUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *TokenValueUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TokenValueUpdateResponseEnvelopeSuccess ¶
type TokenValueUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
TokenValueUpdateResponseEnvelopeSuccessTrue TokenValueUpdateResponseEnvelopeSuccess = true
)
func (TokenValueUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r TokenValueUpdateResponseEnvelopeSuccess) IsKnown() bool
type TokenVerifyResponse ¶
type TokenVerifyResponse struct { // Token identifier tag. ID string `json:"id,required"` // Status of the token. Status TokenVerifyResponseStatus `json:"status,required"` // The expiration time on or after which the JWT MUST NOT be accepted for // processing. ExpiresOn time.Time `json:"expires_on" format:"date-time"` // The time before which the token MUST NOT be accepted for processing. NotBefore time.Time `json:"not_before" format:"date-time"` JSON tokenVerifyResponseJSON `json:"-"` }
func (*TokenVerifyResponse) UnmarshalJSON ¶
func (r *TokenVerifyResponse) UnmarshalJSON(data []byte) (err error)
type TokenVerifyResponseEnvelope ¶
type TokenVerifyResponseEnvelope struct { Errors []TokenVerifyResponseEnvelopeErrors `json:"errors,required"` Messages []TokenVerifyResponseEnvelopeMessages `json:"messages,required"` Result TokenVerifyResponse `json:"result,required"` // Whether the API call was successful Success TokenVerifyResponseEnvelopeSuccess `json:"success,required"` JSON tokenVerifyResponseEnvelopeJSON `json:"-"` }
func (*TokenVerifyResponseEnvelope) UnmarshalJSON ¶
func (r *TokenVerifyResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TokenVerifyResponseEnvelopeErrors ¶
type TokenVerifyResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON tokenVerifyResponseEnvelopeErrorsJSON `json:"-"` }
func (*TokenVerifyResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *TokenVerifyResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type TokenVerifyResponseEnvelopeMessages ¶
type TokenVerifyResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON tokenVerifyResponseEnvelopeMessagesJSON `json:"-"` }
func (*TokenVerifyResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *TokenVerifyResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type TokenVerifyResponseEnvelopeSuccess ¶
type TokenVerifyResponseEnvelopeSuccess bool
Whether the API call was successful
const (
TokenVerifyResponseEnvelopeSuccessTrue TokenVerifyResponseEnvelopeSuccess = true
)
func (TokenVerifyResponseEnvelopeSuccess) IsKnown ¶
func (r TokenVerifyResponseEnvelopeSuccess) IsKnown() bool
type TokenVerifyResponseStatus ¶
type TokenVerifyResponseStatus string
Status of the token.
const ( TokenVerifyResponseStatusActive TokenVerifyResponseStatus = "active" TokenVerifyResponseStatusDisabled TokenVerifyResponseStatus = "disabled" TokenVerifyResponseStatusExpired TokenVerifyResponseStatus = "expired" )
func (TokenVerifyResponseStatus) IsKnown ¶
func (r TokenVerifyResponseStatus) IsKnown() bool
type UserEditParams ¶
type UserEditParams struct { // The country in which the user lives. Country param.Field[string] `json:"country"` // User's first name FirstName param.Field[string] `json:"first_name"` // User's last name LastName param.Field[string] `json:"last_name"` // User's telephone number Telephone param.Field[string] `json:"telephone"` // The zipcode or postal code where the user lives. Zipcode param.Field[string] `json:"zipcode"` }
func (UserEditParams) MarshalJSON ¶
func (r UserEditParams) MarshalJSON() (data []byte, err error)
type UserEditResponse ¶ added in v2.3.0
type UserEditResponse interface {
ImplementsUserUserEditResponse()
}
Union satisfied by user.UserEditResponseUnknown or shared.UnionString.
type UserEditResponseEnvelope ¶
type UserEditResponseEnvelope struct { Errors []UserEditResponseEnvelopeErrors `json:"errors,required"` Messages []UserEditResponseEnvelopeMessages `json:"messages,required"` Result UserEditResponse `json:"result,required"` // Whether the API call was successful Success UserEditResponseEnvelopeSuccess `json:"success,required"` JSON userEditResponseEnvelopeJSON `json:"-"` }
func (*UserEditResponseEnvelope) UnmarshalJSON ¶
func (r *UserEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type UserEditResponseEnvelopeErrors ¶
type UserEditResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON userEditResponseEnvelopeErrorsJSON `json:"-"` }
func (*UserEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *UserEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type UserEditResponseEnvelopeMessages ¶
type UserEditResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON userEditResponseEnvelopeMessagesJSON `json:"-"` }
func (*UserEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *UserEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type UserEditResponseEnvelopeSuccess ¶
type UserEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
UserEditResponseEnvelopeSuccessTrue UserEditResponseEnvelopeSuccess = true
)
func (UserEditResponseEnvelopeSuccess) IsKnown ¶
func (r UserEditResponseEnvelopeSuccess) IsKnown() bool
type UserGetResponse ¶ added in v2.3.0
type UserGetResponse interface {
ImplementsUserUserGetResponse()
}
Union satisfied by user.UserGetResponseUnknown or shared.UnionString.
type UserGetResponseEnvelope ¶
type UserGetResponseEnvelope struct { Errors []UserGetResponseEnvelopeErrors `json:"errors,required"` Messages []UserGetResponseEnvelopeMessages `json:"messages,required"` Result UserGetResponse `json:"result,required"` // Whether the API call was successful Success UserGetResponseEnvelopeSuccess `json:"success,required"` JSON userGetResponseEnvelopeJSON `json:"-"` }
func (*UserGetResponseEnvelope) UnmarshalJSON ¶
func (r *UserGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type UserGetResponseEnvelopeErrors ¶
type UserGetResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON userGetResponseEnvelopeErrorsJSON `json:"-"` }
func (*UserGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *UserGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type UserGetResponseEnvelopeMessages ¶
type UserGetResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON userGetResponseEnvelopeMessagesJSON `json:"-"` }
func (*UserGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *UserGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type UserGetResponseEnvelopeSuccess ¶
type UserGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
UserGetResponseEnvelopeSuccessTrue UserGetResponseEnvelopeSuccess = true
)
func (UserGetResponseEnvelopeSuccess) IsKnown ¶
func (r UserGetResponseEnvelopeSuccess) IsKnown() bool
type UserService ¶
type UserService struct { Options []option.RequestOption AuditLogs *AuditLogService Billing *BillingService Firewall *FirewallService Invites *InviteService LoadBalancers *LoadBalancerService Organizations *OrganizationService Subscriptions *SubscriptionService Tokens *TokenService }
UserService 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 NewUserService method instead.
func NewUserService ¶
func NewUserService(opts ...option.RequestOption) (r *UserService)
NewUserService 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 (*UserService) Edit ¶
func (r *UserService) Edit(ctx context.Context, body UserEditParams, opts ...option.RequestOption) (res *UserEditResponse, err error)
Edit part of your user details.
func (*UserService) Get ¶
func (r *UserService) Get(ctx context.Context, opts ...option.RequestOption) (res *UserGetResponse, err error)
User Details
Source Files
¶
- aliases.go
- auditlog.go
- billing.go
- billinghistory.go
- billingprofile.go
- firewall.go
- firewallaccessrule.go
- invite.go
- loadbalancer.go
- loadbalanceranalytics.go
- loadbalanceranalyticsevent.go
- loadbalancermonitor.go
- loadbalancerpool.go
- loadbalancerpreview.go
- organization.go
- subscription.go
- token.go
- tokenpermissiongroup.go
- tokenvalue.go
- user.go