aiven

package module
v1.36.0 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2023 License: MIT Imports: 19 Imported by: 15

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.

Index

Constants

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 added in v1.5.8

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

ContactEmailFromStringSlice creates []*ContactEmail from string slice

func GetUserAgentOrDefault added in v1.2.0

func GetUserAgentOrDefault(userAgent string) string

GetUserAgentOrDefault configures a default userAgent value, if one has not been provided.

func IsAlreadyExists added in v1.5.11

func IsAlreadyExists(err error) bool

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

func IsNotFound added in v1.5.8

func IsNotFound(err error) bool

IsNotFound returns true if the specified error has status 404

func PointerToString added in v1.8.0

func PointerToString(s *string) string

func ToStringPointer added in v1.5.13

func ToStringPointer(s string) *string

ToStringPointer converts string to a string pointer

func Version added in v1.2.0

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 added in v1.4.0

func (r APIResponse) GetError() error

GetError returns the first error from API Response, if any

type AWSPrivatelinkHandler added in v1.5.13

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

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

func (*AWSPrivatelinkHandler) Create added in v1.5.13

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

Create creates an AWS Privatelink

func (*AWSPrivatelinkHandler) Delete added in v1.5.13

func (h *AWSPrivatelinkHandler) Delete(project, serviceName string) error

Delete deletes an AWS Privatelink

func (*AWSPrivatelinkHandler) Get added in v1.5.13

func (h *AWSPrivatelinkHandler) Get(project, serviceName string) (*AWSPrivatelinkResponse, error)

Get retrieves an AWS Privatelink

func (*AWSPrivatelinkHandler) Update added in v1.5.13

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

Update updates an AWS Privatelink

type AWSPrivatelinkRequest added in v1.5.13

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

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

type AWSPrivatelinkResponse added in v1.5.13

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 added in v1.5.11

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 added in v1.8.0

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

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

type Account added in v1.5.0

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 added in v1.8.0

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

AccountAuthenticationListResponse represents account list of available authentication methods API response

type AccountAuthenticationMethod added in v1.5.0

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 added in v1.8.0

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 added in v1.8.0

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 added in v1.5.0

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

AccountAuthenticationResponse represents account an available authentication method API response

type AccountAuthenticationsHandler added in v1.5.0

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

AccountAuthenticationsHandler Aiven go-client handler for Account Authentications

func (AccountAuthenticationsHandler) Create added in v1.5.0

Create creates an account authentication method

func (AccountAuthenticationsHandler) Delete added in v1.5.0

func (h AccountAuthenticationsHandler) Delete(accountId, authId string) error

Delete deletes an account authentication method

func (AccountAuthenticationsHandler) Get added in v1.5.0

Get returns a list of all available account authentication methods

func (AccountAuthenticationsHandler) List added in v1.5.0

List returns a list of all available account authentication methods

func (AccountAuthenticationsHandler) Update added in v1.5.0

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

type AccountResponse added in v1.5.0

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

AccountResponse represents a Account response

type AccountTeam added in v1.5.0

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 added in v1.5.0

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 added in v1.5.0

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

AccountTeamInvitesHandler Aiven go-client handler for Account Invites

func (AccountTeamInvitesHandler) Delete added in v1.5.2

func (h AccountTeamInvitesHandler) Delete(accountId, teamId, userEmail string) error

Delete deletes a list of all available account invitations

func (AccountTeamInvitesHandler) List added in v1.5.0

func (h AccountTeamInvitesHandler) List(accountId, teamId string) (*AccountTeamInvitesResponse, error)

List returns a list of all available account invitations

type AccountTeamInvitesResponse added in v1.5.0

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

AccountTeamInvitesResponse represents account team list of invites API response

type AccountTeamMember added in v1.5.0

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 added in v1.5.0

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

AccountTeamMemberResponse represents a account team member API response

type AccountTeamMembersHandler added in v1.5.0

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

AccountTeamMembersHandler Aiven go-client handler for Account Team Members

func (AccountTeamMembersHandler) Delete added in v1.5.0

func (h AccountTeamMembersHandler) Delete(accountId, teamId, userId string) error

Delete deletes an existing account team member

func (AccountTeamMembersHandler) Invite added in v1.5.0

func (h AccountTeamMembersHandler) Invite(accountId, teamId, email string) error

Invite invites a team member

func (AccountTeamMembersHandler) List added in v1.5.0

func (h AccountTeamMembersHandler) List(accountId, teamId string) (*AccountTeamMembersResponse, error)

List returns a list of all existing account team members

type AccountTeamMembersResponse added in v1.5.0

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

AccountTeamMembersResponse represents account team members API response

type AccountTeamProject added in v1.5.0

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 added in v1.5.0

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

AccountTeamProjectsHandler Aiven go-client handler for Account Team Projects

func (AccountTeamProjectsHandler) Create added in v1.5.0

func (h AccountTeamProjectsHandler) Create(accountId, teamId string, p AccountTeamProject) error

Create creates account team project association

func (AccountTeamProjectsHandler) Delete added in v1.5.0

func (h AccountTeamProjectsHandler) Delete(accountId, teamId, projectName string) error

Delete deletes account team project association

func (AccountTeamProjectsHandler) List added in v1.5.0

List returns a list of all existing account team projects

func (AccountTeamProjectsHandler) Update added in v1.5.0

func (h AccountTeamProjectsHandler) Update(accountId, teamId string, p AccountTeamProject) error

Update updates account team project association

type AccountTeamProjectsResponse added in v1.5.0

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

AccountTeamProjectsResponse represents account team list of associated projects API response

type AccountTeamResponse added in v1.5.0

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

AccountTeamResponse represents account team API response

type AccountTeamsHandler added in v1.5.0

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

AccountTeamsHandler Aiven go-client handler for Account Teams

func (AccountTeamsHandler) Create added in v1.5.0

func (h AccountTeamsHandler) Create(accountId string, team AccountTeam) (*AccountTeamResponse, error)

Create creates an account team

func (AccountTeamsHandler) Delete added in v1.5.0

func (h AccountTeamsHandler) Delete(accountId, teamId string) error

Delete deletes an account team

func (AccountTeamsHandler) Get added in v1.5.0

func (h AccountTeamsHandler) Get(accountId, teamId string) (*AccountTeamResponse, error)

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

func (AccountTeamsHandler) List added in v1.5.0

func (h AccountTeamsHandler) List(accountId string) (*AccountTeamsResponse, error)

List returns a list of all existing account teams

func (AccountTeamsHandler) Update added in v1.5.0

func (h AccountTeamsHandler) Update(accountId, teamId string, team AccountTeam) (*AccountTeamResponse, error)

Update updates an account team

type AccountTeamsResponse added in v1.5.0

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

AccountTeamsResponse represents account list of teams API response

type AccountsHandler added in v1.5.0

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

AccountsHandler Aiven go-client handler for Accounts

func (AccountsHandler) Create added in v1.5.0

func (h AccountsHandler) Create(account Account) (*AccountResponse, error)

Create creates new account

func (AccountsHandler) Delete added in v1.5.0

func (h AccountsHandler) Delete(id string) error

Delete deletes an existing account by id

func (AccountsHandler) Get added in v1.5.0

Get retrieves account by id

func (AccountsHandler) List added in v1.5.0

func (h AccountsHandler) List() (*AccountsResponse, error)

List returns a list of all existing accounts

func (AccountsHandler) Update added in v1.5.0

func (h AccountsHandler) Update(id string, account Account) (*AccountResponse, error)

Update updates an existing account

type AccountsResponse added in v1.5.0

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

AccountsResponse represents Accounts (list of accounts) response

type AssociateStaticIPRequest added in v1.8.0

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 added in v1.8.0

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 added in v1.8.0

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

type AzurePrivatelinkConnectionsResponse added in v1.8.0

type AzurePrivatelinkConnectionsResponse struct {
	APIResponse
	Connections []AzurePrivatelinkConnectionResponse
}

type AzurePrivatelinkHandler added in v1.7.0

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

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

func (*AzurePrivatelinkHandler) ConnectionApprove added in v1.8.0

func (h *AzurePrivatelinkHandler) ConnectionApprove(project, serviceName, privatelinkConnectionId string) error

ConnectionApprove approves an Azure Privatelink connection

func (*AzurePrivatelinkHandler) ConnectionGet added in v1.8.0

func (h *AzurePrivatelinkHandler) ConnectionGet(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 added in v1.8.0

func (h *AzurePrivatelinkHandler) ConnectionUpdate(project, serviceName, privatelinkConnectionId string, req AzurePrivatelinkConnectionUpdateRequest) error

ConnectionUpdate updates an Azure Privatelink connection

func (*AzurePrivatelinkHandler) ConnectionsList added in v1.8.0

func (h *AzurePrivatelinkHandler) ConnectionsList(project, serviceName string) (*AzurePrivatelinkConnectionsResponse, error)

ConnectionApprove approves an Azure Privatelink connection

func (*AzurePrivatelinkHandler) Create added in v1.7.0

Create creates an Azure Privatelink

func (*AzurePrivatelinkHandler) Delete added in v1.7.0

func (h *AzurePrivatelinkHandler) Delete(project, serviceName string) error

Delete deletes an Azure Privatelink

func (*AzurePrivatelinkHandler) Get added in v1.7.0

func (h *AzurePrivatelinkHandler) Get(project, serviceName string) (*AzurePrivatelinkResponse, error)

Get retrieves an Azure Privatelink

func (*AzurePrivatelinkHandler) Refresh added in v1.8.0

func (h *AzurePrivatelinkHandler) Refresh(project, serviceName string) error

Refresh refreshes an Azure Privatelink

func (*AzurePrivatelinkHandler) Update added in v1.7.0

Update updates an Azure Privatelink

type AzurePrivatelinkRequest added in v1.7.0

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 added in v1.7.0

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        string                    `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 added in v1.8.0

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

BackupAdditionalRegion represents a remote region where the backup is synchronized

type BackupConfig added in v1.8.0

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 added in v1.5.13

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

BillingGroup represents an billing group

type BillingGroupHandler added in v1.5.13

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

BillingGroupHandler is the client that interacts with billing groups on Aiven

func (*BillingGroupHandler) AssignProjects added in v1.5.13

func (h *BillingGroupHandler) AssignProjects(id string, projects []string) error

AssignProjects assigns projects to the billing group

func (*BillingGroupHandler) Create added in v1.5.13

Create creates a new project.

func (*BillingGroupHandler) Delete added in v1.5.13

func (h *BillingGroupHandler) Delete(id string) error

Delete removes the given billing group.

func (*BillingGroupHandler) Get added in v1.5.13

Get returns gets the specified billing group.

func (*BillingGroupHandler) GetInvoice added in v1.33.0

func (h *BillingGroupHandler) GetInvoice(id, invoiceNumber string) (*BillingGroupInvoiceResponse, error)

GetInvoice gets the specified invoice for the billing group.

func (*BillingGroupHandler) GetProjects added in v1.5.13

func (h *BillingGroupHandler) GetProjects(id string) ([]string, error)

GetProjects retrieves a list of assigned projects

func (*BillingGroupHandler) ListAll added in v1.5.13

func (h *BillingGroupHandler) ListAll() ([]BillingGroup, error)

ListAll retrieves a list of all billing groups

func (*BillingGroupHandler) ListInvoices added in v1.33.0

ListInvoices lists invoices for the billing group.

func (*BillingGroupHandler) ListLines added in v1.33.0

func (h *BillingGroupHandler) ListLines(id, invoiceNumber string) (*BillingGroupListInvoiceLinesResponse, error)

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

func (*BillingGroupHandler) Update added in v1.5.13

Update modifies the specified billing group with the given parameters.

type BillingGroupInvoice added in v1.33.0

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 added in v1.33.0

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 *string `json:"tags,omitempty"`
	// 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 added in v1.33.0

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 added in v1.33.0

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 added in v1.33.0

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 added in v1.5.13

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

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

type BillingGroupProject added in v1.5.13

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 added in v1.5.13

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

BillingGroupProjectsResponse is the response from Aiven for the billing group projects

type BillingGroupRequest added in v1.5.13

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 added in v1.5.13

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

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

type CAHandler added in v1.0.0

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

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

func (*CAHandler) Get added in v1.0.0

func (h *CAHandler) Get(project string) (string, error)

Get retrieves the specified Project CA Certificate.

type CancelFlinkApplicationDeploymentResponse added in v1.18.0

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 added in v1.18.0

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 added in v1.0.0

func (h *CardsHandler) Get(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() ([]*Card, error)

List returns all the cards linked to the authenticated account.

type ClickhouseCurrentQueriesResponse added in v1.20.0

type ClickhouseCurrentQueriesResponse struct {
	APIResponse
	Queries []ClickhouseCurrentQuery
}

ClickhouseCurrentQueriesResponse aiven go-client clickhouse current queries response

type ClickhouseCurrentQuery added in v1.20.0

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 added in v1.8.0

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

type ClickhouseDatabaseHandler added in v1.8.0

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

ClickhouseDatabaseHandler aiven go-client handler for Clickhouse Databases

func (*ClickhouseDatabaseHandler) Create added in v1.8.0

func (h *ClickhouseDatabaseHandler) Create(project, service, database string) error

Create creates a ClickHouse job

func (*ClickhouseDatabaseHandler) Delete added in v1.8.0

func (h *ClickhouseDatabaseHandler) Delete(project, service, database string) error

Delete deletes a ClickHouse database

func (*ClickhouseDatabaseHandler) Get added in v1.8.0

func (h *ClickhouseDatabaseHandler) Get(project, service, database string) (*ClickhouseDatabase, error)

Get gets a ClickHouse database

func (*ClickhouseDatabaseHandler) List added in v1.8.0

List gets a list of ClickHouse database for a service

type ClickhouseDatabaseRequest added in v1.8.0

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 added in v1.8.0

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

type ClickhouseQueryHandler added in v1.8.0

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

ClickhouseQueryHandler aiven go-client handler for Clickhouse Queries

func (*ClickhouseQueryHandler) CurrentQueries added in v1.20.0

func (h *ClickhouseQueryHandler) CurrentQueries(project, service string) (*ClickhouseCurrentQueriesResponse, error)

CurrentQueries list current queries

func (*ClickhouseQueryHandler) Query added in v1.8.0

func (h *ClickhouseQueryHandler) Query(project, service, database, query string) (*ClickhouseQueryResponse, error)

Query creates a ClickHouse job

type ClickhouseQueryRequest added in v1.8.0

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

type ClickhouseQueryResponse added in v1.8.0

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

ClickhouseQueryResponse aiven go-client clickhouse query response

type ClickhouseUser added in v1.8.0

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 added in v1.8.0

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

ClickhouseUserHandler aiven go-client handler for Clickhouse Users

func (*ClickhouseUserHandler) Create added in v1.8.0

func (h *ClickhouseUserHandler) Create(project, service, name string) (*ClickhouseUserResponse, error)

Create creates a ClickHouse job

func (*ClickhouseUserHandler) Delete added in v1.8.0

func (h *ClickhouseUserHandler) Delete(project, service, uuid string) error

Delete deletes a ClickHouse user

func (*ClickhouseUserHandler) Get added in v1.8.0

func (h *ClickhouseUserHandler) Get(project, service, uuid string) (*ClickhouseUser, error)

Get gets a ClickHouse user

func (*ClickhouseUserHandler) List added in v1.8.0

func (h *ClickhouseUserHandler) List(project, service string) (*ListClickhouseUserResponse, error)

List gets a list of ClickHouse user for a service

func (*ClickhouseUserHandler) ResetPassword added in v1.8.0

func (h *ClickhouseUserHandler) ResetPassword(project, service, uuid, password string) (string, error)

type ClickhouseUserPrivilege added in v1.8.0

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 added in v1.8.0

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 added in v1.8.0

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

ClickhouseUserResponse Aiven API response

type ClickhouseUserRole added in v1.8.0

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
	OpenSearchSecurityPluginHandler *OpenSearchSecurityPluginHandler
	// contains filtered or unexported fields
}

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

func NewMFAUserClient added in v0.0.2

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 added in v1.8.0

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.

func (*Client) WithContext added in v1.13.0

func (c *Client) WithContext(ctx context.Context) *Client

WithContext create a copy of Client where all request would be using the provided context

type ConnectionInfo added in v1.0.0

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"`
}

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 added in v1.0.0

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

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

func (*ConnectionPoolsHandler) Create added in v1.0.0

func (h *ConnectionPoolsHandler) Create(
	project string,
	serviceName string,
	req CreateConnectionPoolRequest,
) (*ConnectionPool, error)

Create new connection pool entry.

func (*ConnectionPoolsHandler) Delete added in v1.0.0

func (h *ConnectionPoolsHandler) Delete(project, serviceName, poolName string) error

Delete removes the specified connection pool entry.

func (*ConnectionPoolsHandler) Get added in v1.0.0

func (h *ConnectionPoolsHandler) Get(project, serviceName, poolName string) (*ConnectionPool, error)

Get a specific connection pool.

func (*ConnectionPoolsHandler) List added in v1.0.0

func (h *ConnectionPoolsHandler) List(project, serviceName string) ([]*ConnectionPool, error)

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

func (*ConnectionPoolsHandler) Update added in v1.0.0

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

Update a specific connection pool with the given parameters.

type ConsumerGroup added in v0.0.2

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

ConsumerGroup is the group used in partitions.

type ContactEmail added in v1.0.0

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

ContactEmail represents either a technical contact or billing contact.

type CreateConnectionPoolRequest added in v1.0.0

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 added in v1.18.0

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 added in v1.18.0

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 added in v1.18.0

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 added in v1.18.0

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 added in v1.8.0

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 added in v1.7.0

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 added in v1.7.0

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 added in v1.0.0

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 added in v1.8.0

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 added in v0.0.2

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 added in v1.0.0

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 added in v1.0.0

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

CreateServiceIntegrationEndpointRequest are the parameters to create a Service Integration Endpoint.

type CreateServiceIntegrationRequest added in v1.0.0

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"`
}

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 added in v1.8.0

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

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

type CreateStaticIPResponse added in v1.8.0

type CreateStaticIPResponse struct {
	APIResponse

	StaticIP
}

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

type CreateVPCPeeringConnectionRequest added in v1.0.0

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 added in v1.0.0

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 added in v1.0.0

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(project, service string, req CreateDatabaseRequest) (*Database, error)

Create creates a database with the given parameters.

func (*DatabasesHandler) Delete

func (h *DatabasesHandler) Delete(project, service, database string) error

Delete removes the specified database.

func (*DatabasesHandler) Get added in v1.0.0

func (h *DatabasesHandler) Get(projectName, serviceName, databaseName string) (*Database, error)

Get returns a specific database from Aiven.

func (*DatabasesHandler) List added in v1.0.0

func (h *DatabasesHandler) List(project, service string) ([]*Database, error)

List will return all the databases for a given service.

type DeleteFlinkApplicationDeploymentResponse added in v1.18.0

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 added in v1.8.0

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 added in v1.8.0

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 added in v1.8.0

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

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

ElasticSearchACL represents a ElasticSearch ACLs entry

type ElasticSearchACLConfig added in v1.3.0

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

Add appends new ACL to already existing Elasticsearch ACLs config

func (*ElasticSearchACLConfig) Delete added in v1.3.0

Delete subtracts ACL from already existing Elasticsearch ACLs config

type ElasticSearchACLResponse added in v1.3.0

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

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

ElasticSearchACLsHandler Aiven go-client handler for Elastisearch ACLs

func (*ElasticSearchACLsHandler) Get added in v1.3.0

func (h *ElasticSearchACLsHandler) Get(project, service string) (*ElasticSearchACLResponse, error)

Get gets all existing Elasticsearch ACLs config

func (*ElasticSearchACLsHandler) Update added in v1.3.0

Update updates Elasticsearch ACL config

type ElasticsearchACLRequest added in v1.3.0

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

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 added in v1.18.0

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 added in v1.18.0

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

FlinkApplicationDeploymentHandler aiven go-client handler for Flink Application Deployments

func (*FlinkApplicationDeploymentHandler) Cancel added in v1.18.0

func (h *FlinkApplicationDeploymentHandler) Cancel(project, service, applicationId, deploymentId string) (*CancelFlinkApplicationDeploymentResponse, error)

Cancel cancel the Flink of a Flink deployment

func (*FlinkApplicationDeploymentHandler) Create added in v1.18.0

Create creates a Flink deployment

func (*FlinkApplicationDeploymentHandler) Delete added in v1.18.0

func (h *FlinkApplicationDeploymentHandler) Delete(project, service, applicationId, deploymentId string) (*DeleteFlinkApplicationDeploymentResponse, error)

Delete deletes a Flink deployment

func (*FlinkApplicationDeploymentHandler) Get added in v1.18.0

func (h *FlinkApplicationDeploymentHandler) Get(project, service, applicationId, deploymentId string) (*GetFlinkApplicationDeploymentResponse, error)

Get gets a Flink deployment

func (*FlinkApplicationDeploymentHandler) List added in v1.18.0

func (h *FlinkApplicationDeploymentHandler) List(project, service, applicationId string) (*ListFlinkApplicationDeploymentResponse, error)

List lists all Flink deployments

func (*FlinkApplicationDeploymentHandler) Stop added in v1.18.0

func (h *FlinkApplicationDeploymentHandler) Stop(project, service, applicationId, deploymentId string) (*StopFlinkApplicationDeploymentResponse, error)

Stop cancel the Flink of a Flink deployment

type FlinkApplicationHandler added in v1.8.0

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

FlinkApplicationHandler is the client which interacts with the Flink Application.

func (*FlinkApplicationHandler) Create added in v1.8.0

Create is the method to create a Flink Application.

func (*FlinkApplicationHandler) Delete added in v1.8.0

func (h *FlinkApplicationHandler) Delete(
	project string,
	service string,
	applicationID string,
) (*DetailedFlinkApplicationResponse, error)

Delete is the method to delete a Flink Application.

func (*FlinkApplicationHandler) Get added in v1.8.0

func (h *FlinkApplicationHandler) Get(
	project string,
	service string,
	applicationID string,
) (*DetailedFlinkApplicationResponse, error)

Get is the method to get a Flink Application.

func (*FlinkApplicationHandler) List added in v1.8.0

func (h *FlinkApplicationHandler) List(
	project string,
	service string,
) (*FlinkApplicationListResponse, error)

List is the method to list Flink Applications.

func (*FlinkApplicationHandler) Update added in v1.8.0

Update is the method to update a Flink Application.

type FlinkApplicationListResponse added in v1.8.0

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 added in v1.18.0

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

FlinkApplicationQueryHandler aiven go-client handler for Flink Application Queries

func (*FlinkApplicationQueryHandler) CancelJob added in v1.18.0

func (h *FlinkApplicationQueryHandler) CancelJob(project, service, applicationId, queryId string) (*CancelJobFlinkApplicationQueryResponse, error)

CancelJob cancel the Flink job of a Flink query

func (*FlinkApplicationQueryHandler) Create added in v1.18.0

Create creates a Flink query

func (*FlinkApplicationQueryHandler) Delete added in v1.18.0

func (h *FlinkApplicationQueryHandler) Delete(project, service, applicationId, queryId string) error

Delete deletes a Flink query

func (*FlinkApplicationQueryHandler) Get added in v1.18.0

func (h *FlinkApplicationQueryHandler) Get(project, service, applicationId, queryId string) (*GetFlinkApplicationQueryResponse, error)

Get gets a Flink query

func (*FlinkApplicationQueryHandler) List added in v1.18.0

func (h *FlinkApplicationQueryHandler) List(project, service, applicationId string) (*ListFlinkApplicationQueryResponse, error)

List lists all Flink queries

type FlinkApplicationVersion added in v1.18.0

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

type FlinkApplicationVersionCreateInput added in v1.18.0

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

type FlinkApplicationVersionHandler added in v1.8.0

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

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

func (*FlinkApplicationVersionHandler) Create added in v1.8.0

Create is the method to create a Flink Application Version.

func (*FlinkApplicationVersionHandler) Delete added in v1.8.0

func (h *FlinkApplicationVersionHandler) Delete(
	project string,
	service string,
	applicationID string,
	applicationVersionID string,
) (*DetailedFlinkApplicationVersionResponse, error)

Delete is the method to delete a Flink Application Version.

func (*FlinkApplicationVersionHandler) Get added in v1.8.0

func (h *FlinkApplicationVersionHandler) Get(
	project string,
	service string,
	applicationID string,
	applicationVersionID string,
) (*DetailedFlinkApplicationVersionResponse, error)

Get is the method to get a Flink Application Version.

func (*FlinkApplicationVersionHandler) Validate added in v1.8.0

Validate is the method to validate a Flink Application Version.

type FlinkApplicationVersionRelation added in v1.8.0

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 added in v1.7.0

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

FlinkJobHandler aiven go-client handler for Flink Jobs

func (*FlinkJobHandler) Create added in v1.7.0

func (h *FlinkJobHandler) Create(project, service string, req CreateFlinkJobRequest) (*CreateFlinkJobResponse, error)

Create creates a flink job

func (*FlinkJobHandler) Get added in v1.7.0

func (h *FlinkJobHandler) Get(project, service string, req GetFlinkJobRequest) (*GetFlinkJobResponse, error)

Get gets a flink job

func (*FlinkJobHandler) List added in v1.18.0

func (h *FlinkJobHandler) List(project, service string) (*ListFlinkJobResponse, error)

List lists a flink job

func (*FlinkJobHandler) Patch added in v1.7.0

func (h *FlinkJobHandler) Patch(project, service string, req PatchFlinkJobRequest) error

Patch patches a flink job

func (*FlinkJobHandler) Validate added in v1.8.0

func (h *FlinkJobHandler) Validate(project, service string, req ValidateFlinkJobRequest) (*ValidateFlinkJobResponse, error)

Validate validates a flink job

type GCPPrivatelinkConnectionApproveRequest added in v1.32.0

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

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

type GCPPrivatelinkConnectionResponse added in v1.26.0

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 added in v1.26.0

type GCPPrivatelinkConnectionsResponse struct {
	APIResponse
	Connections []GCPPrivatelinkConnectionResponse
}

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

type GCPPrivatelinkHandler added in v1.26.0

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

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

func (*GCPPrivatelinkHandler) ConnectionApprove added in v1.26.0

func (h *GCPPrivatelinkHandler) ConnectionApprove(
	project,
	serviceName,
	connID string,
	req GCPPrivatelinkConnectionApproveRequest,
) error

ConnectionApprove approves a GCP Privatelink connection.

func (*GCPPrivatelinkHandler) ConnectionGet added in v1.26.0

func (h *GCPPrivatelinkHandler) ConnectionGet(
	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 added in v1.26.0

func (h *GCPPrivatelinkHandler) ConnectionsList(
	project,
	serviceName string,
) (*GCPPrivatelinkConnectionsResponse, error)

ConnectionApprove approves a GCP Privatelink connection.

func (*GCPPrivatelinkHandler) Create added in v1.26.0

func (h *GCPPrivatelinkHandler) Create(project, serviceName string) (*GCPPrivatelinkResponse, error)

Create creates a GCP Privatelink.

func (*GCPPrivatelinkHandler) Delete added in v1.26.0

func (h *GCPPrivatelinkHandler) Delete(project, serviceName string) error

Delete deletes a GCP Privatelink.

func (*GCPPrivatelinkHandler) Get added in v1.26.0

func (h *GCPPrivatelinkHandler) Get(project, serviceName string) (*GCPPrivatelinkResponse, error)

Get retrieves a GCP Privatelink.

func (*GCPPrivatelinkHandler) Refresh added in v1.26.0

func (h *GCPPrivatelinkHandler) Refresh(project, serviceName string) error

Refresh refreshes a GCP Privatelink.

func (*GCPPrivatelinkHandler) Update added in v1.26.0

func (h *GCPPrivatelinkHandler) Update(project, serviceName string) (*GCPPrivatelinkResponse, error)

Update updates a GCP Privatelink.

type GCPPrivatelinkResponse added in v1.26.0

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 added in v1.8.0

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 added in v1.8.0

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 added in v1.8.0

type GenericFlinkApplicationVersionResponse struct {
	APIResponse
	GenericFlinkApplicationVersionRequest
}

GenericFlinkApplicationVersionResponse is the generic response for Flink Application Version requests.

type GetFlinkApplicationDeploymentResponse added in v1.18.0

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 added in v1.18.0

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 added in v1.7.0

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 added in v1.7.0

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        int    `json:"end-time"`
	StartTime      int    `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 added in v1.8.0

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 added in v1.8.0

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 added in v1.8.0

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 added in v1.8.0

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 added in v1.0.0

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 added in v1.0.0

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

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

func (*KafkaACLHandler) Create added in v1.0.0

func (h *KafkaACLHandler) Create(project, service string, req CreateKafkaACLRequest) (*KafkaACL, error)

Create creates new Kafka ACL entry.

func (*KafkaACLHandler) Delete added in v1.0.0

func (h *KafkaACLHandler) Delete(project, serviceName, aclID string) error

Delete deletes a specific Kafka ACL entry.

func (*KafkaACLHandler) Get added in v1.0.0

func (h *KafkaACLHandler) Get(project, serviceName, aclID string) (*KafkaACL, error)

Get gets a specific Kafka ACL.

func (*KafkaACLHandler) List added in v1.0.0

func (h *KafkaACLHandler) List(project, serviceName string) ([]*KafkaACL, error)

List lists all the Kafka ACL entries.

type KafkaACLResponse added in v1.0.0

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

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

type KafkaConnector added in v1.4.0

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

KafkaConnector represents Kafka Connector

type KafkaConnectorConfig added in v1.4.0

type KafkaConnectorConfig map[string]string

KafkaConnectorConfig represents a configuration for Kafka Connectors

type KafkaConnectorPlugin added in v1.4.0

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 added in v1.4.0

type KafkaConnectorResponse struct {
	APIResponse
	Connector KafkaConnector
}

KafkaConnectorResponse represents single Kafka Connector API response

type KafkaConnectorStatus added in v1.6.0

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

KafkaConnectorStatus represents the status of a kafka connector

type KafkaConnectorStatusResponse added in v1.6.0

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

KafkaConnectorStatusResponse represents single Kafka Connector API status response

type KafkaConnectorTask added in v1.4.0

type KafkaConnectorTask struct {
	Connector string
	Task      int
}

KafkaConnectorTask represents Kafka Connector Task

type KafkaConnectorTaskStatus added in v1.6.0

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 added in v1.4.0

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

KafkaConnectorsHandler Aiven go-client handler for Kafka Connectors

func (*KafkaConnectorsHandler) Create added in v1.4.0

func (h *KafkaConnectorsHandler) Create(project, service string, c KafkaConnectorConfig) error

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

func (*KafkaConnectorsHandler) Delete added in v1.4.0

func (h *KafkaConnectorsHandler) Delete(project, service, name string) error

Delete deletes Kafka Connector by name

func (*KafkaConnectorsHandler) GetByName added in v1.6.0

func (h *KafkaConnectorsHandler) GetByName(project, service, name string) (*KafkaConnector, error)

GetByName gets a KafkaConnector by name

func (*KafkaConnectorsHandler) List added in v1.4.0

func (h *KafkaConnectorsHandler) List(project, service string) (*KafkaConnectorsResponse, error)

List lists all available Kafka Connectors for a service

func (*KafkaConnectorsHandler) Status added in v1.6.0

func (h *KafkaConnectorsHandler) Status(project, service, name string) (*KafkaConnectorStatusResponse, error)

Get the status of a single Kafka Connector by name

func (*KafkaConnectorsHandler) Update added in v1.4.0

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

Update updates a Kafka Connector configuration by Connector AuthenticationMethodName

type KafkaConnectorsResponse added in v1.4.0

type KafkaConnectorsResponse struct {
	APIResponse
	Connectors []KafkaConnector
}

KafkaConnectorsResponse represents Kafka Connectors API response

type KafkaGlobalSchemaConfigHandler added in v1.4.0

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

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

func (*KafkaGlobalSchemaConfigHandler) Get added in v1.4.0

Get gets a Kafka Schema configuration

func (*KafkaGlobalSchemaConfigHandler) Update added in v1.4.0

Update updates new Kafka Schema config entry

type KafkaListTopic added in v0.0.2

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 added in v1.4.0

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

KafkaSchemaConfig represents Aiven Kafka Schema Configuration options

type KafkaSchemaConfigResponse added in v1.4.0

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

KafkaSchemaConfigResponse represents the response from Aiven Kafka Schema Configuration endpoint

type KafkaSchemaConfigUpdateResponse added in v1.4.2

type KafkaSchemaConfigUpdateResponse struct {
	APIResponse
	KafkaSchemaConfig
}

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

type KafkaSchemaRegistryACL added in v1.8.0

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 added in v1.8.0

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 added in v1.8.0

Create creates new Kafka Schema Registry ACL entry.

func (*KafkaSchemaRegistryACLHandler) Delete added in v1.8.0

func (h *KafkaSchemaRegistryACLHandler) Delete(project, serviceName, aclID string) error

Delete deletes a specific Kafka Schema Registry ACL entry.

func (*KafkaSchemaRegistryACLHandler) Get added in v1.8.0

func (h *KafkaSchemaRegistryACLHandler) Get(project, serviceName, aclID string) (*KafkaSchemaRegistryACL, error)

Get gets a specific Kafka Schema Registry ACL.

func (*KafkaSchemaRegistryACLHandler) List added in v1.8.0

func (h *KafkaSchemaRegistryACLHandler) List(project, serviceName string) ([]*KafkaSchemaRegistryACL, error)

List lists all the Kafka Schema Registry ACL entries.

type KafkaSchemaRegistryACLResponse added in v1.8.0

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 added in v1.4.0

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

KafkaSchemaSubject Kafka SchemaS Subject representation

type KafkaSchemaSubjectResponse added in v1.4.0

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

KafkaSchemaSubjectResponse Kafka Schemas Subject API endpoint response representation

type KafkaSchemaSubjectVersion added in v1.4.0

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 added in v1.4.0

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

KafkaSchemaSubjectVersionResponse Kafka Schemas Subject Version API endpoint response representation

type KafkaSchemaSubjectVersions added in v1.4.2

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

KafkaSchemaSubjectVersions represents a list of versions

type KafkaSchemaSubjectVersionsResponse added in v1.4.2

type KafkaSchemaSubjectVersionsResponse struct {
	APIResponse
	KafkaSchemaSubjectVersions
}

KafkaSchemaSubjectVersionsResponse represents the response from Aiven Kafka Schema Subject versions endpoint

type KafkaSchemaSubjects added in v1.4.0

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

KafkaSchemaSubjects represents a list of Aiven Kafka Schema subjects

type KafkaSchemaSubjectsResponse added in v1.4.0

type KafkaSchemaSubjectsResponse struct {
	APIResponse
	KafkaSchemaSubjects
}

KafkaSchemaSubjectsResponse represents the response from Aiven Kafka Schema Subjects endpoint

type KafkaSchemaValidateResponse added in v1.4.0

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

KafkaSchemaValidateResponse Kafka Schemas Subject validation API endpoint response representation

type KafkaSubjectSchemasHandler added in v1.4.0

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

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

func (*KafkaSubjectSchemasHandler) Add added in v1.4.0

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

Add adds a new kafka Schema

func (*KafkaSubjectSchemasHandler) Delete added in v1.4.0

func (h *KafkaSubjectSchemasHandler) Delete(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 added in v1.4.0

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

Get gets a Kafka Schema Subject

func (*KafkaSubjectSchemasHandler) GetConfiguration added in v1.5.8

func (h *KafkaSubjectSchemasHandler) GetConfiguration(project, service, subjectName string) (
	*KafkaSchemaConfigResponse, error)

func (*KafkaSubjectSchemasHandler) GetVersions added in v1.4.0

func (h *KafkaSubjectSchemasHandler) GetVersions(project, service, name string) (*KafkaSchemaSubjectVersionsResponse, error)

GetVersions gets a Kafka Schema Subject versions

func (*KafkaSubjectSchemasHandler) List added in v1.4.0

List gets a list of Kafka Schema Subjects configuration

func (*KafkaSubjectSchemasHandler) UpdateConfiguration added in v1.5.8

func (h *KafkaSubjectSchemasHandler) UpdateConfiguration(project, service, subjectName, compatibility string) (
	*KafkaSchemaConfigUpdateResponse, error)

UpdateConfiguration updates configuration for Schema Registry subject

func (*KafkaSubjectSchemasHandler) Validate added in v1.4.0

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

Validate validates Kafka Schema

type KafkaTopic added in v0.0.2

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 added in v1.5.10

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"`
}

KafkaTopicConfig represents a Kafka Topic Config on Aiven.

type KafkaTopicConfigResponse added in v1.5.10

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"`
	Tags                            []KafkaTopicTag                `json:"tags,omitempty"`
}

KafkaTopicConfigResponse represents a Kafka Topic Config on Aiven.

type KafkaTopicConfigResponseBool added in v1.5.10

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 added in v1.5.10

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 added in v1.5.10

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 added in v1.5.10

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 added in v0.0.2

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

KafkaTopicResponse is the response for Kafka Topic requests.

type KafkaTopicTag added in v1.5.13

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

type KafkaTopicsHandler added in v0.0.2

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

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

func (*KafkaTopicsHandler) Create added in v0.0.2

func (h *KafkaTopicsHandler) Create(project, service string, req CreateKafkaTopicRequest) error

Create creats a specific kafka topic.

func (*KafkaTopicsHandler) Delete added in v0.0.2

func (h *KafkaTopicsHandler) Delete(project, service, topic string) error

Delete deletes a specific kafka topic.

func (*KafkaTopicsHandler) Get added in v0.0.2

func (h *KafkaTopicsHandler) Get(project, service, topic string) (*KafkaTopic, error)

Get gets a specific kafka topic.

func (*KafkaTopicsHandler) List added in v0.0.2

func (h *KafkaTopicsHandler) List(project, service string) ([]*KafkaListTopic, error)

List lists all the kafka topics.

func (*KafkaTopicsHandler) Update added in v0.0.2

func (h *KafkaTopicsHandler) Update(project, service, topic string, req UpdateKafkaTopicRequest) error

Update updates a specific topic with the given parameters.

func (*KafkaTopicsHandler) V2List added in v1.5.13

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

V2List lists selected kafka topics using v2 API endpoint.

type KafkaTopicsResponse added in v0.0.2

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

KafkaTopicsResponse is the response for listing kafka topics.

type KafkaV2TopicsResponse added in v1.5.13

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

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

type ListClickhouseDatabaseResponse added in v1.8.0

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

ListClickhouseDatabaseResponse Aiven API response

type ListClickhouseUserResponse added in v1.8.0

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

ListClickhouseUserResponse Aiven API response

type ListFlinkApplicationDeploymentResponse added in v1.18.0

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 added in v1.18.0

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 added in v1.18.0

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 added in v1.8.0

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 added in v1.8.0

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 added in v1.1.0

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 added in v1.5.4

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 added in v1.5.4

Create creates new Kafka MirrorMaker 2 Replication Flows entry.

func (*MirrorMakerReplicationFlowHandler) Delete added in v1.5.4

func (h *MirrorMakerReplicationFlowHandler) Delete(project, service, sourceCluster, targetCluster string) error

Delete deletes a Kafka MirrorMaker 2 Replication Flows entry.

func (*MirrorMakerReplicationFlowHandler) Get added in v1.5.4

func (h *MirrorMakerReplicationFlowHandler) Get(project, service, sourceCluster, targetCluster string) (*MirrorMakerReplicationFlowResponse, error)

Get gets a Kafka MirrorMaker 2 Replication Flows.

func (*MirrorMakerReplicationFlowHandler) List added in v1.5.4

List gets a Kafka MirrorMaker 2 Replication Flows.

func (*MirrorMakerReplicationFlowHandler) Update added in v1.5.4

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

Update updates new Kafka MirrorMaker 2 Replication Flows entry.

type MirrorMakerReplicationFlowRequest added in v1.5.4

type MirrorMakerReplicationFlowRequest struct {
	ReplicationFlow
}

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

type MirrorMakerReplicationFlowResponse added in v1.5.4

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 added in v1.5.4

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 added in v1.5.9

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 added in v1.8.0

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 added in v1.1.0

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 added in v1.5.13

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 OpenSearchSecurityPluginConfigurationStatusResponse added in v1.36.0

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 added in v1.36.0

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 added in v1.36.0

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

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

func (*OpenSearchSecurityPluginHandler) Enable added in v1.36.0

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

func (*OpenSearchSecurityPluginHandler) Get added in v1.36.0

Get gets the status of the OpenSearch Security Plugin.

func (*OpenSearchSecurityPluginHandler) UpdatePassword added in v1.36.0

UpdatePassword updates the password of the admin user.

type OpenSearchSecurityPluginUpdatePasswordRequest added in v1.36.0

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 OrganizationHandler added in v1.21.0

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

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

func (*OrganizationHandler) Get added in v1.21.0

Get returns information about the specified organization.

type OrganizationInfo added in v1.17.0

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 string `json:"create_time"`
	// UpdateTime is the time when the organization was last updated.
	UpdateTime string `json:"update_time"`
}

OrganizationInfo is a response from Aiven for a single organization.

type OrganizationMemberInfo added in v1.21.0

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 string `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 added in v1.31.0

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 added in v1.31.0

Create creates Organization User Group.

func (*OrganizationUserGroupHandler) Delete added in v1.31.0

func (h *OrganizationUserGroupHandler) Delete(orgID, userGroupID string) error

Delete deletes Organization User Group.

func (*OrganizationUserGroupHandler) Get added in v1.31.0

Get returns data about the specified Organization User Group.

func (*OrganizationUserGroupHandler) List added in v1.31.0

List retrieves a list of Organization User Groups.

func (*OrganizationUserGroupHandler) Update added in v1.31.0

Update updates Organization User Group.

type OrganizationUserGroupListResponse added in v1.31.0

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 added in v1.34.0

type OrganizationUserGroupMember struct {
	UserID           string                              `json:"user_id"`
	LastActivityTime string                              `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 added in v1.34.0

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 added in v1.34.0

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 string `json:"create_time"`
}

OrganizationUserGroupMemberUserInfo is

type OrganizationUserGroupMembersHandler added in v1.34.0

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 added in v1.34.0

List retrieves a list of Organization User Groups.

func (*OrganizationUserGroupMembersHandler) Modify added in v1.34.0

Modify modify's a user group's members.

type OrganizationUserGroupMembersListResponse added in v1.34.0

type OrganizationUserGroupMembersListResponse struct {
	APIResponse

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

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

type OrganizationUserGroupRequest added in v1.31.0

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 added in v1.31.0

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 string `json:"create_time"`
	// Time when the user group was last updated
	UpdateTime string `json:"update_time"`
}

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

type OrganizationUserHandler added in v1.21.0

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

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

func (*OrganizationUserHandler) Delete added in v1.21.0

func (h *OrganizationUserHandler) Delete(id, userID string) error

Delete deletes a single organization user invitation.

func (*OrganizationUserHandler) Get added in v1.21.0

Get returns a single organization user invitation.

func (*OrganizationUserHandler) List added in v1.21.0

List returns a list of all organization user invitations.

type OrganizationUserInfo added in v1.21.0

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 added in v1.21.0

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 added in v1.21.0

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 string `json:"create_time"`
	// ExpiryTime is the time when the invitation expires.
	ExpiryTime string `json:"expiry_time"`
}

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

type OrganizationUserInvitationsHandler added in v1.21.0

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

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

func (*OrganizationUserInvitationsHandler) Delete added in v1.23.0

func (h *OrganizationUserInvitationsHandler) Delete(id, userEmail string) error

Delete deletes an organization user invitation.

func (*OrganizationUserInvitationsHandler) Invite added in v1.21.0

Invite invites a user to the organization.

func (*OrganizationUserInvitationsHandler) List added in v1.21.0

List returns a list of all organization user invitations.

type OrganizationUserInvitationsList added in v1.21.0

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 added in v1.21.0

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 Partition added in v0.0.2

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 added in v1.7.0

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 added in v1.0.0

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 added in v1.5.13

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"`
}

Project represents the Project model on Aiven.

func (Project) GetBillingEmailsAsStringSlice added in v1.5.8

func (p Project) GetBillingEmailsAsStringSlice() []string

GetBillingEmailsAsStringSlice retrieves BillingEmails converted to string slice

func (Project) GetTechnicalEmailsAsStringSlice added in v1.5.8

func (p Project) GetTechnicalEmailsAsStringSlice() []string

GetTechnicalEmailsAsStringSlice retrieves TechnicalEmails converted to string slice

type ProjectCAResponse added in v1.0.0

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

ProjectCAResponse is the response from Aiven for project CA Certificate.

type ProjectEvent added in v1.5.13

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

ProjectEvent represents a project event log entry

type ProjectEventLogEntriesResponse added in v1.5.13

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

ProjectEventLogEntriesResponse is the response from Aiven for project event log entries

type ProjectIntegrationEndpointTypesResponse added in v1.8.0

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

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

type ProjectIntegrationTypesResponse added in v1.8.0

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

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

type ProjectInvitation added in v1.0.0

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

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

type ProjectInvitationsAndUsersListResponse added in v1.0.0

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 ProjectResponse

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

ProjectResponse is the response from Aiven for the project endpoints.

type ProjectServiceTypesResponse added in v1.8.0

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

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

type ProjectUser added in v1.0.0

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     string   `json:"create_time"`
}

ProjectUser represents a user who has accepted membership in a project

type ProjectUsersHandler added in v1.0.0

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 added in v1.0.0

func (h *ProjectUsersHandler) DeleteInvitation(project, email string) error

DeleteInvitation deletes the given project invitation from Aiven.

func (*ProjectUsersHandler) DeleteUser added in v1.0.0

func (h *ProjectUsersHandler) DeleteUser(project, email string) error

DeleteUser deletes the given project user from Aiven.

func (*ProjectUsersHandler) DeleteUserOrInvitation added in v1.0.0

func (h *ProjectUsersHandler) DeleteUserOrInvitation(project, email string) error

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

func (*ProjectUsersHandler) Get added in v1.0.0

func (h *ProjectUsersHandler) Get(project, email string) (*ProjectUser, *ProjectInvitation, error)

Get a specific project user or project invitation.

func (*ProjectUsersHandler) Invite added in v1.0.0

Invite user to join a project on Aiven.

func (*ProjectUsersHandler) List added in v1.0.0

func (h *ProjectUsersHandler) List(project string) ([]*ProjectUser, []*ProjectInvitation, error)

List all users and invitations for a given project.

func (*ProjectUsersHandler) UpdateInvitation added in v1.0.0

func (h *ProjectUsersHandler) UpdateInvitation(
	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 added in v1.0.0

func (h *ProjectUsersHandler) UpdateUser(
	project string,
	email string,
	req UpdateProjectUserOrInvitationRequest,
) error

UpdateUser updates the given project user with the given parameters.

func (*ProjectUsersHandler) UpdateUserOrInvitation added in v1.0.0

func (h *ProjectUsersHandler) UpdateUserOrInvitation(
	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(project string) error

Delete removes the given project.

func (*ProjectsHandler) Get

func (h *ProjectsHandler) Get(project string) (*Project, error)

Get returns gets the specified project.

func (*ProjectsHandler) GetEventLog added in v1.5.13

func (h *ProjectsHandler) GetEventLog(project string) ([]*ProjectEvent, error)

GetEventLog returns project event log entries

func (*ProjectsHandler) IntegrationEndpointTypes added in v1.8.0

func (h *ProjectsHandler) IntegrationEndpointTypes(project string) ([]IntegrationEndpointType, error)

IntegrationEndpointTypes returns all the available integration endpoint types.

func (*ProjectsHandler) IntegrationTypes added in v1.8.0

func (h *ProjectsHandler) IntegrationTypes(project string) ([]IntegrationType, error)

IntegrationTypes returns all the available integration types.

func (*ProjectsHandler) List

func (h *ProjectsHandler) List() ([]*Project, error)

List returns all the available projects linked to the account.

func (*ProjectsHandler) ServiceTypes added in v1.8.0

func (h *ProjectsHandler) ServiceTypes(project string) (map[string]ServiceType, error)

ServiceTypes returns all the available service types.

func (*ProjectsHandler) Update

func (h *ProjectsHandler) Update(project string, req UpdateProjectRequest) (*Project, error)

Update modifies the specified project with the given parameters.

type ReplicationFlow added in v1.5.4

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"`
	SyncGroupOffsetsEnabled         bool     `json:"sync_group_offsets_enabled"`
	SyncGroupOffsetsIntervalSeconds int      `json:"sync_group_offsets_interval_seconds"`
	EmitHeartbeatsEnabled           bool     `json:"emit_heartbeats_enabled"`
	Topics                          []string `json:"topics"`
	TopicsBlacklist                 []string `json:"topics.blacklist"`
}

ReplicationFlow a replication flow entity

type Response added in v1.4.0

type Response interface {
	GetError() error
}

Response represents Aiven API response interface

type SAMLFieldMapping added in v1.8.0

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            string                    `json:"create_time"`
	UpdateTime            string                    `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"`
}

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 added in v1.4.0

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 added in v1.8.0

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 added in v1.0.0

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 added in v1.0.0

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 added in v1.0.0

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

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

type ServiceIntegrationEndpointResponse added in v1.0.0

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 added in v1.0.0

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 added in v1.0.0

Create the given Service Integration Endpoint on Aiven.

func (*ServiceIntegrationEndpointsHandler) Delete added in v1.0.0

func (h *ServiceIntegrationEndpointsHandler) Delete(project, endpointID string) error

Delete the given service integration endpoint from Aiven.

func (*ServiceIntegrationEndpointsHandler) Get added in v1.0.0

Get a specific service integration endpoint from Aiven.

func (*ServiceIntegrationEndpointsHandler) List added in v1.0.0

List all service integration endpoints for a given project.

func (*ServiceIntegrationEndpointsHandler) Update added in v1.0.0

Update the given service integration endpoint with the given parameters.

type ServiceIntegrationListResponse added in v1.0.0

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

ServiceIntegrationListResponse represents the response from Aiven for listing service integrations.

type ServiceIntegrationResponse added in v1.0.0

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

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

type ServiceIntegrationsHandler added in v1.0.0

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 added in v1.0.0

Create the given Service Integration on Aiven.

func (*ServiceIntegrationsHandler) Delete added in v1.0.0

func (h *ServiceIntegrationsHandler) Delete(project, integrationID string) error

Delete the given service integration from Aiven.

func (*ServiceIntegrationsHandler) Get added in v1.0.0

func (h *ServiceIntegrationsHandler) Get(project, integrationID string) (*ServiceIntegration, error)

Get a specific service integration endpoint from Aiven.

func (*ServiceIntegrationsHandler) List added in v1.0.0

func (h *ServiceIntegrationsHandler) List(project, service string) ([]*ServiceIntegration, error)

List all service integration for a given project and service.

func (*ServiceIntegrationsHandler) Update added in v1.0.0

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 added in v1.8.0

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 added in v1.8.0

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

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

func (*ServiceTagsHandler) Get added in v1.8.0

func (h *ServiceTagsHandler) Get(project, service string) (*ServiceTagsResponse, error)

Get returns a list of all service tags.

func (*ServiceTagsHandler) Set added in v1.8.0

func (h *ServiceTagsHandler) Set(project, service string, req ServiceTagsRequest) (*ServiceTagsResponse, error)

Set sets service tags with the given parameters.

type ServiceTagsRequest added in v1.8.0

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

ServiceTagsRequest contains the parameters used to set service tags.

type ServiceTagsResponse added in v1.8.0

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

ServiceTagsResponse represents the response from Aiven for listing service tags.

type ServiceTask added in v1.5.13

type ServiceTask struct {
	CreateTime      string `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 added in v1.5.13

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

ServiceTaskHandler Aiven go-client handler for Service tesks

func (ServiceTaskHandler) Create added in v1.5.13

func (h ServiceTaskHandler) Create(project, service string, r ServiceTaskRequest) (*ServiceTaskResponse, error)

Create creates a bew service task

func (ServiceTaskHandler) Get added in v1.5.13

func (h ServiceTaskHandler) Get(project, service, id string) (*ServiceTaskResponse, error)

Get retrieves a new service task

type ServiceTaskRequest added in v1.5.13

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

ServiceTaskRequest represents service task request

type ServiceTaskResponse added in v1.5.13

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

ServiceTaskResponse represents service task response

type ServiceType added in v1.8.0

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 added in v1.8.0

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 added in v1.8.0

func (h *ServiceTypesHandler) GetPlan(project, serviceType, servicePlan string) (*GetServicePlanResponse, error)

Get fetches the service plan from Aiven

func (*ServiceTypesHandler) GetPlanPricing added in v1.8.0

func (h *ServiceTypesHandler) GetPlanPricing(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 string        `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(project, service string, req CreateServiceUserRequest) (*ServiceUser, error)

Create creates the given User on Aiven.

func (*ServiceUsersHandler) Delete

func (h *ServiceUsersHandler) Delete(project, service, user string) error

Delete deletes the given Service User in Aiven.

func (*ServiceUsersHandler) Get added in v1.0.0

func (h *ServiceUsersHandler) Get(project, serviceName, username string) (*ServiceUser, error)

Get specific Service User in Aiven.

func (*ServiceUsersHandler) List added in v1.0.0

func (h *ServiceUsersHandler) List(project, serviceName string) ([]*ServiceUser, error)

List Service Users for given service in Aiven.

func (*ServiceUsersHandler) Update added in v1.5.9

func (h *ServiceUsersHandler) Update(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(project string, req CreateServiceRequest) (*Service, error)

Create creates the given Service on Aiven.

func (*ServicesHandler) Delete

func (h *ServicesHandler) Delete(project, service string) error

Delete will delete the given service from Aiven.

func (*ServicesHandler) Get

func (h *ServicesHandler) Get(project, service string) (*Service, error)

Get gets a specific service from Aiven.

func (*ServicesHandler) List

func (h *ServicesHandler) List(project string) ([]*Service, error)

List will fetch all services for a given project.

func (*ServicesHandler) Update

func (h *ServicesHandler) Update(project, service string, req UpdateServiceRequest) (*Service, error)

Update will update the given service with the given parameters.

type StaticIP added in v1.8.0

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 added in v1.8.0

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

StaticIPsHandler aiven go-client handler for static ips

func (*StaticIPsHandler) Associate added in v1.8.0

func (h *StaticIPsHandler) Associate(project, staticIPID string, req AssociateStaticIPRequest) error

func (*StaticIPsHandler) Create added in v1.8.0

Create creates a static ip

func (*StaticIPsHandler) Delete added in v1.8.0

func (h *StaticIPsHandler) Delete(project string, req DeleteStaticIPRequest) error

Delete deletes a static ip

func (*StaticIPsHandler) Dissociate added in v1.8.0

func (h *StaticIPsHandler) Dissociate(project, staticIPID string) error

func (*StaticIPsHandler) Get added in v1.8.0

func (h *StaticIPsHandler) Get(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 added in v1.8.0

func (h *StaticIPsHandler) List(project string) (*ListStaticIPResponse, error)

List lists all static ips

type StopFlinkApplicationDeploymentResponse added in v1.18.0

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 added in v1.5.6

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 added in v1.5.6

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 added in v1.5.6

func (h *TransitGatewayVPCAttachmentHandler) Update(
	project, projectVPCId string,
	req TransitGatewayVPCAttachmentRequest,
) (*VPC, error)

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

type TransitGatewayVPCAttachmentRequest added in v1.5.6

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 added in v1.0.0

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 added in v1.8.0

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 added in v0.0.2

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 added in v1.0.0

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

UpdateProjectUserOrInvitationRequest are the parameters to update project user or invitation

type UpdateServiceIntegrationEndpointRequest added in v1.0.0

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

UpdateServiceIntegrationEndpointRequest are the parameters to update a Service Integration Endpoint.

type UpdateServiceIntegrationRequest added in v1.0.0

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"`
}

UpdateServiceRequest are the parameters to update a Service.

type UserConfigSchema added in v1.8.0

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 added in v1.0.0

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

VPC holds parameters associated with a Virtual Private Cloud

type VPCListResponse added in v1.0.0

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

VPCListResponse represents the response from Aiven for listing VPCs.

type VPCPeeringConnection added in v1.0.0

type VPCPeeringConnection struct {
	CreateTime               *string                 `json:"create_time"`
	PeerCloudAccount         string                  `json:"peer_cloud_account"`
	PeerVPC                  string                  `json:"peer_vpc"`
	PeerRegion               *string                 `json:"peer_region"`
	State                    string                  `json:"state"`
	UpdateTime               string                  `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 added in v1.0.0

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 added in v1.0.0

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 added in v1.0.0

func (h *VPCPeeringConnectionsHandler) Delete(project, vpcID, peerCloudAccount, peerVPC string) error

Delete the given VPC Peering Connection from Aiven.

func (*VPCPeeringConnectionsHandler) DeleteVPCPeering added in v1.1.0

func (h *VPCPeeringConnectionsHandler) DeleteVPCPeering(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 added in v1.5.9

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

DeleteVPCPeeringWithResourceGroup deletes a VPC peering connection

func (*VPCPeeringConnectionsHandler) Get added in v1.0.0

func (h *VPCPeeringConnectionsHandler) Get(
	project string,
	vpcID string,
	peerCloudAccount string,
	peerVPC string,
) (*VPCPeeringConnection, error)

Get a VPC Peering Connection from Aiven.

func (*VPCPeeringConnectionsHandler) GetVPCPeering added in v1.1.0

func (h *VPCPeeringConnectionsHandler) GetVPCPeering(
	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 added in v1.5.9

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

GetVPCPeeringWithResourceGroup retrieves a VPC peering connection

func (*VPCPeeringConnectionsHandler) List added in v1.0.0

func (h *VPCPeeringConnectionsHandler) List(project, vpcID string) ([]*VPCPeeringConnection, error)

List all VPC peering connections for a given VPC.

type VPCsHandler added in v1.0.0

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

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

func (*VPCsHandler) Create added in v1.0.0

func (h *VPCsHandler) Create(project string, req CreateVPCRequest) (*VPC, error)

Create the given VPC on Aiven.

func (*VPCsHandler) Delete added in v1.0.0

func (h *VPCsHandler) Delete(project, vpcID string) error

Delete the given VPC from Aiven.

func (*VPCsHandler) Get added in v1.0.0

func (h *VPCsHandler) Get(project, vpcID string) (*VPC, error)

Get a specific VPC from Aiven.

func (*VPCsHandler) List added in v1.0.0

func (h *VPCsHandler) List(project string) ([]*VPC, error)

List all VPCs for a given project.

type ValidateFlinkApplicationVersionResponse added in v1.8.0

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 added in v1.8.0

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

ValidateFlinkApplicationVersionStatementError is the error for validating a Flink Application Version.

type ValidateFlinkJobRequest added in v1.8.0

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 added in v1.8.0

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
tools module
exp Module

Jump to

Keyboard shortcuts

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