kafka

package
v1.0.0-beta.36 Latest Latest
Warning

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

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

Documentation

Overview

Package kafka provides methods and message types of the kafka v1alpha1 API.

Index

Constants

View Source
const (
	ClusterStatusUnknownStatus = ClusterStatus("unknown_status")
	ClusterStatusReady         = ClusterStatus("ready")
	ClusterStatusCreating      = ClusterStatus("creating")
	ClusterStatusConfiguring   = ClusterStatus("configuring")
	ClusterStatusDeleting      = ClusterStatus("deleting")
	ClusterStatusError         = ClusterStatus("error")
	ClusterStatusLocked        = ClusterStatus("locked")
	ClusterStatusStopped       = ClusterStatus("stopped")
)
View Source
const (
	ListClustersRequestOrderByCreatedAtAsc  = ListClustersRequestOrderBy("created_at_asc")
	ListClustersRequestOrderByCreatedAtDesc = ListClustersRequestOrderBy("created_at_desc")
	ListClustersRequestOrderByNameAsc       = ListClustersRequestOrderBy("name_asc")
	ListClustersRequestOrderByNameDesc      = ListClustersRequestOrderBy("name_desc")
	ListClustersRequestOrderByStatusAsc     = ListClustersRequestOrderBy("status_asc")
	ListClustersRequestOrderByStatusDesc    = ListClustersRequestOrderBy("status_desc")
)
View Source
const (
	ListUsersRequestOrderByNameAsc  = ListUsersRequestOrderBy("name_asc")
	ListUsersRequestOrderByNameDesc = ListUsersRequestOrderBy("name_desc")
)
View Source
const (
	NodeTypeStockUnknownStock = NodeTypeStock("unknown_stock")
	NodeTypeStockLowStock     = NodeTypeStock("low_stock")
	NodeTypeStockOutOfStock   = NodeTypeStock("out_of_stock")
	NodeTypeStockAvailable    = NodeTypeStock("available")
)
View Source
const (
	VolumeTypeUnknownType = VolumeType("unknown_type")
	VolumeTypeSbs5k       = VolumeType("sbs_5k")
	VolumeTypeSbs15k      = VolumeType("sbs_15k")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

This API allows you to manage your Clusters for Apache Kafka®. This product is currently in Public Beta.

func NewAPI

func NewAPI(client *scw.Client) *API

NewAPI returns a API object from a Scaleway client.

func (*API) CreateCluster

func (s *API) CreateCluster(req *CreateClusterRequest, opts ...scw.RequestOption) (*Cluster, error)

CreateCluster: Create a new Kafka cluster.

func (*API) CreateEndpoint

func (s *API) CreateEndpoint(req *CreateEndpointRequest, opts ...scw.RequestOption) (*Endpoint, error)

CreateEndpoint: Create a new endpoint for a Kafka cluster. You can add `public_network` or `private_network` specifications to the body of the request. Note that currently only `private_network` is supported.

func (*API) DeleteCluster

func (s *API) DeleteCluster(req *DeleteClusterRequest, opts ...scw.RequestOption) (*Cluster, error)

DeleteCluster: Delete a given Kafka cluster, specified by the `region` and `cluster_id` parameters. Deleting a Kafka cluster is permanent, and cannot be undone. Note that upon deletion all your data will be lost.

func (*API) DeleteEndpoint

func (s *API) DeleteEndpoint(req *DeleteEndpointRequest, opts ...scw.RequestOption) error

DeleteEndpoint: Delete the endpoint of a Kafka cluster. You must specify the `endpoint_id` parameter of the endpoint you want to delete. Note that you might need to update any environment configurations that point to the deleted endpoint.

func (*API) GetCluster

func (s *API) GetCluster(req *GetClusterRequest, opts ...scw.RequestOption) (*Cluster, error)

GetCluster: Retrieve information about a given Kafka cluster, specified by the `region` and `cluster_id` parameters. Its full details, including name, status, IP address and port, are returned in the response object.

func (*API) GetClusterCertificateAuthority

func (s *API) GetClusterCertificateAuthority(req *GetClusterCertificateAuthorityRequest, opts ...scw.RequestOption) (*scw.File, error)

GetClusterCertificateAuthority: Retrieve certificate authority for a given Kafka cluster, specified by the `region` and `cluster_id` parameters. The response object contains the certificate in PEM format. The certificate is required to validate the sever from the client side during TLS connection.

func (*API) ListClusters

func (s *API) ListClusters(req *ListClustersRequest, opts ...scw.RequestOption) (*ListClustersResponse, error)

ListClusters: List all Kafka clusters in the specified region. By default, the clusters returned in the list are ordered by creation date in ascending order, though this can be modified via the order_by field. You can define additional parameters for your query, such as `tags` and `name`. For the `name` parameter, the value you include will be checked against the whole name string to see if it includes the string you put in the parameter.

func (*API) ListNodeTypes

func (s *API) ListNodeTypes(req *ListNodeTypesRequest, opts ...scw.RequestOption) (*ListNodeTypesResponse, error)

ListNodeTypes: List available node types.

func (*API) ListUsers

func (s *API) ListUsers(req *ListUsersRequest, opts ...scw.RequestOption) (*ListUsersResponse, error)

ListUsers: Retrieve a list of deployment users.

func (*API) ListVersions

func (s *API) ListVersions(req *ListVersionsRequest, opts ...scw.RequestOption) (*ListVersionsResponse, error)

ListVersions: List all available versions of Kafka at the current time.

func (*API) Regions

func (s *API) Regions() []scw.Region

func (*API) RenewClusterCertificateAuthority

func (s *API) RenewClusterCertificateAuthority(req *RenewClusterCertificateAuthorityRequest, opts ...scw.RequestOption) error

RenewClusterCertificateAuthority: Request to renew the certificate authority for a given Kafka cluster, specified by the `region` and `cluster_id` parameters. The certificate authority will be renewed within a few minutes.

func (*API) UpdateCluster

func (s *API) UpdateCluster(req *UpdateClusterRequest, opts ...scw.RequestOption) (*Cluster, error)

UpdateCluster: Update the parameters of a Kafka cluster.

func (*API) UpdateUser

func (s *API) UpdateUser(req *UpdateUserRequest, opts ...scw.RequestOption) (*User, error)

UpdateUser: Update an existing user.

func (*API) WaitForCluster

func (s *API) WaitForCluster(req *WaitForClusterRequest, opts ...scw.RequestOption) (*Cluster, error)

WaitForCluster waits for the Cluster to reach a terminal state.

type Cluster

type Cluster struct {
	// ID: UUID of the Kafka cluster.
	ID string `json:"id"`

	// Name: name of the Kafka cluster.
	Name string `json:"name"`

	// ProjectID: project ID the Kafka cluster belongs to.
	ProjectID string `json:"project_id"`

	// OrganizationID: organisation ID the Kafka cluster belongs to.
	OrganizationID string `json:"organization_id"`

	// Status: status of the Kafka cluster.
	// Default value: unknown_status
	Status ClusterStatus `json:"status"`

	// Version: kafka version of the Kafka cluster.
	Version string `json:"version"`

	// Tags: list of tags applied to the Kafka cluster.
	Tags []string `json:"tags"`

	// Settings: advanced settings of the Kafka cluster.
	Settings []*ClusterSetting `json:"settings"`

	// NodeAmount: number of nodes in Kafka cluster.
	NodeAmount uint32 `json:"node_amount"`

	// NodeType: node type of the Kafka cluster.
	NodeType string `json:"node_type"`

	// Volume: volumes of the Kafka cluster.
	Volume *Volume `json:"volume"`

	// Endpoints: list of Kafka cluster endpoints.
	Endpoints []*Endpoint `json:"endpoints"`

	// CreatedAt: creation date (must follow the ISO 8601 format).
	CreatedAt *time.Time `json:"created_at"`

	// UpdatedAt: last update date (must follow the ISO 8601 format).
	UpdatedAt *time.Time `json:"updated_at"`

	// Region: region the Kafka cluster is in.
	Region scw.Region `json:"region"`
}

Cluster: cluster.

type ClusterSetting

type ClusterSetting struct {
	// Name: name of the setting.
	Name string `json:"name"`

	// BoolValue: boolean value of the setting.
	// Precisely one of BoolValue, StringValue, IntValue, FloatValue must be set.
	BoolValue *bool `json:"bool_value,omitempty"`

	// StringValue: string value of the setting.
	// Precisely one of BoolValue, StringValue, IntValue, FloatValue must be set.
	StringValue *string `json:"string_value,omitempty"`

	// IntValue: integer value of the setting.
	// Precisely one of BoolValue, StringValue, IntValue, FloatValue must be set.
	IntValue *int32 `json:"int_value,omitempty"`

	// FloatValue: float value of the setting.
	// Precisely one of BoolValue, StringValue, IntValue, FloatValue must be set.
	FloatValue *float32 `json:"float_value,omitempty"`
}

ClusterSetting: cluster setting.

type ClusterStatus

type ClusterStatus string

func (ClusterStatus) MarshalJSON

func (enum ClusterStatus) MarshalJSON() ([]byte, error)

func (ClusterStatus) String

func (enum ClusterStatus) String() string

func (*ClusterStatus) UnmarshalJSON

func (enum *ClusterStatus) UnmarshalJSON(data []byte) error

func (ClusterStatus) Values

func (enum ClusterStatus) Values() []ClusterStatus

type CreateClusterRequest

type CreateClusterRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ProjectID: the ID of the Project in which the Kafka cluster will be created.
	ProjectID string `json:"project_id"`

	// Name: name of the Kafka cluster.
	Name string `json:"name"`

	// Version: version of Kafka.
	Version string `json:"version"`

	// Tags: tags to apply to the Kafka cluster.
	Tags []string `json:"tags"`

	// NodeAmount: number of nodes to use for the Kafka cluster.
	NodeAmount uint32 `json:"node_amount"`

	// NodeType: type of node to use for the Kafka cluster.
	NodeType string `json:"node_type"`

	// Volume: kafka volume information.
	Volume *CreateClusterRequestVolumeSpec `json:"volume,omitempty"`

	// Endpoints: one or multiple EndpointSpec used to expose your Kafka cluster.
	Endpoints []*EndpointSpec `json:"endpoints"`

	// UserName: username for the kafka user.
	UserName *string `json:"user_name,omitempty"`

	// Password: password for the kafka user.
	Password *string `json:"password,omitempty"`
}

CreateClusterRequest: create cluster request.

type CreateClusterRequestVolumeSpec

type CreateClusterRequestVolumeSpec struct {
	// SizeBytes: volume size.
	SizeBytes scw.Size `json:"size_bytes"`

	// Type: type of volume where data is stored.
	// Default value: unknown_type
	Type VolumeType `json:"type"`
}

CreateClusterRequestVolumeSpec: create cluster request volume spec.

type CreateEndpointRequest

type CreateEndpointRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ClusterID: UUID of the Kafka Cluster.
	ClusterID string `json:"cluster_id"`

	// Endpoint: endpoint object (`EndpointSpec`) used to expose your Kafka EndpointSpec.
	Endpoint *EndpointSpec `json:"endpoint"`
}

CreateEndpointRequest: create endpoint request.

type DeleteClusterRequest

type DeleteClusterRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ClusterID: UUID of the Kafka Cluster to delete.
	ClusterID string `json:"-"`
}

DeleteClusterRequest: delete cluster request.

type DeleteEndpointRequest

type DeleteEndpointRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// EndpointID: UUID of the endpoint to delete.
	EndpointID string `json:"-"`
}

DeleteEndpointRequest: delete endpoint request.

type Endpoint

type Endpoint struct {
	// ID: UUID of the endpoint.
	ID string `json:"id"`

	// DNSRecords: list of DNS records of the endpoint.
	DNSRecords []string `json:"dns_records"`

	// Port: TCP port of the endpoint.
	Port uint32 `json:"port"`

	// PrivateNetwork: private Network endpoint details.
	// Precisely one of PrivateNetwork, PublicNetwork must be set.
	PrivateNetwork *EndpointPrivateNetworkDetails `json:"private_network,omitempty"`

	// PublicNetwork: public endpoint details.
	// Precisely one of PrivateNetwork, PublicNetwork must be set.
	PublicNetwork *EndpointPublicDetails `json:"public_network,omitempty"`
}

Endpoint: endpoint.

type EndpointPrivateNetworkDetails

type EndpointPrivateNetworkDetails struct {
	// PrivateNetworkID: UUID of the Private Network.
	PrivateNetworkID string `json:"private_network_id"`
}

EndpointPrivateNetworkDetails: Private Network details.

type EndpointPublicDetails

type EndpointPublicDetails struct{}

EndpointPublicDetails: Public Access details.

type EndpointSpec

type EndpointSpec struct {
	// Precisely one of PublicNetwork, PrivateNetwork must be set.
	PublicNetwork *EndpointSpecPublicDetails `json:"public_network,omitempty"`

	// Precisely one of PublicNetwork, PrivateNetwork must be set.
	PrivateNetwork *EndpointSpecPrivateNetworkDetails `json:"private_network,omitempty"`
}

EndpointSpec: endpoint spec.

type EndpointSpecPrivateNetworkDetails

type EndpointSpecPrivateNetworkDetails struct {
	// PrivateNetworkID: UUID of the Private Network.
	PrivateNetworkID string `json:"private_network_id"`
}

EndpointSpecPrivateNetworkDetails: endpoint spec private network details.

type EndpointSpecPublicDetails

type EndpointSpecPublicDetails struct{}

EndpointSpecPublicDetails: endpoint spec public details.

type GetClusterCertificateAuthorityRequest

type GetClusterCertificateAuthorityRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ClusterID: UUID of the Kafka Cluster.
	ClusterID string `json:"-"`
}

GetClusterCertificateAuthorityRequest: get cluster certificate authority request.

type GetClusterRequest

type GetClusterRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ClusterID: UUID of the Kafka Cluster.
	ClusterID string `json:"-"`
}

GetClusterRequest: get cluster request.

type ListClustersRequest

type ListClustersRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// Tags: list Kafka cluster with a given tag.
	Tags []string `json:"-"`

	// Name: lists Kafka clusters that match a name pattern.
	Name *string `json:"-"`

	// OrderBy: criteria to use when ordering Kafka cluster listings.
	// Default value: created_at_asc
	OrderBy ListClustersRequestOrderBy `json:"-"`

	// OrganizationID: organization ID of the Kafka cluster.
	OrganizationID *string `json:"-"`

	// ProjectID: project ID.
	ProjectID *string `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`
}

ListClustersRequest: list clusters request.

type ListClustersRequestOrderBy

type ListClustersRequestOrderBy string

func (ListClustersRequestOrderBy) MarshalJSON

func (enum ListClustersRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListClustersRequestOrderBy) String

func (enum ListClustersRequestOrderBy) String() string

func (*ListClustersRequestOrderBy) UnmarshalJSON

func (enum *ListClustersRequestOrderBy) UnmarshalJSON(data []byte) error

func (ListClustersRequestOrderBy) Values

type ListClustersResponse

type ListClustersResponse struct {
	// Clusters: list of all Kafka cluster available in an Organization or Project.
	Clusters []*Cluster `json:"clusters"`

	// TotalCount: total count of Kafka cluster available in an Organization or Project.
	TotalCount uint64 `json:"total_count"`
}

ListClustersResponse: list clusters response.

func (*ListClustersResponse) UnsafeAppend

func (r *ListClustersResponse) UnsafeAppend(res any) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListClustersResponse) UnsafeGetTotalCount

func (r *ListClustersResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListNodeTypesRequest

type ListNodeTypesRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// IncludeDisabledTypes: defines whether or not to include disabled types.
	IncludeDisabledTypes *bool `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`
}

ListNodeTypesRequest: list node types request.

type ListNodeTypesResponse

type ListNodeTypesResponse struct {
	// NodeTypes: types of the node.
	NodeTypes []*NodeType `json:"node_types"`

	// TotalCount: total count of node types available.
	TotalCount uint64 `json:"total_count"`
}

ListNodeTypesResponse: list node types response.

func (*ListNodeTypesResponse) UnsafeAppend

func (r *ListNodeTypesResponse) UnsafeAppend(res any) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListNodeTypesResponse) UnsafeGetTotalCount

func (r *ListNodeTypesResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListUsersRequest

type ListUsersRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	ClusterID string `json:"-"`

	Page *int32 `json:"-"`

	PageSize *uint32 `json:"-"`

	// OrderBy: default value: name_asc
	OrderBy ListUsersRequestOrderBy `json:"-"`

	Name *string `json:"-"`
}

ListUsersRequest: list users request.

type ListUsersRequestOrderBy

type ListUsersRequestOrderBy string

func (ListUsersRequestOrderBy) MarshalJSON

func (enum ListUsersRequestOrderBy) MarshalJSON() ([]byte, error)

func (ListUsersRequestOrderBy) String

func (enum ListUsersRequestOrderBy) String() string

func (*ListUsersRequestOrderBy) UnmarshalJSON

func (enum *ListUsersRequestOrderBy) UnmarshalJSON(data []byte) error

func (ListUsersRequestOrderBy) Values

type ListUsersResponse

type ListUsersResponse struct {
	Users []*User `json:"users"`

	TotalCount uint64 `json:"total_count"`
}

ListUsersResponse: list users response.

func (*ListUsersResponse) UnsafeAppend

func (r *ListUsersResponse) UnsafeAppend(res any) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListUsersResponse) UnsafeGetTotalCount

func (r *ListUsersResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListVersionsRequest

type ListVersionsRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// Version: kafka version to filter for.
	Version *string `json:"-"`

	// Page: the page number to return, from the paginated results.
	Page *int32 `json:"-"`

	// PageSize: the number of items to return.
	PageSize *uint32 `json:"-"`
}

ListVersionsRequest: list versions request.

type ListVersionsResponse

type ListVersionsResponse struct {
	// Versions: available Kafka versions.
	Versions []*Version `json:"versions"`

	// TotalCount: total count of Kafka versions available.
	TotalCount uint64 `json:"total_count"`
}

ListVersionsResponse: list versions response.

func (*ListVersionsResponse) UnsafeAppend

func (r *ListVersionsResponse) UnsafeAppend(res any) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListVersionsResponse) UnsafeGetTotalCount

func (r *ListVersionsResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type NodeType

type NodeType struct {
	// Name: node type name identifier.
	Name string `json:"name"`

	// StockStatus: current stock status for the node type.
	// Default value: unknown_stock
	StockStatus NodeTypeStock `json:"stock_status"`

	// Description: current specifications of the node type offer.
	Description string `json:"description"`

	// Vcpus: number of virtual CPUs of the node type.
	Vcpus uint32 `json:"vcpus"`

	// MemoryBytes: quantity of RAM.
	MemoryBytes scw.Size `json:"memory_bytes"`

	// AvailableVolumeTypes: available storage options for the node type.
	AvailableVolumeTypes []*NodeTypeVolumeType `json:"available_volume_types"`

	// Disabled: defines whether the node type is currently disabled.
	Disabled bool `json:"disabled"`

	// Beta: defines whether the node type is currently in beta.
	Beta bool `json:"beta"`

	// ClusterRange: cluster range associated with the node type offer.
	ClusterRange string `json:"cluster_range"`
}

NodeType: node type.

type NodeTypeStock

type NodeTypeStock string

func (NodeTypeStock) MarshalJSON

func (enum NodeTypeStock) MarshalJSON() ([]byte, error)

func (NodeTypeStock) String

func (enum NodeTypeStock) String() string

func (*NodeTypeStock) UnmarshalJSON

func (enum *NodeTypeStock) UnmarshalJSON(data []byte) error

func (NodeTypeStock) Values

func (enum NodeTypeStock) Values() []NodeTypeStock

type NodeTypeVolumeType

type NodeTypeVolumeType struct {
	// Type: volume type.
	// Default value: unknown_type
	Type VolumeType `json:"type"`

	// Description: the description of the volume.
	Description string `json:"description"`

	// MinSizeBytes: minimum size required for the volume.
	MinSizeBytes scw.Size `json:"min_size_bytes"`

	// MaxSizeBytes: maximum size required for the volume.
	MaxSizeBytes scw.Size `json:"max_size_bytes"`

	// ChunkSizeBytes: minimum increment level for a Block Storage volume size.
	ChunkSizeBytes scw.Size `json:"chunk_size_bytes"`
}

NodeTypeVolumeType: node type volume type.

type RenewClusterCertificateAuthorityRequest

type RenewClusterCertificateAuthorityRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ClusterID: UUID of the Kafka Cluster.
	ClusterID string `json:"-"`
}

RenewClusterCertificateAuthorityRequest: renew cluster certificate authority request.

type UpdateClusterRequest

type UpdateClusterRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ClusterID: UUID of the Kafka Clusters to update.
	ClusterID string `json:"-"`

	// Name: name of the Kafka Cluster.
	Name *string `json:"name,omitempty"`

	// Tags: tags of a Kafka Cluster.
	Tags *[]string `json:"tags,omitempty"`
}

UpdateClusterRequest: update cluster request.

type UpdateUserRequest

type UpdateUserRequest struct {
	// Region: region to target. If none is passed will use default region from the config.
	Region scw.Region `json:"-"`

	// ClusterID: ID of the cluster in which to update the user's password.
	ClusterID string `json:"-"`

	// Username: username of the Kafka cluster user.
	Username string `json:"-"`

	// Password: new password for the Kafka cluster user.
	Password *string `json:"password,omitempty"`
}

UpdateUserRequest: Update a user of a Kafka cluster.

type User

type User struct {
	Username string `json:"username"`
}

User: user.

type Version

type Version struct {
	// Version: kafka version.
	Version string `json:"version"`

	// EndOfLifeAt: date of End of Life for the version.
	EndOfLifeAt *time.Time `json:"end_of_life_at"`

	// AvailableSettings: cluster configuration settings you are able to change for clusters running this version. Each item in `available_settings` describes one configurable cluster setting.
	AvailableSettings []*VersionAvailableSetting `json:"available_settings"`
}

Version: version.

type VersionAvailableSetting

type VersionAvailableSetting struct {
	// Name: kafka cluster setting name.
	Name string `json:"name"`

	// HotConfigurable: defines whether this setting can be applied without needing a restart.
	HotConfigurable bool `json:"hot_configurable"`

	// Description: setting description.
	Description string `json:"description"`

	// BoolProperty: boolean property, if the setting is a boolean.
	// Precisely one of BoolProperty, StringProperty, IntProperty, FloatProperty must be set.
	BoolProperty *VersionAvailableSettingBooleanProperty `json:"bool_property,omitempty"`

	// StringProperty: string property, if the setting is a string.
	// Precisely one of BoolProperty, StringProperty, IntProperty, FloatProperty must be set.
	StringProperty *VersionAvailableSettingStringProperty `json:"string_property,omitempty"`

	// IntProperty: integer property, if the setting is an integer.
	// Precisely one of BoolProperty, StringProperty, IntProperty, FloatProperty must be set.
	IntProperty *VersionAvailableSettingIntegerProperty `json:"int_property,omitempty"`

	// FloatProperty: float property, if the setting is a float.
	// Precisely one of BoolProperty, StringProperty, IntProperty, FloatProperty must be set.
	FloatProperty *VersionAvailableSettingFloatProperty `json:"float_property,omitempty"`
}

VersionAvailableSetting: version available setting.

type VersionAvailableSettingBooleanProperty

type VersionAvailableSettingBooleanProperty struct {
	DefaultValue bool `json:"default_value"`
}

VersionAvailableSettingBooleanProperty: version available setting boolean property.

type VersionAvailableSettingFloatProperty

type VersionAvailableSettingFloatProperty struct {
	Min float32 `json:"min"`

	Max float32 `json:"max"`

	DefaultValue float32 `json:"default_value"`

	Unit *string `json:"unit"`
}

VersionAvailableSettingFloatProperty: version available setting float property.

type VersionAvailableSettingIntegerProperty

type VersionAvailableSettingIntegerProperty struct {
	Min int32 `json:"min"`

	Max int32 `json:"max"`

	DefaultValue int32 `json:"default_value"`

	Unit *string `json:"unit"`
}

VersionAvailableSettingIntegerProperty: version available setting integer property.

type VersionAvailableSettingStringProperty

type VersionAvailableSettingStringProperty struct {
	StringConstraint *string `json:"string_constraint"`

	DefaultValue string `json:"default_value"`
}

VersionAvailableSettingStringProperty: version available setting string property.

type Volume

type Volume struct {
	// Type: type of volume where data is stored.
	// Default value: unknown_type
	Type VolumeType `json:"type"`

	// SizeBytes: volume size.
	SizeBytes scw.Size `json:"size_bytes"`
}

Volume: volume.

type VolumeType

type VolumeType string

func (VolumeType) MarshalJSON

func (enum VolumeType) MarshalJSON() ([]byte, error)

func (VolumeType) String

func (enum VolumeType) String() string

func (*VolumeType) UnmarshalJSON

func (enum *VolumeType) UnmarshalJSON(data []byte) error

func (VolumeType) Values

func (enum VolumeType) Values() []VolumeType

type WaitForClusterRequest

type WaitForClusterRequest struct {
	Region        scw.Region
	ClusterID     string
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

WaitForClusterRequest is used by WaitForCluster method.

Jump to

Keyboard shortcuts

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