accounts

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 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 CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

View Source
const MemberStatusAccepted = shared.MemberStatusAccepted

This is an alias to an internal value.

View Source
const MemberStatusPending = shared.MemberStatusPending

This is an alias to an internal value.

View Source
const SortDirectionAsc = shared.SortDirectionAsc

This is an alias to an internal value.

View Source
const SortDirectionDesc = shared.SortDirectionDesc

This is an alias to an internal value.

View Source
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly

This is an alias to an internal value.

View Source
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment

This is an alias to an internal value.

View Source
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled

This is an alias to an internal value.

View Source
const SubscriptionStateExpired = shared.SubscriptionStateExpired

This is an alias to an internal value.

View Source
const SubscriptionStateFailed = shared.SubscriptionStateFailed

This is an alias to an internal value.

View Source
const SubscriptionStatePaid = shared.SubscriptionStatePaid

This is an alias to an internal value.

View Source
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned

This is an alias to an internal value.

View Source
const SubscriptionStateTrial = shared.SubscriptionStateTrial

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type Account

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

func (*Account) UnmarshalJSON

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

type AccountDeleteParams

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

type AccountDeleteResponse

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

func (*AccountDeleteResponse) UnmarshalJSON

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

type AccountDeleteResponseEnvelope

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

func (*AccountDeleteResponseEnvelope) UnmarshalJSON

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

type AccountDeleteResponseEnvelopeSuccess

type AccountDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AccountDeleteResponseEnvelopeSuccessTrue AccountDeleteResponseEnvelopeSuccess = true
)

func (AccountDeleteResponseEnvelopeSuccess) IsKnown

type AccountGetParams

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

type AccountGetResponseEnvelope

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

func (*AccountGetResponseEnvelope) UnmarshalJSON

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

type AccountGetResponseEnvelopeSuccess

type AccountGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AccountGetResponseEnvelopeSuccessTrue AccountGetResponseEnvelopeSuccess = true
)

func (AccountGetResponseEnvelopeSuccess) IsKnown

type AccountListParams

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

func (AccountListParams) URLQuery

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

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

type AccountListParamsDirection

type AccountListParamsDirection string

Direction to order results.

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

func (AccountListParamsDirection) IsKnown

func (r AccountListParamsDirection) IsKnown() bool

type AccountNewParams

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

func (AccountNewParams) MarshalJSON

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

type AccountNewParamsType

type AccountNewParamsType string

the type of account being created. For self-serve customers, use standard. for enterprise customers, use enterprise.

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

func (AccountNewParamsType) IsKnown

func (r AccountNewParamsType) IsKnown() bool

type AccountNewParamsUnit

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

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

func (AccountNewParamsUnit) MarshalJSON

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

type AccountNewResponseEnvelope

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

func (*AccountNewResponseEnvelope) UnmarshalJSON

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

type AccountNewResponseEnvelopeSuccess

type AccountNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AccountNewResponseEnvelopeSuccessTrue AccountNewResponseEnvelopeSuccess = true
)

func (AccountNewResponseEnvelopeSuccess) IsKnown

type AccountParam

type AccountParam struct {
	// Account name
	Name param.Field[string] `json:"name,required"`
	// Account settings
	Settings param.Field[AccountSettingsParam] `json:"settings"`
}

func (AccountParam) MarshalJSON

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

type AccountService

type AccountService struct {
	Options       []option.RequestOption
	Members       *MemberService
	Roles         *RoleService
	Subscriptions *SubscriptionService
}

AccountService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewAccountService method instead.

func NewAccountService

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

NewAccountService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*AccountService) Delete

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

func (*AccountService) Get

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

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

func (*AccountService) List

List all accounts you have ownership or verified access to.

func (*AccountService) ListAutoPaging

List all accounts you have ownership or verified access to.

func (*AccountService) New

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

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

func (*AccountService) Update

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

Update an existing account.

type AccountSettings

type AccountSettings struct {
	// Sets an abuse contact email to notify for abuse reports.
	AbuseContactEmail string `json:"abuse_contact_email"`
	// Specifies the default nameservers to be used for new zones added to this
	// account.
	//
	// - `cloudflare.standard` for Cloudflare-branded nameservers
	// - `custom.account` for account custom nameservers
	// - `custom.tenant` for tenant custom nameservers
	//
	// See
	// [Custom Nameservers](https://developers.cloudflare.com/dns/additional-options/custom-nameservers/)
	// for more information.
	DefaultNameservers AccountSettingsDefaultNameservers `json:"default_nameservers"`
	// Indicates whether membership in this account requires that Two-Factor
	// Authentication is enabled
	EnforceTwofactor bool `json:"enforce_twofactor"`
	// Indicates whether new zones should use the account-level custom nameservers by
	// default.
	//
	// Deprecated in favor of `default_nameservers`.
	UseAccountCustomNSByDefault bool                `json:"use_account_custom_ns_by_default"`
	JSON                        accountSettingsJSON `json:"-"`
}

Account settings

func (*AccountSettings) UnmarshalJSON

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

type AccountSettingsDefaultNameservers

type AccountSettingsDefaultNameservers string

Specifies the default nameservers to be used for new zones added to this account.

- `cloudflare.standard` for Cloudflare-branded nameservers - `custom.account` for account custom nameservers - `custom.tenant` for tenant custom nameservers

See [Custom Nameservers](https://developers.cloudflare.com/dns/additional-options/custom-nameservers/) for more information.

const (
	AccountSettingsDefaultNameserversCloudflareStandard AccountSettingsDefaultNameservers = "cloudflare.standard"
	AccountSettingsDefaultNameserversCustomAccount      AccountSettingsDefaultNameservers = "custom.account"
	AccountSettingsDefaultNameserversCustomTenant       AccountSettingsDefaultNameservers = "custom.tenant"
)

func (AccountSettingsDefaultNameservers) IsKnown

type AccountSettingsParam

type AccountSettingsParam struct {
	// Sets an abuse contact email to notify for abuse reports.
	AbuseContactEmail param.Field[string] `json:"abuse_contact_email"`
	// Specifies the default nameservers to be used for new zones added to this
	// account.
	//
	// - `cloudflare.standard` for Cloudflare-branded nameservers
	// - `custom.account` for account custom nameservers
	// - `custom.tenant` for tenant custom nameservers
	//
	// See
	// [Custom Nameservers](https://developers.cloudflare.com/dns/additional-options/custom-nameservers/)
	// for more information.
	DefaultNameservers param.Field[AccountSettingsDefaultNameservers] `json:"default_nameservers"`
	// Indicates whether membership in this account requires that Two-Factor
	// Authentication is enabled
	EnforceTwofactor param.Field[bool] `json:"enforce_twofactor"`
	// Indicates whether new zones should use the account-level custom nameservers by
	// default.
	//
	// Deprecated in favor of `default_nameservers`.
	UseAccountCustomNSByDefault param.Field[bool] `json:"use_account_custom_ns_by_default"`
}

Account settings

func (AccountSettingsParam) MarshalJSON

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

type AccountUpdateParams

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

func (AccountUpdateParams) MarshalJSON

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

type AccountUpdateResponseEnvelope

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

func (*AccountUpdateResponseEnvelope) UnmarshalJSON

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

type AccountUpdateResponseEnvelopeSuccess

type AccountUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AccountUpdateResponseEnvelopeSuccessTrue AccountUpdateResponseEnvelopeSuccess = true
)

func (AccountUpdateResponseEnvelopeSuccess) IsKnown

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

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

This is an alias to an internal type.

type AuditLogOwner

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type CertificateCA

type CertificateCA = shared.CertificateCA

The Certificate Authority that will issue the certificate

This is an alias to an internal type.

type CertificateRequestType

type CertificateRequestType = shared.CertificateRequestType

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

This is an alias to an internal type.

type CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

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

This is an alias to an internal type.

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

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

type MemberDeleteResponse

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

func (*MemberDeleteResponse) UnmarshalJSON

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

type MemberDeleteResponseEnvelope

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

func (*MemberDeleteResponseEnvelope) UnmarshalJSON

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

type MemberDeleteResponseEnvelopeSuccess

type MemberDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	MemberDeleteResponseEnvelopeSuccessTrue MemberDeleteResponseEnvelopeSuccess = true
)

func (MemberDeleteResponseEnvelopeSuccess) IsKnown

type MemberGetParams

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

type MemberGetResponse

type MemberGetResponse struct {
	// Membership identifier tag.
	ID string `json:"id"`
	// Access policy for the membership
	Policies []MemberGetResponsePolicy `json:"policies"`
	// Roles assigned to this Member.
	Roles []shared.Role `json:"roles"`
	// A member's status in the account.
	Status MemberGetResponseStatus `json:"status"`
	// Details of the user associated to the membership.
	User MemberGetResponseUser `json:"user"`
	JSON memberGetResponseJSON `json:"-"`
}

func (*MemberGetResponse) UnmarshalJSON

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

type MemberGetResponseEnvelope

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

func (*MemberGetResponseEnvelope) UnmarshalJSON

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

type MemberGetResponseEnvelopeSuccess

type MemberGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	MemberGetResponseEnvelopeSuccessTrue MemberGetResponseEnvelopeSuccess = true
)

func (MemberGetResponseEnvelopeSuccess) IsKnown

type MemberGetResponsePoliciesAccess

type MemberGetResponsePoliciesAccess string

Allow or deny operations against the resources.

const (
	MemberGetResponsePoliciesAccessAllow MemberGetResponsePoliciesAccess = "allow"
	MemberGetResponsePoliciesAccessDeny  MemberGetResponsePoliciesAccess = "deny"
)

func (MemberGetResponsePoliciesAccess) IsKnown

type MemberGetResponsePoliciesPermissionGroup

type MemberGetResponsePoliciesPermissionGroup struct {
	// Identifier of the group.
	ID string `json:"id,required"`
	// Attributes associated to the permission group.
	Meta MemberGetResponsePoliciesPermissionGroupsMeta `json:"meta"`
	// Name of the group.
	Name string                                       `json:"name"`
	JSON memberGetResponsePoliciesPermissionGroupJSON `json:"-"`
}

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

func (*MemberGetResponsePoliciesPermissionGroup) UnmarshalJSON

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

type MemberGetResponsePoliciesPermissionGroupsMeta

type MemberGetResponsePoliciesPermissionGroupsMeta struct {
	Key   string                                            `json:"key"`
	Value string                                            `json:"value"`
	JSON  memberGetResponsePoliciesPermissionGroupsMetaJSON `json:"-"`
}

Attributes associated to the permission group.

func (*MemberGetResponsePoliciesPermissionGroupsMeta) UnmarshalJSON

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

type MemberGetResponsePoliciesResourceGroup

type MemberGetResponsePoliciesResourceGroup struct {
	// Identifier of the group.
	ID string `json:"id,required"`
	// The scope associated to the resource group
	Scope []MemberGetResponsePoliciesResourceGroupsScope `json:"scope,required"`
	// Attributes associated to the resource group.
	Meta MemberGetResponsePoliciesResourceGroupsMeta `json:"meta"`
	// Name of the resource group.
	Name string                                     `json:"name"`
	JSON memberGetResponsePoliciesResourceGroupJSON `json:"-"`
}

A group of scoped resources.

func (*MemberGetResponsePoliciesResourceGroup) UnmarshalJSON

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

type MemberGetResponsePoliciesResourceGroupsMeta

type MemberGetResponsePoliciesResourceGroupsMeta struct {
	Key   string                                          `json:"key"`
	Value string                                          `json:"value"`
	JSON  memberGetResponsePoliciesResourceGroupsMetaJSON `json:"-"`
}

Attributes associated to the resource group.

func (*MemberGetResponsePoliciesResourceGroupsMeta) UnmarshalJSON

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

type MemberGetResponsePoliciesResourceGroupsScope

type MemberGetResponsePoliciesResourceGroupsScope struct {
	// This is a combination of pre-defined resource name and identifier (like Account
	// ID etc.)
	Key string `json:"key,required"`
	// A list of scope objects for additional context.
	Objects []MemberGetResponsePoliciesResourceGroupsScopeObject `json:"objects,required"`
	JSON    memberGetResponsePoliciesResourceGroupsScopeJSON     `json:"-"`
}

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

func (*MemberGetResponsePoliciesResourceGroupsScope) UnmarshalJSON

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

type MemberGetResponsePoliciesResourceGroupsScopeObject

type MemberGetResponsePoliciesResourceGroupsScopeObject struct {
	// This is a combination of pre-defined resource name and identifier (like Zone ID
	// etc.)
	Key  string                                                 `json:"key,required"`
	JSON memberGetResponsePoliciesResourceGroupsScopeObjectJSON `json:"-"`
}

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

func (*MemberGetResponsePoliciesResourceGroupsScopeObject) UnmarshalJSON

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

type MemberGetResponsePolicy

type MemberGetResponsePolicy struct {
	// Policy identifier.
	ID string `json:"id"`
	// Allow or deny operations against the resources.
	Access MemberGetResponsePoliciesAccess `json:"access"`
	// A set of permission groups that are specified to the policy.
	PermissionGroups []MemberGetResponsePoliciesPermissionGroup `json:"permission_groups"`
	// A list of resource groups that the policy applies to.
	ResourceGroups []MemberGetResponsePoliciesResourceGroup `json:"resource_groups"`
	JSON           memberGetResponsePolicyJSON              `json:"-"`
}

func (*MemberGetResponsePolicy) UnmarshalJSON

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

type MemberGetResponseStatus

type MemberGetResponseStatus string

A member's status in the account.

const (
	MemberGetResponseStatusAccepted MemberGetResponseStatus = "accepted"
	MemberGetResponseStatusPending  MemberGetResponseStatus = "pending"
)

func (MemberGetResponseStatus) IsKnown

func (r MemberGetResponseStatus) IsKnown() bool

type MemberGetResponseUser

type MemberGetResponseUser struct {
	// The contact email address of the user.
	Email string `json:"email,required"`
	// Identifier
	ID string `json:"id"`
	// User's first name
	FirstName string `json:"first_name,nullable"`
	// User's last name
	LastName string `json:"last_name,nullable"`
	// Indicates whether two-factor authentication is enabled for the user account.
	// Does not apply to API authentication.
	TwoFactorAuthenticationEnabled bool                      `json:"two_factor_authentication_enabled"`
	JSON                           memberGetResponseUserJSON `json:"-"`
}

Details of the user associated to the membership.

func (*MemberGetResponseUser) UnmarshalJSON

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

type MemberListParams

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

func (MemberListParams) URLQuery

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

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

type MemberListParamsDirection

type MemberListParamsDirection string

Direction to order results.

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

func (MemberListParamsDirection) IsKnown

func (r MemberListParamsDirection) IsKnown() bool

type MemberListParamsOrder

type MemberListParamsOrder string

Field to order results by.

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

func (MemberListParamsOrder) IsKnown

func (r MemberListParamsOrder) IsKnown() bool

type MemberListParamsStatus

type MemberListParamsStatus string

A member's status in the account.

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

func (MemberListParamsStatus) IsKnown

func (r MemberListParamsStatus) IsKnown() bool

type MemberListResponse

type MemberListResponse struct {
	// Membership identifier tag.
	ID string `json:"id"`
	// Access policy for the membership
	Policies []MemberListResponsePolicy `json:"policies"`
	// Roles assigned to this Member.
	Roles []shared.Role `json:"roles"`
	// A member's status in the account.
	Status MemberListResponseStatus `json:"status"`
	// Details of the user associated to the membership.
	User MemberListResponseUser `json:"user"`
	JSON memberListResponseJSON `json:"-"`
}

func (*MemberListResponse) UnmarshalJSON

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

type MemberListResponsePoliciesAccess

type MemberListResponsePoliciesAccess string

Allow or deny operations against the resources.

const (
	MemberListResponsePoliciesAccessAllow MemberListResponsePoliciesAccess = "allow"
	MemberListResponsePoliciesAccessDeny  MemberListResponsePoliciesAccess = "deny"
)

func (MemberListResponsePoliciesAccess) IsKnown

type MemberListResponsePoliciesPermissionGroup

type MemberListResponsePoliciesPermissionGroup struct {
	// Identifier of the group.
	ID string `json:"id,required"`
	// Attributes associated to the permission group.
	Meta MemberListResponsePoliciesPermissionGroupsMeta `json:"meta"`
	// Name of the group.
	Name string                                        `json:"name"`
	JSON memberListResponsePoliciesPermissionGroupJSON `json:"-"`
}

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

func (*MemberListResponsePoliciesPermissionGroup) UnmarshalJSON

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

type MemberListResponsePoliciesPermissionGroupsMeta

type MemberListResponsePoliciesPermissionGroupsMeta struct {
	Key   string                                             `json:"key"`
	Value string                                             `json:"value"`
	JSON  memberListResponsePoliciesPermissionGroupsMetaJSON `json:"-"`
}

Attributes associated to the permission group.

func (*MemberListResponsePoliciesPermissionGroupsMeta) UnmarshalJSON

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

type MemberListResponsePoliciesResourceGroup

type MemberListResponsePoliciesResourceGroup struct {
	// Identifier of the group.
	ID string `json:"id,required"`
	// The scope associated to the resource group
	Scope []MemberListResponsePoliciesResourceGroupsScope `json:"scope,required"`
	// Attributes associated to the resource group.
	Meta MemberListResponsePoliciesResourceGroupsMeta `json:"meta"`
	// Name of the resource group.
	Name string                                      `json:"name"`
	JSON memberListResponsePoliciesResourceGroupJSON `json:"-"`
}

A group of scoped resources.

func (*MemberListResponsePoliciesResourceGroup) UnmarshalJSON

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

type MemberListResponsePoliciesResourceGroupsMeta

type MemberListResponsePoliciesResourceGroupsMeta struct {
	Key   string                                           `json:"key"`
	Value string                                           `json:"value"`
	JSON  memberListResponsePoliciesResourceGroupsMetaJSON `json:"-"`
}

Attributes associated to the resource group.

func (*MemberListResponsePoliciesResourceGroupsMeta) UnmarshalJSON

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

type MemberListResponsePoliciesResourceGroupsScope

type MemberListResponsePoliciesResourceGroupsScope struct {
	// This is a combination of pre-defined resource name and identifier (like Account
	// ID etc.)
	Key string `json:"key,required"`
	// A list of scope objects for additional context.
	Objects []MemberListResponsePoliciesResourceGroupsScopeObject `json:"objects,required"`
	JSON    memberListResponsePoliciesResourceGroupsScopeJSON     `json:"-"`
}

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

func (*MemberListResponsePoliciesResourceGroupsScope) UnmarshalJSON

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

type MemberListResponsePoliciesResourceGroupsScopeObject

type MemberListResponsePoliciesResourceGroupsScopeObject struct {
	// This is a combination of pre-defined resource name and identifier (like Zone ID
	// etc.)
	Key  string                                                  `json:"key,required"`
	JSON memberListResponsePoliciesResourceGroupsScopeObjectJSON `json:"-"`
}

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

func (*MemberListResponsePoliciesResourceGroupsScopeObject) UnmarshalJSON

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

type MemberListResponsePolicy

type MemberListResponsePolicy struct {
	// Policy identifier.
	ID string `json:"id"`
	// Allow or deny operations against the resources.
	Access MemberListResponsePoliciesAccess `json:"access"`
	// A set of permission groups that are specified to the policy.
	PermissionGroups []MemberListResponsePoliciesPermissionGroup `json:"permission_groups"`
	// A list of resource groups that the policy applies to.
	ResourceGroups []MemberListResponsePoliciesResourceGroup `json:"resource_groups"`
	JSON           memberListResponsePolicyJSON              `json:"-"`
}

func (*MemberListResponsePolicy) UnmarshalJSON

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

type MemberListResponseStatus

type MemberListResponseStatus string

A member's status in the account.

const (
	MemberListResponseStatusAccepted MemberListResponseStatus = "accepted"
	MemberListResponseStatusPending  MemberListResponseStatus = "pending"
)

func (MemberListResponseStatus) IsKnown

func (r MemberListResponseStatus) IsKnown() bool

type MemberListResponseUser

type MemberListResponseUser struct {
	// The contact email address of the user.
	Email string `json:"email,required"`
	// Identifier
	ID string `json:"id"`
	// User's first name
	FirstName string `json:"first_name,nullable"`
	// User's last name
	LastName string `json:"last_name,nullable"`
	// Indicates whether two-factor authentication is enabled for the user account.
	// Does not apply to API authentication.
	TwoFactorAuthenticationEnabled bool                       `json:"two_factor_authentication_enabled"`
	JSON                           memberListResponseUserJSON `json:"-"`
}

Details of the user associated to the membership.

func (*MemberListResponseUser) UnmarshalJSON

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

type MemberNewParams

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

func (MemberNewParams) MarshalJSON

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

type MemberNewParamsBody

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

func (MemberNewParamsBody) MarshalJSON

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

type MemberNewParamsBodyIAMCreateMemberWithPolicies

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

func (MemberNewParamsBodyIAMCreateMemberWithPolicies) MarshalJSON

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

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesAccess

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesAccess string

Allow or deny operations against the resources.

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

func (MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesAccess) IsKnown

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesPermissionGroup

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

A group of permissions.

func (MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesPermissionGroup) MarshalJSON

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesResourceGroup

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

A group of scoped resources.

func (MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesResourceGroup) MarshalJSON

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPolicy

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

func (MemberNewParamsBodyIAMCreateMemberWithPoliciesPolicy) MarshalJSON

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

type MemberNewParamsBodyIAMCreateMemberWithPoliciesStatus

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

func (MemberNewParamsBodyIAMCreateMemberWithPoliciesStatus) IsKnown

type MemberNewParamsBodyIAMCreateMemberWithRoles

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

func (MemberNewParamsBodyIAMCreateMemberWithRoles) MarshalJSON

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

type MemberNewParamsBodyIAMCreateMemberWithRolesStatus

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

func (MemberNewParamsBodyIAMCreateMemberWithRolesStatus) IsKnown

type MemberNewParamsBodyStatus

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

func (MemberNewParamsBodyStatus) IsKnown

func (r MemberNewParamsBodyStatus) IsKnown() bool

type MemberNewParamsBodyUnion

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

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

type MemberNewResponse

type MemberNewResponse struct {
	// Membership identifier tag.
	ID string `json:"id"`
	// Access policy for the membership
	Policies []MemberNewResponsePolicy `json:"policies"`
	// Roles assigned to this Member.
	Roles []shared.Role `json:"roles"`
	// A member's status in the account.
	Status MemberNewResponseStatus `json:"status"`
	// Details of the user associated to the membership.
	User MemberNewResponseUser `json:"user"`
	JSON memberNewResponseJSON `json:"-"`
}

func (*MemberNewResponse) UnmarshalJSON

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

type MemberNewResponseEnvelope

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

func (*MemberNewResponseEnvelope) UnmarshalJSON

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

type MemberNewResponseEnvelopeSuccess

type MemberNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	MemberNewResponseEnvelopeSuccessTrue MemberNewResponseEnvelopeSuccess = true
)

func (MemberNewResponseEnvelopeSuccess) IsKnown

type MemberNewResponsePoliciesAccess

type MemberNewResponsePoliciesAccess string

Allow or deny operations against the resources.

const (
	MemberNewResponsePoliciesAccessAllow MemberNewResponsePoliciesAccess = "allow"
	MemberNewResponsePoliciesAccessDeny  MemberNewResponsePoliciesAccess = "deny"
)

func (MemberNewResponsePoliciesAccess) IsKnown

type MemberNewResponsePoliciesPermissionGroup

type MemberNewResponsePoliciesPermissionGroup struct {
	// Identifier of the group.
	ID string `json:"id,required"`
	// Attributes associated to the permission group.
	Meta MemberNewResponsePoliciesPermissionGroupsMeta `json:"meta"`
	// Name of the group.
	Name string                                       `json:"name"`
	JSON memberNewResponsePoliciesPermissionGroupJSON `json:"-"`
}

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

func (*MemberNewResponsePoliciesPermissionGroup) UnmarshalJSON

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

type MemberNewResponsePoliciesPermissionGroupsMeta

type MemberNewResponsePoliciesPermissionGroupsMeta struct {
	Key   string                                            `json:"key"`
	Value string                                            `json:"value"`
	JSON  memberNewResponsePoliciesPermissionGroupsMetaJSON `json:"-"`
}

Attributes associated to the permission group.

func (*MemberNewResponsePoliciesPermissionGroupsMeta) UnmarshalJSON

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

type MemberNewResponsePoliciesResourceGroup

type MemberNewResponsePoliciesResourceGroup struct {
	// Identifier of the group.
	ID string `json:"id,required"`
	// The scope associated to the resource group
	Scope []MemberNewResponsePoliciesResourceGroupsScope `json:"scope,required"`
	// Attributes associated to the resource group.
	Meta MemberNewResponsePoliciesResourceGroupsMeta `json:"meta"`
	// Name of the resource group.
	Name string                                     `json:"name"`
	JSON memberNewResponsePoliciesResourceGroupJSON `json:"-"`
}

A group of scoped resources.

func (*MemberNewResponsePoliciesResourceGroup) UnmarshalJSON

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

type MemberNewResponsePoliciesResourceGroupsMeta

type MemberNewResponsePoliciesResourceGroupsMeta struct {
	Key   string                                          `json:"key"`
	Value string                                          `json:"value"`
	JSON  memberNewResponsePoliciesResourceGroupsMetaJSON `json:"-"`
}

Attributes associated to the resource group.

func (*MemberNewResponsePoliciesResourceGroupsMeta) UnmarshalJSON

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

type MemberNewResponsePoliciesResourceGroupsScope

type MemberNewResponsePoliciesResourceGroupsScope struct {
	// This is a combination of pre-defined resource name and identifier (like Account
	// ID etc.)
	Key string `json:"key,required"`
	// A list of scope objects for additional context.
	Objects []MemberNewResponsePoliciesResourceGroupsScopeObject `json:"objects,required"`
	JSON    memberNewResponsePoliciesResourceGroupsScopeJSON     `json:"-"`
}

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

func (*MemberNewResponsePoliciesResourceGroupsScope) UnmarshalJSON

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

type MemberNewResponsePoliciesResourceGroupsScopeObject

type MemberNewResponsePoliciesResourceGroupsScopeObject struct {
	// This is a combination of pre-defined resource name and identifier (like Zone ID
	// etc.)
	Key  string                                                 `json:"key,required"`
	JSON memberNewResponsePoliciesResourceGroupsScopeObjectJSON `json:"-"`
}

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

func (*MemberNewResponsePoliciesResourceGroupsScopeObject) UnmarshalJSON

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

type MemberNewResponsePolicy

type MemberNewResponsePolicy struct {
	// Policy identifier.
	ID string `json:"id"`
	// Allow or deny operations against the resources.
	Access MemberNewResponsePoliciesAccess `json:"access"`
	// A set of permission groups that are specified to the policy.
	PermissionGroups []MemberNewResponsePoliciesPermissionGroup `json:"permission_groups"`
	// A list of resource groups that the policy applies to.
	ResourceGroups []MemberNewResponsePoliciesResourceGroup `json:"resource_groups"`
	JSON           memberNewResponsePolicyJSON              `json:"-"`
}

func (*MemberNewResponsePolicy) UnmarshalJSON

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

type MemberNewResponseStatus

type MemberNewResponseStatus string

A member's status in the account.

const (
	MemberNewResponseStatusAccepted MemberNewResponseStatus = "accepted"
	MemberNewResponseStatusPending  MemberNewResponseStatus = "pending"
)

func (MemberNewResponseStatus) IsKnown

func (r MemberNewResponseStatus) IsKnown() bool

type MemberNewResponseUser

type MemberNewResponseUser struct {
	// The contact email address of the user.
	Email string `json:"email,required"`
	// Identifier
	ID string `json:"id"`
	// User's first name
	FirstName string `json:"first_name,nullable"`
	// User's last name
	LastName string `json:"last_name,nullable"`
	// Indicates whether two-factor authentication is enabled for the user account.
	// Does not apply to API authentication.
	TwoFactorAuthenticationEnabled bool                      `json:"two_factor_authentication_enabled"`
	JSON                           memberNewResponseUserJSON `json:"-"`
}

Details of the user associated to the membership.

func (*MemberNewResponseUser) UnmarshalJSON

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

type MemberParam

type MemberParam = shared.MemberParam

This is an alias to an internal type.

type MemberRoleParam

type MemberRoleParam = shared.MemberRoleParam

This is an alias to an internal type.

type MemberRolesPermissionsParam

type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

This is an alias to an internal type.

type MemberService

type MemberService struct {
	Options []option.RequestOption
}

MemberService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewMemberService method instead.

func NewMemberService

func NewMemberService(opts ...option.RequestOption) (r *MemberService)

NewMemberService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*MemberService) Delete

func (r *MemberService) Delete(ctx context.Context, memberID string, body MemberDeleteParams, opts ...option.RequestOption) (res *MemberDeleteResponse, err error)

Remove a member from an account.

func (*MemberService) Get

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

Get information about a specific member of an account.

func (*MemberService) List

List all members of an account.

func (*MemberService) ListAutoPaging

List all members of an account.

func (*MemberService) New

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

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

func (*MemberService) Update

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

Modify an account member.

type MemberStatus

type MemberStatus = shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

type MemberUpdateParams

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

func (MemberUpdateParams) MarshalJSON

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

type MemberUpdateParamsBody

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

func (MemberUpdateParamsBody) ImplementsAccountsMemberUpdateParamsBodyUnion

func (r MemberUpdateParamsBody) ImplementsAccountsMemberUpdateParamsBodyUnion()

func (MemberUpdateParamsBody) MarshalJSON

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

type MemberUpdateParamsBodyIAMUpdateMemberWithPolicies

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

func (MemberUpdateParamsBodyIAMUpdateMemberWithPolicies) ImplementsAccountsMemberUpdateParamsBodyUnion

func (r MemberUpdateParamsBodyIAMUpdateMemberWithPolicies) ImplementsAccountsMemberUpdateParamsBodyUnion()

func (MemberUpdateParamsBodyIAMUpdateMemberWithPolicies) MarshalJSON

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

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesAccess

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesAccess string

Allow or deny operations against the resources.

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

func (MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesAccess) IsKnown

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesPermissionGroup

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

A group of permissions.

func (MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesPermissionGroup) MarshalJSON

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesResourceGroup

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

A group of scoped resources.

func (MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesResourceGroup) MarshalJSON

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPolicy

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

func (MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPolicy) MarshalJSON

type MemberUpdateParamsBodyStatus

type MemberUpdateParamsBodyStatus string

A member's status in the account.

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

func (MemberUpdateParamsBodyStatus) IsKnown

func (r MemberUpdateParamsBodyStatus) IsKnown() bool

type MemberUpdateParamsBodyUnion

type MemberUpdateParamsBodyUnion interface {
	ImplementsAccountsMemberUpdateParamsBodyUnion()
}

Satisfied by shared.MemberParam, accounts.MemberUpdateParamsBodyIAMUpdateMemberWithPolicies, MemberUpdateParamsBody.

type MemberUpdateResponse

type MemberUpdateResponse struct {
	// Membership identifier tag.
	ID string `json:"id"`
	// Access policy for the membership
	Policies []MemberUpdateResponsePolicy `json:"policies"`
	// Roles assigned to this Member.
	Roles []shared.Role `json:"roles"`
	// A member's status in the account.
	Status MemberUpdateResponseStatus `json:"status"`
	// Details of the user associated to the membership.
	User MemberUpdateResponseUser `json:"user"`
	JSON memberUpdateResponseJSON `json:"-"`
}

func (*MemberUpdateResponse) UnmarshalJSON

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

type MemberUpdateResponseEnvelope

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

func (*MemberUpdateResponseEnvelope) UnmarshalJSON

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

type MemberUpdateResponseEnvelopeSuccess

type MemberUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	MemberUpdateResponseEnvelopeSuccessTrue MemberUpdateResponseEnvelopeSuccess = true
)

func (MemberUpdateResponseEnvelopeSuccess) IsKnown

type MemberUpdateResponsePoliciesAccess

type MemberUpdateResponsePoliciesAccess string

Allow or deny operations against the resources.

const (
	MemberUpdateResponsePoliciesAccessAllow MemberUpdateResponsePoliciesAccess = "allow"
	MemberUpdateResponsePoliciesAccessDeny  MemberUpdateResponsePoliciesAccess = "deny"
)

func (MemberUpdateResponsePoliciesAccess) IsKnown

type MemberUpdateResponsePoliciesPermissionGroup

type MemberUpdateResponsePoliciesPermissionGroup struct {
	// Identifier of the group.
	ID string `json:"id,required"`
	// Attributes associated to the permission group.
	Meta MemberUpdateResponsePoliciesPermissionGroupsMeta `json:"meta"`
	// Name of the group.
	Name string                                          `json:"name"`
	JSON memberUpdateResponsePoliciesPermissionGroupJSON `json:"-"`
}

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

func (*MemberUpdateResponsePoliciesPermissionGroup) UnmarshalJSON

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

type MemberUpdateResponsePoliciesPermissionGroupsMeta

type MemberUpdateResponsePoliciesPermissionGroupsMeta struct {
	Key   string                                               `json:"key"`
	Value string                                               `json:"value"`
	JSON  memberUpdateResponsePoliciesPermissionGroupsMetaJSON `json:"-"`
}

Attributes associated to the permission group.

func (*MemberUpdateResponsePoliciesPermissionGroupsMeta) UnmarshalJSON

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

type MemberUpdateResponsePoliciesResourceGroup

type MemberUpdateResponsePoliciesResourceGroup struct {
	// Identifier of the group.
	ID string `json:"id,required"`
	// The scope associated to the resource group
	Scope []MemberUpdateResponsePoliciesResourceGroupsScope `json:"scope,required"`
	// Attributes associated to the resource group.
	Meta MemberUpdateResponsePoliciesResourceGroupsMeta `json:"meta"`
	// Name of the resource group.
	Name string                                        `json:"name"`
	JSON memberUpdateResponsePoliciesResourceGroupJSON `json:"-"`
}

A group of scoped resources.

func (*MemberUpdateResponsePoliciesResourceGroup) UnmarshalJSON

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

type MemberUpdateResponsePoliciesResourceGroupsMeta

type MemberUpdateResponsePoliciesResourceGroupsMeta struct {
	Key   string                                             `json:"key"`
	Value string                                             `json:"value"`
	JSON  memberUpdateResponsePoliciesResourceGroupsMetaJSON `json:"-"`
}

Attributes associated to the resource group.

func (*MemberUpdateResponsePoliciesResourceGroupsMeta) UnmarshalJSON

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

type MemberUpdateResponsePoliciesResourceGroupsScope

type MemberUpdateResponsePoliciesResourceGroupsScope struct {
	// This is a combination of pre-defined resource name and identifier (like Account
	// ID etc.)
	Key string `json:"key,required"`
	// A list of scope objects for additional context.
	Objects []MemberUpdateResponsePoliciesResourceGroupsScopeObject `json:"objects,required"`
	JSON    memberUpdateResponsePoliciesResourceGroupsScopeJSON     `json:"-"`
}

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

func (*MemberUpdateResponsePoliciesResourceGroupsScope) UnmarshalJSON

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

type MemberUpdateResponsePoliciesResourceGroupsScopeObject

type MemberUpdateResponsePoliciesResourceGroupsScopeObject struct {
	// This is a combination of pre-defined resource name and identifier (like Zone ID
	// etc.)
	Key  string                                                    `json:"key,required"`
	JSON memberUpdateResponsePoliciesResourceGroupsScopeObjectJSON `json:"-"`
}

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

func (*MemberUpdateResponsePoliciesResourceGroupsScopeObject) UnmarshalJSON

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

type MemberUpdateResponsePolicy

type MemberUpdateResponsePolicy struct {
	// Policy identifier.
	ID string `json:"id"`
	// Allow or deny operations against the resources.
	Access MemberUpdateResponsePoliciesAccess `json:"access"`
	// A set of permission groups that are specified to the policy.
	PermissionGroups []MemberUpdateResponsePoliciesPermissionGroup `json:"permission_groups"`
	// A list of resource groups that the policy applies to.
	ResourceGroups []MemberUpdateResponsePoliciesResourceGroup `json:"resource_groups"`
	JSON           memberUpdateResponsePolicyJSON              `json:"-"`
}

func (*MemberUpdateResponsePolicy) UnmarshalJSON

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

type MemberUpdateResponseStatus

type MemberUpdateResponseStatus string

A member's status in the account.

const (
	MemberUpdateResponseStatusAccepted MemberUpdateResponseStatus = "accepted"
	MemberUpdateResponseStatusPending  MemberUpdateResponseStatus = "pending"
)

func (MemberUpdateResponseStatus) IsKnown

func (r MemberUpdateResponseStatus) IsKnown() bool

type MemberUpdateResponseUser

type MemberUpdateResponseUser struct {
	// The contact email address of the user.
	Email string `json:"email,required"`
	// Identifier
	ID string `json:"id"`
	// User's first name
	FirstName string `json:"first_name,nullable"`
	// User's last name
	LastName string `json:"last_name,nullable"`
	// Indicates whether two-factor authentication is enabled for the user account.
	// Does not apply to API authentication.
	TwoFactorAuthenticationEnabled bool                         `json:"two_factor_authentication_enabled"`
	JSON                           memberUpdateResponseUserJSON `json:"-"`
}

Details of the user associated to the membership.

func (*MemberUpdateResponseUser) UnmarshalJSON

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

type MemberUserParam

type MemberUserParam = shared.MemberUserParam

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 RatePlanParam

type RatePlanParam = shared.RatePlanParam

The rate plan applied to the subscription.

This is an alias to an internal type.

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

type RoleGetParams

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

type RoleGetResponse

type RoleGetResponse = interface{}

type RoleGetResponseEnvelope

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

func (*RoleGetResponseEnvelope) UnmarshalJSON

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

type RoleGetResponseEnvelopeSuccess

type RoleGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RoleGetResponseEnvelopeSuccessTrue RoleGetResponseEnvelopeSuccess = true
)

func (RoleGetResponseEnvelopeSuccess) IsKnown

type RoleListParams

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

type RoleService

type RoleService struct {
	Options []option.RequestOption
}

RoleService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRoleService method instead.

func NewRoleService

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

NewRoleService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*RoleService) Get

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

Get information about a specific role for an account.

func (*RoleService) List

Get all available roles for an account.

func (*RoleService) ListAutoPaging

Get all available roles for an account.

type SortDirection

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

type Status

type Status string

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

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

func (Status) IsKnown

func (r Status) IsKnown() bool

type Subscription

type Subscription = shared.Subscription

This is an alias to an internal type.

type SubscriptionDeleteParams

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

type SubscriptionDeleteResponse

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

func (*SubscriptionDeleteResponse) UnmarshalJSON

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

type SubscriptionDeleteResponseEnvelope

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

func (*SubscriptionDeleteResponseEnvelope) UnmarshalJSON

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

type SubscriptionDeleteResponseEnvelopeSuccess

type SubscriptionDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SubscriptionDeleteResponseEnvelopeSuccessTrue SubscriptionDeleteResponseEnvelopeSuccess = true
)

func (SubscriptionDeleteResponseEnvelopeSuccess) IsKnown

type SubscriptionFrequency

type SubscriptionFrequency = shared.SubscriptionFrequency

How often the subscription is renewed automatically.

This is an alias to an internal type.

type SubscriptionGetParams

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

type SubscriptionGetResponseEnvelope

type SubscriptionGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	Result   []shared.Subscription `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 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

type SubscriptionNewParams

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

func (SubscriptionNewParams) MarshalJSON

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

type SubscriptionNewResponseEnvelope

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

func (*SubscriptionNewResponseEnvelope) UnmarshalJSON

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

type SubscriptionNewResponseEnvelopeSuccess

type SubscriptionNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SubscriptionNewResponseEnvelopeSuccessTrue SubscriptionNewResponseEnvelopeSuccess = true
)

func (SubscriptionNewResponseEnvelopeSuccess) IsKnown

type SubscriptionParam

type SubscriptionParam = shared.SubscriptionParam

This is an alias to an internal type.

type SubscriptionService

type SubscriptionService struct {
	Options []option.RequestOption
}

SubscriptionService contains methods and other services that help with interacting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSubscriptionService method instead.

func NewSubscriptionService

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

NewSubscriptionService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.

func (*SubscriptionService) Delete

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

Deletes an account's subscription.

func (*SubscriptionService) Get

Lists all of an account's subscriptions.

func (*SubscriptionService) New

func (r *SubscriptionService) New(ctx context.Context, params SubscriptionNewParams, opts ...option.RequestOption) (res *interface{}, err error)

Creates an account subscription.

func (*SubscriptionService) Update

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

Updates an account subscription.

type SubscriptionState

type SubscriptionState = shared.SubscriptionState

The state that the subscription is in.

This is an alias to an internal type.

type SubscriptionUpdateParams

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

func (SubscriptionUpdateParams) MarshalJSON

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

type SubscriptionUpdateResponseEnvelope

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

func (*SubscriptionUpdateResponseEnvelope) UnmarshalJSON

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

type SubscriptionUpdateResponseEnvelopeSuccess

type SubscriptionUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SubscriptionUpdateResponseEnvelopeSuccessTrue SubscriptionUpdateResponseEnvelopeSuccess = true
)

func (SubscriptionUpdateResponseEnvelopeSuccess) IsKnown

Jump to

Keyboard shortcuts

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