accounts

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 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 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.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN added in v2.1.0

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam added in v2.1.0

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 AccountGetParams

type AccountGetParams struct {
	AccountID param.Field[interface{}] `path:"account_id,required"`
}

type AccountGetResponse added in v2.3.0

type AccountGetResponse = interface{}

type AccountGetResponseEnvelope

type AccountGetResponseEnvelope struct {
	Result AccountGetResponse             `json:"result"`
	JSON   accountGetResponseEnvelopeJSON `json:"-"`
}

func (*AccountGetResponseEnvelope) UnmarshalJSON

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

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 AccountListResponse

type AccountListResponse = interface{}

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
}

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) Get

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) Update

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 {
	AccountID param.Field[interface{}] `path:"account_id,required"`
	Account   AccountParam             `json:"account,required"`
}

func (AccountUpdateParams) MarshalJSON

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

type AccountUpdateResponse added in v2.3.0

type AccountUpdateResponse = interface{}

type AccountUpdateResponseEnvelope

type AccountUpdateResponseEnvelope struct {
	Result AccountUpdateResponse             `json:"result"`
	JSON   accountUpdateResponseEnvelopeJSON `json:"-"`
}

func (*AccountUpdateResponseEnvelope) UnmarshalJSON

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

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 added in v2.2.0

type CertificateCA = shared.CertificateCA

The Certificate Authority that will issue the certificate

This is an alias to an internal type.

type CertificateRequestType added in v2.2.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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

type MemberGetResponseEnvelope

type MemberGetResponseEnvelope struct {
	Result MemberGetResponse             `json:"result"`
	JSON   memberGetResponseEnvelopeJSON `json:"-"`
}

func (*MemberGetResponseEnvelope) UnmarshalJSON

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

type MemberGetResponsePoliciesAccess added in v2.3.0

type MemberGetResponsePoliciesAccess string

Allow or deny operations against the resources.

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

func (MemberGetResponsePoliciesAccess) IsKnown added in v2.3.0

type MemberGetResponsePoliciesPermissionGroup added in v2.3.0

type MemberGetResponsePoliciesPermissionGroup struct {
	// Identifier of the group.
	ID string `json:"id,required"`
	// Attributes associated to the permission group.
	Meta interface{} `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 added in v2.3.0

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

type MemberGetResponsePoliciesResourceGroup added in v2.3.0

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 interface{} `json:"meta"`
	// Name of the resource group.
	Name string                                     `json:"name"`
	JSON memberGetResponsePoliciesResourceGroupJSON `json:"-"`
}

A group of scoped resources.

func (*MemberGetResponsePoliciesResourceGroup) UnmarshalJSON added in v2.3.0

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

type MemberGetResponsePoliciesResourceGroupsScope added in v2.3.0

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 added in v2.3.0

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

type MemberGetResponsePoliciesResourceGroupsScopeObject added in v2.3.0

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 added in v2.3.0

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

type MemberGetResponsePolicy added in v2.3.0

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 added in v2.3.0

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

type MemberGetResponseStatus added in v2.3.0

type MemberGetResponseStatus string

A member's status in the account.

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

func (MemberGetResponseStatus) IsKnown added in v2.3.0

func (r MemberGetResponseStatus) IsKnown() bool

type MemberGetResponseUser added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

type MemberListResponsePoliciesAccess string

Allow or deny operations against the resources.

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

func (MemberListResponsePoliciesAccess) IsKnown added in v2.3.0

type MemberListResponsePoliciesPermissionGroup added in v2.3.0

type MemberListResponsePoliciesPermissionGroup struct {
	// Identifier of the group.
	ID string `json:"id,required"`
	// Attributes associated to the permission group.
	Meta interface{} `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 added in v2.3.0

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

type MemberListResponsePoliciesResourceGroup added in v2.3.0

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 interface{} `json:"meta"`
	// Name of the resource group.
	Name string                                      `json:"name"`
	JSON memberListResponsePoliciesResourceGroupJSON `json:"-"`
}

A group of scoped resources.

func (*MemberListResponsePoliciesResourceGroup) UnmarshalJSON added in v2.3.0

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

type MemberListResponsePoliciesResourceGroupsScope added in v2.3.0

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 added in v2.3.0

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

type MemberListResponsePoliciesResourceGroupsScopeObject added in v2.3.0

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 added in v2.3.0

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

type MemberListResponsePolicy added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

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

type MemberNewParamsBodyIAMCreateMemberWithPolicies added in v2.3.0

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 added in v2.3.0

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

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesAccess added in v2.3.0

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesAccess string

Allow or deny operations against the resources.

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

func (MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesAccess) IsKnown added in v2.3.0

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesPermissionGroup added in v2.3.0

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

A group of permissions.

func (MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesPermissionGroup) MarshalJSON added in v2.3.0

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesResourceGroup added in v2.3.0

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

A group of scoped resources.

func (MemberNewParamsBodyIAMCreateMemberWithPoliciesPoliciesResourceGroup) MarshalJSON added in v2.3.0

type MemberNewParamsBodyIAMCreateMemberWithPoliciesPolicy added in v2.3.0

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 added in v2.3.0

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

type MemberNewParamsBodyIAMCreateMemberWithPoliciesStatus added in v2.3.0

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

func (MemberNewParamsBodyIAMCreateMemberWithPoliciesStatus) IsKnown added in v2.3.0

type MemberNewParamsBodyIAMCreateMemberWithRoles added in v2.3.0

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 added in v2.3.0

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

type MemberNewParamsBodyIAMCreateMemberWithRolesStatus added in v2.3.0

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

func (MemberNewParamsBodyIAMCreateMemberWithRolesStatus) IsKnown added in v2.3.0

type MemberNewParamsBodyStatus added in v2.3.0

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

func (MemberNewParamsBodyStatus) IsKnown added in v2.3.0

func (r MemberNewParamsBodyStatus) IsKnown() bool

type MemberNewParamsBodyUnion added in v2.3.0

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

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

type MemberNewResponse added in v2.3.0

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 added in v2.3.0

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

type MemberNewResponseEnvelope

type MemberNewResponseEnvelope struct {
	Result MemberNewResponse             `json:"result"`
	JSON   memberNewResponseEnvelopeJSON `json:"-"`
}

func (*MemberNewResponseEnvelope) UnmarshalJSON

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

type MemberNewResponsePoliciesAccess added in v2.3.0

type MemberNewResponsePoliciesAccess string

Allow or deny operations against the resources.

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

func (MemberNewResponsePoliciesAccess) IsKnown added in v2.3.0

type MemberNewResponsePoliciesPermissionGroup added in v2.3.0

type MemberNewResponsePoliciesPermissionGroup struct {
	// Identifier of the group.
	ID string `json:"id,required"`
	// Attributes associated to the permission group.
	Meta interface{} `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 added in v2.3.0

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

type MemberNewResponsePoliciesResourceGroup added in v2.3.0

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 interface{} `json:"meta"`
	// Name of the resource group.
	Name string                                     `json:"name"`
	JSON memberNewResponsePoliciesResourceGroupJSON `json:"-"`
}

A group of scoped resources.

func (*MemberNewResponsePoliciesResourceGroup) UnmarshalJSON added in v2.3.0

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

type MemberNewResponsePoliciesResourceGroupsScope added in v2.3.0

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 added in v2.3.0

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

type MemberNewResponsePoliciesResourceGroupsScopeObject added in v2.3.0

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 added in v2.3.0

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

type MemberNewResponsePolicy added in v2.3.0

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 added in v2.3.0

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

type MemberNewResponseStatus added in v2.3.0

type MemberNewResponseStatus string

A member's status in the account.

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

func (MemberNewResponseStatus) IsKnown added in v2.3.0

func (r MemberNewResponseStatus) IsKnown() bool

type MemberNewResponseUser added in v2.3.0

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 added in v2.3.0

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

type MemberParam added in v2.1.0

type MemberParam = shared.MemberParam

This is an alias to an internal type.

type MemberRoleParam added in v2.1.0

type MemberRoleParam = shared.MemberRoleParam

This is an alias to an internal type.

type MemberRolesPermissionsParam added in v2.1.0

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 added in v2.3.0

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 added in v2.3.0

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 added in v2.3.0

func (r MemberUpdateParamsBody) ImplementsAccountsMemberUpdateParamsBodyUnion()

func (MemberUpdateParamsBody) MarshalJSON added in v2.3.0

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

type MemberUpdateParamsBodyIAMUpdateMemberWithPolicies added in v2.3.0

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

func (MemberUpdateParamsBodyIAMUpdateMemberWithPolicies) ImplementsAccountsMemberUpdateParamsBodyUnion added in v2.3.0

func (r MemberUpdateParamsBodyIAMUpdateMemberWithPolicies) ImplementsAccountsMemberUpdateParamsBodyUnion()

func (MemberUpdateParamsBodyIAMUpdateMemberWithPolicies) MarshalJSON added in v2.3.0

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

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesAccess added in v2.3.0

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesAccess string

Allow or deny operations against the resources.

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

func (MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesAccess) IsKnown added in v2.3.0

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesPermissionGroup added in v2.3.0

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

A group of permissions.

func (MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesPermissionGroup) MarshalJSON added in v2.3.0

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesResourceGroup added in v2.3.0

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

A group of scoped resources.

func (MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPoliciesResourceGroup) MarshalJSON added in v2.3.0

type MemberUpdateParamsBodyIAMUpdateMemberWithPoliciesPolicy added in v2.3.0

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 added in v2.3.0

type MemberUpdateParamsBodyStatus added in v2.3.0

type MemberUpdateParamsBodyStatus string

A member's status in the account.

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

func (MemberUpdateParamsBodyStatus) IsKnown added in v2.3.0

func (r MemberUpdateParamsBodyStatus) IsKnown() bool

type MemberUpdateParamsBodyUnion added in v2.3.0

type MemberUpdateParamsBodyUnion interface {
	ImplementsAccountsMemberUpdateParamsBodyUnion()
}

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

type MemberUpdateResponse added in v2.3.0

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 added in v2.3.0

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

type MemberUpdateResponseEnvelope

type MemberUpdateResponseEnvelope struct {
	Result MemberUpdateResponse             `json:"result"`
	JSON   memberUpdateResponseEnvelopeJSON `json:"-"`
}

func (*MemberUpdateResponseEnvelope) UnmarshalJSON

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

type MemberUpdateResponsePoliciesAccess added in v2.3.0

type MemberUpdateResponsePoliciesAccess string

Allow or deny operations against the resources.

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

func (MemberUpdateResponsePoliciesAccess) IsKnown added in v2.3.0

type MemberUpdateResponsePoliciesPermissionGroup added in v2.3.0

type MemberUpdateResponsePoliciesPermissionGroup struct {
	// Identifier of the group.
	ID string `json:"id,required"`
	// Attributes associated to the permission group.
	Meta interface{} `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 added in v2.3.0

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

type MemberUpdateResponsePoliciesResourceGroup added in v2.3.0

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 interface{} `json:"meta"`
	// Name of the resource group.
	Name string                                        `json:"name"`
	JSON memberUpdateResponsePoliciesResourceGroupJSON `json:"-"`
}

A group of scoped resources.

func (*MemberUpdateResponsePoliciesResourceGroup) UnmarshalJSON added in v2.3.0

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

type MemberUpdateResponsePoliciesResourceGroupsScope added in v2.3.0

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 added in v2.3.0

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

type MemberUpdateResponsePoliciesResourceGroupsScopeObject added in v2.3.0

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 added in v2.3.0

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

type MemberUpdateResponsePolicy added in v2.3.0

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 added in v2.3.0

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

type MemberUpdateResponseStatus added in v2.3.0

type MemberUpdateResponseStatus string

A member's status in the account.

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

func (MemberUpdateResponseStatus) IsKnown added in v2.3.0

func (r MemberUpdateResponseStatus) IsKnown() bool

type MemberUpdateResponseUser added in v2.3.0

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 added in v2.3.0

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

type MemberUserParam added in v2.1.0

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 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 added in v2.3.0

type RoleGetResponse = interface{}

type RoleGetResponseEnvelope

type RoleGetResponseEnvelope struct {
	Result RoleGetResponse             `json:"result"`
	JSON   roleGetResponseEnvelopeJSON `json:"-"`
}

func (*RoleGetResponseEnvelope) UnmarshalJSON

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

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 interface{}, 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 added in v2.2.0

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

type Status added in v2.2.0

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 added in v2.2.0

func (r Status) IsKnown() bool

Jump to

Keyboard shortcuts

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