resource_sharing

package
v5.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CertificateCADigicert = shared.CertificateCADigicert

This is an alias to an internal value.

View Source
const CertificateCAGoogle = shared.CertificateCAGoogle

This is an alias to an internal value.

View Source
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt

This is an alias to an internal value.

View Source
const CertificateCASSLCom = shared.CertificateCASSLCom

This is an alias to an internal value.

View Source
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA

This is an alias to an internal value.

View Source
const CloudflareTunnelConfigSrcCloudflare = shared.CloudflareTunnelConfigSrcCloudflare

This is an alias to an internal value.

View Source
const CloudflareTunnelConfigSrcLocal = shared.CloudflareTunnelConfigSrcLocal

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

View Source
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow

This is an alias to an internal value.

View Source
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny

This is an alias to an internal value.

View Source
const MemberStatusAccepted = shared.MemberStatusAccepted

This is an alias to an internal value.

View Source
const MemberStatusPending = shared.MemberStatusPending

This is an alias to an internal value.

View Source
const RatePlanIDBusiness = shared.RatePlanIDBusiness

This is an alias to an internal value.

View Source
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDFree = shared.RatePlanIDFree

This is an alias to an internal value.

View Source
const RatePlanIDLite = shared.RatePlanIDLite

This is an alias to an internal value.

View Source
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness

This is an alias to an internal value.

View Source
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree

This is an alias to an internal value.

View Source
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro

This is an alias to an internal value.

View Source
const RatePlanIDPro = shared.RatePlanIDPro

This is an alias to an internal value.

View Source
const RatePlanIDProPlus = shared.RatePlanIDProPlus

This is an alias to an internal value.

View Source
const SortDirectionAsc = shared.SortDirectionAsc

This is an alias to an internal value.

View Source
const SortDirectionDesc = shared.SortDirectionDesc

This is an alias to an internal value.

View Source
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly

This is an alias to an internal value.

View Source
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment

This is an alias to an internal value.

View Source
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled

This is an alias to an internal value.

View Source
const SubscriptionStateExpired = shared.SubscriptionStateExpired

This is an alias to an internal value.

View Source
const SubscriptionStateFailed = shared.SubscriptionStateFailed

This is an alias to an internal value.

View Source
const SubscriptionStatePaid = shared.SubscriptionStatePaid

This is an alias to an internal value.

View Source
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned

This is an alias to an internal value.

View Source
const SubscriptionStateTrial = shared.SubscriptionStateTrial

This is an alias to an internal value.

View Source
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow

This is an alias to an internal value.

View Source
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny

This is an alias to an internal value.

View Source
const TokenStatusActive = shared.TokenStatusActive

This is an alias to an internal value.

View Source
const TokenStatusDisabled = shared.TokenStatusDisabled

This is an alias to an internal value.

View Source
const TokenStatusExpired = shared.TokenStatusExpired

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

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

This is an alias to an internal type.

type AuditLogOwner

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type CertificateCA

type CertificateCA = shared.CertificateCA

The Certificate Authority that will issue the certificate

This is an alias to an internal type.

type CertificateRequestType

type CertificateRequestType = shared.CertificateRequestType

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

This is an alias to an internal type.

type CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

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

This is an alias to an internal type.

type CloudflareTunnelConfigSrc added in v5.1.0

type CloudflareTunnelConfigSrc = shared.CloudflareTunnelConfigSrc

Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.

This is an alias to an internal type.

type CloudflareTunnelConnection

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelStatus

type CloudflareTunnelStatus = shared.CloudflareTunnelStatus

The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).

This is an alias to an internal type.

type CloudflareTunnelTunType

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type ErrorDataSource

type ErrorDataSource = shared.ErrorDataSource

This is an alias to an internal type.

type Member

type Member = shared.Member

This is an alias to an internal type.

type MemberPoliciesAccess

type MemberPoliciesAccess = shared.MemberPoliciesAccess

Allow or deny operations against the resources.

This is an alias to an internal type.

type MemberPoliciesPermissionGroup

type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup

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

This is an alias to an internal type.

type MemberPoliciesPermissionGroupsMeta

type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type MemberPoliciesResourceGroup

type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup

A group of scoped resources.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsMeta

type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta

Attributes associated to the resource group.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScope

type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope

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

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScopeObject

type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject

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

This is an alias to an internal type.

type MemberPolicy

type MemberPolicy = shared.MemberPolicy

This is an alias to an internal type.

type MemberStatus

type MemberStatus = shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

type MemberUser

type MemberUser = shared.MemberUser

Details of the user associated to the membership.

This is an alias to an internal type.

type Permission

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type RatePlan

type RatePlan = shared.RatePlan

The rate plan applied to the subscription.

This is an alias to an internal type.

type RatePlanID

type RatePlanID = shared.RatePlanID

The ID of the rate plan.

This is an alias to an internal type.

type RatePlanParam

type RatePlanParam = shared.RatePlanParam

The rate plan applied to the subscription.

This is an alias to an internal type.

type RecipientDeleteParams

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

type RecipientDeleteResponse

type RecipientDeleteResponse struct {
	// Share Recipient identifier tag.
	ID string `json:"id,required"`
	// Account identifier.
	AccountID string `json:"account_id,required"`
	// Share Recipient association status.
	AssociationStatus RecipientDeleteResponseAssociationStatus `json:"association_status,required"`
	// When the share was created.
	Created time.Time `json:"created,required" format:"date-time"`
	// When the share was modified.
	Modified time.Time `json:"modified,required" format:"date-time"`
	// Share Recipient status message.
	StatusMessage string                      `json:"status_message,required"`
	JSON          recipientDeleteResponseJSON `json:"-"`
}

func (*RecipientDeleteResponse) UnmarshalJSON

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

type RecipientDeleteResponseAssociationStatus

type RecipientDeleteResponseAssociationStatus string

Share Recipient association status.

const (
	RecipientDeleteResponseAssociationStatusAssociating    RecipientDeleteResponseAssociationStatus = "associating"
	RecipientDeleteResponseAssociationStatusAssociated     RecipientDeleteResponseAssociationStatus = "associated"
	RecipientDeleteResponseAssociationStatusDisassociating RecipientDeleteResponseAssociationStatus = "disassociating"
	RecipientDeleteResponseAssociationStatusDisassociated  RecipientDeleteResponseAssociationStatus = "disassociated"
)

func (RecipientDeleteResponseAssociationStatus) IsKnown

type RecipientDeleteResponseEnvelope

type RecipientDeleteResponseEnvelope struct {
	Errors []shared.ResponseInfo `json:"errors,required"`
	// Whether the API call was successful.
	Success bool                                `json:"success,required"`
	Result  RecipientDeleteResponse             `json:"result"`
	JSON    recipientDeleteResponseEnvelopeJSON `json:"-"`
}

func (*RecipientDeleteResponseEnvelope) UnmarshalJSON

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

type RecipientGetParams

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

type RecipientGetResponse

type RecipientGetResponse struct {
	// Share Recipient identifier tag.
	ID string `json:"id,required"`
	// Account identifier.
	AccountID string `json:"account_id,required"`
	// Share Recipient association status.
	AssociationStatus RecipientGetResponseAssociationStatus `json:"association_status,required"`
	// When the share was created.
	Created time.Time `json:"created,required" format:"date-time"`
	// When the share was modified.
	Modified time.Time `json:"modified,required" format:"date-time"`
	// Share Recipient status message.
	StatusMessage string                   `json:"status_message,required"`
	JSON          recipientGetResponseJSON `json:"-"`
}

func (*RecipientGetResponse) UnmarshalJSON

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

type RecipientGetResponseAssociationStatus

type RecipientGetResponseAssociationStatus string

Share Recipient association status.

const (
	RecipientGetResponseAssociationStatusAssociating    RecipientGetResponseAssociationStatus = "associating"
	RecipientGetResponseAssociationStatusAssociated     RecipientGetResponseAssociationStatus = "associated"
	RecipientGetResponseAssociationStatusDisassociating RecipientGetResponseAssociationStatus = "disassociating"
	RecipientGetResponseAssociationStatusDisassociated  RecipientGetResponseAssociationStatus = "disassociated"
)

func (RecipientGetResponseAssociationStatus) IsKnown

type RecipientGetResponseEnvelope

type RecipientGetResponseEnvelope struct {
	Errors []shared.ResponseInfo `json:"errors,required"`
	// Whether the API call was successful.
	Success bool                             `json:"success,required"`
	Result  RecipientGetResponse             `json:"result"`
	JSON    recipientGetResponseEnvelopeJSON `json:"-"`
}

func (*RecipientGetResponseEnvelope) UnmarshalJSON

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

type RecipientListParams

type RecipientListParams struct {
	// Account identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	// Page number.
	Page param.Field[int64] `query:"page"`
	// Number of objects to return per page.
	PerPage param.Field[int64] `query:"per_page"`
}

func (RecipientListParams) URLQuery

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

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

type RecipientListResponse

type RecipientListResponse struct {
	// Share Recipient identifier tag.
	ID string `json:"id,required"`
	// Account identifier.
	AccountID string `json:"account_id,required"`
	// Share Recipient association status.
	AssociationStatus RecipientListResponseAssociationStatus `json:"association_status,required"`
	// When the share was created.
	Created time.Time `json:"created,required" format:"date-time"`
	// When the share was modified.
	Modified time.Time `json:"modified,required" format:"date-time"`
	// Share Recipient status message.
	StatusMessage string                    `json:"status_message,required"`
	JSON          recipientListResponseJSON `json:"-"`
}

func (*RecipientListResponse) UnmarshalJSON

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

type RecipientListResponseAssociationStatus

type RecipientListResponseAssociationStatus string

Share Recipient association status.

const (
	RecipientListResponseAssociationStatusAssociating    RecipientListResponseAssociationStatus = "associating"
	RecipientListResponseAssociationStatusAssociated     RecipientListResponseAssociationStatus = "associated"
	RecipientListResponseAssociationStatusDisassociating RecipientListResponseAssociationStatus = "disassociating"
	RecipientListResponseAssociationStatusDisassociated  RecipientListResponseAssociationStatus = "disassociated"
)

func (RecipientListResponseAssociationStatus) IsKnown

type RecipientNewParams

type RecipientNewParams struct {
	// Account identifier.
	PathAccountID param.Field[string] `path:"account_id,required"`
	// Account identifier.
	BodyAccountID param.Field[string] `json:"account_id"`
	// Organization identifier.
	OrganizationID param.Field[string] `json:"organization_id"`
}

func (RecipientNewParams) MarshalJSON

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

type RecipientNewResponse

type RecipientNewResponse struct {
	// Share Recipient identifier tag.
	ID string `json:"id,required"`
	// Account identifier.
	AccountID string `json:"account_id,required"`
	// Share Recipient association status.
	AssociationStatus RecipientNewResponseAssociationStatus `json:"association_status,required"`
	// When the share was created.
	Created time.Time `json:"created,required" format:"date-time"`
	// When the share was modified.
	Modified time.Time `json:"modified,required" format:"date-time"`
	// Share Recipient status message.
	StatusMessage string                   `json:"status_message,required"`
	JSON          recipientNewResponseJSON `json:"-"`
}

func (*RecipientNewResponse) UnmarshalJSON

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

type RecipientNewResponseAssociationStatus

type RecipientNewResponseAssociationStatus string

Share Recipient association status.

const (
	RecipientNewResponseAssociationStatusAssociating    RecipientNewResponseAssociationStatus = "associating"
	RecipientNewResponseAssociationStatusAssociated     RecipientNewResponseAssociationStatus = "associated"
	RecipientNewResponseAssociationStatusDisassociating RecipientNewResponseAssociationStatus = "disassociating"
	RecipientNewResponseAssociationStatusDisassociated  RecipientNewResponseAssociationStatus = "disassociated"
)

func (RecipientNewResponseAssociationStatus) IsKnown

type RecipientNewResponseEnvelope

type RecipientNewResponseEnvelope struct {
	Errors []shared.ResponseInfo `json:"errors,required"`
	// Whether the API call was successful.
	Success bool                             `json:"success,required"`
	Result  RecipientNewResponse             `json:"result"`
	JSON    recipientNewResponseEnvelopeJSON `json:"-"`
}

func (*RecipientNewResponseEnvelope) UnmarshalJSON

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

type RecipientService

type RecipientService struct {
	Options []option.RequestOption
}

RecipientService 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 NewRecipientService method instead.

func NewRecipientService

func NewRecipientService(opts ...option.RequestOption) (r *RecipientService)

NewRecipientService 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 (*RecipientService) Delete

func (r *RecipientService) Delete(ctx context.Context, shareID string, recipientID string, body RecipientDeleteParams, opts ...option.RequestOption) (res *RecipientDeleteResponse, err error)

Deletion is not immediate, an updated share recipient object with a new status will be returned.

func (*RecipientService) Get

func (r *RecipientService) Get(ctx context.Context, shareID string, recipientID string, query RecipientGetParams, opts ...option.RequestOption) (res *RecipientGetResponse, err error)

Get share recipient by ID.

func (*RecipientService) List

List share recipients by share ID.

func (*RecipientService) ListAutoPaging

List share recipients by share ID.

func (*RecipientService) New

func (r *RecipientService) New(ctx context.Context, shareID string, params RecipientNewParams, opts ...option.RequestOption) (res *RecipientNewResponse, err error)

Create a new share recipient

type ResourceDeleteParams

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

type ResourceDeleteResponse

type ResourceDeleteResponse struct {
	// Share Resource identifier.
	ID string `json:"id,required"`
	// When the share was created.
	Created time.Time `json:"created,required" format:"date-time"`
	// Resource Metadata.
	Meta interface{} `json:"meta,required"`
	// When the share was modified.
	Modified time.Time `json:"modified,required" format:"date-time"`
	// Account identifier.
	ResourceAccountID string `json:"resource_account_id,required"`
	// Share Resource identifier.
	ResourceID string `json:"resource_id,required"`
	// Resource Type.
	ResourceType ResourceDeleteResponseResourceType `json:"resource_type,required"`
	// Resource Version.
	ResourceVersion int64 `json:"resource_version,required"`
	// Resource Status.
	Status ResourceDeleteResponseStatus `json:"status,required"`
	JSON   resourceDeleteResponseJSON   `json:"-"`
}

func (*ResourceDeleteResponse) UnmarshalJSON

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

type ResourceDeleteResponseEnvelope

type ResourceDeleteResponseEnvelope struct {
	Errors []shared.ResponseInfo `json:"errors,required"`
	// Whether the API call was successful.
	Success bool                               `json:"success,required"`
	Result  ResourceDeleteResponse             `json:"result"`
	JSON    resourceDeleteResponseEnvelopeJSON `json:"-"`
}

func (*ResourceDeleteResponseEnvelope) UnmarshalJSON

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

type ResourceDeleteResponseResourceType

type ResourceDeleteResponseResourceType string

Resource Type.

const (
	ResourceDeleteResponseResourceTypeCustomRuleset ResourceDeleteResponseResourceType = "custom-ruleset"
	ResourceDeleteResponseResourceTypeWidget        ResourceDeleteResponseResourceType = "widget"
)

func (ResourceDeleteResponseResourceType) IsKnown

type ResourceDeleteResponseStatus

type ResourceDeleteResponseStatus string

Resource Status.

const (
	ResourceDeleteResponseStatusActive   ResourceDeleteResponseStatus = "active"
	ResourceDeleteResponseStatusDeleting ResourceDeleteResponseStatus = "deleting"
	ResourceDeleteResponseStatusDeleted  ResourceDeleteResponseStatus = "deleted"
)

func (ResourceDeleteResponseStatus) IsKnown

func (r ResourceDeleteResponseStatus) IsKnown() bool

type ResourceGetParams

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

type ResourceGetResponse

type ResourceGetResponse struct {
	// Share Resource identifier.
	ID string `json:"id,required"`
	// When the share was created.
	Created time.Time `json:"created,required" format:"date-time"`
	// Resource Metadata.
	Meta interface{} `json:"meta,required"`
	// When the share was modified.
	Modified time.Time `json:"modified,required" format:"date-time"`
	// Account identifier.
	ResourceAccountID string `json:"resource_account_id,required"`
	// Share Resource identifier.
	ResourceID string `json:"resource_id,required"`
	// Resource Type.
	ResourceType ResourceGetResponseResourceType `json:"resource_type,required"`
	// Resource Version.
	ResourceVersion int64 `json:"resource_version,required"`
	// Resource Status.
	Status ResourceGetResponseStatus `json:"status,required"`
	JSON   resourceGetResponseJSON   `json:"-"`
}

func (*ResourceGetResponse) UnmarshalJSON

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

type ResourceGetResponseEnvelope

type ResourceGetResponseEnvelope struct {
	Errors []shared.ResponseInfo `json:"errors,required"`
	// Whether the API call was successful.
	Success bool                            `json:"success,required"`
	Result  ResourceGetResponse             `json:"result"`
	JSON    resourceGetResponseEnvelopeJSON `json:"-"`
}

func (*ResourceGetResponseEnvelope) UnmarshalJSON

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

type ResourceGetResponseResourceType

type ResourceGetResponseResourceType string

Resource Type.

const (
	ResourceGetResponseResourceTypeCustomRuleset ResourceGetResponseResourceType = "custom-ruleset"
	ResourceGetResponseResourceTypeWidget        ResourceGetResponseResourceType = "widget"
)

func (ResourceGetResponseResourceType) IsKnown

type ResourceGetResponseStatus

type ResourceGetResponseStatus string

Resource Status.

const (
	ResourceGetResponseStatusActive   ResourceGetResponseStatus = "active"
	ResourceGetResponseStatusDeleting ResourceGetResponseStatus = "deleting"
	ResourceGetResponseStatusDeleted  ResourceGetResponseStatus = "deleted"
)

func (ResourceGetResponseStatus) IsKnown

func (r ResourceGetResponseStatus) IsKnown() bool

type ResourceListParams

type ResourceListParams struct {
	// Account identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	// Page number.
	Page param.Field[int64] `query:"page"`
	// Number of objects to return per page.
	PerPage param.Field[int64] `query:"per_page"`
	// Filter share resources by resource_type.
	ResourceType param.Field[ResourceListParamsResourceType] `query:"resource_type"`
	// Filter share resources by status.
	Status param.Field[ResourceListParamsStatus] `query:"status"`
}

func (ResourceListParams) URLQuery

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

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

type ResourceListParamsResourceType

type ResourceListParamsResourceType string

Filter share resources by resource_type.

const (
	ResourceListParamsResourceTypeCustomRuleset ResourceListParamsResourceType = "custom-ruleset"
	ResourceListParamsResourceTypeWidget        ResourceListParamsResourceType = "widget"
)

func (ResourceListParamsResourceType) IsKnown

type ResourceListParamsStatus

type ResourceListParamsStatus string

Filter share resources by status.

const (
	ResourceListParamsStatusActive   ResourceListParamsStatus = "active"
	ResourceListParamsStatusDeleting ResourceListParamsStatus = "deleting"
	ResourceListParamsStatusDeleted  ResourceListParamsStatus = "deleted"
)

func (ResourceListParamsStatus) IsKnown

func (r ResourceListParamsStatus) IsKnown() bool

type ResourceListResponse

type ResourceListResponse struct {
	// Share Resource identifier.
	ID string `json:"id,required"`
	// When the share was created.
	Created time.Time `json:"created,required" format:"date-time"`
	// Resource Metadata.
	Meta interface{} `json:"meta,required"`
	// When the share was modified.
	Modified time.Time `json:"modified,required" format:"date-time"`
	// Account identifier.
	ResourceAccountID string `json:"resource_account_id,required"`
	// Share Resource identifier.
	ResourceID string `json:"resource_id,required"`
	// Resource Type.
	ResourceType ResourceListResponseResourceType `json:"resource_type,required"`
	// Resource Version.
	ResourceVersion int64 `json:"resource_version,required"`
	// Resource Status.
	Status ResourceListResponseStatus `json:"status,required"`
	JSON   resourceListResponseJSON   `json:"-"`
}

func (*ResourceListResponse) UnmarshalJSON

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

type ResourceListResponseResourceType

type ResourceListResponseResourceType string

Resource Type.

const (
	ResourceListResponseResourceTypeCustomRuleset ResourceListResponseResourceType = "custom-ruleset"
	ResourceListResponseResourceTypeWidget        ResourceListResponseResourceType = "widget"
)

func (ResourceListResponseResourceType) IsKnown

type ResourceListResponseStatus

type ResourceListResponseStatus string

Resource Status.

const (
	ResourceListResponseStatusActive   ResourceListResponseStatus = "active"
	ResourceListResponseStatusDeleting ResourceListResponseStatus = "deleting"
	ResourceListResponseStatusDeleted  ResourceListResponseStatus = "deleted"
)

func (ResourceListResponseStatus) IsKnown

func (r ResourceListResponseStatus) IsKnown() bool

type ResourceNewParams

type ResourceNewParams struct {
	// Account identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	// Resource Metadata.
	Meta param.Field[interface{}] `json:"meta,required"`
	// Account identifier.
	ResourceAccountID param.Field[string] `json:"resource_account_id,required"`
	// Share Resource identifier.
	ResourceID param.Field[string] `json:"resource_id,required"`
	// Resource Type.
	ResourceType param.Field[ResourceNewParamsResourceType] `json:"resource_type,required"`
}

func (ResourceNewParams) MarshalJSON

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

type ResourceNewParamsResourceType

type ResourceNewParamsResourceType string

Resource Type.

const (
	ResourceNewParamsResourceTypeCustomRuleset ResourceNewParamsResourceType = "custom-ruleset"
	ResourceNewParamsResourceTypeWidget        ResourceNewParamsResourceType = "widget"
)

func (ResourceNewParamsResourceType) IsKnown

func (r ResourceNewParamsResourceType) IsKnown() bool

type ResourceNewResponse

type ResourceNewResponse struct {
	// Share Resource identifier.
	ID string `json:"id,required"`
	// When the share was created.
	Created time.Time `json:"created,required" format:"date-time"`
	// Resource Metadata.
	Meta interface{} `json:"meta,required"`
	// When the share was modified.
	Modified time.Time `json:"modified,required" format:"date-time"`
	// Account identifier.
	ResourceAccountID string `json:"resource_account_id,required"`
	// Share Resource identifier.
	ResourceID string `json:"resource_id,required"`
	// Resource Type.
	ResourceType ResourceNewResponseResourceType `json:"resource_type,required"`
	// Resource Version.
	ResourceVersion int64 `json:"resource_version,required"`
	// Resource Status.
	Status ResourceNewResponseStatus `json:"status,required"`
	JSON   resourceNewResponseJSON   `json:"-"`
}

func (*ResourceNewResponse) UnmarshalJSON

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

type ResourceNewResponseEnvelope

type ResourceNewResponseEnvelope struct {
	Errors []shared.ResponseInfo `json:"errors,required"`
	// Whether the API call was successful.
	Success bool                            `json:"success,required"`
	Result  ResourceNewResponse             `json:"result"`
	JSON    resourceNewResponseEnvelopeJSON `json:"-"`
}

func (*ResourceNewResponseEnvelope) UnmarshalJSON

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

type ResourceNewResponseResourceType

type ResourceNewResponseResourceType string

Resource Type.

const (
	ResourceNewResponseResourceTypeCustomRuleset ResourceNewResponseResourceType = "custom-ruleset"
	ResourceNewResponseResourceTypeWidget        ResourceNewResponseResourceType = "widget"
)

func (ResourceNewResponseResourceType) IsKnown

type ResourceNewResponseStatus

type ResourceNewResponseStatus string

Resource Status.

const (
	ResourceNewResponseStatusActive   ResourceNewResponseStatus = "active"
	ResourceNewResponseStatusDeleting ResourceNewResponseStatus = "deleting"
	ResourceNewResponseStatusDeleted  ResourceNewResponseStatus = "deleted"
)

func (ResourceNewResponseStatus) IsKnown

func (r ResourceNewResponseStatus) IsKnown() bool

type ResourceService

type ResourceService struct {
	Options []option.RequestOption
}

ResourceService 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 NewResourceService method instead.

func NewResourceService

func NewResourceService(opts ...option.RequestOption) (r *ResourceService)

NewResourceService 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 (*ResourceService) Delete

func (r *ResourceService) Delete(ctx context.Context, shareID string, resourceID string, body ResourceDeleteParams, opts ...option.RequestOption) (res *ResourceDeleteResponse, err error)

Deletion is not immediate, an updated share resource object with a new status will be returned.

func (*ResourceService) Get

func (r *ResourceService) Get(ctx context.Context, shareID string, resourceID string, query ResourceGetParams, opts ...option.RequestOption) (res *ResourceGetResponse, err error)

Get share resource by ID.

func (*ResourceService) List

List share resources by share ID.

func (*ResourceService) ListAutoPaging

List share resources by share ID.

func (*ResourceService) New

func (r *ResourceService) New(ctx context.Context, shareID string, params ResourceNewParams, opts ...option.RequestOption) (res *ResourceNewResponse, err error)

Create a new share resource

func (*ResourceService) Update

func (r *ResourceService) Update(ctx context.Context, shareID string, resourceID string, params ResourceUpdateParams, opts ...option.RequestOption) (res *ResourceUpdateResponse, err error)

Update is not immediate, an updated share resource object with a new status will be returned.

type ResourceSharingDeleteParams

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

type ResourceSharingDeleteResponse

type ResourceSharingDeleteResponse struct {
	// Share identifier tag.
	ID string `json:"id,required"`
	// Account identifier.
	AccountID string `json:"account_id,required"`
	// The display name of an account.
	AccountName string `json:"account_name,required"`
	// When the share was created.
	Created time.Time `json:"created,required" format:"date-time"`
	// When the share was modified.
	Modified time.Time `json:"modified,required" format:"date-time"`
	// The name of the share.
	Name string `json:"name,required"`
	// Organization identifier.
	OrganizationID string                                  `json:"organization_id,required"`
	Status         ResourceSharingDeleteResponseStatus     `json:"status,required"`
	TargetType     ResourceSharingDeleteResponseTargetType `json:"target_type,required"`
	Kind           ResourceSharingDeleteResponseKind       `json:"kind"`
	JSON           resourceSharingDeleteResponseJSON       `json:"-"`
}

func (*ResourceSharingDeleteResponse) UnmarshalJSON

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

type ResourceSharingDeleteResponseEnvelope

type ResourceSharingDeleteResponseEnvelope struct {
	Errors []shared.ResponseInfo `json:"errors,required"`
	// Whether the API call was successful.
	Success bool                                      `json:"success,required"`
	Result  ResourceSharingDeleteResponse             `json:"result"`
	JSON    resourceSharingDeleteResponseEnvelopeJSON `json:"-"`
}

func (*ResourceSharingDeleteResponseEnvelope) UnmarshalJSON

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

type ResourceSharingDeleteResponseKind

type ResourceSharingDeleteResponseKind string
const (
	ResourceSharingDeleteResponseKindSent     ResourceSharingDeleteResponseKind = "sent"
	ResourceSharingDeleteResponseKindReceived ResourceSharingDeleteResponseKind = "received"
)

func (ResourceSharingDeleteResponseKind) IsKnown

type ResourceSharingDeleteResponseStatus

type ResourceSharingDeleteResponseStatus string
const (
	ResourceSharingDeleteResponseStatusActive   ResourceSharingDeleteResponseStatus = "active"
	ResourceSharingDeleteResponseStatusDeleting ResourceSharingDeleteResponseStatus = "deleting"
	ResourceSharingDeleteResponseStatusDeleted  ResourceSharingDeleteResponseStatus = "deleted"
)

func (ResourceSharingDeleteResponseStatus) IsKnown

type ResourceSharingDeleteResponseTargetType

type ResourceSharingDeleteResponseTargetType string
const (
	ResourceSharingDeleteResponseTargetTypeAccount      ResourceSharingDeleteResponseTargetType = "account"
	ResourceSharingDeleteResponseTargetTypeOrganization ResourceSharingDeleteResponseTargetType = "organization"
)

func (ResourceSharingDeleteResponseTargetType) IsKnown

type ResourceSharingGetParams

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

type ResourceSharingGetResponse

type ResourceSharingGetResponse struct {
	// Share identifier tag.
	ID string `json:"id,required"`
	// Account identifier.
	AccountID string `json:"account_id,required"`
	// The display name of an account.
	AccountName string `json:"account_name,required"`
	// When the share was created.
	Created time.Time `json:"created,required" format:"date-time"`
	// When the share was modified.
	Modified time.Time `json:"modified,required" format:"date-time"`
	// The name of the share.
	Name string `json:"name,required"`
	// Organization identifier.
	OrganizationID string                               `json:"organization_id,required"`
	Status         ResourceSharingGetResponseStatus     `json:"status,required"`
	TargetType     ResourceSharingGetResponseTargetType `json:"target_type,required"`
	Kind           ResourceSharingGetResponseKind       `json:"kind"`
	JSON           resourceSharingGetResponseJSON       `json:"-"`
}

func (*ResourceSharingGetResponse) UnmarshalJSON

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

type ResourceSharingGetResponseEnvelope

type ResourceSharingGetResponseEnvelope struct {
	Errors []shared.ResponseInfo `json:"errors,required"`
	// Whether the API call was successful.
	Success bool                                   `json:"success,required"`
	Result  ResourceSharingGetResponse             `json:"result"`
	JSON    resourceSharingGetResponseEnvelopeJSON `json:"-"`
}

func (*ResourceSharingGetResponseEnvelope) UnmarshalJSON

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

type ResourceSharingGetResponseKind

type ResourceSharingGetResponseKind string
const (
	ResourceSharingGetResponseKindSent     ResourceSharingGetResponseKind = "sent"
	ResourceSharingGetResponseKindReceived ResourceSharingGetResponseKind = "received"
)

func (ResourceSharingGetResponseKind) IsKnown

type ResourceSharingGetResponseStatus

type ResourceSharingGetResponseStatus string
const (
	ResourceSharingGetResponseStatusActive   ResourceSharingGetResponseStatus = "active"
	ResourceSharingGetResponseStatusDeleting ResourceSharingGetResponseStatus = "deleting"
	ResourceSharingGetResponseStatusDeleted  ResourceSharingGetResponseStatus = "deleted"
)

func (ResourceSharingGetResponseStatus) IsKnown

type ResourceSharingGetResponseTargetType

type ResourceSharingGetResponseTargetType string
const (
	ResourceSharingGetResponseTargetTypeAccount      ResourceSharingGetResponseTargetType = "account"
	ResourceSharingGetResponseTargetTypeOrganization ResourceSharingGetResponseTargetType = "organization"
)

func (ResourceSharingGetResponseTargetType) IsKnown

type ResourceSharingListParams

type ResourceSharingListParams struct {
	// Account identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	// Direction to sort objects.
	Direction param.Field[ResourceSharingListParamsDirection] `query:"direction"`
	// Filter shares by kind.
	Kind param.Field[ResourceSharingListParamsKind] `query:"kind"`
	// Order shares by values in the given field.
	Order param.Field[ResourceSharingListParamsOrder] `query:"order"`
	// Page number.
	Page param.Field[int64] `query:"page"`
	// Number of objects to return per page.
	PerPage param.Field[int64] `query:"per_page"`
	// Filter shares by status.
	Status param.Field[ResourceSharingListParamsStatus] `query:"status"`
	// Filter shares by target_type.
	TargetType param.Field[ResourceSharingListParamsTargetType] `query:"target_type"`
}

func (ResourceSharingListParams) URLQuery

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

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

type ResourceSharingListParamsDirection

type ResourceSharingListParamsDirection string

Direction to sort objects.

const (
	ResourceSharingListParamsDirectionAsc  ResourceSharingListParamsDirection = "asc"
	ResourceSharingListParamsDirectionDesc ResourceSharingListParamsDirection = "desc"
)

func (ResourceSharingListParamsDirection) IsKnown

type ResourceSharingListParamsKind

type ResourceSharingListParamsKind string

Filter shares by kind.

const (
	ResourceSharingListParamsKindSent     ResourceSharingListParamsKind = "sent"
	ResourceSharingListParamsKindReceived ResourceSharingListParamsKind = "received"
)

func (ResourceSharingListParamsKind) IsKnown

func (r ResourceSharingListParamsKind) IsKnown() bool

type ResourceSharingListParamsOrder

type ResourceSharingListParamsOrder string

Order shares by values in the given field.

const (
	ResourceSharingListParamsOrderName    ResourceSharingListParamsOrder = "name"
	ResourceSharingListParamsOrderCreated ResourceSharingListParamsOrder = "created"
)

func (ResourceSharingListParamsOrder) IsKnown

type ResourceSharingListParamsStatus

type ResourceSharingListParamsStatus string

Filter shares by status.

const (
	ResourceSharingListParamsStatusActive   ResourceSharingListParamsStatus = "active"
	ResourceSharingListParamsStatusDeleting ResourceSharingListParamsStatus = "deleting"
	ResourceSharingListParamsStatusDeleted  ResourceSharingListParamsStatus = "deleted"
)

func (ResourceSharingListParamsStatus) IsKnown

type ResourceSharingListParamsTargetType

type ResourceSharingListParamsTargetType string

Filter shares by target_type.

const (
	ResourceSharingListParamsTargetTypeAccount      ResourceSharingListParamsTargetType = "account"
	ResourceSharingListParamsTargetTypeOrganization ResourceSharingListParamsTargetType = "organization"
)

func (ResourceSharingListParamsTargetType) IsKnown

type ResourceSharingListResponse

type ResourceSharingListResponse struct {
	// Share identifier tag.
	ID string `json:"id,required"`
	// Account identifier.
	AccountID string `json:"account_id,required"`
	// The display name of an account.
	AccountName string `json:"account_name,required"`
	// When the share was created.
	Created time.Time `json:"created,required" format:"date-time"`
	// When the share was modified.
	Modified time.Time `json:"modified,required" format:"date-time"`
	// The name of the share.
	Name string `json:"name,required"`
	// Organization identifier.
	OrganizationID string                                `json:"organization_id,required"`
	Status         ResourceSharingListResponseStatus     `json:"status,required"`
	TargetType     ResourceSharingListResponseTargetType `json:"target_type,required"`
	Kind           ResourceSharingListResponseKind       `json:"kind"`
	JSON           resourceSharingListResponseJSON       `json:"-"`
}

func (*ResourceSharingListResponse) UnmarshalJSON

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

type ResourceSharingListResponseKind

type ResourceSharingListResponseKind string
const (
	ResourceSharingListResponseKindSent     ResourceSharingListResponseKind = "sent"
	ResourceSharingListResponseKindReceived ResourceSharingListResponseKind = "received"
)

func (ResourceSharingListResponseKind) IsKnown

type ResourceSharingListResponseStatus

type ResourceSharingListResponseStatus string
const (
	ResourceSharingListResponseStatusActive   ResourceSharingListResponseStatus = "active"
	ResourceSharingListResponseStatusDeleting ResourceSharingListResponseStatus = "deleting"
	ResourceSharingListResponseStatusDeleted  ResourceSharingListResponseStatus = "deleted"
)

func (ResourceSharingListResponseStatus) IsKnown

type ResourceSharingListResponseTargetType

type ResourceSharingListResponseTargetType string
const (
	ResourceSharingListResponseTargetTypeAccount      ResourceSharingListResponseTargetType = "account"
	ResourceSharingListResponseTargetTypeOrganization ResourceSharingListResponseTargetType = "organization"
)

func (ResourceSharingListResponseTargetType) IsKnown

type ResourceSharingNewParams

type ResourceSharingNewParams struct {
	// Account identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	// The name of the share.
	Name       param.Field[string]                              `json:"name,required"`
	Recipients param.Field[[]ResourceSharingNewParamsRecipient] `json:"recipients,required"`
	Resources  param.Field[[]ResourceSharingNewParamsResource]  `json:"resources,required"`
}

func (ResourceSharingNewParams) MarshalJSON

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

type ResourceSharingNewParamsRecipient

type ResourceSharingNewParamsRecipient struct {
	// Account identifier.
	AccountID param.Field[string] `json:"account_id"`
	// Organization identifier.
	OrganizationID param.Field[string] `json:"organization_id"`
}

Account or organization ID must be provided.

func (ResourceSharingNewParamsRecipient) MarshalJSON

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

type ResourceSharingNewParamsResource

type ResourceSharingNewParamsResource struct {
	// Resource Metadata.
	Meta param.Field[interface{}] `json:"meta,required"`
	// Account identifier.
	ResourceAccountID param.Field[string] `json:"resource_account_id,required"`
	// Share Resource identifier.
	ResourceID param.Field[string] `json:"resource_id,required"`
	// Resource Type.
	ResourceType param.Field[ResourceSharingNewParamsResourcesResourceType] `json:"resource_type,required"`
}

func (ResourceSharingNewParamsResource) MarshalJSON

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

type ResourceSharingNewParamsResourcesResourceType

type ResourceSharingNewParamsResourcesResourceType string

Resource Type.

const (
	ResourceSharingNewParamsResourcesResourceTypeCustomRuleset ResourceSharingNewParamsResourcesResourceType = "custom-ruleset"
	ResourceSharingNewParamsResourcesResourceTypeWidget        ResourceSharingNewParamsResourcesResourceType = "widget"
)

func (ResourceSharingNewParamsResourcesResourceType) IsKnown

type ResourceSharingNewResponse

type ResourceSharingNewResponse struct {
	// Share identifier tag.
	ID string `json:"id,required"`
	// Account identifier.
	AccountID string `json:"account_id,required"`
	// The display name of an account.
	AccountName string `json:"account_name,required"`
	// When the share was created.
	Created time.Time `json:"created,required" format:"date-time"`
	// When the share was modified.
	Modified time.Time `json:"modified,required" format:"date-time"`
	// The name of the share.
	Name string `json:"name,required"`
	// Organization identifier.
	OrganizationID string                               `json:"organization_id,required"`
	Status         ResourceSharingNewResponseStatus     `json:"status,required"`
	TargetType     ResourceSharingNewResponseTargetType `json:"target_type,required"`
	Kind           ResourceSharingNewResponseKind       `json:"kind"`
	JSON           resourceSharingNewResponseJSON       `json:"-"`
}

func (*ResourceSharingNewResponse) UnmarshalJSON

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

type ResourceSharingNewResponseEnvelope

type ResourceSharingNewResponseEnvelope struct {
	Errors []shared.ResponseInfo `json:"errors,required"`
	// Whether the API call was successful.
	Success bool                                   `json:"success,required"`
	Result  ResourceSharingNewResponse             `json:"result"`
	JSON    resourceSharingNewResponseEnvelopeJSON `json:"-"`
}

func (*ResourceSharingNewResponseEnvelope) UnmarshalJSON

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

type ResourceSharingNewResponseKind

type ResourceSharingNewResponseKind string
const (
	ResourceSharingNewResponseKindSent     ResourceSharingNewResponseKind = "sent"
	ResourceSharingNewResponseKindReceived ResourceSharingNewResponseKind = "received"
)

func (ResourceSharingNewResponseKind) IsKnown

type ResourceSharingNewResponseStatus

type ResourceSharingNewResponseStatus string
const (
	ResourceSharingNewResponseStatusActive   ResourceSharingNewResponseStatus = "active"
	ResourceSharingNewResponseStatusDeleting ResourceSharingNewResponseStatus = "deleting"
	ResourceSharingNewResponseStatusDeleted  ResourceSharingNewResponseStatus = "deleted"
)

func (ResourceSharingNewResponseStatus) IsKnown

type ResourceSharingNewResponseTargetType

type ResourceSharingNewResponseTargetType string
const (
	ResourceSharingNewResponseTargetTypeAccount      ResourceSharingNewResponseTargetType = "account"
	ResourceSharingNewResponseTargetTypeOrganization ResourceSharingNewResponseTargetType = "organization"
)

func (ResourceSharingNewResponseTargetType) IsKnown

type ResourceSharingService

type ResourceSharingService struct {
	Options    []option.RequestOption
	Recipients *RecipientService
	Resources  *ResourceService
}

ResourceSharingService 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 NewResourceSharingService method instead.

func NewResourceSharingService

func NewResourceSharingService(opts ...option.RequestOption) (r *ResourceSharingService)

NewResourceSharingService 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 (*ResourceSharingService) Delete

Deletion is not immediate, an updated share object with a new status will be returned.

func (*ResourceSharingService) Get

Fetches share by ID.

func (*ResourceSharingService) List

Lists all account shares.

func (*ResourceSharingService) ListAutoPaging

Lists all account shares.

func (*ResourceSharingService) New

Create a new share

func (*ResourceSharingService) Update

Updating is not immediate, an updated share object with a new status will be returned.

type ResourceSharingUpdateParams

type ResourceSharingUpdateParams struct {
	// Account identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	// The name of the share.
	Name param.Field[string] `json:"name,required"`
}

func (ResourceSharingUpdateParams) MarshalJSON

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

type ResourceSharingUpdateResponse

type ResourceSharingUpdateResponse struct {
	// Share identifier tag.
	ID string `json:"id,required"`
	// Account identifier.
	AccountID string `json:"account_id,required"`
	// The display name of an account.
	AccountName string `json:"account_name,required"`
	// When the share was created.
	Created time.Time `json:"created,required" format:"date-time"`
	// When the share was modified.
	Modified time.Time `json:"modified,required" format:"date-time"`
	// The name of the share.
	Name string `json:"name,required"`
	// Organization identifier.
	OrganizationID string                                  `json:"organization_id,required"`
	Status         ResourceSharingUpdateResponseStatus     `json:"status,required"`
	TargetType     ResourceSharingUpdateResponseTargetType `json:"target_type,required"`
	Kind           ResourceSharingUpdateResponseKind       `json:"kind"`
	JSON           resourceSharingUpdateResponseJSON       `json:"-"`
}

func (*ResourceSharingUpdateResponse) UnmarshalJSON

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

type ResourceSharingUpdateResponseEnvelope

type ResourceSharingUpdateResponseEnvelope struct {
	Errors []shared.ResponseInfo `json:"errors,required"`
	// Whether the API call was successful.
	Success bool                                      `json:"success,required"`
	Result  ResourceSharingUpdateResponse             `json:"result"`
	JSON    resourceSharingUpdateResponseEnvelopeJSON `json:"-"`
}

func (*ResourceSharingUpdateResponseEnvelope) UnmarshalJSON

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

type ResourceSharingUpdateResponseKind

type ResourceSharingUpdateResponseKind string
const (
	ResourceSharingUpdateResponseKindSent     ResourceSharingUpdateResponseKind = "sent"
	ResourceSharingUpdateResponseKindReceived ResourceSharingUpdateResponseKind = "received"
)

func (ResourceSharingUpdateResponseKind) IsKnown

type ResourceSharingUpdateResponseStatus

type ResourceSharingUpdateResponseStatus string
const (
	ResourceSharingUpdateResponseStatusActive   ResourceSharingUpdateResponseStatus = "active"
	ResourceSharingUpdateResponseStatusDeleting ResourceSharingUpdateResponseStatus = "deleting"
	ResourceSharingUpdateResponseStatusDeleted  ResourceSharingUpdateResponseStatus = "deleted"
)

func (ResourceSharingUpdateResponseStatus) IsKnown

type ResourceSharingUpdateResponseTargetType

type ResourceSharingUpdateResponseTargetType string
const (
	ResourceSharingUpdateResponseTargetTypeAccount      ResourceSharingUpdateResponseTargetType = "account"
	ResourceSharingUpdateResponseTargetTypeOrganization ResourceSharingUpdateResponseTargetType = "organization"
)

func (ResourceSharingUpdateResponseTargetType) IsKnown

type ResourceUpdateParams

type ResourceUpdateParams struct {
	// Account identifier.
	AccountID param.Field[string] `path:"account_id,required"`
	// Resource Metadata.
	Meta param.Field[interface{}] `json:"meta,required"`
}

func (ResourceUpdateParams) MarshalJSON

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

type ResourceUpdateResponse

type ResourceUpdateResponse struct {
	// Share Resource identifier.
	ID string `json:"id,required"`
	// When the share was created.
	Created time.Time `json:"created,required" format:"date-time"`
	// Resource Metadata.
	Meta interface{} `json:"meta,required"`
	// When the share was modified.
	Modified time.Time `json:"modified,required" format:"date-time"`
	// Account identifier.
	ResourceAccountID string `json:"resource_account_id,required"`
	// Share Resource identifier.
	ResourceID string `json:"resource_id,required"`
	// Resource Type.
	ResourceType ResourceUpdateResponseResourceType `json:"resource_type,required"`
	// Resource Version.
	ResourceVersion int64 `json:"resource_version,required"`
	// Resource Status.
	Status ResourceUpdateResponseStatus `json:"status,required"`
	JSON   resourceUpdateResponseJSON   `json:"-"`
}

func (*ResourceUpdateResponse) UnmarshalJSON

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

type ResourceUpdateResponseEnvelope

type ResourceUpdateResponseEnvelope struct {
	Errors []shared.ResponseInfo `json:"errors,required"`
	// Whether the API call was successful.
	Success bool                               `json:"success,required"`
	Result  ResourceUpdateResponse             `json:"result"`
	JSON    resourceUpdateResponseEnvelopeJSON `json:"-"`
}

func (*ResourceUpdateResponseEnvelope) UnmarshalJSON

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

type ResourceUpdateResponseResourceType

type ResourceUpdateResponseResourceType string

Resource Type.

const (
	ResourceUpdateResponseResourceTypeCustomRuleset ResourceUpdateResponseResourceType = "custom-ruleset"
	ResourceUpdateResponseResourceTypeWidget        ResourceUpdateResponseResourceType = "widget"
)

func (ResourceUpdateResponseResourceType) IsKnown

type ResourceUpdateResponseStatus

type ResourceUpdateResponseStatus string

Resource Status.

const (
	ResourceUpdateResponseStatusActive   ResourceUpdateResponseStatus = "active"
	ResourceUpdateResponseStatusDeleting ResourceUpdateResponseStatus = "deleting"
	ResourceUpdateResponseStatusDeleted  ResourceUpdateResponseStatus = "deleted"
)

func (ResourceUpdateResponseStatus) IsKnown

func (r ResourceUpdateResponseStatus) IsKnown() bool

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type ResponseInfoSource

type ResponseInfoSource = shared.ResponseInfoSource

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

type RoleParam

type RoleParam = shared.RoleParam

This is an alias to an internal type.

type RolePermissions

type RolePermissions = shared.RolePermissions

This is an alias to an internal type.

type RolePermissionsParam

type RolePermissionsParam = shared.RolePermissionsParam

This is an alias to an internal type.

type SortDirection

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

type Subscription

type Subscription = shared.Subscription

This is an alias to an internal type.

type SubscriptionFrequency

type SubscriptionFrequency = shared.SubscriptionFrequency

How often the subscription is renewed automatically.

This is an alias to an internal type.

type SubscriptionParam

type SubscriptionParam = shared.SubscriptionParam

This is an alias to an internal type.

type SubscriptionState

type SubscriptionState = shared.SubscriptionState

The state that the subscription is in.

This is an alias to an internal type.

type Token

type Token = shared.Token

This is an alias to an internal type.

type TokenCondition

type TokenCondition = shared.TokenCondition

This is an alias to an internal type.

type TokenConditionCIDRList

type TokenConditionCIDRList = shared.TokenConditionCIDRList

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionCIDRListParam

type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionParam

type TokenConditionParam = shared.TokenConditionParam

This is an alias to an internal type.

type TokenConditionRequestIP

type TokenConditionRequestIP = shared.TokenConditionRequestIP

Client IP restrictions.

This is an alias to an internal type.

type TokenConditionRequestIPParam

type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam

Client IP restrictions.

This is an alias to an internal type.

type TokenParam

type TokenParam = shared.TokenParam

This is an alias to an internal type.

type TokenPolicy

type TokenPolicy = shared.TokenPolicy

This is an alias to an internal type.

type TokenPolicyEffect

type TokenPolicyEffect = shared.TokenPolicyEffect

Allow or deny operations against the resources.

This is an alias to an internal type.

type TokenPolicyParam

type TokenPolicyParam = shared.TokenPolicyParam

This is an alias to an internal type.

type TokenPolicyPermissionGroup

type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup

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

This is an alias to an internal type.

type TokenPolicyPermissionGroupParam

type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam

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

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMeta

type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMetaParam

type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectNested

type TokenPolicyResourcesIAMResourcesTypeObjectNested = shared.TokenPolicyResourcesIAMResourcesTypeObjectNested

Map of nested resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam

type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectNestedParam

Map of nested resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectString

type TokenPolicyResourcesIAMResourcesTypeObjectString = shared.TokenPolicyResourcesIAMResourcesTypeObjectString

Map of simple string resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectStringParam

type TokenPolicyResourcesIAMResourcesTypeObjectStringParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectStringParam

Map of simple string resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesUnion

type TokenPolicyResourcesUnion = shared.TokenPolicyResourcesUnion

A list of resource names that the policy applies to.

This is an alias to an internal type.

type TokenPolicyResourcesUnionParam

type TokenPolicyResourcesUnionParam = shared.TokenPolicyResourcesUnionParam

A list of resource names that the policy applies to.

This is an alias to an internal type.

type TokenStatus

type TokenStatus = shared.TokenStatus

Status of the token.

This is an alias to an internal type.

type TokenValue

type TokenValue = shared.TokenValue

The token value.

This is an alias to an internal type.

Jump to

Keyboard shortcuts

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