aiven

package module
v2.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 19 Imported by: 16

README

Aiven client

Go Report Card Documentation Release

Aiven is a next-generation managed cloud services platform with a focus on ease of adoption, high fault resilience, customer peace of mind and advanced features at competitive price points. See https://aiven.io/ for more information about the backend service.

This is the official Aiven SDK for Go. This SDK provides full implementation of the Aiven API but no command line interface. If you're looking for a command line client, check out the Aiven Python Client.

This client is used by the Aiven Terraform Provider.

Credits

The original version of the Aiven Go client was written and maintained by Jelmer Snoeck (https://github.com/jelmersnoeck).

Documentation

Overview

Package aiven provides a client for using the Aiven API.

Package aiven provides a client for using the Aiven API.

Package aiven provides a client for using the Aiven API.

Package aiven provides a client for using the Aiven API.

Package aiven provides a client for using the Aiven API.

Package aiven provides a client for using the Aiven API.

Package aiven provides a client for using the Aiven API.

Index

Constants

View Source
const (
	OrganizationGroupMemberAdd    = "add_members"
	OrganizationGroupMemberRemove = "remove_members"
)
View Source
const (
	UpdateOperationResetCredentials = "reset-credentials"
	UpdateOperationSetAccessControl = "set-access-control"
)

Variables

View Source
var (
	// ErrNoResponseData is uses when there is no data available in the response.
	ErrNoResponseData = errors.New("no response data available")

	// ErrInvalidHost is used when the provided host is formatted incorrectly.
	ErrInvalidHost = errors.New("host wasn't specified in the correct format: `hostname:port`")
)

Functions

func ContactEmailFromStringSlice

func ContactEmailFromStringSlice(emails []string) *[]*ContactEmail

ContactEmailFromStringSlice creates []*ContactEmail from string slice

func IsAlreadyExists

func IsAlreadyExists(err error) bool

IsAlreadyExists returns true if the error message and error code that indicates that entity already exists

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns true if the specified error has status 404

func PointerToString

func PointerToString(s *string) string

func ToStringPointer

func ToStringPointer(s string) *string

ToStringPointer converts string to a string pointer

func Version

func Version() string

Version returns aiven-go-client version string

Types

type APIResponse

type APIResponse struct {
	Errors  []Error `json:"errors,omitempty"`
	Message string  `json:"message,omitempty"`
}

APIResponse represents a response returned by the Aiven API.

func (APIResponse) GetError

func (r APIResponse) GetError() error

GetError returns the first error from API Response, if any

type AWSPrivatelinkHandler

type AWSPrivatelinkHandler struct {
	// contains filtered or unexported fields
}

AWSPrivatelinkHandler is the client that interacts with the AWS Privatelink API on Aiven.

func (*AWSPrivatelinkHandler) Create

func (h *AWSPrivatelinkHandler) Create(ctx context.Context, project, serviceName string, principals []string) (*AWSPrivatelinkResponse, error)

Create creates an AWS Privatelink

func (*AWSPrivatelinkHandler) Delete

func (h *AWSPrivatelinkHandler) Delete(ctx context.Context, project, serviceName string) error

Delete deletes an AWS Privatelink

func (*AWSPrivatelinkHandler) Get

func (h *AWSPrivatelinkHandler) Get(ctx context.Context, project, serviceName string) (*AWSPrivatelinkResponse, error)

Get retrieves an AWS Privatelink

func (*AWSPrivatelinkHandler) Update

func (h *AWSPrivatelinkHandler) Update(ctx context.Context, project, serviceName string, principals []string) (*AWSPrivatelinkResponse, error)

Update updates an AWS Privatelink

type AWSPrivatelinkRequest

type AWSPrivatelinkRequest struct {
	Principals []string `json:"principals"`
}

AWSPrivatelinkRequest holds the parameters to create a new or update an existing AWS Privatelink.

type AWSPrivatelinkResponse

type AWSPrivatelinkResponse struct {
	APIResponse
	AWSServiceID   string   `json:"aws_service_id"`
	AWSServiceName string   `json:"aws_service_name"`
	State          string   `json:"state"`
	Principals     []string `json:"principals"`
}

AWSPrivatelinkResponse represents the response from Aiven after interacting with the AWS Privatelink.

type AccessControl

type AccessControl struct {
	M3Group                  *string  `json:"m3_group"`
	RedisACLCategories       []string `json:"redis_acl_categories"`
	RedisACLCommands         []string `json:"redis_acl_commands"`
	RedisACLKeys             []string `json:"redis_acl_keys"`
	RedisACLChannels         []string `json:"redis_acl_channels"`
	PostgresAllowReplication *bool    `json:"pg_allow_replication"`
}

func (AccessControl) MarshalJSON

func (ac AccessControl) MarshalJSON() ([]byte, error)

MarshalJSON implements a custom marshalling process for AccessControl where only null fields are omitted

type Account

type Account struct {
	Id                    string     `json:"account_id,omitempty"`
	Name                  string     `json:"account_name"`
	OwnerTeamId           string     `json:"account_owner_team_id,omitempty"`
	CreateTime            *time.Time `json:"create_time,omitempty"`
	UpdateTime            *time.Time `json:"update_time,omitempty"`
	BillingEnabled        bool       `json:"account_billing_enabled,omitempty"`
	TenantId              string     `json:"tenant_id,omitempty"`
	PrimaryBillingGroupId string     `json:"primary_billing_group_id,omitempty"`
	IsAccountOwner        bool       `json:"is_account_owner,omitempty"`
	ParentAccountId       string     `json:"parent_account_id,omitempty"`
	OrganizationId        string     `json:"organization_id,omitempty"`
}

Account represents account

type AccountAuthenticationListResponse

type AccountAuthenticationListResponse struct {
	APIResponse
	AuthenticationMethods []AccountAuthenticationMethod `json:"authentication_methods"`
}

AccountAuthenticationListResponse represents account list of available authentication methods API response

type AccountAuthenticationMethod

type AccountAuthenticationMethod struct {
	AccountID                     string            `json:"account_id"`
	AuthenticationMethodEnabled   bool              `json:"authentication_method_enabled"`
	AuthenticationMethodID        string            `json:"authentication_method_id"`
	AuthenticationMethodName      string            `json:"authentication_method_name"`
	AuthenticationMethodType      string            `json:"authentication_method_type"`
	AutoJoinTeamID                string            `json:"auto_join_team_id"`
	CreateTime                    *time.Time        `json:"create_time"`
	DeleteTime                    *time.Time        `json:"delete_time"`
	SAMLAcsURL                    string            `json:"saml_acs_url,omitempty"`
	SAMLCertificate               string            `json:"saml_certificate,omitempty"`
	SAMLCertificateIssuer         string            `json:"saml_certificate_issuer,omitempty"`
	SAMLCertificateNotValidAfter  string            `json:"saml_certificate_not_valid_after,omitempty"`
	SAMLCertificateNotValidBefore string            `json:"saml_certificate_not_valid_before,omitempty"`
	SAMLCertificateSubject        string            `json:"saml_certificate_subject,omitempty"`
	SAMLDigestAlgorithm           string            `json:"saml_digest_algorithm,omitempty"`
	SAMLEntityID                  string            `json:"saml_entity_id,omitempty"`
	SAMLFieldMapping              *SAMLFieldMapping `json:"saml_field_mapping,omitempty"`
	SAMLIdpLoginAllowed           bool              `json:"saml_idp_login_allowed,omitempty"`
	SAMLIdpURL                    string            `json:"saml_idp_url,omitempty"`
	SAMLMetadataURL               string            `json:"saml_metadata_url,omitempty"`
	SAMLSignatureAlgorithm        string            `json:"saml_signature_algorithm,omitempty"`
	SAMLVariant                   string            `json:"saml_variant,omitempty"`
	State                         string            `json:"state"`
	UpdateTime                    *time.Time        `json:"update_time"`
}

AccountAuthenticationMethod response object for AccountAuthenticationMethodUpdate https://api.aiven.io/doc/#operation/AccountAuthenticationMethodUpdate

type AccountAuthenticationMethodCreate

type AccountAuthenticationMethodCreate struct {
	AuthenticationMethodName string            `json:"authentication_method_name"`
	AuthenticationMethodType string            `json:"authentication_method_type"`
	AutoJoinTeamID           string            `json:"auto_join_team_id,omitempty"`
	SAMLCertificate          string            `json:"saml_certificate,omitempty"`
	SAMLDigestAlgorithm      string            `json:"saml_digest_algorithm,omitempty"`
	SAMLEntityID             string            `json:"saml_entity_id,omitempty"`
	SAMLFieldMapping         *SAMLFieldMapping `json:"saml_field_mapping,omitempty"`
	SAMLIdpLoginAllowed      bool              `json:"saml_idp_login_allowed,omitempty"`
	SAMLIdpURL               string            `json:"saml_idp_url,omitempty"`
	SAMLSignatureAlgorithm   string            `json:"saml_signature_algorithm,omitempty"`
	SAMLVariant              string            `json:"saml_variant,omitempty"`
}

AccountAuthenticationMethodCreate request object for AccountAuthenticationMethodCreate https://api.aiven.io/doc/#operation/AccountAuthenticationMethodCreate

type AccountAuthenticationMethodUpdate

type AccountAuthenticationMethodUpdate struct {
	AuthenticationMethodEnabled bool              `json:"authentication_method_enabled,omitempty"`
	AuthenticationMethodName    string            `json:"authentication_method_name"`
	AutoJoinTeamID              string            `json:"auto_join_team_id,omitempty"`
	SAMLCertificate             string            `json:"saml_certificate,omitempty"`
	SAMLDigestAlgorithm         string            `json:"saml_digest_algorithm,omitempty"`
	SAMLEntity                  string            `json:"saml_entity_id,omitempty"`
	SAMLFieldMapping            *SAMLFieldMapping `json:"saml_field_mapping,omitempty"`
	SAMLIdpLoginAllowed         bool              `json:"saml_idp_login_allowed,omitempty"`
	SAMLIdpURL                  string            `json:"saml_idp_url,omitempty"`
	SAMLSignatureAlgorithm      string            `json:"saml_signature_algorithm,omitempty"`
	SAMLVariant                 string            `json:"saml_variant,omitempty"`
}

AccountAuthenticationMethodUpdate request object for AccountAuthenticationMethodUpdate https://api.aiven.io/doc/#operation/AccountAuthenticationMethodUpdate

type AccountAuthenticationResponse

type AccountAuthenticationResponse struct {
	APIResponse
	AuthenticationMethod AccountAuthenticationMethod `json:"authentication_method"`
}

AccountAuthenticationResponse represents account an available authentication method API response

type AccountAuthenticationsHandler

type AccountAuthenticationsHandler struct {
	// contains filtered or unexported fields
}

AccountAuthenticationsHandler Aiven go-client handler for Account Authentications

func (AccountAuthenticationsHandler) Create

Create creates an account authentication method

func (AccountAuthenticationsHandler) Delete

func (h AccountAuthenticationsHandler) Delete(ctx context.Context, accountId, authId string) error

Delete deletes an account authentication method

func (AccountAuthenticationsHandler) Get

Get returns a list of all available account authentication methods

func (AccountAuthenticationsHandler) List

List returns a list of all available account authentication methods

func (AccountAuthenticationsHandler) Update

Update updates an account authentication method empty fields are omitted, acts like PATCH

type AccountResponse

type AccountResponse struct {
	APIResponse
	Account Account `json:"account"`
}

AccountResponse represents a Account response

type AccountTeam

type AccountTeam struct {
	AccountId  string     `json:"account_id,omitempty"`
	Id         string     `json:"team_id,omitempty"`
	Name       string     `json:"team_name"`
	CreateTime *time.Time `json:"create_time,omitempty"`
	UpdateTime *time.Time `json:"update_time,omitempty"`
}

AccountTeam represents account team

type AccountTeamInvite

type AccountTeamInvite struct {
	AccountId          string     `json:"account_id"`
	AccountName        string     `json:"account_name"`
	InvitedByUserEmail string     `json:"invited_by_user_email"`
	TeamId             string     `json:"team_id"`
	TeamName           string     `json:"team_name"`
	UserEmail          string     `json:"user_email"`
	CreateTime         *time.Time `json:"create_time,omitempty"`
}

AccountTeamInvite represents account team invite

type AccountTeamInvitesHandler

type AccountTeamInvitesHandler struct {
	// contains filtered or unexported fields
}

AccountTeamInvitesHandler Aiven go-client handler for Account Invites

func (AccountTeamInvitesHandler) Delete

func (h AccountTeamInvitesHandler) Delete(ctx context.Context, accountId, teamId, userEmail string) error

Delete deletes a list of all available account invitations

func (AccountTeamInvitesHandler) List

List returns a list of all available account invitations

type AccountTeamInvitesResponse

type AccountTeamInvitesResponse struct {
	APIResponse
	Invites []AccountTeamInvite `json:"account_invites"`
}

AccountTeamInvitesResponse represents account team list of invites API response

type AccountTeamMember

type AccountTeamMember struct {
	UserId     string     `json:"user_id,omitempty"`
	RealName   string     `json:"real_name,omitempty"`
	TeamId     string     `json:"team_id,omitempty"`
	TeamName   string     `json:"team_name,omitempty"`
	UserEmail  string     `json:"user_email,omitempty"`
	CreateTime *time.Time `json:"create_time,omitempty"`
	UpdateTime *time.Time `json:"update_time,omitempty"`
}

AccountTeamMember represents an account team member

type AccountTeamMemberResponse

type AccountTeamMemberResponse struct {
	APIResponse
	Member AccountTeamMember `json:"member"`
}

AccountTeamMemberResponse represents a account team member API response

type AccountTeamMembersHandler

type AccountTeamMembersHandler struct {
	// contains filtered or unexported fields
}

AccountTeamMembersHandler Aiven go-client handler for Account Team Members

func (AccountTeamMembersHandler) Delete

func (h AccountTeamMembersHandler) Delete(ctx context.Context, accountId, teamId, userId string) error

Delete deletes an existing account team member

func (AccountTeamMembersHandler) Invite

func (h AccountTeamMembersHandler) Invite(ctx context.Context, accountId, teamId, email string) error

Invite invites a team member

func (AccountTeamMembersHandler) List

List returns a list of all existing account team members

type AccountTeamMembersResponse

type AccountTeamMembersResponse struct {
	APIResponse
	Members []AccountTeamMember `json:"members"`
}

AccountTeamMembersResponse represents account team members API response

type AccountTeamProject

type AccountTeamProject struct {
	ProjectName string `json:"project_name,omitempty"`
	// team type could be one of the following values: admin, developer, operator amd read_only
	TeamType string `json:"team_type,omitempty"`
}

AccountTeamProject represents account team associated project

type AccountTeamProjectsHandler

type AccountTeamProjectsHandler struct {
	// contains filtered or unexported fields
}

AccountTeamProjectsHandler Aiven go-client handler for Account Team Projects

func (AccountTeamProjectsHandler) Create

func (h AccountTeamProjectsHandler) Create(ctx context.Context, accountId, teamId string, p AccountTeamProject) error

Create creates account team project association

func (AccountTeamProjectsHandler) Delete

func (h AccountTeamProjectsHandler) Delete(ctx context.Context, accountId, teamId, projectName string) error

Delete deletes account team project association

func (AccountTeamProjectsHandler) List

List returns a list of all existing account team projects

func (AccountTeamProjectsHandler) Update

func (h AccountTeamProjectsHandler) Update(ctx context.Context, accountId, teamId string, p AccountTeamProject) error

Update updates account team project association

type AccountTeamProjectsResponse

type AccountTeamProjectsResponse struct {
	APIResponse
	Projects []AccountTeamProject `json:"projects"`
}

AccountTeamProjectsResponse represents account team list of associated projects API response

type AccountTeamResponse

type AccountTeamResponse struct {
	APIResponse
	Team AccountTeam `json:"team"`
}

AccountTeamResponse represents account team API response

type AccountTeamsHandler

type AccountTeamsHandler struct {
	// contains filtered or unexported fields
}

AccountTeamsHandler Aiven go-client handler for Account Teams

func (AccountTeamsHandler) Create

func (h AccountTeamsHandler) Create(ctx context.Context, accountId string, team AccountTeam) (*AccountTeamResponse, error)

Create creates an account team

func (AccountTeamsHandler) Delete

func (h AccountTeamsHandler) Delete(ctx context.Context, accountId, teamId string) error

Delete deletes an account team

func (AccountTeamsHandler) Get

func (h AccountTeamsHandler) Get(ctx context.Context, accountId, teamId string) (*AccountTeamResponse, error)

Get retrieves an existing account team by account and team id`s

func (AccountTeamsHandler) List

List returns a list of all existing account teams

func (AccountTeamsHandler) Update

func (h AccountTeamsHandler) Update(ctx context.Context, accountId, teamId string, team AccountTeam) (*AccountTeamResponse, error)

Update updates an account team

type AccountTeamsResponse

type AccountTeamsResponse struct {
	APIResponse
	Teams []AccountTeam `json:"teams"`
}

AccountTeamsResponse represents account list of teams API response

type AccountsHandler

type AccountsHandler struct {
	// contains filtered or unexported fields
}

AccountsHandler Aiven go-client handler for Accounts

func (AccountsHandler) Create

func (h AccountsHandler) Create(ctx context.Context, account Account) (*AccountResponse, error)

Create creates new account

func (AccountsHandler) Delete

func (h AccountsHandler) Delete(ctx context.Context, id string) error

Delete deletes an existing account by id

func (AccountsHandler) Get

Get retrieves account by id

func (AccountsHandler) List

List returns a list of all existing accounts

func (AccountsHandler) Update

func (h AccountsHandler) Update(ctx context.Context, id string, account Account) (*AccountResponse, error)

Update updates an existing account

type AccountsResponse

type AccountsResponse struct {
	APIResponse
	Accounts []Account `json:"accounts"`
}

AccountsResponse represents Accounts (list of accounts) response

type ApplicationUserCreateRequest added in v2.9.0

type ApplicationUserCreateRequest struct {
	// Name is the name of the user.
	Name string `json:"name"`
}

ApplicationUserCreateRequest is a request to create a user in an application.

type ApplicationUserCreateResponse added in v2.9.0

type ApplicationUserCreateResponse struct {
	APIResponse

	ApplicationUserInfo
}

ApplicationUserCreateResponse is a response from Aiven for a user creation request.

type ApplicationUserInfo added in v2.9.0

type ApplicationUserInfo struct {
	// UserID is the unique identifier of the user.
	UserID string `json:"user_id"`
	// UserEmail is the email of the user.
	UserEmail string `json:"user_email"`
	// Name is the name of the user.
	Name string `json:"name"`
}

ApplicationUserInfo is a struct that represents a user in an application.

type ApplicationUserListResponse added in v2.9.0

type ApplicationUserListResponse struct {
	APIResponse

	// Users is a list of application users.
	Users []ApplicationUserInfo `json:"application_users"`
}

ApplicationUserListResponse is a response from Aiven for a list of application users.

type ApplicationUserTokenCreateRequest added in v2.9.0

type ApplicationUserTokenCreateRequest struct {
	// Description is the description of the token.
	Description *string `json:"description,omitempty"`
	// MaxAgeSeconds is the time the token remains valid since creation (or since last use if extend_when_used
	// is true).
	MaxAgeSeconds *int `json:"max_age_seconds,omitempty"`
	// ExtendWhenUsed is true to extend token expiration time when token is used. Only applicable if
	// max_age_seconds is specified.
	ExtendWhenUsed *bool `json:"extend_when_used,omitempty"`
	// Scopes is the scopes this token is restricted to if specified.
	Scopes *[]string `json:"scopes,omitempty"`
}

ApplicationUserTokenCreateRequest is a request to create a token for a user in an application.

type ApplicationUserTokenCreateResponse added in v2.9.0

type ApplicationUserTokenCreateResponse struct {
	APIResponse

	// FullToken is the full token.
	FullToken string `json:"full_token"`
	// TokenPrefix is the prefix of the token.
	TokenPrefix string `json:"token_prefix"`
}

ApplicationUserTokenCreateResponse is a response from Aiven for a token creation request.

type ApplicationUserTokenInfo added in v2.9.0

type ApplicationUserTokenInfo struct {
	// CurrentlyActive is true if API request was made with this access token.
	CurrentlyActive bool `json:"currently_active"`
	// CreateTime is the time when the token was created.
	CreateTime *time.Time `json:"create_time"`
	// CreatedManually is true for tokens explicitly created via the access_tokens API, false for tokens created
	// via login.
	CreatedManually bool `json:"created_manually"`
	// Description is the description of the token.
	Description *string `json:"description,omitempty"`
	// ExpiryTime is the timestamp when the access token will expire unless extended, if ever.
	ExpiryTime *time.Time `json:"expiry_time,omitempty"`
	// ExtendWhenUsed is true to extend token expiration time when token is used. Only applicable if
	// max_age_seconds is specified.
	ExtendWhenUsed *bool `json:"extend_when_used,omitempty"`
	// LastIP is the IP address of the last request made with this token.
	LastIP string `json:"last_ip"`
	// LastUsedTime is the timestamp when the access token was last used, if ever.
	LastUsedTime *time.Time `json:"last_used_time,omitempty"`
	// LastUserAgent is the user agent of the last request made with this token.
	LastUserAgent *string `json:"last_user_agent,omitempty"`
	// LastUserAgentHumanReadable is the user agent of the last request made with this token in
	// human-readable format.
	LastUserAgentHumanReadable *string `json:"last_user_agent_human_readable,omitempty"`
	// MaxAgeSeconds is the time the token remains valid since creation (or since last use if extend_when_used
	// is true).
	MaxAgeSeconds int `json:"max_age_seconds"`
	// TokenPrefix is the prefix of the token.
	TokenPrefix string `json:"token_prefix"`
	// Scopes is the scopes this token is restricted to if specified.
	Scopes *[]string `json:"scopes,omitempty"`
}

ApplicationUserTokenInfo is a struct that represents a user's token in an application.

type ApplicationUserTokenList added in v2.9.0

type ApplicationUserTokenList struct {
	// Tokens is a list of user's tokens in an application.
	Tokens []ApplicationUserTokenInfo `json:"tokens"`
}

ApplicationUserTokenList is a struct that represents a list of user's tokens in an application.

type ApplicationUserTokenListResponse added in v2.9.0

type ApplicationUserTokenListResponse struct {
	APIResponse

	ApplicationUserTokenList
}

ApplicationUserTokenListResponse is a response from Aiven for a list of user's tokens in an application.

type AssociateStaticIPRequest

type AssociateStaticIPRequest struct {
	ServiceName string `json:"service_name"`
}

AssociateStaticIPRequest Aiven API request POST https://api.aiven.io/v1/project/<project>/static-ips/<static-ip>/association

type AzurePrivatelinkConnectionResponse

type AzurePrivatelinkConnectionResponse struct {
	APIResponse
	PrivateEndpointID       string `json:"private_endpoint_id"`
	PrivatelinkConnectionID string `json:"privatelink_connection_id"`
	State                   string `json:"state"`
	UserIPAddress           string `json:"user_ip_address"`
}

type AzurePrivatelinkConnectionUpdateRequest

type AzurePrivatelinkConnectionUpdateRequest struct {
	UserIPAddress string `json:"user_ip_address"`
}

type AzurePrivatelinkConnectionsResponse

type AzurePrivatelinkConnectionsResponse struct {
	APIResponse
	Connections []AzurePrivatelinkConnectionResponse
}

type AzurePrivatelinkHandler

type AzurePrivatelinkHandler struct {
	// contains filtered or unexported fields
}

AzurePrivatelinkHandler is the client that interacts with the Azure Privatelink API on Aiven.

func (*AzurePrivatelinkHandler) ConnectionApprove

func (h *AzurePrivatelinkHandler) ConnectionApprove(ctx context.Context, project, serviceName, privatelinkConnectionId string) error

ConnectionApprove approves an Azure Privatelink connection

func (*AzurePrivatelinkHandler) ConnectionGet

func (h *AzurePrivatelinkHandler) ConnectionGet(ctx context.Context, project, serviceName string, connID *string) (*AzurePrivatelinkConnectionResponse, error)

ConnectionGet retrieves a Azure Privatelink connection. This is a convenience function that fetches all connections and filters by ID because the API does not support fetching by ID. It fetches all connections and filters by ID and returns a fake 404 if nothing is found.

func (*AzurePrivatelinkHandler) ConnectionUpdate

func (h *AzurePrivatelinkHandler) ConnectionUpdate(ctx context.Context, project, serviceName, privatelinkConnectionId string, req AzurePrivatelinkConnectionUpdateRequest) error

ConnectionUpdate updates an Azure Privatelink connection

func (*AzurePrivatelinkHandler) ConnectionsList

func (h *AzurePrivatelinkHandler) ConnectionsList(ctx context.Context, project, serviceName string) (*AzurePrivatelinkConnectionsResponse, error)

ConnectionApprove approves an Azure Privatelink connection

func (*AzurePrivatelinkHandler) Create

Create creates an Azure Privatelink

func (*AzurePrivatelinkHandler) Delete

func (h *AzurePrivatelinkHandler) Delete(ctx context.Context, project, serviceName string) error

Delete deletes an Azure Privatelink

func (*AzurePrivatelinkHandler) Get

func (h *AzurePrivatelinkHandler) Get(ctx context.Context, project, serviceName string) (*AzurePrivatelinkResponse, error)

Get retrieves an Azure Privatelink

func (*AzurePrivatelinkHandler) Refresh

func (h *AzurePrivatelinkHandler) Refresh(ctx context.Context, project, serviceName string) error

Refresh refreshes an Azure Privatelink

func (*AzurePrivatelinkHandler) Update

Update updates an Azure Privatelink

type AzurePrivatelinkRequest

type AzurePrivatelinkRequest struct {
	UserSubscriptionIDs []string `json:"user_subscription_ids"`
}

AzurePrivatelinkRequest holds the parameters to create a new or update an existing Azure Privatelink.

type AzurePrivatelinkResponse

type AzurePrivatelinkResponse struct {
	APIResponse
	AzureServiceAlias   string   `json:"azure_service_alias"`
	AzureServiceID      string   `json:"azure_service_id"`
	Message             string   `json:"message"`
	State               string   `json:"state"`
	UserSubscriptionIDs []string `json:"user_subscription_ids"`
}

AzurePrivatelinkResponse represents the response from Aiven after interacting with the Azure Privatelink.

type Backup

type Backup struct {
	BackupTime        *time.Time                `json:"backup_time"`
	BackupName        string                    `json:"backup_name"`
	DataSize          int                       `json:"data_size"`
	StorageLocation   string                    `json:"storage_location"`
	AdditionalRegions []*BackupAdditionalRegion `json:"additional_regions"`
}

Backup represents an individual backup of service data on Aiven

type BackupAdditionalRegion

type BackupAdditionalRegion struct {
	Cloud  string `json:"cloud"`
	Region string `json:"region"`
}

BackupAdditionalRegion represents a remote region where the backup is synchronized

type BackupConfig

type BackupConfig struct {
	FrequentIntervalMinutes    int    `json:"frequent_interval_minutes"`
	FrequentOldestAgeMinutes   int    `json:"frequent_oldest_age_minutes"`
	InfrequentIntervalMinutes  int    `json:"infrequent_interval_minutes"`
	InfrequentOldestAgeMinutes int    `json:"infrequent_oldest_age_minutes"`
	Interval                   int    `json:"interval"`
	MaxCount                   int    `json:"max_count"`
	RecoveryMode               string `json:"recovery_mode"`
}

BackupConfig represents a backup config.

type BillingGroup

type BillingGroup struct {
	BillingGroupRequest
	Id string `json:"billing_group_id"`
}

BillingGroup represents an billing group

type BillingGroupHandler

type BillingGroupHandler struct {
	// contains filtered or unexported fields
}

BillingGroupHandler is the client that interacts with billing groups on Aiven

func (*BillingGroupHandler) AssignProjects

func (h *BillingGroupHandler) AssignProjects(ctx context.Context, id string, projects []string) error

AssignProjects assigns projects to the billing group

func (*BillingGroupHandler) Create

Create creates a new project.

func (*BillingGroupHandler) Delete

func (h *BillingGroupHandler) Delete(ctx context.Context, id string) error

Delete removes the given billing group.

func (*BillingGroupHandler) Get

Get returns gets the specified billing group.

func (*BillingGroupHandler) GetInvoice

func (h *BillingGroupHandler) GetInvoice(ctx context.Context, id, invoiceNumber string) (*BillingGroupInvoiceResponse, error)

GetInvoice gets the specified invoice for the billing group.

func (*BillingGroupHandler) GetProjects

func (h *BillingGroupHandler) GetProjects(ctx context.Context, id string) ([]string, error)

GetProjects retrieves a list of assigned projects

func (*BillingGroupHandler) ListAll

func (h *BillingGroupHandler) ListAll(ctx context.Context) ([]BillingGroup, error)

ListAll retrieves a list of all billing groups

func (*BillingGroupHandler) ListInvoices

ListInvoices lists invoices for the billing group.

func (*BillingGroupHandler) ListLines

func (h *BillingGroupHandler) ListLines(ctx context.Context, id, invoiceNumber string) (*BillingGroupListInvoiceLinesResponse, error)

ListLines lists invoice lines for the billing group's invoice.

func (*BillingGroupHandler) Update

Update modifies the specified billing group with the given parameters.

type BillingGroupInvoice

type BillingGroupInvoice struct {
	// BillingGroupId is the billing group ID.
	BillingGroupId string `json:"billing_group_id"`
	// BillingGroupName is the billing group name.
	BillingGroupName string `json:"billing_group_name"`
	// BillingGroupState is the billing group state.
	BillingGroupState string `json:"billing_group_state"`
	// Currency is the currency of the invoice.
	Currency string `json:"currency"`
	// DownloadCookie is the authentication cookie for downloading the invoice.
	DownloadCookie string `json:"download_cookie"`
	// GeneratedAt is the time when the invoice was generated.
	GeneratedAt *string `json:"generated_at,omitempty"`
	// InvoiceNumber is the invoice number.
	InvoiceNumber string `json:"invoice_number"`
	// PeriodBegin is the start of the billing period.
	PeriodBegin string `json:"period_begin"`
	// PeriodEnd is the end of the billing period.
	PeriodEnd string `json:"period_end"`
	// State is the state of the invoice.
	State string `json:"state"`
	// TotalIncVAT is the total amount including VAT.
	TotalIncVAT string `json:"total_inc_vat"`
	// TotalVAT is the total amount excluding VAT.
	TotalVATZero string `json:"total_vat_zero"`
}

BillingGroupInvoice is the structure of the billing group invoice.

type BillingGroupInvoiceLine

type BillingGroupInvoiceLine struct {
	// CloudName is the name of the cloud.
	CloudName *string `json:"cloud_name,omitempty"`
	// CommitmentName is the name of the commitment.
	CommitmentName *string `json:"commitment_name,omitempty"`
	// Description is the human-readable description of the line.
	Description string `json:"description"`
	// LinePreDiscountLocal is the line amount before discount in local currency.
	LinePreDiscountLocal *string `json:"line_pre_discount_local,omitempty"`
	// LineTotalLocal is the line total in local currency.
	LineTotalLocal *string `json:"line_total_local,omitempty"`
	// LineTotalUSD is the line total in USD.
	LineTotalUSD string `json:"line_total_usd"`
	// LineType is the type of the line.
	LineType string `json:"line_type"`
	// LocalCurrency is the local currency.
	LocalCurrency *string `json:"local_currency,omitempty"`
	// ProjectName is the name of the project.
	ProjectName *string `json:"project_name,omitempty"`
	// ServiceName is the name of the service.
	ServiceName *string `json:"service_name,omitempty"`
	// ServicePlan is the name of the service plan.
	ServicePlan *string `json:"service_plan,omitempty"`
	// ServiceType is the type of the service.
	ServiceType *string `json:"service_type,omitempty"`
	// Tags is the list of tags.
	Tags map[string]string `json:"tags"`
	// TimestampBegin is the start of the line.
	TimestampBegin *string `json:"timestamp_begin,omitempty"`
	// TimestampEnd is the end of the line.
	TimestampEnd *string `json:"timestamp_end,omitempty"`
}

BillingGroupInvoiceLine is the structure of the billing group invoice line.

type BillingGroupInvoiceResponse

type BillingGroupInvoiceResponse struct {
	APIResponse

	// Invoice is the invoice.
	Invoice BillingGroupInvoice `json:"invoice"`
}

BillingGroupInvoiceResponse is the response from Aiven for the billing group invoice.

type BillingGroupListInvoiceLinesResponse

type BillingGroupListInvoiceLinesResponse struct {
	APIResponse

	// Lines is the list of invoice lines.
	Lines []BillingGroupInvoiceLine `json:"lines"`
}

BillingGroupListInvoiceLinesResponse is the response from Aiven for the billing group invoice lines.

type BillingGroupListInvoicesResponse

type BillingGroupListInvoicesResponse struct {
	APIResponse

	// Invoices is the list of invoices.
	Invoices []BillingGroupInvoice `json:"invoices"`
}

BillingGroupListInvoicesResponse is the response from Aiven for the billing group invoices.

type BillingGroupListResponse

type BillingGroupListResponse struct {
	APIResponse
	BillingGroupList []BillingGroup `json:"billing_groups"`
}

BillingGroupListResponse is the response from Aiven from a list of billing groups.

type BillingGroupProject

type BillingGroupProject struct {
	AvailableCredits string `json:"available_credits"`
	EstimatedBalance string `json:"estimated_balance"`
	ProjectName      string `json:"project_name"`
}

BillingGroupProject is assigned billing group project response

type BillingGroupProjectsResponse

type BillingGroupProjectsResponse struct {
	APIResponse
	Projects []BillingGroupProject `json:"projects,omitempty"`
}

BillingGroupProjectsResponse is the response from Aiven for the billing group projects

type BillingGroupRequest

type BillingGroupRequest struct {
	BillingGroupName     string          `json:"billing_group_name,omitempty"`
	AccountId            *string         `json:"account_id,omitempty"`
	CardId               *string         `json:"card_id,omitempty"`
	VatId                *string         `json:"vat_id,omitempty"`
	BillingCurrency      *string         `json:"billing_currency,omitempty"`
	BillingExtraText     *string         `json:"billing_extra_text,omitempty"`
	BillingEmails        []*ContactEmail `json:"billing_emails,omitempty"`
	Company              *string         `json:"company,omitempty"`
	AddressLines         []string        `json:"address_lines,omitempty"`
	CountryCode          *string         `json:"country_code,omitempty"`
	City                 *string         `json:"city,omitempty"`
	State                *string         `json:"state,omitempty"`
	ZipCode              *string         `json:"zip_code,omitempty"`
	CopyFromBillingGroup *string         `json:"copy_from_billing_group,omitempty"`
}

BillingGroupRequest is the request from Aiven for the billing group endpoints.

type BillingGroupResponse

type BillingGroupResponse struct {
	APIResponse
	BillingGroup *BillingGroup `json:"billing_group"`
}

BillingGroupResponse is the response from Aiven for the billing group endpoints.

type CAHandler

type CAHandler struct {
	// contains filtered or unexported fields
}

CAHandler is the client which interacts with the Projects CA endpoint on Aiven.

func (*CAHandler) Get

func (h *CAHandler) Get(ctx context.Context, project string) (string, error)

Get retrieves the specified Project CA Certificate.

type CancelFlinkApplicationDeploymentResponse

type CancelFlinkApplicationDeploymentResponse struct {
	APIResponse

	FlinkApplicationDeployment
}

CancelFlinkApplicationDeploymentResponse Aiven API response POST https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/application/<application_id>/deployment/<deployment_id>/cancel

type CancelJobFlinkApplicationQueryResponse

type CancelJobFlinkApplicationQueryResponse struct {
	APIResponse

	Details  string `json:"details"`
	Canceled bool   `json:"canceled"`
}

CancelJobFlinkApplicationQueryResponse Aiven API response PATCH https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/application/<application_id>/query/<query_id>/cancel_job

type Card

type Card struct {
	Brand        string   `json:"brand"`
	CardID       string   `json:"card_id"`
	Country      string   `json:"country"`
	CountryCode  string   `json:"country_code"`
	ExpMonth     int      `json:"exp_month"`
	ExpYear      int      `json:"exp_year"`
	Last4        string   `json:"last4"`
	Name         string   `json:"name"`
	ProjectNames []string `json:"projects"`
}

Card represents the card model on Aiven.

type CardListResponse

type CardListResponse struct {
	APIResponse
	Cards []*Card `json:"cards"`
}

CardListResponse is the response for listing cards.

type CardsHandler

type CardsHandler struct {
	// contains filtered or unexported fields
}

CardsHandler is the client that interacts with the cards endpoints on Aiven.

func (*CardsHandler) Get

func (h *CardsHandler) Get(ctx context.Context, cardID string) (*Card, error)

Get card by card ID. The ID may be either last 4 digits of the card or the actual ID

func (*CardsHandler) List

func (h *CardsHandler) List(ctx context.Context) ([]*Card, error)

List returns all the cards linked to the authenticated account.

type ClickhouseCurrentQueriesResponse

type ClickhouseCurrentQueriesResponse struct {
	APIResponse
	Queries []ClickhouseCurrentQuery
}

ClickhouseCurrentQueriesResponse aiven go-client clickhouse current queries response

type ClickhouseCurrentQuery

type ClickhouseCurrentQuery struct {
	ClientName string  `json:"client_name"`
	Database   string  `json:"database"`
	Elapsed    float64 `json:"elapsed"`
	Query      string  `json:"query"`
	User       string  `json:"user"`
}

type ClickhouseDatabase

type ClickhouseDatabase struct {
	Engine   string `json:"engine,omitempty"`
	Name     string `json:"name"`
	Required bool   `json:"required,omitempty"`
}

type ClickhouseDatabaseHandler

type ClickhouseDatabaseHandler struct {
	// contains filtered or unexported fields
}

ClickhouseDatabaseHandler aiven go-client handler for Clickhouse Databases

func (*ClickhouseDatabaseHandler) Create

func (h *ClickhouseDatabaseHandler) Create(ctx context.Context, project, service, database string) error

Create creates a ClickHouse job

func (*ClickhouseDatabaseHandler) Delete

func (h *ClickhouseDatabaseHandler) Delete(ctx context.Context, project, service, database string) error

Delete deletes a ClickHouse database

func (*ClickhouseDatabaseHandler) Get

func (h *ClickhouseDatabaseHandler) Get(ctx context.Context, project, service, database string) (*ClickhouseDatabase, error)

Get gets a ClickHouse database

func (*ClickhouseDatabaseHandler) List

List gets a list of ClickHouse database for a service

type ClickhouseDatabaseRequest

type ClickhouseDatabaseRequest struct {
	Database string `json:"database"`
}

ClickhouseDatabaseRequest Aiven API request https://api.aiven.io/v1/project/<project>/service/<service_name>/clickhouse/db

type ClickhouseQueryColumnMeta

type ClickhouseQueryColumnMeta struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type ClickhouseQueryHandler

type ClickhouseQueryHandler struct {
	// contains filtered or unexported fields
}

ClickhouseQueryHandler aiven go-client handler for Clickhouse Queries

func (*ClickhouseQueryHandler) CurrentQueries

func (h *ClickhouseQueryHandler) CurrentQueries(ctx context.Context, project, service string) (*ClickhouseCurrentQueriesResponse, error)

CurrentQueries list current queries

func (*ClickhouseQueryHandler) Query

func (h *ClickhouseQueryHandler) Query(ctx context.Context, project, service, database, query string) (*ClickhouseQueryResponse, error)

Query creates a ClickHouse job

type ClickhouseQueryRequest

type ClickhouseQueryRequest struct {
	Database string `json:"database"`
	Query    string `json:"query"`
}

type ClickhouseQueryResponse

type ClickhouseQueryResponse struct {
	APIResponse
	Meta []ClickhouseQueryColumnMeta
	Data []interface{}
}

ClickhouseQueryResponse aiven go-client clickhouse query response

type ClickhouseUser

type ClickhouseUser struct {
	Name       string                    `json:"name"`
	Password   string                    `json:"password"`
	Required   bool                      `json:"required,omitempty"`
	UUID       string                    `json:"uuid,omitempty"`
	Roles      []ClickhouseUserRole      `json:"roles,omitempty"`
	Privileges []ClickhouseUserPrivilege `json:"privileges,omitempty"`
}

type ClickhouseUserHandler

type ClickhouseUserHandler struct {
	// contains filtered or unexported fields
}

ClickhouseUserHandler aiven go-client handler for Clickhouse Users

func (*ClickhouseUserHandler) Create

func (h *ClickhouseUserHandler) Create(ctx context.Context, project, service, name string) (*ClickhouseUserResponse, error)

Create creates a ClickHouse job

func (*ClickhouseUserHandler) Delete

func (h *ClickhouseUserHandler) Delete(ctx context.Context, project, service, uuid string) error

Delete deletes a ClickHouse user

func (*ClickhouseUserHandler) Get

func (h *ClickhouseUserHandler) Get(ctx context.Context, project, service, uuid string) (*ClickhouseUser, error)

Get gets a ClickHouse user

func (*ClickhouseUserHandler) List

func (h *ClickhouseUserHandler) List(ctx context.Context, project, service string) (*ListClickhouseUserResponse, error)

List gets a list of ClickHouse user for a service

func (*ClickhouseUserHandler) ResetPassword

func (h *ClickhouseUserHandler) ResetPassword(ctx context.Context, project, service, uuid, password string) (string, error)

type ClickhouseUserPrivilege

type ClickhouseUserPrivilege struct {
	AccessType      string `json:"access_type"`
	Column          string `json:"column,omitempty"`
	Database        string `json:"database,omitempty"`
	Table           string `json:"table,omitempty"`
	GrantOption     bool   `json:"grant_option"`
	IsPartialRevoke bool   `json:"is_partial_revoke"`
}

type ClickhouseUserRequest

type ClickhouseUserRequest struct {
	Name string `json:"name"`
}

ClickhouseUserRequest Aiven API request https://api.aiven.io/v1/project/<project>/service/<service_name>/clickhouse/user

type ClickhouseUserResponse

type ClickhouseUserResponse struct {
	APIResponse
	User ClickhouseUser `json:"user"`
}

ClickhouseUserResponse Aiven API response

type ClickhouseUserRole

type ClickhouseUserRole struct {
	Name            string `json:"name"`
	UUID            string `json:"uuid"`
	IsDefault       bool   `json:"is_default"`
	WithAdminOption bool   `json:"with_admin_option"`
}

type Client

type Client struct {
	APIKey    string
	Client    *http.Client
	UserAgent string

	Projects                           *ProjectsHandler
	ProjectUsers                       *ProjectUsersHandler
	CA                                 *CAHandler
	CardsHandler                       *CardsHandler
	ServiceIntegrationEndpoints        *ServiceIntegrationEndpointsHandler
	ServiceIntegrations                *ServiceIntegrationsHandler
	ServiceTypes                       *ServiceTypesHandler
	ServiceTask                        *ServiceTaskHandler
	Services                           *ServicesHandler
	ConnectionPools                    *ConnectionPoolsHandler
	Databases                          *DatabasesHandler
	ServiceUsers                       *ServiceUsersHandler
	KafkaACLs                          *KafkaACLHandler
	KafkaSchemaRegistryACLs            *KafkaSchemaRegistryACLHandler
	KafkaSubjectSchemas                *KafkaSubjectSchemasHandler
	KafkaGlobalSchemaConfig            *KafkaGlobalSchemaConfigHandler
	KafkaConnectors                    *KafkaConnectorsHandler
	KafkaMirrorMakerReplicationFlow    *MirrorMakerReplicationFlowHandler
	ElasticsearchACLs                  *ElasticSearchACLsHandler
	KafkaTopics                        *KafkaTopicsHandler
	VPCs                               *VPCsHandler
	VPCPeeringConnections              *VPCPeeringConnectionsHandler
	Accounts                           *AccountsHandler
	AccountTeams                       *AccountTeamsHandler
	AccountTeamMembers                 *AccountTeamMembersHandler
	AccountTeamProjects                *AccountTeamProjectsHandler
	AccountAuthentications             *AccountAuthenticationsHandler
	AccountTeamInvites                 *AccountTeamInvitesHandler
	TransitGatewayVPCAttachment        *TransitGatewayVPCAttachmentHandler
	BillingGroup                       *BillingGroupHandler
	AWSPrivatelink                     *AWSPrivatelinkHandler
	AzurePrivatelink                   *AzurePrivatelinkHandler
	GCPPrivatelink                     *GCPPrivatelinkHandler
	FlinkJobs                          *FlinkJobHandler
	FlinkApplications                  *FlinkApplicationHandler
	FlinkApplicationDeployments        *FlinkApplicationDeploymentHandler
	FlinkApplicationVersions           *FlinkApplicationVersionHandler
	FlinkApplicationQueries            *FlinkApplicationQueryHandler
	StaticIPs                          *StaticIPsHandler
	ClickhouseDatabase                 *ClickhouseDatabaseHandler
	ClickhouseUser                     *ClickhouseUserHandler
	ClickHouseQuery                    *ClickhouseQueryHandler
	ServiceTags                        *ServiceTagsHandler
	Organization                       *OrganizationHandler
	OrganizationUser                   *OrganizationUserHandler
	OrganizationUserInvitations        *OrganizationUserInvitationsHandler
	OrganizationUserGroups             *OrganizationUserGroupHandler
	OrganizationUserGroupMembers       *OrganizationUserGroupMembersHandler
	OrganizationApplicationUserHandler *OrganizationApplicationUserHandler
	OpenSearchSecurityPluginHandler    *OpenSearchSecurityPluginHandler
	OpenSearchACLs                     *OpenSearchACLsHandler
	ProjectOrganization                *ProjectOrgHandler
}

Client represents the instance that does all the calls to the Aiven API.

func NewMFAUserClient

func NewMFAUserClient(email, otp, password string, userAgent string) (*Client, error)

NewMFAUserClient creates a new client based on email, one-time password and password.

func NewTokenClient

func NewTokenClient(key string, userAgent string) (*Client, error)

NewTokenClient creates a new client based on a given token.

func NewUserClient

func NewUserClient(email, password string, userAgent string) (*Client, error)

NewUserClient creates a new client based on email and password.

func SetupEnvClient

func SetupEnvClient(userAgent string) (*Client, error)

SetupEnvClient creates a new client using the provided web URL and token in the environment. This should only be used for testing and development purposes, or if you know what you're doing.

func (*Client) Init

func (c *Client) Init()

Init initializes the client and sets up all the handlers.

type ConnectionInfo

type ConnectionInfo struct {
	CassandraHosts []string `json:"cassandra"`

	ElasticsearchURIs     []string `json:"elasticsearch"`
	ElasticsearchUsername string   `json:"elasticsearch_username"`
	ElasticsearchPassword string   `json:"elasticsearch_password"`
	KibanaURI             string   `json:"kibana_uri"`

	OpensearchURIs          []string `json:"opensearch"`
	OpensearchDashboardsURI string   `json:"opensearch_dashboards_uri"`
	OpensearchPassword      string   `json:"opensearch_password"`
	OpensearchUsername      string   `json:"opensearch_username"`

	GrafanaURIs []string `json:"grafana"`

	InfluxDBURIs         []string `json:"influxdb"`
	InfluxDBDatabaseName string   `json:"influxdb_dbname"`
	InfluxDBUsername     string   `json:"influxdb_username"`
	InfluxDBPassword     string   `json:"influxdb_password"`

	KafkaHosts        []string `json:"kafka"`
	KafkaAccessCert   string   `json:"kafka_access_cert"`
	KafkaAccessKey    string   `json:"kafka_access_key"`
	KafkaConnectURI   string   `json:"kafka_connect_uri"`
	KafkaRestURI      string   `json:"kafka_rest_uri"`
	SchemaRegistryURI string   `json:"schema_registry_uri"`

	PostgresParams      []PostgresParams `json:"pg_params"`
	PostgresReplicaURI  string           `json:"pg_replica_uri"`
	PostgresStandbyURIs []string         `json:"pg_standby"`
	PostgresURIs        []string         `json:"pg"`

	RedisPassword  string   `json:"redis_password"`
	RedisSlaveURIs []string `json:"redis_slave"`
	RedisURIs      []string `json:"redis"`

	FlinkHostPorts []string `json:"flink"`

	MySQLURIs        []string      `json:"mysql"`
	MySQLParams      []MySQLParams `json:"mysql_params"`
	MySQLReplicaURI  string        `json:"mysql_replica_uri"`
	MySQLStandbyURIs []string      `json:"mysql_standby"`

	// Thanos
	QueryFrontendURI                string `json:"query_frontend_uri"`
	QueryURI                        string `json:"query_uri"`
	ReceiverIngestingRemoteWriteURI string `json:"receiver_ingesting_remote_write_uri"`
	ReceiverRemoteWriteURI          string `json:"receiver_remote_write_uri"`
	StoreURI                        string `json:"store_uri"`
}

ConnectionInfo represents the Service Connection information on Aiven.

type ConnectionPool

type ConnectionPool struct {
	ConnectionURI string `json:"connection_uri"`
	Database      string `json:"database"`
	PoolMode      string `json:"pool_mode"`
	PoolName      string `json:"pool_name"`
	PoolSize      int    `json:"pool_size"`
	Username      string `json:"username"`
}

ConnectionPool represents a PostgreSQL PGBouncer connection pool on Aiven

type ConnectionPoolsHandler

type ConnectionPoolsHandler struct {
	// contains filtered or unexported fields
}

ConnectionPoolsHandler is the client which interacts with the connection pool endpoints on Aiven.

func (*ConnectionPoolsHandler) Create

func (h *ConnectionPoolsHandler) Create(
	ctx context.Context,
	project string,
	serviceName string,
	req CreateConnectionPoolRequest,
) (*ConnectionPool, error)

Create new connection pool entry.

func (*ConnectionPoolsHandler) Delete

func (h *ConnectionPoolsHandler) Delete(ctx context.Context, project, serviceName, poolName string) error

Delete removes the specified connection pool entry.

func (*ConnectionPoolsHandler) Get

func (h *ConnectionPoolsHandler) Get(ctx context.Context, project, serviceName, poolName string) (*ConnectionPool, error)

Get a specific connection pool.

func (*ConnectionPoolsHandler) List

func (h *ConnectionPoolsHandler) List(ctx context.Context, project, serviceName string) ([]*ConnectionPool, error)

List returns all the connection pool entries for a given service.

func (*ConnectionPoolsHandler) Update

func (h *ConnectionPoolsHandler) Update(
	ctx context.Context,
	project string,
	serviceName string,
	poolName string,
	req UpdateConnectionPoolRequest,
) (*ConnectionPool, error)

Update a specific connection pool with the given parameters.

type ConsumerGroup

type ConsumerGroup struct {
	GroupName string `json:"group_name"`
	Offset    int64  `json:"offset"`
}

ConsumerGroup is the group used in partitions.

type ContactEmail

type ContactEmail struct {
	Email string `json:"email"`
}

ContactEmail represents either a technical contact or billing contact.

type CreateConnectionPoolRequest

type CreateConnectionPoolRequest struct {
	Database string  `json:"database"`
	PoolMode string  `json:"pool_mode"`
	PoolName string  `json:"pool_name"`
	PoolSize int     `json:"pool_size"`
	Username *string `json:"username,omitempty"`
}

CreateConnectionPoolRequest are the parameters used to create a connection pool entry.

type CreateDatabaseRequest

type CreateDatabaseRequest struct {
	Database  string `json:"database"`
	LcCollate string `json:"lc_collate,omitempty"`
	LcType    string `json:"lc_ctype,omitempty"`
}

CreateDatabaseRequest contains the parameters used to create a database.

type CreateFlinkApplicationDeploymentRequest

type CreateFlinkApplicationDeploymentRequest struct {
	Parallelism       int    `json:"parallelism,omitempty"`
	RestartEnabled    bool   `json:"restart_enabled,omitempty"`
	StartingSavepoint string `json:"starting_savepoint,omitempty"`
	VersionID         string `json:"version_id"`
}

CreateFlinkApplicationDeploymentRequest Aiven API request POST https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/application/<application_id>/deployment

type CreateFlinkApplicationDeploymentResponse

type CreateFlinkApplicationDeploymentResponse struct {
	APIResponse
	FlinkApplicationDeployment
}

CreateFlinkApplicationDeploymentResponse Aiven API response POST https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/application/<application_id>/deployment

type CreateFlinkApplicationQueryRequest

type CreateFlinkApplicationQueryRequest struct {
	JobTTL  int `json:"job_ttl"`
	MaxRows int `json:"max_rows"`
	Sinks   []struct {
		CreateTable   string `json:"create_table"`
		IntegrationID string `json:"integration_id"`
	} `json:"sinks"`
	Sources []struct {
		CreateTable   string `json:"create_table"`
		IntegrationID string `json:"integration_id"`
	} `json:"sources"`
	Statement string `json:"statement"`
}

CreateFlinkApplicationQueryRequest Aiven API request POST https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/application/<application_id>/query

type CreateFlinkApplicationQueryResponse

type CreateFlinkApplicationQueryResponse struct {
	APIResponse

	QueryID string `json:"query_id"`
}

CreateFlinkApplicationQueryResponse Aiven API response POST https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/application/<application_id>/query

type CreateFlinkApplicationRequest

type CreateFlinkApplicationRequest struct {
	Name               string                   `json:"name"`
	ApplicationVersion *FlinkApplicationVersion `json:"application_version,omitempty"`
}

CreateFlinkApplicationRequest is the request to create a Flink Application. POST /project/{project}/service/{service_name}/flink/application

type CreateFlinkJobRequest

type CreateFlinkJobRequest struct {
	JobName   string   `json:"job_name,omitempty"`
	Statement string   `json:"statement"`
	TablesIds []string `json:"table_ids"`
}

CreateFlinkJobRequest Aiven API request POST https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/job

type CreateFlinkJobResponse

type CreateFlinkJobResponse struct {
	APIResponse

	JobName string `json:"job_name"`
	JobId   string `json:"job_id"`
}

CreateFlinkJobResponse Aiven API response POST https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/job

type CreateKafkaACLRequest

type CreateKafkaACLRequest struct {
	Permission string `json:"permission"`
	Topic      string `json:"topic"`
	Username   string `json:"username"`
}

CreateKafkaACLRequest are the parameters used to create a Kafka ACL entry.

type CreateKafkaSchemaRegistryACLRequest

type CreateKafkaSchemaRegistryACLRequest struct {
	Permission string `json:"permission"`
	Resource   string `json:"resource"`
	Username   string `json:"username"`
}

CreateKafkaSchemaRegistryACLRequest are the parameters used to create a Kafka Schema Registry ACL entry.

type CreateKafkaTopicRequest

type CreateKafkaTopicRequest struct {
	CleanupPolicy         *string          `json:"cleanup_policy,omitempty"`
	MinimumInSyncReplicas *int             `json:"min_insync_replicas,omitempty"`
	Partitions            *int             `json:"partitions,omitempty"`
	Replication           *int             `json:"replication,omitempty"`
	RetentionBytes        *int             `json:"retention_bytes,omitempty"`
	RetentionHours        *int             `json:"retention_hours,omitempty"`
	TopicName             string           `json:"topic_name"`
	Config                KafkaTopicConfig `json:"config"`
	Tags                  []KafkaTopicTag  `json:"tags,omitempty"`
}

CreateKafkaTopicRequest are the parameters used to create a kafka topic.

type CreateProjectInvitationRequest

type CreateProjectInvitationRequest struct {
	UserEmail  string `json:"user_email"`
	MemberType string `json:"member_type"`
}

CreateProjectInvitationRequest are the parameters to invite a user to a project

type CreateProjectRequest

type CreateProjectRequest struct {
	BillingAddress               *string           `json:"billing_address,omitempty"`
	BillingEmails                *[]*ContactEmail  `json:"billing_emails,omitempty"`
	BillingExtraText             *string           `json:"billing_extra_text,omitempty"`
	CardID                       *string           `json:"card_id,omitempty"`
	Cloud                        *string           `json:"cloud,omitempty"`
	CopyFromProject              string            `json:"copy_from_project,omitempty"`
	CountryCode                  *string           `json:"country_code,omitempty"`
	Project                      string            `json:"project"`
	AccountId                    *string           `json:"account_id,omitempty"`
	TechnicalEmails              *[]*ContactEmail  `json:"tech_emails,omitempty"`
	BillingCurrency              string            `json:"billing_currency,omitempty"`
	VatID                        *string           `json:"vat_id,omitempty"`
	UseSourceProjectBillingGroup bool              `json:"use_source_project_billing_group,omitempty"`
	BillingGroupId               string            `json:"billing_group_id,omitempty"`
	AddAccountOwnersAdminAccess  *bool             `json:"add_account_owners_admin_access,omitempty"`
	Tags                         map[string]string `json:"tags"`
}

CreateProjectRequest are the parameters for creating a project.

type CreateServiceIntegrationEndpointRequest

type CreateServiceIntegrationEndpointRequest struct {
	EndpointName string                 `json:"endpoint_name"`
	EndpointType string                 `json:"endpoint_type"`
	UserConfig   map[string]interface{} `json:"user_config"`
}

CreateServiceIntegrationEndpointRequest are the parameters to create a Service Integration Endpoint.

type CreateServiceIntegrationRequest

type CreateServiceIntegrationRequest struct {
	DestinationService    *string                `json:"dest_service,omitempty"`
	DestinationEndpointID *string                `json:"dest_endpoint_id,omitempty"`
	DestinationProject    *string                `json:"dest_project,omitempty"`
	IntegrationType       string                 `json:"integration_type"`
	SourceService         *string                `json:"source_service,omitempty"`
	SourceProject         *string                `json:"source_project,omitempty"`
	SourceEndpointID      *string                `json:"source_endpoint_id,omitempty"`
	UserConfig            map[string]interface{} `json:"user_config,omitempty"`
}

CreateServiceIntegrationRequest are the parameters to create a Service Integration.

type CreateServiceRequest

type CreateServiceRequest struct {
	Cloud                 string                  `json:"cloud,omitempty"`
	GroupName             string                  `json:"group_name,omitempty"`
	MaintenanceWindow     *MaintenanceWindow      `json:"maintenance,omitempty"`
	Plan                  string                  `json:"plan,omitempty"`
	ProjectVPCID          *string                 `json:"project_vpc_id"`
	ServiceName           string                  `json:"service_name"`
	ServiceType           string                  `json:"service_type"`
	TerminationProtection bool                    `json:"termination_protection"`
	UserConfig            map[string]interface{}  `json:"user_config,omitempty"`
	ServiceIntegrations   []NewServiceIntegration `json:"service_integrations"`
	DiskSpaceMB           int                     `json:"disk_space_mb,omitempty"`
	StaticIPs             []string                `json:"static_ips,omitempty"`
	TechnicalEmails       *[]ContactEmail         `json:"tech_emails,omitempty"`
}

CreateServiceRequest are the parameters to create a Service.

type CreateServiceUserRequest

type CreateServiceUserRequest struct {
	Username       string         `json:"username"`
	Authentication *string        `json:"authentication,omitempty"`
	AccessControl  *AccessControl `json:"access_control,omitempty"`
}

CreateServiceUserRequest are the parameters required to create a ServiceUser.

type CreateStaticIPRequest

type CreateStaticIPRequest struct {
	CloudName string `json:"cloud_name"`
}

CreateStaticIPRequest Aiven API request POST https://api.aiven.io/v1/project/<project>/static-ips

type CreateStaticIPResponse

type CreateStaticIPResponse struct {
	APIResponse

	StaticIP
}

CreateStaticIPResponse Aiven API response POST https://api.aiven.io/v1/project/<project>/static-ips

type CreateVPCPeeringConnectionRequest

type CreateVPCPeeringConnectionRequest struct {
	PeerCloudAccount     string   `json:"peer_cloud_account"`
	PeerVPC              string   `json:"peer_vpc"`
	PeerRegion           *string  `json:"peer_region,omitempty"`
	PeerAzureAppId       string   `json:"peer_azure_app_id,omitempty"`
	PeerAzureTenantId    string   `json:"peer_azure_tenant_id,omitempty"`
	PeerResourceGroup    string   `json:"peer_resource_group,omitempty"`
	UserPeerNetworkCIDRs []string `json:"user_peer_network_cidrs,omitempty"`
}

CreateVPCPeeringConnectionRequest holds the parameters to create a new peering connection.

type CreateVPCRequest

type CreateVPCRequest struct {
	CloudName          string                  `json:"cloud_name"`
	NetworkCIDR        string                  `json:"network_cidr"`
	PeeringConnections []*VPCPeeringConnection `json:"peering_connections"`
}

CreateVPCRequest holds the parameters to create a new VPC.

type Database

type Database struct {
	DatabaseName string `json:"database_name"`
	LcCollate    string `json:"lc_collate,omitempty"`
	LcType       string `json:"lc_ctype,omitempty"`
}

Database represents a database type on Aiven.

type DatabaseListResponse

type DatabaseListResponse struct {
	APIResponse
	Databases []*Database `json:"databases"`
}

DatabaseListResponse represents the response from Aiven for listing databases.

type DatabasesHandler

type DatabasesHandler struct {
	// contains filtered or unexported fields
}

DatabasesHandler is the client which interacts with the Aiven database endpoints.

func (*DatabasesHandler) Create

func (h *DatabasesHandler) Create(ctx context.Context, project, service string, req CreateDatabaseRequest) (*Database, error)

Create creates a database with the given parameters.

func (*DatabasesHandler) Delete

func (h *DatabasesHandler) Delete(ctx context.Context, project, service, database string) error

Delete removes the specified database.

func (*DatabasesHandler) Get

func (h *DatabasesHandler) Get(ctx context.Context, projectName, serviceName, databaseName string) (*Database, error)

Get returns a specific database from Aiven.

func (*DatabasesHandler) List

func (h *DatabasesHandler) List(ctx context.Context, project, service string) ([]*Database, error)

List will return all the databases for a given service.

type DeleteFlinkApplicationDeploymentResponse

type DeleteFlinkApplicationDeploymentResponse struct {
	APIResponse

	FlinkApplicationDeployment
}

DeleteFlinkApplicationDeploymentResponse Aiven API response DELETE https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/application/<application_id>/deployment/<deployment_id>

type DeleteStaticIPRequest

type DeleteStaticIPRequest struct {
	StaticIPAddressID string `json:"static_ip_address_id"`
}

DeleteStaticIPRequest Aiven API request DELETE https://api.aiven.io/v1/project/<project>/static-ips/<static_ip_address_id>

type DetailedFlinkApplicationResponse

type DetailedFlinkApplicationResponse struct {
	GenericFlinkApplicationResponse

	ApplicationVersions []FlinkApplicationVersion  `json:"application_versions"`
	CurrentDeployment   FlinkApplicationDeployment `json:"current_deployment"`
}

DetailedFlinkApplicationResponse is the detailed response for Flink Application requests. GET /project/{project}/service/{service_name}/flink/application/{application_id} POST /project/{project}/service/{service_name}/flink/application PUT /project/{project}/service/{service_name}/flink/application/{application_id} DELETE /project/{project}/service/{service_name}/flink/application/{application_id}

type DetailedFlinkApplicationVersionResponse

type DetailedFlinkApplicationVersionResponse struct {
	GenericFlinkApplicationVersionResponse

	ID        string `json:"id,omitempty"`
	Version   int    `json:"version"`
	CreatedAt string `json:"created_at"`
	CreatedBy string `json:"created_by"`
}

DetailedFlinkApplicationVersionResponse is the detailed response for Flink Application Version requests. GET /project/{project}/service/{service_name}/flink/application/{application_id}/version/{application_version_id} POST /project/{project}/service/{service_name}/flink/application/{application_id}/version DELETE /project/{project}/service/{service_name}/flink/application/{application_id}/version/{application_version_id}

type ElasticSearchACL

type ElasticSearchACL struct {
	Rules    []ElasticsearchACLRule `json:"rules"`
	Username string                 `json:"username"`
}

ElasticSearchACL represents a ElasticSearch ACLs entry

type ElasticSearchACLConfig

type ElasticSearchACLConfig struct {
	ACLs        []ElasticSearchACL `json:"acls"`
	Enabled     bool               `json:"enabled"`
	ExtendedAcl bool               `json:"extendedAcl"`
}

ElasticSearchACLConfig represents a configuration for Elasticsearch ACLs

func (*ElasticSearchACLConfig) Add deprecated

Add appends new ACL to the existing ElasticSearch ACLs config.

Deprecated: Use OpenSearchACLConfig.Add instead.

func (*ElasticSearchACLConfig) Delete deprecated

Delete removes the specified ACL from the existing ElasticSearch ACLs config.

Deprecated: Use OpenSearchACLConfig.Delete instead.

type ElasticSearchACLResponse

type ElasticSearchACLResponse struct {
	APIResponse
	ElasticSearchACLConfig ElasticSearchACLConfig `json:"elasticsearch_acl_config"`
}

ElasticSearchACLResponse Aiven API response https://api.aiven.io/v1/project/<project>/service/<service_name>/elasticsearch/acl

type ElasticSearchACLsHandler

type ElasticSearchACLsHandler struct {
	// contains filtered or unexported fields
}

ElasticSearchACLsHandler Aiven go-client handler for Elastisearch ACLs

func (*ElasticSearchACLsHandler) Get deprecated

Get gets all existing Elasticsearch ACLs config

Deprecated: Use OpenSearchACLsHandler.Get instead.

func (*ElasticSearchACLsHandler) Update deprecated

Update updates Elasticsearch ACL config

Deprecated: Use OpenSearchACLsHandler.Update instead.

type ElasticsearchACLRequest

type ElasticsearchACLRequest struct {
	ElasticSearchACLConfig ElasticSearchACLConfig `json:"elasticsearch_acl_config"`
}

ElasticsearchACLRequest Aiven API request https://api.aiven.io/v1/project/<project>/service/<service_name>/elasticsearch/acl

type ElasticsearchACLRule

type ElasticsearchACLRule struct {
	Index      string `json:"index"`
	Permission string `json:"permission"`
}

ElasticsearchACLRule represents a ElasticSearch ACLs Rule entry

type Error

type Error struct {
	Message  string `json:"message"`
	MoreInfo string `json:"more_info"`
	Status   int    `json:"status"`
}

Error represents an Aiven API Error.

func (Error) Error

func (e Error) Error() string

Error concatenates the Status, Message and MoreInfo values.

type FlinkApplicationDeployment

type FlinkApplicationDeployment struct {
	CreatedAt         string `json:"created_at"`
	CreatedBy         string `json:"created_by"`
	ID                string `json:"id"`
	JobID             string `json:"job_id"`
	LastSavepoint     string `json:"last_savepoint"`
	Parallelism       int    `json:"parallelism"`
	RestartEnabled    bool   `json:"restart_enabled"`
	StartingSavepoint string `json:"starting_savepoint"`
	Status            string `json:"status"`
	VersionID         string `json:"version_id"`
}

shared fields by some responses

type FlinkApplicationDeploymentHandler

type FlinkApplicationDeploymentHandler struct {
	// contains filtered or unexported fields
}

FlinkApplicationDeploymentHandler aiven go-client handler for Flink Application Deployments

func (*FlinkApplicationDeploymentHandler) Cancel

func (h *FlinkApplicationDeploymentHandler) Cancel(ctx context.Context, project, service, applicationId, deploymentId string) (*CancelFlinkApplicationDeploymentResponse, error)

Cancel cancel the Flink of a Flink deployment

func (*FlinkApplicationDeploymentHandler) Create

Create creates a Flink deployment

func (*FlinkApplicationDeploymentHandler) Delete

func (h *FlinkApplicationDeploymentHandler) Delete(ctx context.Context, project, service, applicationId, deploymentId string) (*DeleteFlinkApplicationDeploymentResponse, error)

Delete deletes a Flink deployment

func (*FlinkApplicationDeploymentHandler) Get

func (h *FlinkApplicationDeploymentHandler) Get(ctx context.Context, project, service, applicationId, deploymentId string) (*GetFlinkApplicationDeploymentResponse, error)

Get gets a Flink deployment

func (*FlinkApplicationDeploymentHandler) List

func (h *FlinkApplicationDeploymentHandler) List(ctx context.Context, project, service, applicationId string) (*ListFlinkApplicationDeploymentResponse, error)

List lists all Flink deployments

func (*FlinkApplicationDeploymentHandler) Stop

func (h *FlinkApplicationDeploymentHandler) Stop(ctx context.Context, project, service, applicationId, deploymentId string) (*StopFlinkApplicationDeploymentResponse, error)

Stop cancel the Flink of a Flink deployment

type FlinkApplicationHandler

type FlinkApplicationHandler struct {
	// contains filtered or unexported fields
}

FlinkApplicationHandler is the client which interacts with the Flink Application.

func (*FlinkApplicationHandler) Create

Create is the method to create a Flink Application.

func (*FlinkApplicationHandler) Delete

func (h *FlinkApplicationHandler) Delete(
	ctx context.Context,
	project string,
	service string,
	applicationID string,
) (*DetailedFlinkApplicationResponse, error)

Delete is the method to delete a Flink Application.

func (*FlinkApplicationHandler) Get

func (h *FlinkApplicationHandler) Get(
	ctx context.Context,
	project string,
	service string,
	applicationID string,
) (*DetailedFlinkApplicationResponse, error)

Get is the method to get a Flink Application.

func (*FlinkApplicationHandler) List

List is the method to list Flink Applications.

func (*FlinkApplicationHandler) Update

Update is the method to update a Flink Application.

type FlinkApplicationListResponse

type FlinkApplicationListResponse struct {
	APIResponse

	Applications []GenericFlinkApplicationResponse `json:"applications"`
}

FlinkApplicationListResponse is the response for listing Flink Applications. GET /project/{project}/service/{service_name}/flink/application

type FlinkApplicationQueryHandler

type FlinkApplicationQueryHandler struct {
	// contains filtered or unexported fields
}

FlinkApplicationQueryHandler aiven go-client handler for Flink Application Queries

func (*FlinkApplicationQueryHandler) CancelJob

func (h *FlinkApplicationQueryHandler) CancelJob(ctx context.Context, project, service, applicationId, queryId string) (*CancelJobFlinkApplicationQueryResponse, error)

CancelJob cancel the Flink job of a Flink query

func (*FlinkApplicationQueryHandler) Create

Create creates a Flink query

func (*FlinkApplicationQueryHandler) Delete

func (h *FlinkApplicationQueryHandler) Delete(ctx context.Context, project, service, applicationId, queryId string) error

Delete deletes a Flink query

func (*FlinkApplicationQueryHandler) Get

func (h *FlinkApplicationQueryHandler) Get(ctx context.Context, project, service, applicationId, queryId string) (*GetFlinkApplicationQueryResponse, error)

Get gets a Flink query

func (*FlinkApplicationQueryHandler) List

func (h *FlinkApplicationQueryHandler) List(ctx context.Context, project, service, applicationId string) (*ListFlinkApplicationQueryResponse, error)

List lists all Flink queries

type FlinkApplicationVersion

type FlinkApplicationVersion struct {
	Sinks     []FlinkApplicationVersionCreateInput `json:"sinks"`
	Sources   []FlinkApplicationVersionCreateInput `json:"sources"`
	Statement string                               `json:"statement"`
}

type FlinkApplicationVersionCreateInput

type FlinkApplicationVersionCreateInput struct {
	CreateTable   string `json:"create_table"`
	IntegrationID string `json:"integration_id"`
}

type FlinkApplicationVersionHandler

type FlinkApplicationVersionHandler struct {
	// contains filtered or unexported fields
}

FlinkApplicationVersionHandler is the client which interacts with the Flink Application Version.

func (*FlinkApplicationVersionHandler) Create

Create is the method to create a Flink Application Version.

func (*FlinkApplicationVersionHandler) Delete

func (h *FlinkApplicationVersionHandler) Delete(
	ctx context.Context,
	project string,
	service string,
	applicationID string,
	applicationVersionID string,
) (*DetailedFlinkApplicationVersionResponse, error)

Delete is the method to delete a Flink Application Version.

func (*FlinkApplicationVersionHandler) Get

func (h *FlinkApplicationVersionHandler) Get(
	ctx context.Context,
	project string,
	service string,
	applicationID string,
	applicationVersionID string,
) (*DetailedFlinkApplicationVersionResponse, error)

Get is the method to get a Flink Application Version.

func (*FlinkApplicationVersionHandler) Validate

Validate is the method to validate a Flink Application Version.

type FlinkApplicationVersionRelation

type FlinkApplicationVersionRelation struct {
	CreateTable   string `json:"create_table,omitempty"`
	IntegrationID string `json:"integration_id,omitempty"`
}

FlinkApplicationVersionRelation is the relation between a Flink Application Version and an Integration.

type FlinkJobHandler

type FlinkJobHandler struct {
	// contains filtered or unexported fields
}

FlinkJobHandler aiven go-client handler for Flink Jobs

func (*FlinkJobHandler) Create

func (h *FlinkJobHandler) Create(ctx context.Context, project, service string, req CreateFlinkJobRequest) (*CreateFlinkJobResponse, error)

Create creates a flink job

func (*FlinkJobHandler) Get

func (h *FlinkJobHandler) Get(ctx context.Context, project, service string, req GetFlinkJobRequest) (*GetFlinkJobResponse, error)

Get gets a flink job

func (*FlinkJobHandler) List

func (h *FlinkJobHandler) List(ctx context.Context, project, service string) (*ListFlinkJobResponse, error)

List lists a flink job

func (*FlinkJobHandler) Patch

func (h *FlinkJobHandler) Patch(ctx context.Context, project, service string, req PatchFlinkJobRequest) error

Patch patches a flink job

func (*FlinkJobHandler) Validate

func (h *FlinkJobHandler) Validate(ctx context.Context, project, service string, req ValidateFlinkJobRequest) (*ValidateFlinkJobResponse, error)

Validate validates a flink job

type GCPPrivatelinkConnectionApproveRequest

type GCPPrivatelinkConnectionApproveRequest struct {
	UserIPAddress string `json:"user_ip_address"`
}

GCPPrivatelinkConnectionApproveRequest holds the request parameters for approving a GCP Privatelink connection.

type GCPPrivatelinkConnectionResponse

type GCPPrivatelinkConnectionResponse struct {
	APIResponse
	PrivatelinkConnectionID string `json:"privatelink_connection_id"`
	State                   string `json:"state"`
	UserIPAddress           string `json:"user_ip_address"`
	PSCConnectionID         string `json:"psc_connection_id"`
}

GCPPrivatelinkConnectionResponse is a response with a GCP Privatelink connection details.

type GCPPrivatelinkConnectionsResponse

type GCPPrivatelinkConnectionsResponse struct {
	APIResponse
	Connections []GCPPrivatelinkConnectionResponse
}

GCPPrivatelinkConnectionsResponse is a response with a list of GCP Privatelink connections.

type GCPPrivatelinkHandler

type GCPPrivatelinkHandler struct {
	// contains filtered or unexported fields
}

GCPPrivatelinkHandler is the client that interacts with the Aiven GCP Privatelink API.

func (*GCPPrivatelinkHandler) ConnectionApprove

func (h *GCPPrivatelinkHandler) ConnectionApprove(
	ctx context.Context,
	project,
	serviceName,
	connID string,
	req GCPPrivatelinkConnectionApproveRequest,
) error

ConnectionApprove approves a GCP Privatelink connection.

func (*GCPPrivatelinkHandler) ConnectionGet

func (h *GCPPrivatelinkHandler) ConnectionGet(
	ctx context.Context,
	project,
	serviceName string,
	connID *string,
) (*GCPPrivatelinkConnectionResponse, error)

ConnectionGet retrieves a GCP Privatelink connection. This is a convenience function that fetches all connections and filters by ID because the API does not support fetching by ID. It fetches all connections and filters by ID and returns a fake 404 if nothing is found.

func (*GCPPrivatelinkHandler) ConnectionsList

func (h *GCPPrivatelinkHandler) ConnectionsList(
	ctx context.Context,
	project,
	serviceName string,
) (*GCPPrivatelinkConnectionsResponse, error)

ConnectionApprove approves a GCP Privatelink connection.

func (*GCPPrivatelinkHandler) Create

func (h *GCPPrivatelinkHandler) Create(ctx context.Context, project, serviceName string) (*GCPPrivatelinkResponse, error)

Create creates a GCP Privatelink.

func (*GCPPrivatelinkHandler) Delete

func (h *GCPPrivatelinkHandler) Delete(ctx context.Context, project, serviceName string) error

Delete deletes a GCP Privatelink.

func (*GCPPrivatelinkHandler) Get

func (h *GCPPrivatelinkHandler) Get(ctx context.Context, project, serviceName string) (*GCPPrivatelinkResponse, error)

Get retrieves a GCP Privatelink.

func (*GCPPrivatelinkHandler) Refresh

func (h *GCPPrivatelinkHandler) Refresh(ctx context.Context, project, serviceName string) error

Refresh refreshes a GCP Privatelink.

func (*GCPPrivatelinkHandler) Update

func (h *GCPPrivatelinkHandler) Update(ctx context.Context, project, serviceName string) (*GCPPrivatelinkResponse, error)

Update updates a GCP Privatelink.

type GCPPrivatelinkResponse

type GCPPrivatelinkResponse struct {
	APIResponse
	State                   string `json:"state"`
	GoogleServiceAttachment string `json:"google_service_attachment"`
}

GCPPrivatelinkResponse is a response with a GCP Privatelink details.

type GenericFlinkApplicationResponse

type GenericFlinkApplicationResponse struct {
	APIResponse

	ID        string `json:"id"`
	Name      string `json:"name"`
	CreatedAt string `json:"created_at"`
	CreatedBy string `json:"created_by"`
	UpdatedAt string `json:"updated_at"`
	UpdatedBy string `json:"updated_by"`
}

GenericFlinkApplicationResponse is the generic response for Flink Application requests. GET https://api.aiven.io/v1/project/{project}/service/{service_name}/flink/application

type GenericFlinkApplicationVersionRequest

type GenericFlinkApplicationVersionRequest struct {
	Statement string                            `json:"statement,omitempty"`
	Sinks     []FlinkApplicationVersionRelation `json:"sinks,omitempty"`
	Sources   []FlinkApplicationVersionRelation `json:"sources,omitempty"`
}

GenericFlinkApplicationVersionRequest is the generic request for Flink Application Version requests. POST /project/{project}/service/{service_name}/flink/application/{application_id}/version POST /project/{project}/service/{service_name}/flink/application/{application_id}/version/validate

type GenericFlinkApplicationVersionResponse

type GenericFlinkApplicationVersionResponse struct {
	APIResponse
	GenericFlinkApplicationVersionRequest
}

GenericFlinkApplicationVersionResponse is the generic response for Flink Application Version requests.

type GetFlinkApplicationDeploymentResponse

type GetFlinkApplicationDeploymentResponse struct {
	APIResponse

	FlinkApplicationDeployment
}

GetFlinkApplicationDeploymentResponse Aiven API response GET https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/application/<application_id>/deployment/<deployment_id>

type GetFlinkApplicationQueryResponse

type GetFlinkApplicationQueryResponse struct {
	APIResponse
	// contains filtered or unexported fields
}

GetFlinkApplicationQueryResponse Aiven API response GET https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/application/<application_id>/query/<query_id>

type GetFlinkJobRequest

type GetFlinkJobRequest struct {
	JobId string `json:"job_id"`
}

GetFlinkJobRequest Aiven API request GET https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/job/<job_id>

type GetFlinkJobResponse

type GetFlinkJobResponse struct {
	APIResponse

	Name           string     `json:"name"`
	JID            string     `json:"jid"`
	IsStoppable    bool       `json:"isStoppable"`
	Duration       int        `json:"duration"`
	Now            int        `json:"now"`
	EndTime        *time.Time `json:"end-time"`
	StartTime      *time.Time `json:"start-time"`
	MaxParallelism int        `json:"maxParallelism"`
	State          string     `json:"state"`
	Plan           struct {
		JID   string `json:"jid"`
		Name  string `json:"name"`
		Nodes []struct {
			Description         string      `json:"description"`
			Id                  string      `json:"id"`
			Operator            string      `json:"operator"`
			OperatorStrategy    string      `json:"operator_strategy"`
			OptimizerProperties interface{} `json:"optimizer_properties"`
			Parallelism         int         `json:"parallelism"`
		} `json:"nodes"`
	} `json:"plan"`
	StatusCounts struct {
		Canceled     int `json:"CANCELED"`
		Canceling    int `json:"CANCELING"`
		Created      int `json:"CREATED"`
		Deploying    int `json:"DEPLOYING"`
		Failed       int `json:"FAILED"`
		Finished     int `json:"FINISHED"`
		Initializing int `json:"INITIALIZING"`
		Reconciling  int `json:"RECONCILING"`
		Running      int `json:"RUNNING"`
		Scheduled    int `json:"SCHEDULED"`
	} `json:"status-counts"`
	Timestamps struct {
		Canceled     int `json:"CANCELED"`
		Canceling    int `json:"CANCELING"`
		Created      int `json:"CREATED"`
		Deploying    int `json:"DEPLOYING"`
		Failed       int `json:"FAILED"`
		Finished     int `json:"FINISHED"`
		Initializing int `json:"INITIALIZING"`
		Reconciling  int `json:"RECONCILING"`
		Running      int `json:"RUNNING"`
		Scheduled    int `json:"SCHEDULED"`
	} `json:"timestamps"`

	Vertices []interface{} `json:"vertices"`
}

GetFlinkJobResponse Aiven API response GET https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/proxy/v1/jobs/<job_id>

type GetServicePlanPricingResponse

type GetServicePlanPricingResponse struct {
	APIResponse
	BasePriceUSD           string `json:"base_price_usd"`
	ExtraDiskPricePerGBUSD string `json:"extra_disk_price_per_gb_usd"`
}

GetServicePlanPricingResponse Aiven API request GET https://api.aiven.io/v1/project/<project>/pricing/service-types/<service_type>/plans/<service_plan>/cloud/<cloud>

type GetServicePlanResponse

type GetServicePlanResponse struct {
	APIResponse
	DiskSpaceCapMB  int `json:"disk_space_cap_mb"`
	DiskSpaceMB     int `json:"disk_space_mb"`
	DiskSpaceStepMB int `json:"disk_space_step_mb"`
}

GetServicePlanResponse Aiven API request GET https://api.aiven.io/v1/project/<project>/service-types/<service_type>/plans/<service_plan>

type IntegrationEndpointType

type IntegrationEndpointType struct {
	EndpointType     string           `json:"endpoint_type"`
	ServiceTypes     []string         `json:"service_types"`
	Title            string           `json:"title"`
	UserConfigSchema UserConfigSchema `json:"user_config_schema"`
}

IntegrationEndpointType represents an integration endpoint type.

type IntegrationType

type IntegrationType struct {
	DestDescription    string           `json:"dest_description"`
	DestServiceTypes   []string         `json:"dest_service_types"`
	IntegrationType    string           `json:"integration_type"`
	SourceDescription  string           `json:"source_description"`
	SourceServiceTypes []string         `json:"source_service_types"`
	UserConfigSchema   UserConfigSchema `json:"user_config_schema"`
}

IntegrationType represents an integration type.

type KafkaACL

type KafkaACL struct {
	ID         string `json:"id"`
	Permission string `json:"permission"`
	Topic      string `json:"topic"`
	Username   string `json:"username"`
}

KafkaACL represents a Kafka ACL entry on Aiven.

type KafkaACLHandler

type KafkaACLHandler struct {
	// contains filtered or unexported fields
}

KafkaACLHandler is the client which interacts with the Kafka ACL endpoints on Aiven.

func (*KafkaACLHandler) Create

func (h *KafkaACLHandler) Create(ctx context.Context, project, service string, req CreateKafkaACLRequest) (*KafkaACL, error)

Create creates new Kafka ACL entry.

func (*KafkaACLHandler) Delete

func (h *KafkaACLHandler) Delete(ctx context.Context, project, serviceName, aclID string) error

Delete deletes a specific Kafka ACL entry.

func (*KafkaACLHandler) Get

func (h *KafkaACLHandler) Get(ctx context.Context, project, serviceName, aclID string) (*KafkaACL, error)

Get gets a specific Kafka ACL.

func (*KafkaACLHandler) List

func (h *KafkaACLHandler) List(ctx context.Context, project, serviceName string) ([]*KafkaACL, error)

List lists all the Kafka ACL entries.

type KafkaACLResponse

type KafkaACLResponse struct {
	APIResponse
	ACL []*KafkaACL `json:"acl"`
}

KafkaACLResponse represents the response from Aiven after interacting with the Kafka ACL API.

type KafkaConnector

type KafkaConnector struct {
	Name   string `json:"name"`
	Config KafkaConnectorConfig
	Plugin KafkaConnectorPlugin
	Tasks  []KafkaConnectorTask
}

KafkaConnector represents Kafka Connector

type KafkaConnectorConfig

type KafkaConnectorConfig map[string]string

KafkaConnectorConfig represents a configuration for Kafka Connectors

type KafkaConnectorPlugin

type KafkaConnectorPlugin struct {
	Author           string `json:"author"`
	Class            string `json:"class"`
	DocumentationURL string `json:"docURL"`
	Title            string `json:"title"`
	Type             string `json:"type"`
	Version          string `json:"version"`
}

KafkaConnectorPlugin represents Kafka Connector Plugin

type KafkaConnectorResponse

type KafkaConnectorResponse struct {
	APIResponse
	Connector KafkaConnector
}

KafkaConnectorResponse represents single Kafka Connector API response

type KafkaConnectorStatus

type KafkaConnectorStatus struct {
	State string                     `json:"state"`
	Tasks []KafkaConnectorTaskStatus `json:"tasks"`
}

KafkaConnectorStatus represents the status of a kafka connector

type KafkaConnectorStatusResponse

type KafkaConnectorStatusResponse struct {
	APIResponse
	Status KafkaConnectorStatus `json:"status"`
}

KafkaConnectorStatusResponse represents single Kafka Connector API status response

type KafkaConnectorTask

type KafkaConnectorTask struct {
	Connector string
	Task      int
}

KafkaConnectorTask represents Kafka Connector Task

type KafkaConnectorTaskStatus

type KafkaConnectorTaskStatus struct {
	Id    int    `json:"id"`
	State string `json:"state"`
	Trace string `json:"trace"`
}

KafkaConnectorTaskStatus represents the status of a kafka connector task

type KafkaConnectorsHandler

type KafkaConnectorsHandler struct {
	// contains filtered or unexported fields
}

KafkaConnectorsHandler Aiven go-client handler for Kafka Connectors

func (*KafkaConnectorsHandler) Create

func (h *KafkaConnectorsHandler) Create(ctx context.Context, project, service string, c KafkaConnectorConfig) error

Create creates Kafka Connector attached to Kafka or Kafka Connector service based on configuration

func (*KafkaConnectorsHandler) Delete

func (h *KafkaConnectorsHandler) Delete(ctx context.Context, project, service, name string) error

Delete deletes Kafka Connector by name

func (*KafkaConnectorsHandler) GetByName

func (h *KafkaConnectorsHandler) GetByName(ctx context.Context, project, service, name string) (*KafkaConnector, error)

GetByName gets a KafkaConnector by name

func (*KafkaConnectorsHandler) List

func (h *KafkaConnectorsHandler) List(ctx context.Context, project, service string) (*KafkaConnectorsResponse, error)

List lists all available Kafka Connectors for a service

func (*KafkaConnectorsHandler) Status

func (h *KafkaConnectorsHandler) Status(ctx context.Context, project, service, name string) (*KafkaConnectorStatusResponse, error)

Get the status of a single Kafka Connector by name

func (*KafkaConnectorsHandler) Update

func (h *KafkaConnectorsHandler) Update(ctx context.Context, project, service, name string, c KafkaConnectorConfig) (*KafkaConnectorResponse, error)

Update updates a Kafka Connector configuration by Connector AuthenticationMethodName

type KafkaConnectorsResponse

type KafkaConnectorsResponse struct {
	APIResponse
	Connectors []KafkaConnector
}

KafkaConnectorsResponse represents Kafka Connectors API response

type KafkaGlobalSchemaConfigHandler

type KafkaGlobalSchemaConfigHandler struct {
	// contains filtered or unexported fields
}

KafkaGlobalSchemaConfigHandler is the client which interacts with the Kafka Schema endpoints on Aiven

func (*KafkaGlobalSchemaConfigHandler) Get

Get gets a Kafka Schema configuration

func (*KafkaGlobalSchemaConfigHandler) Update

Update updates new Kafka Schema config entry

type KafkaListTopic

type KafkaListTopic struct {
	CleanupPolicy         string `json:"cleanup_policy"`
	MinimumInSyncReplicas int    `json:"min_insync_replicas"`
	Partitions            int    `json:"partitions"`
	Replication           int    `json:"replication"`
	RetentionBytes        int    `json:"retention_bytes"`
	RetentionHours        *int64 `json:"retention_hours,omitempty"`
	State                 string `json:"state"`
	TopicName             string `json:"topic_name"`
}

KafkaListTopic represents kafka list topic model on Aiven.

type KafkaSchemaConfig

type KafkaSchemaConfig struct {
	CompatibilityLevel string `json:"compatibility"`
}

KafkaSchemaConfig represents Aiven Kafka Schema Configuration options

type KafkaSchemaConfigResponse

type KafkaSchemaConfigResponse struct {
	APIResponse
	CompatibilityLevel string `json:"compatibilityLevel"`
}

KafkaSchemaConfigResponse represents the response from Aiven Kafka Schema Configuration endpoint

type KafkaSchemaConfigUpdateResponse

type KafkaSchemaConfigUpdateResponse struct {
	APIResponse
	KafkaSchemaConfig
}

KafkaSchemaConfigUpdateResponse represents the PUT method response from Aiven Kafka Schema Configuration endpoint

type KafkaSchemaRegistryACL

type KafkaSchemaRegistryACL struct {
	ID         string `json:"id"`
	Permission string `json:"permission"`
	Resource   string `json:"resource"`
	Username   string `json:"username"`
}

KafkaSchemaRegistryACL represents a Kafka Schema Registry ACL entry on Aiven.

type KafkaSchemaRegistryACLHandler

type KafkaSchemaRegistryACLHandler struct {
	// contains filtered or unexported fields
}

KafkaSchemaRegistryACLHandler is the client which interacts with the Kafka Schema Registry ACL endpoints on Aiven.

func (*KafkaSchemaRegistryACLHandler) Create

Create creates new Kafka Schema Registry ACL entry.

func (*KafkaSchemaRegistryACLHandler) Delete

func (h *KafkaSchemaRegistryACLHandler) Delete(ctx context.Context, project, serviceName, aclID string) error

Delete deletes a specific Kafka Schema Registry ACL entry.

func (*KafkaSchemaRegistryACLHandler) Get

func (h *KafkaSchemaRegistryACLHandler) Get(ctx context.Context, project, serviceName, aclID string) (*KafkaSchemaRegistryACL, error)

Get gets a specific Kafka Schema Registry ACL.

func (*KafkaSchemaRegistryACLHandler) List

func (h *KafkaSchemaRegistryACLHandler) List(ctx context.Context, project, serviceName string) ([]*KafkaSchemaRegistryACL, error)

List lists all the Kafka Schema Registry ACL entries.

type KafkaSchemaRegistryACLResponse

type KafkaSchemaRegistryACLResponse struct {
	APIResponse
	ACL []*KafkaSchemaRegistryACL `json:"acl"`
}

KafkaSchemaRegistryACLResponse represents the response from Aiven after interacting with the Kafka Schema Registry ACL API.

type KafkaSchemaSubject

type KafkaSchemaSubject struct {
	Schema     string `json:"schema"`
	SchemaType string `json:"schemaType,omitempty"`
}

KafkaSchemaSubject Kafka SchemaS Subject representation

type KafkaSchemaSubjectResponse

type KafkaSchemaSubjectResponse struct {
	APIResponse
	Id int `json:"id"`
}

KafkaSchemaSubjectResponse Kafka Schemas Subject API endpoint response representation

type KafkaSchemaSubjectVersion

type KafkaSchemaSubjectVersion struct {
	Id         int    `json:"id"`
	Schema     string `json:"schema"`
	Subject    string `json:"subject"`
	Version    int    `json:"version"`
	SchemaType string `json:"schemaType"`
}

KafkaSchemaSubjectVersion Kafka Schema Subject Version representation

type KafkaSchemaSubjectVersionResponse

type KafkaSchemaSubjectVersionResponse struct {
	APIResponse
	Version KafkaSchemaSubjectVersion `json:"version"`
}

KafkaSchemaSubjectVersionResponse Kafka Schemas Subject Version API endpoint response representation

type KafkaSchemaSubjectVersions

type KafkaSchemaSubjectVersions struct {
	Versions []int `json:"versions"`
}

KafkaSchemaSubjectVersions represents a list of versions

type KafkaSchemaSubjectVersionsResponse

type KafkaSchemaSubjectVersionsResponse struct {
	APIResponse
	KafkaSchemaSubjectVersions
}

KafkaSchemaSubjectVersionsResponse represents the response from Aiven Kafka Schema Subject versions endpoint

type KafkaSchemaSubjects

type KafkaSchemaSubjects struct {
	Subjects []string `json:"subjects"`
}

KafkaSchemaSubjects represents a list of Aiven Kafka Schema subjects

type KafkaSchemaSubjectsResponse

type KafkaSchemaSubjectsResponse struct {
	APIResponse
	KafkaSchemaSubjects
}

KafkaSchemaSubjectsResponse represents the response from Aiven Kafka Schema Subjects endpoint

type KafkaSchemaValidateResponse

type KafkaSchemaValidateResponse struct {
	APIResponse
	IsCompatible bool `json:"is_compatible"`
}

KafkaSchemaValidateResponse Kafka Schemas Subject validation API endpoint response representation

type KafkaSubjectSchemasHandler

type KafkaSubjectSchemasHandler struct {
	// contains filtered or unexported fields
}

KafkaSubjectSchemasHandler is the client which interacts with the Kafka Schema endpoints on Aiven

func (*KafkaSubjectSchemasHandler) Add

func (h *KafkaSubjectSchemasHandler) Add(ctx context.Context, project, service, name string, subject KafkaSchemaSubject) (*KafkaSchemaSubjectResponse, error)

Add adds a new kafka Schema

func (*KafkaSubjectSchemasHandler) Delete

func (h *KafkaSubjectSchemasHandler) Delete(ctx context.Context, project, service, name string, versions ...int) error

Delete delete a Kafka Schema Subject versions, of versions parameter is empty it delete all existing versions

func (*KafkaSubjectSchemasHandler) Get

func (h *KafkaSubjectSchemasHandler) Get(ctx context.Context, project, service, name string, version int) (*KafkaSchemaSubjectVersionResponse, error)

Get gets a Kafka Schema Subject

func (*KafkaSubjectSchemasHandler) GetConfiguration

func (h *KafkaSubjectSchemasHandler) GetConfiguration(ctx context.Context, project, service, subjectName string) (
	*KafkaSchemaConfigResponse, error)

func (*KafkaSubjectSchemasHandler) GetVersions

func (h *KafkaSubjectSchemasHandler) GetVersions(ctx context.Context, project, service, name string) (*KafkaSchemaSubjectVersionsResponse, error)

GetVersions gets a Kafka Schema Subject versions

func (*KafkaSubjectSchemasHandler) List

List gets a list of Kafka Schema Subjects configuration

func (*KafkaSubjectSchemasHandler) UpdateConfiguration

func (h *KafkaSubjectSchemasHandler) UpdateConfiguration(ctx context.Context, project, service, subjectName, compatibility string) (
	*KafkaSchemaConfigUpdateResponse, error)

UpdateConfiguration updates configuration for Schema Registry subject

func (*KafkaSubjectSchemasHandler) Validate

func (h *KafkaSubjectSchemasHandler) Validate(
	ctx context.Context,
	project, service, name string,
	version int,
	subject KafkaSchemaSubject) (bool, error)

Validate validates Kafka Schema

type KafkaTopic

type KafkaTopic struct {
	CleanupPolicy         string                   `json:"cleanup_policy"`
	MinimumInSyncReplicas int                      `json:"min_insync_replicas"`
	Partitions            []*Partition             `json:"partitions"`
	Replication           int                      `json:"replication"`
	RetentionBytes        int                      `json:"retention_bytes"`
	RetentionHours        *int                     `json:"retention_hours,omitempty"`
	State                 string                   `json:"state"`
	TopicName             string                   `json:"topic_name"`
	Config                KafkaTopicConfigResponse `json:"config"`
	Tags                  []KafkaTopicTag          `json:"tags,omitempty"`
}

KafkaTopic represents a Kafka Topic on Aiven.

type KafkaTopicConfig

type KafkaTopicConfig struct {
	CleanupPolicy                   string   `json:"cleanup_policy,omitempty"`
	CompressionType                 string   `json:"compression_type,omitempty"`
	DeleteRetentionMs               *int64   `json:"delete_retention_ms,omitempty"`
	FileDeleteDelayMs               *int64   `json:"file_delete_delay_ms,omitempty"`
	FlushMessages                   *int64   `json:"flush_messages,omitempty"`
	FlushMs                         *int64   `json:"flush_ms,omitempty"`
	IndexIntervalBytes              *int64   `json:"index_interval_bytes,omitempty"`
	MaxCompactionLagMs              *int64   `json:"max_compaction_lag_ms,omitempty"`
	MaxMessageBytes                 *int64   `json:"max_message_bytes,omitempty"`
	MessageDownconversionEnable     *bool    `json:"message_downconversion_enable,omitempty"`
	MessageFormatVersion            string   `json:"message_format_version,omitempty"`
	MessageTimestampDifferenceMaxMs *int64   `json:"message_timestamp_difference_max_ms,omitempty"`
	MessageTimestampType            string   `json:"message_timestamp_type,omitempty"`
	MinCleanableDirtyRatio          *float64 `json:"min_cleanable_dirty_ratio,omitempty"`
	MinCompactionLagMs              *int64   `json:"min_compaction_lag_ms,omitempty"`
	MinInsyncReplicas               *int64   `json:"min_insync_replicas,omitempty"`
	Preallocate                     *bool    `json:"preallocate,omitempty"`
	RetentionBytes                  *int64   `json:"retention_bytes,omitempty"`
	RetentionMs                     *int64   `json:"retention_ms,omitempty"`
	SegmentBytes                    *int64   `json:"segment_bytes,omitempty"`
	SegmentIndexBytes               *int64   `json:"segment_index_bytes,omitempty"`
	SegmentJitterMs                 *int64   `json:"segment_jitter_ms,omitempty"`
	SegmentMs                       *int64   `json:"segment_ms,omitempty"`
	UncleanLeaderElectionEnable     *bool    `json:"unclean_leader_election_enable,omitempty"`
	RemoteStorageEnable             *bool    `json:"remote_storage_enable,omitempty"`
	LocalRetentionBytes             *int64   `json:"local_retention_bytes,omitempty"`
	LocalRetentionMs                *int64   `json:"local_retention_ms,omitempty"`
}

KafkaTopicConfig represents a Kafka Topic Config on Aiven.

type KafkaTopicConfigResponse

type KafkaTopicConfigResponse struct {
	CleanupPolicy                   *KafkaTopicConfigResponseString `json:"cleanup_policy,omitempty"`
	CompressionType                 *KafkaTopicConfigResponseString `json:"compression_type,omitempty"`
	DeleteRetentionMs               *KafkaTopicConfigResponseInt    `json:"delete_retention_ms,omitempty"`
	FileDeleteDelayMs               *KafkaTopicConfigResponseInt    `json:"file_delete_delay_ms,omitempty"`
	FlushMessages                   *KafkaTopicConfigResponseInt    `json:"flush_messages,omitempty"`
	FlushMs                         *KafkaTopicConfigResponseInt    `json:"flush_ms,omitempty"`
	IndexIntervalBytes              *KafkaTopicConfigResponseInt    `json:"index_interval_bytes,omitempty"`
	MaxCompactionLagMs              *KafkaTopicConfigResponseInt    `json:"max_compaction_lag_ms,omitempty"`
	MaxMessageBytes                 *KafkaTopicConfigResponseInt    `json:"max_message_bytes,omitempty"`
	MessageDownconversionEnable     *KafkaTopicConfigResponseBool   `json:"message_downconversion_enable,omitempty"`
	MessageFormatVersion            *KafkaTopicConfigResponseString `json:"message_format_version,omitempty"`
	MessageTimestampDifferenceMaxMs *KafkaTopicConfigResponseInt    `json:"message_timestamp_difference_max_ms,omitempty"`
	MessageTimestampType            *KafkaTopicConfigResponseString `json:"message_timestamp_type,omitempty"`
	MinCleanableDirtyRatio          *KafkaTopicConfigResponseFloat  `json:"min_cleanable_dirty_ratio,omitempty"`
	MinCompactionLagMs              *KafkaTopicConfigResponseInt    `json:"min_compaction_lag_ms,omitempty"`
	MinInsyncReplicas               *KafkaTopicConfigResponseInt    `json:"min_insync_replicas,omitempty"`
	Preallocate                     *KafkaTopicConfigResponseBool   `json:"preallocate,omitempty"`
	RetentionBytes                  *KafkaTopicConfigResponseInt    `json:"retention_bytes,omitempty"`
	RetentionMs                     *KafkaTopicConfigResponseInt    `json:"retention_ms,omitempty"`
	SegmentBytes                    *KafkaTopicConfigResponseInt    `json:"segment_bytes,omitempty"`
	SegmentIndexBytes               *KafkaTopicConfigResponseInt    `json:"segment_index_bytes,omitempty"`
	SegmentJitterMs                 *KafkaTopicConfigResponseInt    `json:"segment_jitter_ms,omitempty"`
	SegmentMs                       *KafkaTopicConfigResponseInt    `json:"segment_ms,omitempty"`
	UncleanLeaderElectionEnable     *KafkaTopicConfigResponseBool   `json:"unclean_leader_election_enable,omitempty"`
	RemoteStorageEnable             *KafkaTopicConfigResponseBool   `json:"remote_storage_enable,omitempty"`
	LocalRetentionBytes             *KafkaTopicConfigResponseInt    `json:"local_retention_bytes,omitempty"`
	LocalRetentionMs                *KafkaTopicConfigResponseInt    `json:"local_retention_ms,omitempty"`
}

KafkaTopicConfigResponse represents a Kafka Topic Config on Aiven.

type KafkaTopicConfigResponseBool

type KafkaTopicConfigResponseBool struct {
	Source   string `json:"source"`
	Value    bool   `json:"value"`
	Synonyms []struct {
		Source string `json:"source"`
		Value  bool   `json:"value"`
		Name   string `json:"name"`
	} `json:"synonyms"`
}

type KafkaTopicConfigResponseFloat

type KafkaTopicConfigResponseFloat struct {
	Source   string  `json:"source"`
	Value    float64 `json:"value"`
	Synonyms []struct {
		Source string  `json:"source"`
		Value  float64 `json:"value"`
		Name   string  `json:"name"`
	} `json:"synonyms"`
}

type KafkaTopicConfigResponseInt

type KafkaTopicConfigResponseInt struct {
	Source   string `json:"source"`
	Value    int64  `json:"value"`
	Synonyms []struct {
		Source string `json:"source"`
		Value  int64  `json:"value"`
		Name   string `json:"name"`
	} `json:"synonyms"`
}

type KafkaTopicConfigResponseString

type KafkaTopicConfigResponseString struct {
	Source   string `json:"source"`
	Value    string `json:"value"`
	Synonyms []struct {
		Source string `json:"source"`
		Value  string `json:"value"`
		Name   string `json:"name"`
	} `json:"synonyms"`
}

type KafkaTopicResponse

type KafkaTopicResponse struct {
	APIResponse
	Topic *KafkaTopic `json:"topic"`
}

KafkaTopicResponse is the response for Kafka Topic requests.

type KafkaTopicTag

type KafkaTopicTag struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type KafkaTopicsHandler

type KafkaTopicsHandler struct {
	// contains filtered or unexported fields
}

KafkaTopicsHandler is the client which interacts with the kafka endpoints on Aiven.

func (*KafkaTopicsHandler) Create

func (h *KafkaTopicsHandler) Create(ctx context.Context, project, service string, req CreateKafkaTopicRequest) error

Create creats a specific kafka topic.

func (*KafkaTopicsHandler) Delete

func (h *KafkaTopicsHandler) Delete(ctx context.Context, project, service, topic string) error

Delete deletes a specific kafka topic.

func (*KafkaTopicsHandler) Get

func (h *KafkaTopicsHandler) Get(ctx context.Context, project, service, topic string) (*KafkaTopic, error)

Get gets a specific kafka topic.

func (*KafkaTopicsHandler) List

func (h *KafkaTopicsHandler) List(ctx context.Context, project, service string) ([]*KafkaListTopic, error)

List lists all the kafka topics.

func (*KafkaTopicsHandler) Update

func (h *KafkaTopicsHandler) Update(ctx context.Context, project, service, topic string, req UpdateKafkaTopicRequest) error

Update updates a specific topic with the given parameters.

func (*KafkaTopicsHandler) V2List

func (h *KafkaTopicsHandler) V2List(ctx context.Context, project, service string, topics []string) ([]*KafkaTopic, error)

V2List lists selected kafka topics using v2 API endpoint.

type KafkaTopicsResponse

type KafkaTopicsResponse struct {
	APIResponse
	Topics []*KafkaListTopic `json:"topics"`
}

KafkaTopicsResponse is the response for listing kafka topics.

type KafkaV2TopicsResponse

type KafkaV2TopicsResponse struct {
	APIResponse
	Topics []*KafkaTopic `json:"topics"`
}

KafkaV2TopicsResponse is the response for listing kafka topics specific for API V2 endpoint.

type ListClickhouseDatabaseResponse

type ListClickhouseDatabaseResponse struct {
	APIResponse
	Databases []ClickhouseDatabase `json:"databases"`
}

ListClickhouseDatabaseResponse Aiven API response

type ListClickhouseUserResponse

type ListClickhouseUserResponse struct {
	APIResponse
	Users []ClickhouseUser `json:"users"`
}

ListClickhouseUserResponse Aiven API response

type ListFlinkApplicationDeploymentResponse

type ListFlinkApplicationDeploymentResponse struct {
	APIResponse
	Deployments []FlinkApplicationDeployment `json:"deployments"`
}

ListFlinkApplicationDeploymentResponse Aiven API response GET https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/application/<application_id>/deployment

type ListFlinkApplicationQueryResponse

type ListFlinkApplicationQueryResponse struct {
	APIResponse
	Queries []flinkApplicationQueryBase `json:"queries"`
}

ListFlinkApplicationQueryResponse Aiven API response GET https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/application/<application_id>/query

type ListFlinkJobResponse

type ListFlinkJobResponse struct {
	APIResponse
	Jobs []struct {
		ID     string `json:"id"`
		Status string `json:"status"`
	} `json:"jobs"`
}

ListFlinkApplicationDeploymentResponse Aiven API response GET https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/job

type ListStaticIPResponse

type ListStaticIPResponse struct {
	APIResponse

	StaticIPs []StaticIP `json:"static_ips"`
}

ListStaticIPResponse Aiven API response GET https://api.aiven.io/v1/project/<project>/static-ips

type MaintenanceUpdate

type MaintenanceUpdate struct {
	Deadline    *string `json:"deadline,omitempty"`
	Description string  `json:"description,omitempty"`
	StartAfter  string  `json:"start_after,omitempty"`
	StartAt     *string `json:"start_at,omitempty"`
}

MaintenanceUpdate represents a maintenance needing to be applied on the service.

type MaintenanceWindow

type MaintenanceWindow struct {
	DayOfWeek string               `json:"dow"`
	TimeOfDay string               `json:"time"`
	Updates   []*MaintenanceUpdate `json:"updates,omitempty"`
}

MaintenanceWindow during which maintenance operations should take place

type MirrorMakerReplicationFlowHandler

type MirrorMakerReplicationFlowHandler struct {
	// contains filtered or unexported fields
}

MirrorMakerReplicationFlowHandler is the client which interacts with the Kafka MirrorMaker 2 ReplicationFlows endpoints on Aiven.

func (*MirrorMakerReplicationFlowHandler) Create

Create creates new Kafka MirrorMaker 2 Replication Flows entry.

func (*MirrorMakerReplicationFlowHandler) Delete

func (h *MirrorMakerReplicationFlowHandler) Delete(ctx context.Context, project, service, sourceCluster, targetCluster string) error

Delete deletes a Kafka MirrorMaker 2 Replication Flows entry.

func (*MirrorMakerReplicationFlowHandler) Get

func (h *MirrorMakerReplicationFlowHandler) Get(ctx context.Context, project, service, sourceCluster, targetCluster string) (*MirrorMakerReplicationFlowResponse, error)

Get gets a Kafka MirrorMaker 2 Replication Flows.

func (*MirrorMakerReplicationFlowHandler) List

List gets a Kafka MirrorMaker 2 Replication Flows.

func (*MirrorMakerReplicationFlowHandler) Update

func (h *MirrorMakerReplicationFlowHandler) Update(ctx context.Context, project, service, sourceCluster, targetCluster string, req MirrorMakerReplicationFlowRequest) (*MirrorMakerReplicationFlowResponse, error)

Update updates new Kafka MirrorMaker 2 Replication Flows entry.

type MirrorMakerReplicationFlowRequest

type MirrorMakerReplicationFlowRequest struct {
	ReplicationFlow
}

MirrorMakerReplicationFlowRequest request used to create a Kafka MirrorMaker 2 ReplicationFlows entry.

type MirrorMakerReplicationFlowResponse

type MirrorMakerReplicationFlowResponse struct {
	APIResponse
	ReplicationFlow ReplicationFlow `json:"replication_flow"`
}

MirrorMakerReplicationFlowResponse represents the response from Aiven after interacting with the Kafka MirrorMaker 2 API.

type MirrorMakerReplicationFlowsResponse

type MirrorMakerReplicationFlowsResponse struct {
	APIResponse
	ReplicationFlows []ReplicationFlow `json:"replication_flows"`
}

MirrorMakerReplicationFlowsResponse represents the response from Aiven after interacting with the Kafka MirrorMaker 2 API.

type ModifyServiceUserRequest

type ModifyServiceUserRequest struct {
	Operation      *string        `json:"operation"`
	Authentication *string        `json:"authentication,omitempty"`
	NewPassword    *string        `json:"new_password,omitempty"`
	AccessControl  *AccessControl `json:"access_control,omitempty"`
}

ModifyServiceUserRequest params required to modify a ServiceUser

type MySQLParams

type MySQLParams struct {
	DatabaseName string `json:"dbname"`
	Host         string `json:"host"`
	Password     string `json:"password"`
	Port         string `json:"port"`
	SSLMode      string `json:"ssl-mode"`
	User         string `json:"user"`
}

MySQLParams represents individual parameters for a MySQL ConnectionInfo

type NewServiceIntegration

type NewServiceIntegration struct {
	DestinationEndpointID *string                `json:"dest_endpoint_id"`
	DestinationService    *string                `json:"dest_service"`
	IntegrationType       string                 `json:"integration_type"`
	SourceService         *string                `json:"source_service"`
	SourceEndpointID      *string                `json:"source_endpoint_id"`
	UserConfig            map[string]interface{} `json:"user_config,omitempty"`
}

NewServiceIntegration defines partial set of service integration fields used when passing integration as part of service creation call

type NodeState

type NodeState struct {
	Name            string           `json:"name"`
	ProgressUpdates []ProgressUpdate `json:"progress_updates"`
	Role            string           `json:"role"`
	State           string           `json:"state"`
}

NodeState represents the Node State model on Aiven

type OpenSearchACL added in v2.2.0

type OpenSearchACL struct {
	Rules    []OpenSearchACLRule `json:"rules"`
	Username string              `json:"username"`
}

OpenSearchACL represents a OpenSearch ACLs entry

type OpenSearchACLConfig added in v2.2.0

type OpenSearchACLConfig struct {
	ACLs        []OpenSearchACL `json:"acls"`
	Enabled     bool            `json:"enabled"`
	ExtendedAcl bool            `json:"extendedAcl"`
}

OpenSearchACLConfig represents a configuration for OpenSearch ACLs

func (*OpenSearchACLConfig) Add added in v2.2.0

Add appends new ACL to the existing OpenSearch ACLs config.

func (*OpenSearchACLConfig) Delete added in v2.2.0

Delete removes the specified ACL from the existing OpenSearch ACLs config.

type OpenSearchACLRequest added in v2.2.0

type OpenSearchACLRequest struct {
	OpenSearchACLConfig OpenSearchACLConfig `json:"opensearch_acl_config"`
}

OpenSearchACLRequest Aiven API request https://api.aiven.io/v1/project/<project>/service/<service_name>/opensearch/acl

type OpenSearchACLResponse added in v2.2.0

type OpenSearchACLResponse struct {
	APIResponse
	OpenSearchACLConfig OpenSearchACLConfig `json:"opensearch_acl_config"`
}

OpenSearchACLResponse Aiven API response https://api.aiven.io/v1/project/<project>/service/<service_name>/opensearch/acl

type OpenSearchACLRule added in v2.2.0

type OpenSearchACLRule struct {
	Index      string `json:"index"`
	Permission string `json:"permission"`
}

OpenSearchACLRule represents a OpenSearch ACLs Rule entry

type OpenSearchACLsHandler added in v2.2.0

type OpenSearchACLsHandler struct {
	// contains filtered or unexported fields
}

OpenSearchACLsHandler Aiven go-client handler for OpenSearch ACLs

func (*OpenSearchACLsHandler) Get added in v2.2.0

func (h *OpenSearchACLsHandler) Get(ctx context.Context, project, service string) (*OpenSearchACLResponse, error)

Get gets all existing OpenSearch ACLs config

func (*OpenSearchACLsHandler) Update added in v2.2.0

Update updates OpenSearch ACL config

type OpenSearchSecurityPluginConfigurationStatusResponse

type OpenSearchSecurityPluginConfigurationStatusResponse struct {
	APIResponse

	// SecurityPluginAdminEnabled is true if the admin user is defined in the OpenSearch Security Plugin.
	SecurityPluginAdminEnabled bool `json:"security_plugin_admin_enabled"`
	// SecurityPluginAvailable is true if the OpenSearch Security Plugin is available.
	SecurityPluginAvailable bool `json:"security_plugin_available"`
	// SecurityPluginEnabled is true if the OpenSearch Security Plugin is enabled.
	SecurityPluginEnabled bool `json:"security_plugin_enabled"`
}

OpenSearchSecurityPluginConfigurationStatusResponse is the response when getting the status of the OpenSearch Security Plugin.

type OpenSearchSecurityPluginEnableRequest

type OpenSearchSecurityPluginEnableRequest struct {
	// AdminPassword is the admin password.
	AdminPassword string `json:"admin_password"`
}

OpenSearchSecurityPluginEnableRequest is the request to enable the OpenSearch Security Plugin.

type OpenSearchSecurityPluginHandler

type OpenSearchSecurityPluginHandler struct {
	// contains filtered or unexported fields
}

OpenSearchSecurityPluginHandler is the handler that interacts with the OpenSearch Security Plugin API.

func (*OpenSearchSecurityPluginHandler) Enable

Enable enables the OpenSearch Security Plugin and sets the password of the admin user.

func (*OpenSearchSecurityPluginHandler) Get

Get gets the status of the OpenSearch Security Plugin.

func (*OpenSearchSecurityPluginHandler) UpdatePassword

UpdatePassword updates the password of the admin user.

type OpenSearchSecurityPluginUpdatePasswordRequest

type OpenSearchSecurityPluginUpdatePasswordRequest struct {
	// AdminPassword is the current admin password.
	AdminPassword string `json:"admin_password"`
	// NewPassword is the new admin password.
	NewPassword string `json:"new_password"`
}

OpenSearchSecurityPluginUpdatePasswordRequest is the request to update the password of the admin user.

type OrganizationApplicationUserHandler added in v2.9.0

type OrganizationApplicationUserHandler struct {
	// contains filtered or unexported fields
}

OrganizationApplicationUserHandler is the client which interacts with the Organization Application Users API on Aiven.

func (*OrganizationApplicationUserHandler) Create added in v2.9.0

Create creates a new application user.

POST /organization/{organization_id}/application-users

func (*OrganizationApplicationUserHandler) CreateToken added in v2.9.0

CreateToken creates a new application user token.

POST /organization/{organization_id}/application-users/{user_id}/access-tokens

func (*OrganizationApplicationUserHandler) Delete added in v2.9.0

func (h *OrganizationApplicationUserHandler) Delete(
	ctx context.Context,
	orgID string,
	userID string,
) error

Delete deletes an application user.

DELETE /organization/{organization_id}/application-users/{user_id}

func (*OrganizationApplicationUserHandler) DeleteToken added in v2.9.0

func (h *OrganizationApplicationUserHandler) DeleteToken(
	ctx context.Context,
	orgID string,
	userID string,
	tokenPrefix string,
) error

DeleteToken deletes an application user token.

DELETE /organization/{organization_id}/application-users/{user_id}/access-tokens/{token_prefix}

func (*OrganizationApplicationUserHandler) List added in v2.9.0

List returns a list of all application users.

GET /organization/{organization_id}/application-users

func (*OrganizationApplicationUserHandler) ListTokens added in v2.9.0

ListTokens returns a list of all application user tokens.

GET /organization/{organization_id}/application-users/{user_id}/access-tokens

type OrganizationHandler

type OrganizationHandler struct {
	// contains filtered or unexported fields
}

OrganizationHandler is the client which interacts with the Organizations API on Aiven.

func (*OrganizationHandler) Get

Get returns information about the specified organization.

type OrganizationInfo

type OrganizationInfo struct {
	APIResponse

	// ID is the unique identifier of the organization.
	ID string `json:"organization_id"`
	// Name is the name of the organization.
	Name string `json:"organization_name"`
	// AccountID is the unique identifier of the account.
	AccountID string `json:"account_id"`
	// CreateTime is the time when the organization was created.
	CreateTime *time.Time `json:"create_time"`
	// UpdateTime is the time when the organization was last updated.
	UpdateTime *time.Time `json:"update_time"`
}

OrganizationInfo is a response from Aiven for a single organization.

type OrganizationMemberInfo

type OrganizationMemberInfo struct {
	APIResponse

	// UserID is the unique identifier of the user.
	UserID string `json:"user_id"`
	// JoinTime is the time when the user joined the organization.
	JoinTime *time.Time `json:"join_time"`
	// UserInfo is the information of the user.
	UserInfo OrganizationUserInfo `json:"user_info"`
}

OrganizationMemberInfo is a struct that represents a user's membership in an organization.

type OrganizationUserGroupHandler

type OrganizationUserGroupHandler struct {
	// contains filtered or unexported fields
}

OrganizationUserGroupHandler is the client which interacts with the Organization Users Groups API on Aiven.

func (*OrganizationUserGroupHandler) Create

Create creates Organization User Group.

func (*OrganizationUserGroupHandler) Delete

func (h *OrganizationUserGroupHandler) Delete(ctx context.Context, orgID, userGroupID string) error

Delete deletes Organization User Group.

func (*OrganizationUserGroupHandler) Get

Get returns data about the specified Organization User Group.

func (*OrganizationUserGroupHandler) List

List retrieves a list of Organization User Groups.

func (*OrganizationUserGroupHandler) Update

Update updates Organization User Group.

type OrganizationUserGroupListResponse

type OrganizationUserGroupListResponse struct {
	APIResponse

	UserGroups []OrganizationUserGroupResponse `json:"user_groups"`
}

OrganizationUserGroupListResponse is response structure for the Organization Users Groups Members List API on Aiven.

type OrganizationUserGroupMember

type OrganizationUserGroupMember struct {
	UserID           string                              `json:"user_id"`
	LastActivityTime *time.Time                          `json:"last_activity_time"`
	UserInfo         OrganizationUserGroupMemberUserInfo `json:"user_info"`
}

OrganizationUserGroupMember is response element for the Organization Users Group Member List API on Aiven.

type OrganizationUserGroupMemberRequest

type OrganizationUserGroupMemberRequest struct {
	// Operation to perform on the group:
	Operation string `json:"operation"`

	// List of user ids to apply with the operation with
	MemberIDs []string `json:"member_ids"`
}

OrganizationUserGroupMemberRequest is request structure for the Organization Users Group Member API on Aiven.

type OrganizationUserGroupMemberUserInfo

type OrganizationUserGroupMemberUserInfo struct {
	UserEmail  string     `json:"user_email"`
	RealName   string     `json:"real_name"`
	State      string     `json:"state"`
	JobTitle   string     `json:"job_title"`
	Country    string     `json:"country"`
	City       string     `json:"city"`
	Department string     `json:"department"`
	CreateTime *time.Time `json:"create_time"`
}

OrganizationUserGroupMemberUserInfo is

type OrganizationUserGroupMembersHandler

type OrganizationUserGroupMembersHandler struct {
	// contains filtered or unexported fields
}

OrganizationUserGroupMembersHandler is the client which interacts with the Organization Users Group Members API on Aiven.

func (*OrganizationUserGroupMembersHandler) List

List retrieves a list of Organization User Groups.

func (*OrganizationUserGroupMembersHandler) Modify

Modify modify's a user group's members.

type OrganizationUserGroupMembersListResponse

type OrganizationUserGroupMembersListResponse struct {
	APIResponse

	Members []OrganizationUserGroupMember `json:"members"`
}

OrganizationUserGroupListResponse is response structure for the Organization Users Groups Members List API on Aiven.

type OrganizationUserGroupRequest

type OrganizationUserGroupRequest struct {
	// Name of the user group
	UserGroupName string `json:"user_group_name,omitempty"`
	// Optional description of the user group
	Description string `json:"description,omitempty"`
}

OrganizationUserGroupRequest is request structure for the Organization Users Groups API on Aiven.

type OrganizationUserGroupResponse

type OrganizationUserGroupResponse struct {
	APIResponse

	// ID of the user group
	UserGroupID string `json:"user_group_id"`
	// Name of the user group
	UserGroupName string `json:"user_group_name"`
	// Description of the user group
	Description string `json:"description"`
	// Time when the user group was created
	CreateTime *time.Time `json:"create_time"`
	// Time when the user group was last updated
	UpdateTime *time.Time `json:"update_time"`
}

OrganizationUserGroupResponse is response structure for the Organization Users Groups API on Aiven.

type OrganizationUserHandler

type OrganizationUserHandler struct {
	// contains filtered or unexported fields
}

OrganizationUserHandler is the client which interacts with the Organization Users API on Aiven.

func (*OrganizationUserHandler) Delete

func (h *OrganizationUserHandler) Delete(ctx context.Context, id, userID string) error

Delete deletes a single organization user invitation.

func (*OrganizationUserHandler) Get

Get returns a single organization user invitation.

func (*OrganizationUserHandler) List

List returns a list of all organization user invitations.

func (*OrganizationUserHandler) Update added in v2.9.0

Update updates an organization user.

type OrganizationUserInfo

type OrganizationUserInfo struct {
	// UserEmail is the email of the user.
	UserEmail string `json:"user_email"`
	// RealName is the real name of the user.
	RealName string `json:"real_name"`
	// State is the state of the user.
	State string `json:"state"`
	// JobTitle is the job title of the user.
	JobTitle string `json:"job_title"`
	// Country is the country of the user.
	Country string `json:"country"`
	// Department is the department of the user.
	Department string `json:"department"`
}

OrganizationUserInfo is a struct that represents a user in an organization.

type OrganizationUserInvitationAddRequest

type OrganizationUserInvitationAddRequest struct {
	// UserEmail is the email of the user to invite to the organization.
	UserEmail string `json:"user_email"`
}

OrganizationUserInvitationAddRequest are the parameters to add an organization user invitation.

type OrganizationUserInvitationInfo

type OrganizationUserInvitationInfo struct {
	// UserEmail is the email of the user that was invited to the organization.
	UserEmail string `json:"user_email"`
	// InvitedBy is the email of the user that invited the user to the organization.
	InvitedBy *string `json:"invited_by,omitempty"`
	// CreateTime is the time when the invitation was created.
	CreateTime *time.Time `json:"create_time"`
	// ExpiryTime is the time when the invitation expires.
	ExpiryTime *time.Time `json:"expiry_time"`
}

OrganizationUserInvitationInfo is a response from Aiven for a single organization user invitation.

type OrganizationUserInvitationsHandler

type OrganizationUserInvitationsHandler struct {
	// contains filtered or unexported fields
}

OrganizationUserInvitationsHandler is the client which interacts with the Organization Invitations API on Aiven.

func (*OrganizationUserInvitationsHandler) Delete

func (h *OrganizationUserInvitationsHandler) Delete(ctx context.Context, id, userEmail string) error

Delete deletes an organization user invitation.

func (*OrganizationUserInvitationsHandler) Invite

Invite invites a user to the organization.

func (*OrganizationUserInvitationsHandler) List

List returns a list of all organization user invitations.

type OrganizationUserInvitationsList

type OrganizationUserInvitationsList struct {
	APIResponse

	// Invitations is a list of organization user invitations.
	Invitations []OrganizationUserInvitationInfo `json:"invitations"`
}

OrganizationUserInvitationsList is a response from Aiven for a list of organization user invitations.

type OrganizationUserList

type OrganizationUserList struct {
	APIResponse

	// Users is a list of organization users.
	Users []OrganizationMemberInfo `json:"users"`
}

OrganizationUserList is a response from Aiven for a list of organization users.

type OrganizationUserUpdateRequest added in v2.9.0

type OrganizationUserUpdateRequest struct {
	// IsSuperAdmin alters super admin state of the organization user.
	IsSuperAdmin *bool `json:"is_super_admin,omitempty"`
	// RealName is the real name of the user.
	RealName *string `json:"real_name,omitempty"`
	// JobTitle is the job title of the user.
	JobTitle *string `json:"job_title,omitempty"`
	// Department is the department of the user.
	Department *string `json:"department,omitempty"`
	// Country is the country of the user.
	Country *string `json:"country,omitempty"`
	// City is the city of the user.
	City *string `json:"city,omitempty"`
}

OrganizationUserUpdateRequest are the parameters to update an organization user.

type Partition

type Partition struct {
	ConsumerGroups []*ConsumerGroup `json:"consumer_groups"`
	EarliestOffset int64            `json:"earliest_offset"`
	ISR            int              `json:"isr"`
	LatestOffset   int64            `json:"latest_offset"`
	Partition      int              `json:"partition"`
	Size           int64            `json:"size"`
}

Partition represents a Kafka partition.

type PatchFlinkJobRequest

type PatchFlinkJobRequest struct {
	JobId string `json:"job_id"`
}

PatchFlinkJobRequest Aiven API request PATCH https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/proxy/v1/jobs/<job_id>

type PostgresParams

type PostgresParams struct {
	DatabaseName string `json:"dbname"`
	Host         string `json:"host"`
	Password     string `json:"password"`
	Port         string `json:"port"`
	SSLMode      string `json:"sslmode"`
	User         string `json:"user"`
}

PostgresParams represents individual parameters for a PostgreSQL ConnectionInfo

type ProgressUpdate

type ProgressUpdate struct {
	Completed bool   `json:"completed"`
	Current   int    `json:"current"`
	Max       int    `json:"max"`
	Min       int    `json:"min"`
	Phase     string `json:"phase"`
	Unit      string `json:"unit"`
}

ProgressUpdate state represents the Progress Update model on Aiven

type Project

type Project struct {
	AvailableCredits string            `json:"available_credits"`
	BillingAddress   string            `json:"billing_address"`
	BillingEmails    []*ContactEmail   `json:"billing_emails"`
	BillingExtraText string            `json:"billing_extra_text"`
	Card             Card              `json:"card_info"`
	Country          string            `json:"country"`
	CountryCode      string            `json:"country_code"`
	DefaultCloud     string            `json:"default_cloud"`
	EstimatedBalance string            `json:"estimated_balance"`
	PaymentMethod    string            `json:"payment_method"`
	Name             string            `json:"project_name"`
	TechnicalEmails  []*ContactEmail   `json:"tech_emails"`
	VatID            string            `json:"vat_id"`
	AccountId        string            `json:"account_id"`
	BillingCurrency  string            `json:"billing_currency"`
	CopyFromProject  string            `json:"copy_from_project"`
	BillingGroupId   string            `json:"billing_group_id"`
	BillingGroupName string            `json:"billing_group_name"`
	Tags             map[string]string `json:"tags"`
	OrganizationId   string            `json:"organization_id"`
}

Project represents the Project model on Aiven.

func (Project) GetBillingEmailsAsStringSlice

func (p Project) GetBillingEmailsAsStringSlice() []string

GetBillingEmailsAsStringSlice retrieves BillingEmails converted to string slice

func (Project) GetTechnicalEmailsAsStringSlice

func (p Project) GetTechnicalEmailsAsStringSlice() []string

GetTechnicalEmailsAsStringSlice retrieves TechnicalEmails converted to string slice

type ProjectCAResponse

type ProjectCAResponse struct {
	APIResponse
	CACertificate string `json:"certificate"`
}

ProjectCAResponse is the response from Aiven for project CA Certificate.

type ProjectEvent

type ProjectEvent struct {
	Actor       string     `json:"actor"`
	EventDesc   string     `json:"event_desc"`
	EventType   string     `json:"event_type"`
	ID          string     `json:"id"`
	ServiceName string     `json:"service_name"`
	Time        *time.Time `json:"time"`
}

ProjectEvent represents a project event log entry

type ProjectEventLogEntriesResponse

type ProjectEventLogEntriesResponse struct {
	APIResponse
	Events []*ProjectEvent `json:"events"`
}

ProjectEventLogEntriesResponse is the response from Aiven for project event log entries

type ProjectIntegrationEndpointTypesResponse

type ProjectIntegrationEndpointTypesResponse struct {
	APIResponse
	EndpointTypes []IntegrationEndpointType `json:"endpoint_types"`
}

ProjectIntegrationEndpointTypesResponse is the response from Aiven for listing project integration endpoint types.

type ProjectIntegrationTypesResponse

type ProjectIntegrationTypesResponse struct {
	APIResponse
	IntegrationTypes []IntegrationType `json:"integration_types"`
}

ProjectIntegrationTypesResponse is the response from Aiven for listing project integration types.

type ProjectInvitation

type ProjectInvitation struct {
	UserEmail         string     `json:"invited_user_email"`
	InvitingUserEmail string     `json:"inviting_user_email"`
	MemberType        string     `json:"member_type"`
	InviteTime        *time.Time `json:"invite_time"`
}

ProjectInvitation represents a user who has been invited to join a project but has not yet accepted the invitation

type ProjectInvitationsAndUsersListResponse

type ProjectInvitationsAndUsersListResponse struct {
	APIResponse
	ProjectInvitations []*ProjectInvitation `json:"invitations"`
	ProjectUsers       []*ProjectUser       `json:"users"`
}

ProjectInvitationsAndUsersListResponse represents the response from Aiven for listing project invitations and members.

type ProjectListResponse

type ProjectListResponse struct {
	APIResponse
	Projects []*Project `json:"projects"`
}

ProjectListResponse is the response from Aiven for listing projects.

type ProjectOrgHandler added in v2.6.0

type ProjectOrgHandler struct {
	// contains filtered or unexported fields
}

ProjectOrgHandler is the client that interacts with projects and organizations relations on Aiven.

func (*ProjectOrgHandler) Add added in v2.6.0

func (h *ProjectOrgHandler) Add(ctx context.Context, project, userGroupID, role string) error

Add or update direct access to a project for a group with a given role. API endpoint: PUT /project/<project>/access/groups/<user_group_id>

func (*ProjectOrgHandler) Delete added in v2.6.0

func (h *ProjectOrgHandler) Delete(ctx context.Context, project, userGroupID string) error

Delete removes direct access to a project for a group. API endpoint: DELETE /project/<project>/access/groups/<user_group_id>

func (*ProjectOrgHandler) List added in v2.6.0

func (h *ProjectOrgHandler) List(ctx context.Context, project string) ([]*ProjectUserGroup, error)

Retrieve the list of resource access entries for the given project. API endpoint: GET /project/<project>/access

func (*ProjectOrgHandler) OrganizationProjects added in v2.6.0

func (h *ProjectOrgHandler) OrganizationProjects(ctx context.Context, organizationID string) ([]*Project, error)

List all project that have a direct access for an organization. API endpoint: GET /organization/{organization_id}/projects

type ProjectResponse

type ProjectResponse struct {
	APIResponse
	Project *Project `json:"project"`
}

ProjectResponse is the response from Aiven for the project endpoints.

type ProjectServiceTypesResponse

type ProjectServiceTypesResponse struct {
	APIResponse
	ServiceTypes map[string]ServiceType `json:"service_types"`
}

ProjectServiceTypesResponse is the response from Aiven for listing project service types.

type ProjectUser

type ProjectUser struct {
	Email          string     `json:"user_email"`
	RealName       string     `json:"real_name"`
	MemberType     string     `json:"member_type"`
	TeamId         string     `json:"team_id"`
	TeamName       string     `json:"team_name"`
	BillingContact bool       `json:"billing_contact"`
	AuthMethods    []string   `json:"auth"`
	CreateTime     *time.Time `json:"create_time"`
}

ProjectUser represents a user who has accepted membership in a project

type ProjectUserGroup added in v2.6.0

type ProjectUserGroup struct {
	OrganizationGroupID string `json:"user_group_id"`
	Role                string `json:"role"`
	CreateTime          string `json:"create_time"`
	UpdateTime          string `json:"update_time"`
}

ProjectUserGroup is the response from Aiven for the project user group endpoints.

type ProjectUserGroupListResponse added in v2.6.0

type ProjectUserGroupListResponse struct {
	APIResponse
	AccessList []*ProjectUserGroup `json:"resource_access_list"`
}

ProjectListResponse is the response from Aiven for the project endpoints.

type ProjectUserGroupRequest added in v2.6.0

type ProjectUserGroupRequest struct {
	Role string `json:"role"`
}

ProjectUserGroupRequest is the request from Aiven for the project user group endpoints.

type ProjectUsersHandler

type ProjectUsersHandler struct {
	// contains filtered or unexported fields
}

ProjectUsersHandler is the client that interacts with project User and Invitation API endpoints on Aiven

func (*ProjectUsersHandler) DeleteInvitation

func (h *ProjectUsersHandler) DeleteInvitation(ctx context.Context, project, email string) error

DeleteInvitation deletes the given project invitation from Aiven.

func (*ProjectUsersHandler) DeleteUser

func (h *ProjectUsersHandler) DeleteUser(ctx context.Context, project, email string) error

DeleteUser deletes the given project user from Aiven.

func (*ProjectUsersHandler) DeleteUserOrInvitation

func (h *ProjectUsersHandler) DeleteUserOrInvitation(ctx context.Context, project, email string) error

DeleteUserOrInvitation deletes a user or a project invitation, whichever the email address is associated with

func (*ProjectUsersHandler) Get

func (h *ProjectUsersHandler) Get(ctx context.Context, project, email string) (*ProjectUser, *ProjectInvitation, error)

Get a specific project user or project invitation.

func (*ProjectUsersHandler) Invite

Invite user to join a project on Aiven.

func (*ProjectUsersHandler) List

List all users and invitations for a given project.

func (*ProjectUsersHandler) UpdateInvitation

func (h *ProjectUsersHandler) UpdateInvitation(
	ctx context.Context,
	project string,
	email string,
	req UpdateProjectUserOrInvitationRequest,
) error

UpdateInvitation updates the given project member with the given parameters. NB: The server does not support updating invitations so this is implemented as delete + create

func (*ProjectUsersHandler) UpdateUser

func (h *ProjectUsersHandler) UpdateUser(
	ctx context.Context,
	project string,
	email string,
	req UpdateProjectUserOrInvitationRequest,
) error

UpdateUser updates the given project user with the given parameters.

func (*ProjectUsersHandler) UpdateUserOrInvitation

func (h *ProjectUsersHandler) UpdateUserOrInvitation(
	ctx context.Context,
	project string,
	email string,
	req UpdateProjectUserOrInvitationRequest,
) error

UpdateUserOrInvitation updates either a user if the given email address is associated with a project member or project invitation if it isn't

type ProjectsHandler

type ProjectsHandler struct {
	// contains filtered or unexported fields
}

ProjectsHandler is the client which interacts with the Projects endpoints on Aiven.

func (*ProjectsHandler) Create

Create creates a new project.

func (*ProjectsHandler) Delete

func (h *ProjectsHandler) Delete(ctx context.Context, project string) error

Delete removes the given project.

func (*ProjectsHandler) Get

func (h *ProjectsHandler) Get(ctx context.Context, project string) (*Project, error)

Get returns gets the specified project.

func (*ProjectsHandler) GetEventLog

func (h *ProjectsHandler) GetEventLog(ctx context.Context, project string) ([]*ProjectEvent, error)

GetEventLog returns project event log entries

func (*ProjectsHandler) IntegrationEndpointTypes

func (h *ProjectsHandler) IntegrationEndpointTypes(ctx context.Context, project string) ([]IntegrationEndpointType, error)

IntegrationEndpointTypes returns all the available integration endpoint types.

func (*ProjectsHandler) IntegrationTypes

func (h *ProjectsHandler) IntegrationTypes(ctx context.Context, project string) ([]IntegrationType, error)

IntegrationTypes returns all the available integration types.

func (*ProjectsHandler) List

func (h *ProjectsHandler) List(ctx context.Context) ([]*Project, error)

List returns all the available projects linked to the account.

func (*ProjectsHandler) ServiceTypes

func (h *ProjectsHandler) ServiceTypes(ctx context.Context, project string) (map[string]ServiceType, error)

ServiceTypes returns all the available service types.

func (*ProjectsHandler) Update

func (h *ProjectsHandler) Update(ctx context.Context, project string, req UpdateProjectRequest) (*Project, error)

Update modifies the specified project with the given parameters.

type ReplicationFlow

type ReplicationFlow struct {
	Enabled                         bool     `json:"enabled"`
	OffsetSyncsTopicLocation        string   `json:"offset_syncs_topic_location,omitempty"`
	SourceCluster                   string   `json:"source_cluster,omitempty"`
	TargetCluster                   string   `json:"target_cluster,omitempty"`
	ReplicationPolicyClass          string   `json:"replication_policy_class,omitempty"`
	SyncGroupOffsetsEnabled         *bool    `json:"sync_group_offsets_enabled,omitempty"`
	SyncGroupOffsetsIntervalSeconds *int     `json:"sync_group_offsets_interval_seconds,omitempty"`
	EmitHeartbeatsEnabled           *bool    `json:"emit_heartbeats_enabled,omitempty"`
	EmitBackwardHeartbeatsEnabled   *bool    `json:"emit_backward_heartbeats_enabled,omitempty"`
	Topics                          []string `json:"topics,omitempty"`
	TopicsBlacklist                 []string `json:"topics.blacklist,omitempty"`
}

ReplicationFlow a replication flow entity

type Response

type Response interface {
	GetError() error
}

Response represents Aiven API response interface

type SAMLFieldMapping

type SAMLFieldMapping struct {
	Email     string `json:"email,omitempty"`
	FirstName string `json:"first_name,omitempty"`
	Identity  string `json:"identity,omitempty"`
	LastName  string `json:"last_name,omitempty"`
	RealName  string `json:"real_name,omitempty"`
}

type Service

type Service struct {
	ACL                   []*KafkaACL               `json:"acl"`
	SchemaRegistryACL     []*KafkaSchemaRegistryACL `json:"schema_registry_acl"`
	Backups               []*Backup                 `json:"backups"`
	CloudName             string                    `json:"cloud_name"`
	ConnectionPools       []*ConnectionPool         `json:"connection_pools"`
	CreateTime            *time.Time                `json:"create_time"`
	UpdateTime            *time.Time                `json:"update_time"`
	GroupList             []string                  `json:"group_list"`
	NodeCount             int                       `json:"node_count"`
	Plan                  string                    `json:"plan"`
	Name                  string                    `json:"service_name"`
	Type                  string                    `json:"service_type"`
	ProjectVPCID          *string                   `json:"project_vpc_id"`
	URI                   string                    `json:"service_uri"`
	URIParams             map[string]string         `json:"service_uri_params"`
	State                 string                    `json:"state"`
	Metadata              interface{}               `json:"metadata"`
	Users                 []*ServiceUser            `json:"users"`
	UserConfig            map[string]interface{}    `json:"user_config"`
	ConnectionInfo        ConnectionInfo            `json:"connection_info"`
	TerminationProtection bool                      `json:"termination_protection"`
	MaintenanceWindow     MaintenanceWindow         `json:"maintenance"`
	Integrations          []*ServiceIntegration     `json:"service_integrations"`
	Components            []*ServiceComponents      `json:"components"`
	Powered               bool                      `json:"powered"`
	NodeStates            []*NodeState              `json:"node_states"`
	DiskSpaceMB           int                       `json:"disk_space_mb"`
	Features              ServiceFeatures           `json:"features"`
	TechnicalEmails       []ContactEmail            `json:"tech_emails"`
}

Service represents the Service model on Aiven.

func (*Service) Hostname

func (s *Service) Hostname() (string, error)

Hostname provides host name for the service. This method is provided for backwards compatibility, typically it is easier to just get the value from URIParams directly.

func (*Service) Port

func (s *Service) Port() (string, error)

Port provides port for the service. This method is provided for backwards compatibility, typically it is easier to just get the value from URIParams directly.

type ServiceComponents

type ServiceComponents struct {
	Component                 string `json:"component"`
	Host                      string `json:"host"`
	Port                      int    `json:"port"`
	Route                     string `json:"route"`
	Usage                     string `json:"usage"`
	Ssl                       *bool  `json:"ssl"`
	KafkaAuthenticationMethod string `json:"kafka_authentication_method"`
}

ServiceComponents represents Service Components which may contain information regarding service components Dynamic/Public DNS records

type ServiceFeatures

type ServiceFeatures struct {
	EnhancedLogging                bool `json:"enhanced_logging"`
	ImprovedTopicManagement        bool `json:"improved_topic_management"`
	ServiceIntegrations            bool `json:"service_integrations"`
	KafkaConnectServiceIntegration bool `json:"kafka_connect_service_integration"`
	PGAllowReplication             bool `json:"pg_allow_replication"`
	Letsencrypt                    bool `json:"letsencrypt"`
	IndexPatterns                  bool `json:"index_patterns"`
	Karapace                       bool `json:"karapace"`
	KarapaceRest                   bool `json:"karapace_rest"`
	KarapaceJSONSchema             bool `json:"karapace_json_schema"`
	KafkaConfigBackupsEnabled      bool `json:"kafka_config_backups_enabled"`
	TopicManagement                bool `json:"topic_management"`
	KafkaStrictAccessCertChecks    bool `json:"kafka_strict_access_cert_checks"`
	KafkaTopicInfo                 bool `json:"kafka_topic_info"`
	KafkaConnect                   bool `json:"kafka_connect"`
	KafkaMirrormaker               bool `json:"kafka_mirrormaker"`
	KafkaRest                      bool `json:"kafka_rest"`
	SchemaRegistry                 bool `json:"schema_registry"`
}

type ServiceIntegration

type ServiceIntegration struct {
	Active                  bool                   `json:"active"`
	Description             string                 `json:"description"`
	DestinationProject      *string                `json:"dest_project"`
	DestinationService      *string                `json:"dest_service"`
	DestinationEndpointID   *string                `json:"dest_endpoint_id"`
	DestinationEndpointName *string                `json:"dest_endpoint"`
	DestinationServiceType  *string                `json:"dest_service_type"`
	Enabled                 bool                   `json:"enabled"`
	IntegrationType         string                 `json:"integration_type"`
	IntegrationStatus       map[string]interface{} `json:"integration_status"`
	ServiceIntegrationID    string                 `json:"service_integration_id"`
	SourceProject           *string                `json:"source_project"`
	SourceService           *string                `json:"source_service"`
	SourceEndpointID        *string                `json:"source_endpoint_id"`
	SourceEndpointName      *string                `json:"source_endpoint"`
	SourceServiceType       *string                `json:"source_service_type"`
	UserConfig              map[string]interface{} `json:"user_config"`
}

ServiceIntegration represents a service integration endpoint, like parameters for integration to Datadog

type ServiceIntegrationEndpoint

type ServiceIntegrationEndpoint struct {
	EndpointID     string                 `json:"endpoint_id"`
	EndpointName   string                 `json:"endpoint_name"`
	EndpointType   string                 `json:"endpoint_type"`
	UserConfig     map[string]interface{} `json:"user_config"`
	EndpointConfig map[string]interface{} `json:"endpoint_config"`
}

ServiceIntegrationEndpoint represents a service integration endpoint, like parameters for integration to Datadog

type ServiceIntegrationEndpointListResponse

type ServiceIntegrationEndpointListResponse struct {
	APIResponse
	ServiceIntegrationEndpoints []*ServiceIntegrationEndpoint `json:"service_integration_endpoints"`
}

ServiceIntegrationEndpointListResponse represents the response from Aiven for listing service integration endpoints.

type ServiceIntegrationEndpointResponse

type ServiceIntegrationEndpointResponse struct {
	APIResponse
	ServiceIntegrationEndpoint *ServiceIntegrationEndpoint `json:"service_integration_endpoint"`
}

ServiceIntegrationEndpointResponse represents the response from Aiven after interacting with the Service Integration Endpoints API.

type ServiceIntegrationEndpointsHandler

type ServiceIntegrationEndpointsHandler struct {
	// contains filtered or unexported fields
}

ServiceIntegrationEndpointsHandler is the client that interacts with the Service Integration Endpoints API endpoints on Aiven.

func (*ServiceIntegrationEndpointsHandler) Create

Create the given Service Integration Endpoint on Aiven.

func (*ServiceIntegrationEndpointsHandler) Delete

func (h *ServiceIntegrationEndpointsHandler) Delete(ctx context.Context, project, endpointID string) error

Delete the given service integration endpoint from Aiven.

func (*ServiceIntegrationEndpointsHandler) Get

Get a specific service integration endpoint from Aiven.

func (*ServiceIntegrationEndpointsHandler) List

List all service integration endpoints for a given project.

func (*ServiceIntegrationEndpointsHandler) Update

Update the given service integration endpoint with the given parameters.

type ServiceIntegrationListResponse

type ServiceIntegrationListResponse struct {
	APIResponse
	ServiceIntegrations []*ServiceIntegration `json:"service_integrations"`
}

ServiceIntegrationListResponse represents the response from Aiven for listing service integrations.

type ServiceIntegrationResponse

type ServiceIntegrationResponse struct {
	APIResponse
	ServiceIntegration *ServiceIntegration `json:"service_integration"`
}

ServiceIntegrationResponse represents the response from Aiven after interacting with the Service Integration API.

type ServiceIntegrationsHandler

type ServiceIntegrationsHandler struct {
	// contains filtered or unexported fields
}

ServiceIntegrationsHandler is the client that interacts with the Service Integration Endpoints API endpoints on Aiven.

func (*ServiceIntegrationsHandler) Create

Create the given Service Integration on Aiven.

func (*ServiceIntegrationsHandler) Delete

func (h *ServiceIntegrationsHandler) Delete(ctx context.Context, project, integrationID string) error

Delete the given service integration from Aiven.

func (*ServiceIntegrationsHandler) Get

func (h *ServiceIntegrationsHandler) Get(ctx context.Context, project, integrationID string) (*ServiceIntegration, error)

Get a specific service integration endpoint from Aiven.

func (*ServiceIntegrationsHandler) List

func (h *ServiceIntegrationsHandler) List(ctx context.Context, project, service string) ([]*ServiceIntegration, error)

List all service integration for a given project and service.

func (*ServiceIntegrationsHandler) Update

Update the given service integration with the given parameters.

type ServiceListResponse

type ServiceListResponse struct {
	APIResponse
	Services []*Service `json:"services"`
}

ServiceListResponse represents the response from Aiven for listing services.

type ServicePlan

type ServicePlan struct {
	BackupConfig     *BackupConfig `json:"backup_config"`
	MaxMemoryPercent int           `json:"max_memory_percent"`
	NodeCount        int           `json:"node_count"`
	Regions          interface{}   `json:"regions"`
	ServicePlan      string        `json:"service_plan"`
	ServiceType      string        `json:"service_type"`
}

ServicePlan represents a service plan.

type ServiceResponse

type ServiceResponse struct {
	APIResponse
	Service *Service `json:"service"`
}

ServiceResponse represents the response from Aiven after interacting with the Service API.

type ServiceTagsHandler

type ServiceTagsHandler struct {
	// contains filtered or unexported fields
}

ServiceTagsHandler is the client which interacts with the Aiven service tags endpoints.

func (*ServiceTagsHandler) Get

func (h *ServiceTagsHandler) Get(ctx context.Context, project, service string) (*ServiceTagsResponse, error)

Get returns a list of all service tags.

func (*ServiceTagsHandler) Set

func (h *ServiceTagsHandler) Set(ctx context.Context, project, service string, req ServiceTagsRequest) (*ServiceTagsResponse, error)

Set sets service tags with the given parameters.

type ServiceTagsRequest

type ServiceTagsRequest struct {
	Tags map[string]string `json:"tags"`
}

ServiceTagsRequest contains the parameters used to set service tags.

type ServiceTagsResponse

type ServiceTagsResponse struct {
	APIResponse
	Tags map[string]string `json:"tags"`
}

ServiceTagsResponse represents the response from Aiven for listing service tags.

type ServiceTask

type ServiceTask struct {
	CreateTime      *time.Time `json:"create_time"`
	Result          string     `json:"result"`
	TaskType        string     `json:"task_type"`
	Success         *bool      `json:"success"`
	SourcePgVersion string     `json:"source_pg_version,omitempty"`
	TargetPgVersion string     `json:"target_pg_version,omitempty"`
	Id              string     `json:"task_id,omitempty"`
}

ServiceTask represents a service task

type ServiceTaskHandler

type ServiceTaskHandler struct {
	// contains filtered or unexported fields
}

ServiceTaskHandler Aiven go-client handler for Service tesks

func (ServiceTaskHandler) Create

func (h ServiceTaskHandler) Create(ctx context.Context, project, service string, r ServiceTaskRequest) (*ServiceTaskResponse, error)

Create creates a bew service task

func (ServiceTaskHandler) Get

func (h ServiceTaskHandler) Get(ctx context.Context, project, service, id string) (*ServiceTaskResponse, error)

Get retrieves a new service task

type ServiceTaskRequest

type ServiceTaskRequest struct {
	TargetVersion string `json:"target_version"`
	TaskType      string `json:"task_type"`
}

ServiceTaskRequest represents service task request

type ServiceTaskResponse

type ServiceTaskResponse struct {
	APIResponse
	Task ServiceTask `json:"task"`
}

ServiceTaskResponse represents service task response

type ServiceType

type ServiceType struct {
	DefaultVersion         string           `json:"default_version"`
	Description            string           `json:"description"`
	LatestAvailableVersion string           `json:"latest_available_version"`
	ServicePlans           []ServicePlan    `json:"service_plans"`
	UserConfigSchema       UserConfigSchema `json:"user_config_schema"`
}

ServiceType represents a service type.

type ServiceTypesHandler

type ServiceTypesHandler struct {
	// contains filtered or unexported fields
}

ServiceTypesHandler is the client that interacts with the Service Types API endpoints on Aiven.

func (*ServiceTypesHandler) GetPlan

func (h *ServiceTypesHandler) GetPlan(ctx context.Context, project, serviceType, servicePlan string) (*GetServicePlanResponse, error)

Get fetches the service plan from Aiven

func (*ServiceTypesHandler) GetPlanPricing

func (h *ServiceTypesHandler) GetPlanPricing(ctx context.Context, project, serviceType, servicePlan, cloudName string) (*GetServicePlanPricingResponse, error)

Get fetches the pricing for the service plan from Aiven

type ServiceUser

type ServiceUser struct {
	Username                    string        `json:"username"`
	Password                    string        `json:"password"`
	Type                        string        `json:"type"`
	AccessCert                  string        `json:"access_cert"`
	AccessKey                   string        `json:"access_key"`
	AccessCertNotValidAfterTime *time.Time    `json:"access_cert_not_valid_after_time"`
	AccessControl               AccessControl `json:"access_control,omitempty"`
}

ServiceUser is the representation of a Service User in the Aiven API.

type ServiceUserResponse

type ServiceUserResponse struct {
	APIResponse
	User *ServiceUser `json:"user"`
}

ServiceUserResponse represents the response after creating a ServiceUser.

type ServiceUsersHandler

type ServiceUsersHandler struct {
	// contains filtered or unexported fields
}

ServiceUsersHandler is the client that interacts with the ServiceUsers endpoints.

func (*ServiceUsersHandler) Create

func (h *ServiceUsersHandler) Create(ctx context.Context, project, service string, req CreateServiceUserRequest) (*ServiceUser, error)

Create creates the given User on Aiven.

func (*ServiceUsersHandler) Delete

func (h *ServiceUsersHandler) Delete(ctx context.Context, project, service, user string) error

Delete deletes the given Service User in Aiven.

func (*ServiceUsersHandler) Get

func (h *ServiceUsersHandler) Get(ctx context.Context, project, serviceName, username string) (*ServiceUser, error)

Get specific Service User in Aiven.

func (*ServiceUsersHandler) List

func (h *ServiceUsersHandler) List(ctx context.Context, project, serviceName string) ([]*ServiceUser, error)

List Service Users for given service in Aiven.

func (*ServiceUsersHandler) Update

func (h *ServiceUsersHandler) Update(ctx context.Context, project, service, username string, update ModifyServiceUserRequest) (*ServiceUser, error)

Update modifies the given Service User in Aiven.

type ServicesHandler

type ServicesHandler struct {
	// contains filtered or unexported fields
}

ServicesHandler is the client that interacts with the Service API endpoints on Aiven.

func (*ServicesHandler) Create

func (h *ServicesHandler) Create(ctx context.Context, project string, req CreateServiceRequest) (*Service, error)

Create creates the given Service on Aiven.

func (*ServicesHandler) Delete

func (h *ServicesHandler) Delete(ctx context.Context, project, service string) error

Delete will delete the given service from Aiven.

func (*ServicesHandler) Get

func (h *ServicesHandler) Get(ctx context.Context, project, service string) (*Service, error)

Get gets a specific service from Aiven.

func (*ServicesHandler) List

func (h *ServicesHandler) List(ctx context.Context, project string) ([]*Service, error)

List will fetch all services for a given project.

func (*ServicesHandler) Update

func (h *ServicesHandler) Update(ctx context.Context, project, service string, req UpdateServiceRequest) (*Service, error)

Update will update the given service with the given parameters.

type StaticIP

type StaticIP struct {
	CloudName         string `json:"cloud_name"`
	IPAddress         string `json:"ip_address"`
	ServiceName       string `json:"service_name"`
	State             string `json:"state"`
	StaticIPAddressID string `json:"static_ip_address_id"`
}

StaticIP shared fields by API responses

type StaticIPsHandler

type StaticIPsHandler struct {
	// contains filtered or unexported fields
}

StaticIPsHandler aiven go-client handler for static ips

func (*StaticIPsHandler) Associate

func (h *StaticIPsHandler) Associate(ctx context.Context, project, staticIPID string, req AssociateStaticIPRequest) error

func (*StaticIPsHandler) Create

Create creates a static ip

func (*StaticIPsHandler) Delete

func (h *StaticIPsHandler) Delete(ctx context.Context, project string, req DeleteStaticIPRequest) error

Delete deletes a static ip

func (*StaticIPsHandler) Dissociate

func (h *StaticIPsHandler) Dissociate(ctx context.Context, project, staticIPID string) error

func (*StaticIPsHandler) Get

func (h *StaticIPsHandler) Get(ctx context.Context, project, staticIPID string) (*StaticIP, error)

Get retrieves a Static IP NOTE: API does not support GET /v1/project/{project}/static-ips/{static-ip-id}, need to fetch all, filter by ID and fake a 404 if nothing is found

func (*StaticIPsHandler) List

List lists all static ips

type StopFlinkApplicationDeploymentResponse

type StopFlinkApplicationDeploymentResponse struct {
	APIResponse

	FlinkApplicationDeployment
}

StopFlinkApplicationDeploymentResponse Aiven API response POST https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/application/<application_id>/deployment/<deployment_id>/stop

type Token

type Token struct {
	Token string `json:"token"`
	State string `json:"state"`
}

Token represents a user token.

type TransitGatewayVPCAttachment

type TransitGatewayVPCAttachment struct {
	CIDR              string  `json:"cidr"`
	PeerCloudAccount  string  `json:"peer_cloud_account"`
	PeerResourceGroup *string `json:"peer_resource_group"`
	PeerVPC           string  `json:"peer_vpc"`
}

TransitGatewayVPCAttachment represents Transit Gateway VPC Attachment

type TransitGatewayVPCAttachmentHandler

type TransitGatewayVPCAttachmentHandler struct {
	// contains filtered or unexported fields
}

TransitGatewayVPCAttachmentHandler is the client that interacts with the Transit Gateway VPC Attachment API on Aiven.

func (*TransitGatewayVPCAttachmentHandler) Update

func (h *TransitGatewayVPCAttachmentHandler) Update(
	ctx context.Context,
	project, projectVPCId string,
	req TransitGatewayVPCAttachmentRequest,
) (*VPC, error)

Update updates user-defined peer network CIDRs for a project VPC

type TransitGatewayVPCAttachmentRequest

type TransitGatewayVPCAttachmentRequest struct {
	Add    []TransitGatewayVPCAttachment `json:"add"`
	Delete []string                      `json:"delete"`
}

TransitGatewayVPCAttachmentRequest holds the parameters to create a new or update an existing Transit Gateway VPC Attachment.

type UpdateConnectionPoolRequest

type UpdateConnectionPoolRequest struct {
	Database string  `json:"database"`
	PoolMode string  `json:"pool_mode"`
	PoolSize int     `json:"pool_size"`
	Username *string `json:"username"`
}

UpdateConnectionPoolRequest are the parameters used to update a connection pool entry.

type UpdateFlinkApplicationRequest

type UpdateFlinkApplicationRequest struct {
	Name string `json:"name,omitempty"`
}

UpdateFlinkApplicationRequest is the request to update a Flink Application. PUT /project/{project}/service/{service_name}/flink/application/{application_id}

type UpdateKafkaTopicRequest

type UpdateKafkaTopicRequest struct {
	MinimumInSyncReplicas *int             `json:"min_insync_replicas,omitempty"`
	Partitions            *int             `json:"partitions,omitempty"`
	Replication           *int             `json:"replication,omitempty"`
	RetentionBytes        *int             `json:"retention_bytes,omitempty"`
	RetentionHours        *int             `json:"retention_hours,omitempty"`
	Config                KafkaTopicConfig `json:"config"`
	Tags                  []KafkaTopicTag  `json:"tags,omitempty"`
}

UpdateKafkaTopicRequest are the parameters used to update a kafka topic.

type UpdateProjectRequest

type UpdateProjectRequest struct {
	Name                        string            `json:"project_name,omitempty"`
	BillingAddress              *string           `json:"billing_address,omitempty"`
	BillingEmails               *[]*ContactEmail  `json:"billing_emails,omitempty"`
	BillingExtraText            *string           `json:"billing_extra_text,omitempty"`
	CardID                      *string           `json:"card_id,omitempty"`
	Cloud                       *string           `json:"cloud,omitempty"`
	CountryCode                 *string           `json:"country_code,omitempty"`
	AccountId                   string            `json:"account_id"`
	TechnicalEmails             *[]*ContactEmail  `json:"tech_emails,omitempty"`
	BillingCurrency             string            `json:"billing_currency,omitempty"`
	VatID                       *string           `json:"vat_id,omitempty"`
	Tags                        map[string]string `json:"tags"`
	AddAccountOwnersAdminAccess *bool             `json:"add_account_owners_admin_access,omitempty"`
}

UpdateProjectRequest are the parameters for updating a project.

type UpdateProjectUserOrInvitationRequest

type UpdateProjectUserOrInvitationRequest struct {
	MemberType string `json:"member_type"`
}

UpdateProjectUserOrInvitationRequest are the parameters to update project user or invitation

type UpdateServiceIntegrationEndpointRequest

type UpdateServiceIntegrationEndpointRequest struct {
	UserConfig map[string]interface{} `json:"user_config"`
}

UpdateServiceIntegrationEndpointRequest are the parameters to update a Service Integration Endpoint.

type UpdateServiceIntegrationRequest

type UpdateServiceIntegrationRequest struct {
	UserConfig map[string]interface{} `json:"user_config"`
}

UpdateServiceIntegrationRequest are the parameters to update a Service Integration.

type UpdateServiceRequest

type UpdateServiceRequest struct {
	Cloud                 string                 `json:"cloud,omitempty"`
	GroupName             string                 `json:"group_name,omitempty"`
	MaintenanceWindow     *MaintenanceWindow     `json:"maintenance,omitempty"`
	Plan                  string                 `json:"plan,omitempty"`
	ProjectVPCID          *string                `json:"project_vpc_id"`
	Powered               bool                   `json:"powered"`
	TerminationProtection bool                   `json:"termination_protection"`
	UserConfig            map[string]interface{} `json:"user_config,omitempty"`
	DiskSpaceMB           int                    `json:"disk_space_mb,omitempty"`
	Karapace              *bool                  `json:"karapace,omitempty"`
	TechnicalEmails       *[]ContactEmail        `json:"tech_emails,omitempty"`
}

UpdateServiceRequest are the parameters to update a Service.

type UserConfigSchema

type UserConfigSchema struct {
	Title                string                      `json:"title"`
	Description          string                      `json:"description"`
	Type                 interface{}                 `json:"type"`
	Default              interface{}                 `json:"default"`
	Required             []string                    `json:"required"`
	Properties           map[string]UserConfigSchema `json:"properties"`
	AdditionalProperties interface{}                 `json:"additionalProperties"`
	Items                *UserConfigSchema           `json:"items"`
	OneOf                []UserConfigSchema          `json:"oneOf"`
	Enum                 []interface{}               `json:"enum"`
	Minimum              *float64                    `json:"minimum"`
	Maximum              *float64                    `json:"maximum"`
	MinLength            *int                        `json:"minLength"`
	MaxLength            *int                        `json:"maxLength"`
	MaxItems             *int                        `json:"maxItems"`
	CreateOnly           bool                        `json:"createOnly"`
	Pattern              string                      `json:"pattern"`
	Example              interface{}                 `json:"example"`
	UserError            string                      `json:"user_error"`
}

UserConfigSchema represents a user config schema.

type VPC

type VPC struct {
	CloudName          string                  `json:"cloud_name"`
	CreateTime         *time.Time              `json:"create_time"`
	NetworkCIDR        string                  `json:"network_cidr"`
	ProjectVPCID       string                  `json:"project_vpc_id"`
	State              string                  `json:"state"`
	UpdateTime         *time.Time              `json:"update_time"`
	PeeringConnections []*VPCPeeringConnection `json:"peering_connections"`
}

VPC holds parameters associated with a Virtual Private Cloud

type VPCListResponse

type VPCListResponse struct {
	APIResponse
	VPCs []*VPC `json:"vpcs"`
}

VPCListResponse represents the response from Aiven for listing VPCs.

type VPCPeeringConnection

type VPCPeeringConnection struct {
	CreateTime               *time.Time              `json:"create_time"`
	PeerCloudAccount         string                  `json:"peer_cloud_account"`
	PeerVPC                  string                  `json:"peer_vpc"`
	PeerRegion               *string                 `json:"peer_region"`
	State                    string                  `json:"state"`
	UpdateTime               *time.Time              `json:"update_time"`
	StateInfo                *map[string]interface{} `json:"state_info"`
	PeerAzureAppId           string                  `json:"peer_azure_app_id,omitempty"`
	PeerAzureTenantId        string                  `json:"peer_azure_tenant_id,omitempty"`
	UserPeerNetworkCIDRs     []string                `json:"user_peer_network_cidrs,omitempty"`
	VPCPeeringConnectionType string                  `json:"vpc_peering_connection_type,omitempty"`
	PeerResourceGroup        *string                 `json:"peer_resource_group,omitempty"`
}

VPCPeeringConnection holds parameters associated with a VPC peering connection

type VPCPeeringConnectionsHandler

type VPCPeeringConnectionsHandler struct {
	// contains filtered or unexported fields
}

VPCPeeringConnectionsHandler is the client that interacts with the VPC Peering Connections API on Aiven.

func (*VPCPeeringConnectionsHandler) Create

Create the given VPC on Aiven. when CreateVPCPeeringConnectionRequest.PeerRegion == nil the PeerVPC must be in the same region as the project VPC (vpcID)

func (*VPCPeeringConnectionsHandler) Delete

func (h *VPCPeeringConnectionsHandler) Delete(ctx context.Context, project, vpcID, peerCloudAccount, peerVPC string) error

Delete the given VPC Peering Connection from Aiven.

func (*VPCPeeringConnectionsHandler) DeleteVPCPeering

func (h *VPCPeeringConnectionsHandler) DeleteVPCPeering(ctx context.Context, project, vpcID, peerCloudAccount, peerVPC string, peerRegion *string) error

DeleteVPCPeering Connection from Aiven. If peerRegion == nil the peering VPC must be in the same region as project VPC (vpcID)

func (*VPCPeeringConnectionsHandler) DeleteVPCPeeringWithResourceGroup

func (h *VPCPeeringConnectionsHandler) DeleteVPCPeeringWithResourceGroup(ctx context.Context, project, vpcID, peerCloudAccount, peerVPC, peerResourceGroup string, peerRegion *string) error

DeleteVPCPeeringWithResourceGroup deletes a VPC peering connection

func (*VPCPeeringConnectionsHandler) Get

func (h *VPCPeeringConnectionsHandler) Get(
	ctx context.Context,
	project string,
	vpcID string,
	peerCloudAccount string,
	peerVPC string,
) (*VPCPeeringConnection, error)

Get a VPC Peering Connection from Aiven.

func (*VPCPeeringConnectionsHandler) GetVPCPeering

func (h *VPCPeeringConnectionsHandler) GetVPCPeering(
	ctx context.Context,
	project string,
	vpcID string,
	peerCloudAccount string,
	peerVPC string,
	peerRegion *string,
) (*VPCPeeringConnection, error)

GetVPCPeering Connection from Aiven. if peerRegion == nil the peered VPC is assumed to be in the same region as the project VPC (vpcID)

func (*VPCPeeringConnectionsHandler) GetVPCPeeringWithResourceGroup

func (h *VPCPeeringConnectionsHandler) GetVPCPeeringWithResourceGroup(
	ctx context.Context,
	project string,
	vpcID string,
	peerCloudAccount string,
	peerVPC string,
	peerRegion *string,
	peerResourceGroup *string,
) (*VPCPeeringConnection, error)

GetVPCPeeringWithResourceGroup retrieves a VPC peering connection

func (*VPCPeeringConnectionsHandler) List

func (h *VPCPeeringConnectionsHandler) List(ctx context.Context, project, vpcID string) ([]*VPCPeeringConnection, error)

List all VPC peering connections for a given VPC.

type VPCsHandler

type VPCsHandler struct {
	// contains filtered or unexported fields
}

VPCsHandler is the client that interacts with the VPCs API on Aiven.

func (*VPCsHandler) Create

func (h *VPCsHandler) Create(ctx context.Context, project string, req CreateVPCRequest) (*VPC, error)

Create the given VPC on Aiven.

func (*VPCsHandler) Delete

func (h *VPCsHandler) Delete(ctx context.Context, project, vpcID string) error

Delete the given VPC from Aiven.

func (*VPCsHandler) Get

func (h *VPCsHandler) Get(ctx context.Context, project, vpcID string) (*VPC, error)

Get a specific VPC from Aiven.

func (*VPCsHandler) List

func (h *VPCsHandler) List(ctx context.Context, project string) ([]*VPC, error)

List all VPCs for a given project.

type ValidateFlinkApplicationVersionResponse

type ValidateFlinkApplicationVersionResponse struct {
	GenericFlinkApplicationVersionResponse

	ValidateFlinkApplicationVersionStatementError
}

ValidateFlinkApplicationVersionResponse is the response for validating a Flink Application Version. POST /project/{project}/service/{service_name}/flink/application/{application_id}/version/validate

type ValidateFlinkApplicationVersionStatementError

type ValidateFlinkApplicationVersionStatementError struct {
	Message  string        `json:"message"`
	Position flinkPosition `json:"position"`
}

ValidateFlinkApplicationVersionStatementError is the error for validating a Flink Application Version.

type ValidateFlinkJobRequest

type ValidateFlinkJobRequest struct {
	Statement string   `json:"statement"`
	TableIDs  []string `json:"table_ids"`
}

ValidateFlinkJobRequest Aiven API request POST https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/job/validate

type ValidateFlinkJobResponse

type ValidateFlinkJobResponse struct {
	APIResponse

	JobValidateError struct {
		Message  string        `json:"message"`
		Position flinkPosition `json:"position"`
	} `json:"job_validate_error"`
}

ValidateFlinkJobResponse Aiven API response POST https://api.aiven.io/v1/project/<project>/service/<service_name>/flink/job/validate

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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