cloud

package
v0.1.0-alpha.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessRule

type AccessRule struct {
	// Access Rule ID
	ID string `json:"id,required" format:"uuid4"`
	// Access mode
	//
	// Any of "ro", "rw".
	AccessLevel AccessRuleAccessLevel `json:"access_level,required"`
	// Source IP or network
	AccessTo string `json:"access_to,required" format:"ipvanyaddress"`
	// Access Rule state
	//
	// Any of "active", "applying", "denying", "error", "new", "queued_to_apply",
	// "queued_to_deny".
	State AccessRuleState `json:"state,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		AccessLevel respjson.Field
		AccessTo    respjson.Field
		State       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccessRule) RawJSON

func (r AccessRule) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccessRule) UnmarshalJSON

func (r *AccessRule) UnmarshalJSON(data []byte) error

type AccessRuleAccessLevel

type AccessRuleAccessLevel string

Access mode

const (
	AccessRuleAccessLevelRo AccessRuleAccessLevel = "ro"
	AccessRuleAccessLevelRw AccessRuleAccessLevel = "rw"
)

type AccessRuleList

type AccessRuleList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []AccessRule `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AccessRuleList) RawJSON

func (r AccessRuleList) RawJSON() string

Returns the unmodified JSON received from the API

func (*AccessRuleList) UnmarshalJSON

func (r *AccessRuleList) UnmarshalJSON(data []byte) error

type AccessRuleState

type AccessRuleState string

Access Rule state

const (
	AccessRuleStateActive        AccessRuleState = "active"
	AccessRuleStateApplying      AccessRuleState = "applying"
	AccessRuleStateDenying       AccessRuleState = "denying"
	AccessRuleStateError         AccessRuleState = "error"
	AccessRuleStateNew           AccessRuleState = "new"
	AccessRuleStateQueuedToApply AccessRuleState = "queued_to_apply"
	AccessRuleStateQueuedToDeny  AccessRuleState = "queued_to_deny"
)

type AllowedAddressPairs

type AllowedAddressPairs struct {
	// Subnet mask or IP address of the port specified in allowed_address_pairs
	IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
	// MAC address of the port specified in allowed_address_pairs
	MacAddress string `json:"mac_address,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IPAddress   respjson.Field
		MacAddress  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AllowedAddressPairs) RawJSON

func (r AllowedAddressPairs) RawJSON() string

Returns the unmodified JSON received from the API

func (*AllowedAddressPairs) UnmarshalJSON

func (r *AllowedAddressPairs) UnmarshalJSON(data []byte) error

type AwsIamData

type AwsIamData struct {
	// AWS IAM key ID.
	AwsAccessKeyID string `json:"aws_access_key_id,required"`
	// AWS IAM secret key.
	AwsSecretAccessKey string `json:"aws_secret_access_key,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AwsAccessKeyID     respjson.Field
		AwsSecretAccessKey respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (AwsIamData) RawJSON

func (r AwsIamData) RawJSON() string

Returns the unmodified JSON received from the API

func (AwsIamData) ToParam

func (r AwsIamData) ToParam() AwsIamDataParam

ToParam converts this AwsIamData to a AwsIamDataParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with AwsIamDataParam.Overrides()

func (*AwsIamData) UnmarshalJSON

func (r *AwsIamData) UnmarshalJSON(data []byte) error

type AwsIamDataParam

type AwsIamDataParam struct {
	// AWS IAM key ID.
	AwsAccessKeyID string `json:"aws_access_key_id,required"`
	// AWS IAM secret key.
	AwsSecretAccessKey string `json:"aws_secret_access_key,required"`
	// contains filtered or unexported fields
}

The properties AwsAccessKeyID, AwsSecretAccessKey are required.

func (AwsIamDataParam) MarshalJSON

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

type BaremetalFixedAddress

type BaremetalFixedAddress struct {
	// Address
	Addr string `json:"addr,required"`
	// Interface name. This field will be `null` if `with_interfaces_name=true` is not
	// set in the request when listing servers. It will also be `null` if the
	// `interface_name` was not specified during server creation or when attaching the
	// interface.
	InterfaceName string `json:"interface_name,required"`
	// The unique identifier of the subnet associated with this address.
	SubnetID string `json:"subnet_id,required"`
	// The name of the subnet associated with this address.
	SubnetName string `json:"subnet_name,required"`
	// Type of the address
	Type constant.Fixed `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Addr          respjson.Field
		InterfaceName respjson.Field
		SubnetID      respjson.Field
		SubnetName    respjson.Field
		Type          respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

IP addresses of the trunk port and its subports.

func (BaremetalFixedAddress) RawJSON

func (r BaremetalFixedAddress) RawJSON() string

Returns the unmodified JSON received from the API

func (*BaremetalFixedAddress) UnmarshalJSON

func (r *BaremetalFixedAddress) UnmarshalJSON(data []byte) error

type BaremetalFlavor

type BaremetalFlavor struct {
	// Flavor architecture type
	Architecture string `json:"architecture,required"`
	// Disabled flavor flag
	Disabled bool `json:"disabled,required"`
	// Flavor ID is the same as name
	FlavorID string `json:"flavor_id,required"`
	// Flavor name
	FlavorName string `json:"flavor_name,required"`
	// Flavor operating system
	OsType string `json:"os_type,required"`
	// RAM size in MiB
	Ram int64 `json:"ram,required"`
	// Flavor resource class for mapping to hardware capacity
	ResourceClass string `json:"resource_class,required"`
	// Virtual CPU count. For bare metal flavors, it's a physical CPU count
	Vcpus int64 `json:"vcpus,required"`
	// Number of available instances of given configuration
	Capacity int64 `json:"capacity,nullable"`
	// Currency code. Shown if the include_prices query parameter if set to true
	CurrencyCode string `json:"currency_code,nullable"`
	// Additional hardware description
	HardwareDescription map[string]string `json:"hardware_description"`
	// Price per hour. Shown if the include_prices query parameter if set to true
	PricePerHour float64 `json:"price_per_hour,nullable"`
	// Price per month. Shown if the include_prices query parameter if set to true
	PricePerMonth float64 `json:"price_per_month,nullable"`
	// Price status for the UI
	//
	// Any of "error", "hide", "show".
	PriceStatus BaremetalFlavorPriceStatus `json:"price_status,nullable"`
	// Count of reserved but not used nodes. If a client don't have reservations for
	// the flavor, it's None.
	ReservedInStock int64 `json:"reserved_in_stock,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Architecture        respjson.Field
		Disabled            respjson.Field
		FlavorID            respjson.Field
		FlavorName          respjson.Field
		OsType              respjson.Field
		Ram                 respjson.Field
		ResourceClass       respjson.Field
		Vcpus               respjson.Field
		Capacity            respjson.Field
		CurrencyCode        respjson.Field
		HardwareDescription respjson.Field
		PricePerHour        respjson.Field
		PricePerMonth       respjson.Field
		PriceStatus         respjson.Field
		ReservedInStock     respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Bare metal flavor schema

func (BaremetalFlavor) RawJSON

func (r BaremetalFlavor) RawJSON() string

Returns the unmodified JSON received from the API

func (*BaremetalFlavor) UnmarshalJSON

func (r *BaremetalFlavor) UnmarshalJSON(data []byte) error

type BaremetalFlavorList

type BaremetalFlavorList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []BaremetalFlavor `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BaremetalFlavorList) RawJSON

func (r BaremetalFlavorList) RawJSON() string

Returns the unmodified JSON received from the API

func (*BaremetalFlavorList) UnmarshalJSON

func (r *BaremetalFlavorList) UnmarshalJSON(data []byte) error

type BaremetalFlavorListParams

type BaremetalFlavorListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Flag for filtering disabled flavors in the region. Defaults to true
	Disabled param.Opt[bool] `query:"disabled,omitzero" json:"-"`
	// Set to true to exclude flavors dedicated to linux images. Default False
	ExcludeLinux param.Opt[bool] `query:"exclude_linux,omitzero" json:"-"`
	// Set to true to exclude flavors dedicated to windows images. Default False
	ExcludeWindows param.Opt[bool] `query:"exclude_windows,omitzero" json:"-"`
	// Set to true if the response should include flavor capacity
	IncludeCapacity param.Opt[bool] `query:"include_capacity,omitzero" json:"-"`
	// Set to true if the response should include flavor prices
	IncludePrices param.Opt[bool] `query:"include_prices,omitzero" json:"-"`
	// Optional. Set to true if flavor listing should include count of reserved
	// resources in stock.
	IncludeReservationStock param.Opt[bool] `query:"include_reservation_stock,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (BaremetalFlavorListParams) URLQuery

func (r BaremetalFlavorListParams) URLQuery() (v url.Values, err error)

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

type BaremetalFlavorListSuitableParams

type BaremetalFlavorListSuitableParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Set to true if flavor listing should include flavor prices
	IncludePrices param.Opt[bool] `query:"include_prices,omitzero" json:"-"`
	// Apptemplate ID
	ApptemplateID param.Opt[string] `json:"apptemplate_id,omitzero"`
	// Image ID
	ImageID param.Opt[string] `json:"image_id,omitzero"`
	// contains filtered or unexported fields
}

func (BaremetalFlavorListSuitableParams) MarshalJSON

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

func (BaremetalFlavorListSuitableParams) URLQuery

func (r BaremetalFlavorListSuitableParams) URLQuery() (v url.Values, err error)

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

type BaremetalFlavorPriceStatus

type BaremetalFlavorPriceStatus string

Price status for the UI

const (
	BaremetalFlavorPriceStatusError BaremetalFlavorPriceStatus = "error"
	BaremetalFlavorPriceStatusHide  BaremetalFlavorPriceStatus = "hide"
	BaremetalFlavorPriceStatusShow  BaremetalFlavorPriceStatus = "show"
)

type BaremetalFlavorService

type BaremetalFlavorService struct {
	Options []option.RequestOption
}

BaremetalFlavorService contains methods and other services that help with interacting with the gcore API.

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

func NewBaremetalFlavorService

func NewBaremetalFlavorService(opts ...option.RequestOption) (r BaremetalFlavorService)

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

func (*BaremetalFlavorService) List

Retrieve a list of flavors. When the include_prices query parameter is specified, the list shows prices. A client in trial mode gets all price values as 0. If you get Pricing Error contact the support

func (*BaremetalFlavorService) ListSuitable

List suitalbe flavors for bare metal server creation

type BaremetalFloatingAddress

type BaremetalFloatingAddress struct {
	// Address
	Addr string `json:"addr,required"`
	// Type of the address
	Type constant.Floating `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Addr        respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BaremetalFloatingAddress) RawJSON

func (r BaremetalFloatingAddress) RawJSON() string

Returns the unmodified JSON received from the API

func (*BaremetalFloatingAddress) UnmarshalJSON

func (r *BaremetalFloatingAddress) UnmarshalJSON(data []byte) error

type BaremetalImageListParams

type BaremetalImageListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Show price
	IncludePrices param.Opt[bool] `query:"include_prices,omitzero" json:"-"`
	// Any value to show private images
	Private param.Opt[string] `query:"private,omitzero" json:"-"`
	// Filter by tag key-value pairs. Must be a valid JSON string. 'curl -G
	// --data-urlencode 'tag_key_value={"key": "value"}' --url
	// 'http://localhost:1111/v1/images/1/1'"
	TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
	// Filter by tag keys.
	TagKey []string `query:"tag_key,omitzero" json:"-"`
	// Image visibility. Globally visible images are public
	//
	// Any of "private", "public", "shared".
	Visibility BaremetalImageListParamsVisibility `query:"visibility,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (BaremetalImageListParams) URLQuery

func (r BaremetalImageListParams) URLQuery() (v url.Values, err error)

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

type BaremetalImageListParamsVisibility

type BaremetalImageListParamsVisibility string

Image visibility. Globally visible images are public

const (
	BaremetalImageListParamsVisibilityPrivate BaremetalImageListParamsVisibility = "private"
	BaremetalImageListParamsVisibilityPublic  BaremetalImageListParamsVisibility = "public"
	BaremetalImageListParamsVisibilityShared  BaremetalImageListParamsVisibility = "shared"
)

type BaremetalImageService

type BaremetalImageService struct {
	Options []option.RequestOption
}

BaremetalImageService contains methods and other services that help with interacting with the gcore API.

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

func NewBaremetalImageService

func NewBaremetalImageService(opts ...option.RequestOption) (r BaremetalImageService)

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

func (*BaremetalImageService) List

Retrieve the available images list for bare metal servers. Returned entities may or may not be owned by the project

type BaremetalServer

type BaremetalServer struct {
	// Bare metal server ID
	ID string `json:"id,required" format:"uuid4"`
	// Map of network_name to list of addresses in that network
	Addresses map[string][]BaremetalServerAddressUnion `json:"addresses,required"`
	// IP addresses of the instances that are blackholed by DDoS mitigation system
	BlackholePorts []BlackholePort `json:"blackhole_ports,required"`
	// Datetime when bare metal server was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Task that created this entity
	CreatorTaskID string `json:"creator_task_id,required"`
	// Bare metal advanced DDoS protection profile. It is always `null` if query
	// parameter `with_ddos=true` is not set.
	DDOSProfile DDOSProfile `json:"ddos_profile,required"`
	// Fixed IP assigned to instance
	FixedIPAssignments []BaremetalServerFixedIPAssignment `json:"fixed_ip_assignments,required"`
	// Flavor details
	Flavor BaremetalServerFlavor `json:"flavor,required"`
	// Instance isolation information
	InstanceIsolation InstanceIsolation `json:"instance_isolation,required"`
	// Bare metal server name
	Name string `json:"name,required"`
	// Project ID
	ProjectID int64 `json:"project_id,required"`
	// Region name
	Region string `json:"region,required"`
	// Region ID
	RegionID int64 `json:"region_id,required"`
	// SSH key assigned to bare metal server
	SSHKeyName string `json:"ssh_key_name,required"`
	// Bare metal server status
	//
	// Any of "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING",
	// "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE",
	// "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED",
	// "UNKNOWN", "VERIFY_RESIZE".
	Status BaremetalServerStatus `json:"status,required"`
	// List of key-value tags associated with the resource. A tag is a key-value pair
	// that can be associated with a resource, enabling efficient filtering and
	// grouping for better organization and management. Some tags are read-only and
	// cannot be modified by the user. Tags are also integrated with cost reports,
	// allowing cost data to be filtered based on tag keys or values.
	Tags []Tag `json:"tags,required"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,required"`
	// Task state
	TaskState string `json:"task_state,required"`
	// Bare metal server state
	//
	// Any of "active", "building", "deleted", "error", "paused", "rescued", "resized",
	// "shelved", "shelved_offloaded", "soft-deleted", "stopped", "suspended".
	VmState BaremetalServerVmState `json:"vm_state,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                 respjson.Field
		Addresses          respjson.Field
		BlackholePorts     respjson.Field
		CreatedAt          respjson.Field
		CreatorTaskID      respjson.Field
		DDOSProfile        respjson.Field
		FixedIPAssignments respjson.Field
		Flavor             respjson.Field
		InstanceIsolation  respjson.Field
		Name               respjson.Field
		ProjectID          respjson.Field
		Region             respjson.Field
		RegionID           respjson.Field
		SSHKeyName         respjson.Field
		Status             respjson.Field
		Tags               respjson.Field
		TaskID             respjson.Field
		TaskState          respjson.Field
		VmState            respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BaremetalServer) RawJSON

func (r BaremetalServer) RawJSON() string

Returns the unmodified JSON received from the API

func (*BaremetalServer) UnmarshalJSON

func (r *BaremetalServer) UnmarshalJSON(data []byte) error

type BaremetalServerAddressUnion

type BaremetalServerAddressUnion struct {
	Addr string `json:"addr"`
	Type string `json:"type"`
	// This field is from variant [BaremetalFixedAddress].
	InterfaceName string `json:"interface_name"`
	// This field is from variant [BaremetalFixedAddress].
	SubnetID string `json:"subnet_id"`
	// This field is from variant [BaremetalFixedAddress].
	SubnetName string `json:"subnet_name"`
	JSON       struct {
		Addr          respjson.Field
		Type          respjson.Field
		InterfaceName respjson.Field
		SubnetID      respjson.Field
		SubnetName    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

BaremetalServerAddressUnion contains all possible properties and values from BaremetalFloatingAddress, BaremetalFixedAddress.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (BaremetalServerAddressUnion) AsFixedIPAddress

func (u BaremetalServerAddressUnion) AsFixedIPAddress() (v BaremetalFixedAddress)

func (BaremetalServerAddressUnion) AsFloatingIPAddress

func (u BaremetalServerAddressUnion) AsFloatingIPAddress() (v BaremetalFloatingAddress)

func (BaremetalServerAddressUnion) RawJSON

func (u BaremetalServerAddressUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*BaremetalServerAddressUnion) UnmarshalJSON

func (r *BaremetalServerAddressUnion) UnmarshalJSON(data []byte) error

type BaremetalServerFixedIPAssignment

type BaremetalServerFixedIPAssignment struct {
	// Is network external
	External bool `json:"external,required"`
	// Ip address
	IPAddress string `json:"ip_address,required"`
	// Interface subnet id
	SubnetID string `json:"subnet_id,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		External    respjson.Field
		IPAddress   respjson.Field
		SubnetID    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BaremetalServerFixedIPAssignment) RawJSON

Returns the unmodified JSON received from the API

func (*BaremetalServerFixedIPAssignment) UnmarshalJSON

func (r *BaremetalServerFixedIPAssignment) UnmarshalJSON(data []byte) error

type BaremetalServerFlavor

type BaremetalServerFlavor struct {
	// CPU architecture
	Architecture string `json:"architecture,required"`
	// Flavor ID is the same as name
	FlavorID string `json:"flavor_id,required"`
	// Flavor name
	FlavorName string `json:"flavor_name,required"`
	// Additional hardware description
	HardwareDescription BaremetalServerFlavorHardwareDescription `json:"hardware_description,required"`
	// Operating system
	OsType string `json:"os_type,required"`
	// RAM size in MiB
	Ram int64 `json:"ram,required"`
	// Flavor resource class for mapping to hardware capacity
	ResourceClass string `json:"resource_class,required"`
	// Virtual CPU count. For bare metal flavors, it's a physical CPU count
	Vcpus int64 `json:"vcpus,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Architecture        respjson.Field
		FlavorID            respjson.Field
		FlavorName          respjson.Field
		HardwareDescription respjson.Field
		OsType              respjson.Field
		Ram                 respjson.Field
		ResourceClass       respjson.Field
		Vcpus               respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Flavor details

func (BaremetalServerFlavor) RawJSON

func (r BaremetalServerFlavor) RawJSON() string

Returns the unmodified JSON received from the API

func (*BaremetalServerFlavor) UnmarshalJSON

func (r *BaremetalServerFlavor) UnmarshalJSON(data []byte) error

type BaremetalServerFlavorHardwareDescription

type BaremetalServerFlavorHardwareDescription struct {
	// Human-readable CPU description
	CPU string `json:"cpu,required"`
	// Human-readable disk description
	Disk string `json:"disk,required"`
	// If the flavor is licensed, this field contains the license type
	License string `json:"license,required"`
	// Human-readable NIC description
	Network string `json:"network,required"`
	// Human-readable RAM description
	Ram string `json:"ram,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CPU         respjson.Field
		Disk        respjson.Field
		License     respjson.Field
		Network     respjson.Field
		Ram         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Additional hardware description

func (BaremetalServerFlavorHardwareDescription) RawJSON

Returns the unmodified JSON received from the API

func (*BaremetalServerFlavorHardwareDescription) UnmarshalJSON

func (r *BaremetalServerFlavorHardwareDescription) UnmarshalJSON(data []byte) error

type BaremetalServerListParams

type BaremetalServerListParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Filters the instances by a date and time stamp when the instances last changed.
	ChangesBefore param.Opt[time.Time] `query:"changes-before,omitzero" format:"date-time" json:"-"`
	// Filters the instances by a date and time stamp when the instances last changed
	// status.
	ChangesSince param.Opt[time.Time] `query:"changes-since,omitzero" format:"date-time" json:"-"`
	// Filter out instances by flavor_id. Flavor id must match exactly.
	FlavorID param.Opt[string] `query:"flavor_id,omitzero" json:"-"`
	// Filter out instances by flavor_prefix.
	FlavorPrefix param.Opt[string] `query:"flavor_prefix,omitzero" json:"-"`
	// Include managed k8s worker nodes
	IncludeK8s param.Opt[bool] `query:"include_k8s,omitzero" json:"-"`
	// An IPv4 address to filter results by. Note: partial matches are allowed. For
	// example, searching for 192.168.0.1 will return 192.168.0.1, 192.168.0.10,
	// 192.168.0.110, and so on.
	IP param.Opt[string] `query:"ip,omitzero" json:"-"`
	// Optional. Limit the number of returned items
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter instances by name. You can provide a full or partial name, instances with
	// matching names will be returned. For example, entering 'test' will return all
	// instances that contain 'test' in their name.
	Name param.Opt[string] `query:"name,omitzero" json:"-"`
	// Optional. Offset value is used to exclude the first set of records from the
	// result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Include only isolated instances
	OnlyIsolated param.Opt[bool] `query:"only_isolated,omitzero" json:"-"`
	// Return bare metals only with external fixed IP addresses.
	OnlyWithFixedExternalIP param.Opt[bool] `query:"only_with_fixed_external_ip,omitzero" json:"-"`
	// Filter result by ddos protection profile name. Effective only with with_ddos set
	// to true.
	ProfileName param.Opt[string] `query:"profile_name,omitzero" json:"-"`
	// Optional. Filter by tag key-value pairs. curl -G --data-urlencode
	// "tag_key_value={"key": "value"}" --url
	// "https://example.com/cloud/v1/resource/1/1"
	TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
	// Filter the server list result by the UUID of the server. Allowed UUID part
	Uuid param.Opt[string] `query:"uuid,omitzero" json:"-"`
	// Include DDoS profile information for bare-metal servers in the response when set
	// to `true`. Otherwise, the `ddos_profile` field in the response is `null` by
	// default.
	WithDDOS param.Opt[bool] `query:"with_ddos,omitzero" json:"-"`
	// Include `interface_name` in the addresses
	WithInterfacesName param.Opt[bool] `query:"with_interfaces_name,omitzero" json:"-"`
	// Order by field and direction.
	//
	// Any of "created.asc", "created.desc", "name.asc", "name.desc", "status.asc",
	// "status.desc".
	OrderBy BaremetalServerListParamsOrderBy `query:"order_by,omitzero" json:"-"`
	// Filter result by DDoS protection_status. Effective only with with_ddos set to
	// true. (Active, Queued or Error)
	//
	// Any of "Active", "Queued", "Error".
	ProtectionStatus BaremetalServerListParamsProtectionStatus `query:"protection_status,omitzero" json:"-"`
	// Filters instances by a server status, as a string.
	//
	// Any of "ACTIVE", "BUILD", "ERROR", "HARD_REBOOT", "REBOOT", "REBUILD", "RESCUE",
	// "SHUTOFF", "SUSPENDED".
	Status BaremetalServerListParamsStatus `query:"status,omitzero" json:"-"`
	// Optional. Filter by tag values. ?tag_value=value1&tag_value=value2
	TagValue []string `query:"tag_value,omitzero" json:"-"`
	// Return bare metals either only with advanced or only basic DDoS protection.
	// Effective only with with_ddos set to true. (advanced or basic)
	//
	// Any of "basic", "advanced".
	TypeDDOSProfile BaremetalServerListParamsTypeDDOSProfile `query:"type_ddos_profile,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (BaremetalServerListParams) URLQuery

func (r BaremetalServerListParams) URLQuery() (v url.Values, err error)

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

type BaremetalServerListParamsOrderBy

type BaremetalServerListParamsOrderBy string

Order by field and direction.

const (
	BaremetalServerListParamsOrderByCreatedAsc  BaremetalServerListParamsOrderBy = "created.asc"
	BaremetalServerListParamsOrderByCreatedDesc BaremetalServerListParamsOrderBy = "created.desc"
	BaremetalServerListParamsOrderByNameAsc     BaremetalServerListParamsOrderBy = "name.asc"
	BaremetalServerListParamsOrderByNameDesc    BaremetalServerListParamsOrderBy = "name.desc"
	BaremetalServerListParamsOrderByStatusAsc   BaremetalServerListParamsOrderBy = "status.asc"
	BaremetalServerListParamsOrderByStatusDesc  BaremetalServerListParamsOrderBy = "status.desc"
)

type BaremetalServerListParamsProtectionStatus

type BaremetalServerListParamsProtectionStatus string

Filter result by DDoS protection_status. Effective only with with_ddos set to true. (Active, Queued or Error)

const (
	BaremetalServerListParamsProtectionStatusActive BaremetalServerListParamsProtectionStatus = "Active"
	BaremetalServerListParamsProtectionStatusQueued BaremetalServerListParamsProtectionStatus = "Queued"
	BaremetalServerListParamsProtectionStatusError  BaremetalServerListParamsProtectionStatus = "Error"
)

type BaremetalServerListParamsStatus

type BaremetalServerListParamsStatus string

Filters instances by a server status, as a string.

const (
	BaremetalServerListParamsStatusActive     BaremetalServerListParamsStatus = "ACTIVE"
	BaremetalServerListParamsStatusBuild      BaremetalServerListParamsStatus = "BUILD"
	BaremetalServerListParamsStatusError      BaremetalServerListParamsStatus = "ERROR"
	BaremetalServerListParamsStatusHardReboot BaremetalServerListParamsStatus = "HARD_REBOOT"
	BaremetalServerListParamsStatusReboot     BaremetalServerListParamsStatus = "REBOOT"
	BaremetalServerListParamsStatusRebuild    BaremetalServerListParamsStatus = "REBUILD"
	BaremetalServerListParamsStatusRescue     BaremetalServerListParamsStatus = "RESCUE"
	BaremetalServerListParamsStatusShutoff    BaremetalServerListParamsStatus = "SHUTOFF"
	BaremetalServerListParamsStatusSuspended  BaremetalServerListParamsStatus = "SUSPENDED"
)

type BaremetalServerListParamsTypeDDOSProfile

type BaremetalServerListParamsTypeDDOSProfile string

Return bare metals either only with advanced or only basic DDoS protection. Effective only with with_ddos set to true. (advanced or basic)

const (
	BaremetalServerListParamsTypeDDOSProfileBasic    BaremetalServerListParamsTypeDDOSProfile = "basic"
	BaremetalServerListParamsTypeDDOSProfileAdvanced BaremetalServerListParamsTypeDDOSProfile = "advanced"
)

type BaremetalServerNewParams

type BaremetalServerNewParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// The flavor of the instance.
	Flavor string `json:"flavor,required"`
	// A list of network interfaces for the server. You can create one or more
	// interfaces - private, public, or both.
	Interfaces []BaremetalServerNewParamsInterfaceUnion `json:"interfaces,omitzero,required"`
	// Specifies the name of the SSH keypair, created via the
	// <a href="#operation/SSHKeyCollectionViewSet.post">/v1/ssh_keys endpoint</a>.
	SSHKeyName param.Opt[string] `json:"ssh_key_name,omitzero"`
	// Apptemplate ID. Either `image_id` or `apptemplate_id` is required.
	ApptemplateID param.Opt[string] `json:"apptemplate_id,omitzero"`
	// Image ID. Either `image_id` or `apptemplate_id` is required.
	ImageID param.Opt[string] `json:"image_id,omitzero" format:"uuid4"`
	// Server name.
	Name param.Opt[string] `json:"name,omitzero"`
	// If you want server names to be automatically generated based on IP addresses,
	// you can provide a name template instead of specifying the name manually. The
	// template should include a placeholder that will be replaced during provisioning.
	// Supported placeholders are: `{ip_octets}` (last 3 octets of the IP),
	// `{two_ip_octets}`, and `{one_ip_octet}`.
	NameTemplate param.Opt[string] `json:"name_template,omitzero"`
	// For Linux instances, 'username' and 'password' are used to create a new user.
	// When only 'password' is provided, it is set as the password for the default user
	// of the image. For Windows instances, 'username' cannot be specified. Use the
	// 'password' field to set the password for the 'Admin' user on Windows. Use the
	// 'user_data' field to provide a script to create new users on Windows. The
	// password of the Admin user cannot be updated via 'user_data'.
	Password param.Opt[string] `json:"password,omitzero"`
	// String in base64 format. For Linux instances, 'user_data' is ignored when
	// 'password' field is provided. For Windows instances, Admin user password is set
	// by 'password' field and cannot be updated via 'user_data'. Examples of the
	// user_data: https://cloudinit.readthedocs.io/en/latest/topics/examples.html
	UserData param.Opt[string] `json:"user_data,omitzero"`
	// For Linux instances, 'username' and 'password' are used to create a new user.
	// For Windows instances, 'username' cannot be specified. Use 'password' field to
	// set the password for the 'Admin' user on Windows.
	Username param.Opt[string] `json:"username,omitzero"`
	// Parameters for the application template if creating the instance from an
	// `apptemplate`.
	AppConfig any `json:"app_config,omitzero"`
	// Enable advanced DDoS protection for the server
	DDOSProfile BaremetalServerNewParamsDDOSProfile `json:"ddos_profile,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// contains filtered or unexported fields
}

func (BaremetalServerNewParams) MarshalJSON

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

type BaremetalServerNewParamsDDOSProfile

type BaremetalServerNewParamsDDOSProfile struct {
	// DDoS profile template ID
	ProfileTemplate int64 `json:"profile_template,required"`
	// DDoS profile template name
	ProfileTemplateName param.Opt[string] `json:"profile_template_name,omitzero"`
	// DDoS profile parameters
	Fields []BaremetalServerNewParamsDDOSProfileField `json:"fields,omitzero"`
	// contains filtered or unexported fields
}

Enable advanced DDoS protection for the server

The property ProfileTemplate is required.

func (BaremetalServerNewParamsDDOSProfile) MarshalJSON

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

type BaremetalServerNewParamsDDOSProfileField

type BaremetalServerNewParamsDDOSProfileField struct {
	// ID of DDoS profile field
	BaseField param.Opt[int64] `json:"base_field,omitzero"`
	// Name of DDoS profile field
	FieldName param.Opt[string] `json:"field_name,omitzero"`
	// Basic type value. Only one of 'value' or 'field_value' must be specified.
	Value param.Opt[string] `json:"value,omitzero"`
	// Complex value. Only one of 'value' or 'field_value' must be specified.
	FieldValue BaremetalServerNewParamsDDOSProfileFieldFieldValueUnion `json:"field_value,omitzero"`
	// contains filtered or unexported fields
}

func (BaremetalServerNewParamsDDOSProfileField) MarshalJSON

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

type BaremetalServerNewParamsDDOSProfileFieldFieldValueUnion

type BaremetalServerNewParamsDDOSProfileFieldFieldValueUnion struct {
	OfAnyArray []any             `json:",omitzero,inline"`
	OfInt      param.Opt[int64]  `json:",omitzero,inline"`
	OfString   param.Opt[string] `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (BaremetalServerNewParamsDDOSProfileFieldFieldValueUnion) MarshalJSON

type BaremetalServerNewParamsInterfaceAnySubnet

type BaremetalServerNewParamsInterfaceAnySubnet struct {
	// The network where the instance will be connected.
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// Interface name. Defaults to `null` and is returned as `null` in the API response
	// if not set.
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// You can specify a specific IP address from your subnet.
	IPAddress param.Opt[string] `json:"ip_address,omitzero" format:"ipvanyaddress"`
	// Specifies the trunk group to which this interface belongs. Applicable only for
	// bare metal servers. Each unique port group is mapped to a separate trunk port.
	// Use this to control how interfaces are grouped across trunks.
	PortGroup param.Opt[int64] `json:"port_group,omitzero"`
	// Allows the instance to have a public IP that can be reached from the internet.
	FloatingIP BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion `json:"floating_ip,omitzero"`
	// Specify `ipv4`, `ipv6`, or `dual` to enable both.
	//
	// Any of "dual", "ipv4", "ipv6".
	IPFamily InterfaceIPFamily `json:"ip_family,omitzero"`
	// Instance will be attached to a subnet with the largest count of free IPs.
	//
	// This field can be elided, and will marshal its zero value as "any_subnet".
	Type constant.AnySubnet `json:"type,required"`
	// contains filtered or unexported fields
}

The properties NetworkID, Type are required.

func (BaremetalServerNewParamsInterfaceAnySubnet) MarshalJSON

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

type BaremetalServerNewParamsInterfaceAnySubnetFloatingIPExisting

type BaremetalServerNewParamsInterfaceAnySubnetFloatingIPExisting struct {
	// An existing available floating IP id must be specified if the source is set to
	// `existing`
	ExistingFloatingID string `json:"existing_floating_id,required" format:"uuid4"`
	// An existing available floating IP will be attached to the instance. A floating
	// IP is a public IP that makes the instance accessible from the internet, even if
	// it only has a private IP. It works like SNAT, allowing outgoing and incoming
	// traffic.
	//
	// This field can be elided, and will marshal its zero value as "existing".
	Source constant.Existing `json:"source,required"`
	// contains filtered or unexported fields
}

The properties ExistingFloatingID, Source are required.

func (BaremetalServerNewParamsInterfaceAnySubnetFloatingIPExisting) MarshalJSON

type BaremetalServerNewParamsInterfaceAnySubnetFloatingIPNew

type BaremetalServerNewParamsInterfaceAnySubnetFloatingIPNew struct {
	// A new floating IP will be created and attached to the instance. A floating IP is
	// a public IP that makes the instance accessible from the internet, even if it
	// only has a private IP. It works like SNAT, allowing outgoing and incoming
	// traffic.
	Source constant.New `json:"source,required"`
	// contains filtered or unexported fields
}

This struct has a constant value, construct it with NewBaremetalServerNewParamsInterfaceAnySubnetFloatingIPNew.

func (BaremetalServerNewParamsInterfaceAnySubnetFloatingIPNew) MarshalJSON

type BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion

type BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion struct {
	OfNew      *BaremetalServerNewParamsInterfaceAnySubnetFloatingIPNew      `json:",omitzero,inline"`
	OfExisting *BaremetalServerNewParamsInterfaceAnySubnetFloatingIPExisting `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion) GetExistingFloatingID

Returns a pointer to the underlying variant's property, if present.

func (BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion) GetSource

Returns a pointer to the underlying variant's property, if present.

func (BaremetalServerNewParamsInterfaceAnySubnetFloatingIPUnion) MarshalJSON

type BaremetalServerNewParamsInterfaceExternal

type BaremetalServerNewParamsInterfaceExternal struct {
	// Interface name. Defaults to `null` and is returned as `null` in the API response
	// if not set.
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// Specifies the trunk group to which this interface belongs. Applicable only for
	// bare metal servers. Each unique port group is mapped to a separate trunk port.
	// Use this to control how interfaces are grouped across trunks.
	PortGroup param.Opt[int64] `json:"port_group,omitzero"`
	// Specify `ipv4`, `ipv6`, or `dual` to enable both.
	//
	// Any of "dual", "ipv4", "ipv6".
	IPFamily InterfaceIPFamily `json:"ip_family,omitzero"`
	// A public IP address will be assigned to the instance.
	//
	// This field can be elided, and will marshal its zero value as "external".
	Type constant.External `json:"type,required"`
	// contains filtered or unexported fields
}

Instance will be attached to default external network

The property Type is required.

func (BaremetalServerNewParamsInterfaceExternal) MarshalJSON

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

type BaremetalServerNewParamsInterfaceReservedFixedIP

type BaremetalServerNewParamsInterfaceReservedFixedIP struct {
	// Network ID the subnet belongs to. Port will be plugged in this network.
	PortID string `json:"port_id,required"`
	// Interface name. Defaults to `null` and is returned as `null` in the API response
	// if not set.
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// Specifies the trunk group to which this interface belongs. Applicable only for
	// bare metal servers. Each unique port group is mapped to a separate trunk port.
	// Use this to control how interfaces are grouped across trunks.
	PortGroup param.Opt[int64] `json:"port_group,omitzero"`
	// Allows the instance to have a public IP that can be reached from the internet.
	FloatingIP BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion `json:"floating_ip,omitzero"`
	// An existing available reserved fixed IP will be attached to the instance. If the
	// reserved IP is not public and you choose to add a floating IP, the instance will
	// be accessible from the internet.
	//
	// This field can be elided, and will marshal its zero value as
	// "reserved_fixed_ip".
	Type constant.ReservedFixedIP `json:"type,required"`
	// contains filtered or unexported fields
}

The properties PortID, Type are required.

func (BaremetalServerNewParamsInterfaceReservedFixedIP) MarshalJSON

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

type BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPExisting

type BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPExisting struct {
	// An existing available floating IP id must be specified if the source is set to
	// `existing`
	ExistingFloatingID string `json:"existing_floating_id,required" format:"uuid4"`
	// An existing available floating IP will be attached to the instance. A floating
	// IP is a public IP that makes the instance accessible from the internet, even if
	// it only has a private IP. It works like SNAT, allowing outgoing and incoming
	// traffic.
	//
	// This field can be elided, and will marshal its zero value as "existing".
	Source constant.Existing `json:"source,required"`
	// contains filtered or unexported fields
}

The properties ExistingFloatingID, Source are required.

func (BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPExisting) MarshalJSON

type BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPNew

type BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPNew struct {
	// A new floating IP will be created and attached to the instance. A floating IP is
	// a public IP that makes the instance accessible from the internet, even if it
	// only has a private IP. It works like SNAT, allowing outgoing and incoming
	// traffic.
	Source constant.New `json:"source,required"`
	// contains filtered or unexported fields
}

This struct has a constant value, construct it with NewBaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPNew.

func (BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPNew) MarshalJSON

type BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion

type BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion struct {
	OfNew      *BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPNew      `json:",omitzero,inline"`
	OfExisting *BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPExisting `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion) GetExistingFloatingID

Returns a pointer to the underlying variant's property, if present.

func (BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion) GetSource

Returns a pointer to the underlying variant's property, if present.

func (BaremetalServerNewParamsInterfaceReservedFixedIPFloatingIPUnion) MarshalJSON

type BaremetalServerNewParamsInterfaceSubnet

type BaremetalServerNewParamsInterfaceSubnet struct {
	// The network where the instance will be connected.
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// The instance will get an IP address from this subnet.
	SubnetID string `json:"subnet_id,required" format:"uuid4"`
	// Interface name. Defaults to `null` and is returned as `null` in the API response
	// if not set.
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// Specifies the trunk group to which this interface belongs. Applicable only for
	// bare metal servers. Each unique port group is mapped to a separate trunk port.
	// Use this to control how interfaces are grouped across trunks.
	PortGroup param.Opt[int64] `json:"port_group,omitzero"`
	// Allows the instance to have a public IP that can be reached from the internet.
	FloatingIP BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion `json:"floating_ip,omitzero"`
	// The instance will get an IP address from the selected network. If you choose to
	// add a floating IP, the instance will be reachable from the internet. Otherwise,
	// it will only have a private IP within the network.
	//
	// This field can be elided, and will marshal its zero value as "subnet".
	Type constant.Subnet `json:"type,required"`
	// contains filtered or unexported fields
}

The instance will get an IP address from the selected network. If you choose to add a floating IP, the instance will be reachable from the internet. Otherwise, it will only have a private IP within the network.

The properties NetworkID, SubnetID, Type are required.

func (BaremetalServerNewParamsInterfaceSubnet) MarshalJSON

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

type BaremetalServerNewParamsInterfaceSubnetFloatingIPExisting

type BaremetalServerNewParamsInterfaceSubnetFloatingIPExisting struct {
	// An existing available floating IP id must be specified if the source is set to
	// `existing`
	ExistingFloatingID string `json:"existing_floating_id,required" format:"uuid4"`
	// An existing available floating IP will be attached to the instance. A floating
	// IP is a public IP that makes the instance accessible from the internet, even if
	// it only has a private IP. It works like SNAT, allowing outgoing and incoming
	// traffic.
	//
	// This field can be elided, and will marshal its zero value as "existing".
	Source constant.Existing `json:"source,required"`
	// contains filtered or unexported fields
}

The properties ExistingFloatingID, Source are required.

func (BaremetalServerNewParamsInterfaceSubnetFloatingIPExisting) MarshalJSON

type BaremetalServerNewParamsInterfaceSubnetFloatingIPNew

type BaremetalServerNewParamsInterfaceSubnetFloatingIPNew struct {
	// A new floating IP will be created and attached to the instance. A floating IP is
	// a public IP that makes the instance accessible from the internet, even if it
	// only has a private IP. It works like SNAT, allowing outgoing and incoming
	// traffic.
	Source constant.New `json:"source,required"`
	// contains filtered or unexported fields
}

This struct has a constant value, construct it with NewBaremetalServerNewParamsInterfaceSubnetFloatingIPNew.

func (BaremetalServerNewParamsInterfaceSubnetFloatingIPNew) MarshalJSON

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

type BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion

type BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion struct {
	OfNew      *BaremetalServerNewParamsInterfaceSubnetFloatingIPNew      `json:",omitzero,inline"`
	OfExisting *BaremetalServerNewParamsInterfaceSubnetFloatingIPExisting `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion) GetExistingFloatingID

Returns a pointer to the underlying variant's property, if present.

func (BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion) GetSource

Returns a pointer to the underlying variant's property, if present.

func (BaremetalServerNewParamsInterfaceSubnetFloatingIPUnion) MarshalJSON

type BaremetalServerNewParamsInterfaceUnion

type BaremetalServerNewParamsInterfaceUnion struct {
	OfExternal        *BaremetalServerNewParamsInterfaceExternal        `json:",omitzero,inline"`
	OfSubnet          *BaremetalServerNewParamsInterfaceSubnet          `json:",omitzero,inline"`
	OfAnySubnet       *BaremetalServerNewParamsInterfaceAnySubnet       `json:",omitzero,inline"`
	OfReservedFixedIP *BaremetalServerNewParamsInterfaceReservedFixedIP `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (BaremetalServerNewParamsInterfaceUnion) GetFloatingIP

func (u BaremetalServerNewParamsInterfaceUnion) GetFloatingIP() (res baremetalServerNewParamsInterfaceUnionFloatingIP)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (BaremetalServerNewParamsInterfaceUnion) GetIPAddress

Returns a pointer to the underlying variant's property, if present.

func (BaremetalServerNewParamsInterfaceUnion) GetIPFamily

Returns a pointer to the underlying variant's property, if present.

func (BaremetalServerNewParamsInterfaceUnion) GetInterfaceName

func (u BaremetalServerNewParamsInterfaceUnion) GetInterfaceName() *string

Returns a pointer to the underlying variant's property, if present.

func (BaremetalServerNewParamsInterfaceUnion) GetNetworkID

Returns a pointer to the underlying variant's property, if present.

func (BaremetalServerNewParamsInterfaceUnion) GetPortGroup

Returns a pointer to the underlying variant's property, if present.

func (BaremetalServerNewParamsInterfaceUnion) GetPortID

Returns a pointer to the underlying variant's property, if present.

func (BaremetalServerNewParamsInterfaceUnion) GetSubnetID

Returns a pointer to the underlying variant's property, if present.

func (BaremetalServerNewParamsInterfaceUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (BaremetalServerNewParamsInterfaceUnion) MarshalJSON

func (u BaremetalServerNewParamsInterfaceUnion) MarshalJSON() ([]byte, error)

type BaremetalServerRebuildParams

type BaremetalServerRebuildParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Image ID
	ImageID param.Opt[string] `json:"image_id,omitzero"`
	// String in base64 format. Must not be passed together with 'username' or
	// 'password'. Examples of the user_data:
	// https://cloudinit.readthedocs.io/en/latest/topics/examples.html
	UserData param.Opt[string] `json:"user_data,omitzero"`
	// contains filtered or unexported fields
}

func (BaremetalServerRebuildParams) MarshalJSON

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

type BaremetalServerService

type BaremetalServerService struct {
	Options []option.RequestOption
}

BaremetalServerService contains methods and other services that help with interacting with the gcore API.

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

func NewBaremetalServerService

func NewBaremetalServerService(opts ...option.RequestOption) (r BaremetalServerService)

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

func (*BaremetalServerService) List

List bare metal servers

func (*BaremetalServerService) ListAutoPaging

List bare metal servers

func (*BaremetalServerService) New

For Linux,

  • Use the `user_data` field to provide a <a href=https://cloudinit.readthedocs.io/en/latest/reference/examples.html>cloud-init script</a> in base64 to apply configurations to the instance.
  • Specify the `username` and `password` to create a new user.
  • When only `password` is provided, it is set as the password for the default user of the image.
  • The `user_data` is ignored when the `password` is specified.

For Windows,

  • Use the `user_data` field to provide a <a href=https://cloudbase-init.readthedocs.io/en/latest/userdata.html#cloud-config>cloudbase-init script</a> in base64 to create new users on Windows.
  • Use the `password` field to set the password for the 'Admin' user on Windows.
  • The password of the Admin user cannot be updated via `user_data`.
  • The `username` cannot be specified in the request.

func (*BaremetalServerService) Rebuild

func (r *BaremetalServerService) Rebuild(ctx context.Context, serverID string, params BaremetalServerRebuildParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Rebuild bare metal server

type BaremetalServerStatus

type BaremetalServerStatus string

Bare metal server status

const (
	BaremetalServerStatusActive           BaremetalServerStatus = "ACTIVE"
	BaremetalServerStatusBuild            BaremetalServerStatus = "BUILD"
	BaremetalServerStatusDeleted          BaremetalServerStatus = "DELETED"
	BaremetalServerStatusError            BaremetalServerStatus = "ERROR"
	BaremetalServerStatusHardReboot       BaremetalServerStatus = "HARD_REBOOT"
	BaremetalServerStatusMigrating        BaremetalServerStatus = "MIGRATING"
	BaremetalServerStatusPassword         BaremetalServerStatus = "PASSWORD"
	BaremetalServerStatusPaused           BaremetalServerStatus = "PAUSED"
	BaremetalServerStatusReboot           BaremetalServerStatus = "REBOOT"
	BaremetalServerStatusRebuild          BaremetalServerStatus = "REBUILD"
	BaremetalServerStatusRescue           BaremetalServerStatus = "RESCUE"
	BaremetalServerStatusResize           BaremetalServerStatus = "RESIZE"
	BaremetalServerStatusRevertResize     BaremetalServerStatus = "REVERT_RESIZE"
	BaremetalServerStatusShelved          BaremetalServerStatus = "SHELVED"
	BaremetalServerStatusShelvedOffloaded BaremetalServerStatus = "SHELVED_OFFLOADED"
	BaremetalServerStatusShutoff          BaremetalServerStatus = "SHUTOFF"
	BaremetalServerStatusSoftDeleted      BaremetalServerStatus = "SOFT_DELETED"
	BaremetalServerStatusSuspended        BaremetalServerStatus = "SUSPENDED"
	BaremetalServerStatusUnknown          BaremetalServerStatus = "UNKNOWN"
	BaremetalServerStatusVerifyResize     BaremetalServerStatus = "VERIFY_RESIZE"
)

type BaremetalServerVmState

type BaremetalServerVmState string

Bare metal server state

const (
	BaremetalServerVmStateActive           BaremetalServerVmState = "active"
	BaremetalServerVmStateBuilding         BaremetalServerVmState = "building"
	BaremetalServerVmStateDeleted          BaremetalServerVmState = "deleted"
	BaremetalServerVmStateError            BaremetalServerVmState = "error"
	BaremetalServerVmStatePaused           BaremetalServerVmState = "paused"
	BaremetalServerVmStateRescued          BaremetalServerVmState = "rescued"
	BaremetalServerVmStateResized          BaremetalServerVmState = "resized"
	BaremetalServerVmStateShelved          BaremetalServerVmState = "shelved"
	BaremetalServerVmStateShelvedOffloaded BaremetalServerVmState = "shelved_offloaded"
	BaremetalServerVmStateSoftDeleted      BaremetalServerVmState = "soft-deleted"
	BaremetalServerVmStateStopped          BaremetalServerVmState = "stopped"
	BaremetalServerVmStateSuspended        BaremetalServerVmState = "suspended"
)

type BaremetalService

type BaremetalService struct {
	Options []option.RequestOption
	Images  BaremetalImageService
	Flavors BaremetalFlavorService
	Servers BaremetalServerService
}

BaremetalService contains methods and other services that help with interacting with the gcore API.

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

func NewBaremetalService

func NewBaremetalService(opts ...option.RequestOption) (r BaremetalService)

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

type BillingReservation

type BillingReservation struct {
	// Reservation id
	ID int64 `json:"id,required"`
	// Reservation active from date
	ActiveFrom time.Time `json:"active_from,required" format:"date"`
	// Reservation active to date
	ActiveTo time.Time `json:"active_to,required" format:"date"`
	// Name of the billing period, e.g month
	ActivityPeriod string `json:"activity_period,required"`
	// Length of the full reservation period by `activity_period`
	ActivityPeriodLength int64 `json:"activity_period_length,required"`
	// Reservation amount prices
	AmountPrices BillingReservationAmountPrices `json:"amount_prices,required"`
	// Billing plan id
	BillingPlanID int64 `json:"billing_plan_id,required"`
	// Reservation creation date
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Error message if any occured during reservation
	Error string `json:"error,required"`
	// ETA delivery if bare metal out of stock. Value None means that bare metal in
	// stock.
	Eta time.Time `json:"eta,required" format:"date"`
	// Hide or show expiration message to customer.
	IsExpirationMessageVisible bool `json:"is_expiration_message_visible,required"`
	// Reservation name
	Name string `json:"name,required"`
	// List of possible next reservation statuses
	NextStatuses []string `json:"next_statuses,required"`
	// Region id
	RegionID int64 `json:"region_id,required"`
	// Region name
	RegionName string `json:"region_name,required"`
	// The date when show expiration date to customer
	RemindExpirationMessage time.Time `json:"remind_expiration_message,required" format:"date"`
	// List of reservation resources
	Resources []BillingReservationResource `json:"resources,required"`
	// Reservation status
	Status string `json:"status,required"`
	// User status
	UserStatus string `json:"user_status,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                         respjson.Field
		ActiveFrom                 respjson.Field
		ActiveTo                   respjson.Field
		ActivityPeriod             respjson.Field
		ActivityPeriodLength       respjson.Field
		AmountPrices               respjson.Field
		BillingPlanID              respjson.Field
		CreatedAt                  respjson.Field
		Error                      respjson.Field
		Eta                        respjson.Field
		IsExpirationMessageVisible respjson.Field
		Name                       respjson.Field
		NextStatuses               respjson.Field
		RegionID                   respjson.Field
		RegionName                 respjson.Field
		RemindExpirationMessage    respjson.Field
		Resources                  respjson.Field
		Status                     respjson.Field
		UserStatus                 respjson.Field
		ExtraFields                map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BillingReservation) RawJSON

func (r BillingReservation) RawJSON() string

Returns the unmodified JSON received from the API

func (*BillingReservation) UnmarshalJSON

func (r *BillingReservation) UnmarshalJSON(data []byte) error

type BillingReservationAmountPrices

type BillingReservationAmountPrices struct {
	// Commit price of the item charged per month
	CommitPricePerMonth string `json:"commit_price_per_month,required"`
	// Commit price of the item charged per hour
	CommitPricePerUnit string `json:"commit_price_per_unit,required"`
	// Commit price of the item charged for all period reservation
	CommitPriceTotal string `json:"commit_price_total,required"`
	// Currency code (3 letter code per ISO 4217)
	CurrencyCode string `json:"currency_code,required"`
	// Overcommit price of the item charged per month
	OvercommitPricePerMonth string `json:"overcommit_price_per_month,required"`
	// Overcommit price of the item charged per hour
	OvercommitPricePerUnit string `json:"overcommit_price_per_unit,required"`
	// Overcommit price of the item charged for all period reservation
	OvercommitPriceTotal string `json:"overcommit_price_total,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CommitPricePerMonth     respjson.Field
		CommitPricePerUnit      respjson.Field
		CommitPriceTotal        respjson.Field
		CurrencyCode            respjson.Field
		OvercommitPricePerMonth respjson.Field
		OvercommitPricePerUnit  respjson.Field
		OvercommitPriceTotal    respjson.Field
		ExtraFields             map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Reservation amount prices

func (BillingReservationAmountPrices) RawJSON

Returns the unmodified JSON received from the API

func (*BillingReservationAmountPrices) UnmarshalJSON

func (r *BillingReservationAmountPrices) UnmarshalJSON(data []byte) error

type BillingReservationListParams

type BillingReservationListParams struct {
	// Lower bound, starting from what date the reservation was/will be activated
	ActivatedFrom param.Opt[time.Time] `query:"activated_from,omitzero" format:"date" json:"-"`
	// High bound, before what date the reservation was/will be activated
	ActivatedTo param.Opt[time.Time] `query:"activated_to,omitzero" format:"date" json:"-"`
	// Lower bound the filter, showing result(s) equal to or greater than date the
	// reservation was created
	CreatedFrom param.Opt[time.Time] `query:"created_from,omitzero" format:"date-time" json:"-"`
	// High bound the filter, showing result(s) equal to or less date the reservation
	// was created
	CreatedTo param.Opt[time.Time] `query:"created_to,omitzero" format:"date-time" json:"-"`
	// Lower bound, starting from what date the reservation was/will be deactivated
	DeactivatedFrom param.Opt[time.Time] `query:"deactivated_from,omitzero" format:"date" json:"-"`
	// High bound, before what date the reservation was/will be deactivated
	DeactivatedTo param.Opt[time.Time] `query:"deactivated_to,omitzero" format:"date" json:"-"`
	// Limit of reservation list page
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Name from billing features for specific resource
	MetricName param.Opt[string] `query:"metric_name,omitzero" json:"-"`
	// Offset in reservation list
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Region for reservation
	RegionID param.Opt[int64] `query:"region_id,omitzero" json:"-"`
	// Field for fixed a status by reservation workflow
	//
	// Any of "ACTIVATED", "APPROVED", "COPIED", "CREATED", "EXPIRED", "REJECTED",
	// "RESERVED", "WAITING_FOR_PAYMENT".
	Status []string `query:"status,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (BillingReservationListParams) URLQuery

func (r BillingReservationListParams) URLQuery() (v url.Values, err error)

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

type BillingReservationResource

type BillingReservationResource struct {
	// Name of the billing period, e.g month
	ActivityPeriod string `json:"activity_period,required"`
	// Length of the full reservation period by `activity_period`
	ActivityPeriodLength int64 `json:"activity_period_length,required"`
	// Billing plan item id
	BillingPlanItemID int64 `json:"billing_plan_item_id,required"`
	// Commit price of the item charged per month
	CommitPricePerMonth string `json:"commit_price_per_month,required"`
	// Commit price of the item charged per hour
	CommitPricePerUnit string `json:"commit_price_per_unit,required"`
	// Commit price of the item charged for all period reservation
	CommitPriceTotal string `json:"commit_price_total,required"`
	// Overcommit billing plan item id
	OvercommitBillingPlanItemID int64 `json:"overcommit_billing_plan_item_id,required"`
	// Overcommit price of the item charged per month
	OvercommitPricePerMonth string `json:"overcommit_price_per_month,required"`
	// Overcommit price of the item charged per hour
	OvercommitPricePerUnit string `json:"overcommit_price_per_unit,required"`
	// Overcommit price of the item charged for all period reservation
	OvercommitPriceTotal string `json:"overcommit_price_total,required"`
	// Number of reserved resource items
	ResourceCount int64 `json:"resource_count,required"`
	// Resource name
	ResourceName string `json:"resource_name,required"`
	// Resource type
	//
	// Any of "flavor".
	ResourceType string `json:"resource_type,required"`
	// Billing unit name
	UnitName string `json:"unit_name,required"`
	// Minimal billing size, for example it is 744 hours per 1 month.
	UnitSizeMonth string `json:"unit_size_month,required"`
	// Unit size month multiplied by count of resources in the reservation
	UnitSizeTotal string `json:"unit_size_total,required"`
	// Baremetal CPU description
	CPU string `json:"cpu,nullable"`
	// Baremetal disk description
	Disk string `json:"disk,nullable"`
	// Baremetal RAM description
	Ram string `json:"ram,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ActivityPeriod              respjson.Field
		ActivityPeriodLength        respjson.Field
		BillingPlanItemID           respjson.Field
		CommitPricePerMonth         respjson.Field
		CommitPricePerUnit          respjson.Field
		CommitPriceTotal            respjson.Field
		OvercommitBillingPlanItemID respjson.Field
		OvercommitPricePerMonth     respjson.Field
		OvercommitPricePerUnit      respjson.Field
		OvercommitPriceTotal        respjson.Field
		ResourceCount               respjson.Field
		ResourceName                respjson.Field
		ResourceType                respjson.Field
		UnitName                    respjson.Field
		UnitSizeMonth               respjson.Field
		UnitSizeTotal               respjson.Field
		CPU                         respjson.Field
		Disk                        respjson.Field
		Ram                         respjson.Field
		ExtraFields                 map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BillingReservationResource) RawJSON

func (r BillingReservationResource) RawJSON() string

Returns the unmodified JSON received from the API

func (*BillingReservationResource) UnmarshalJSON

func (r *BillingReservationResource) UnmarshalJSON(data []byte) error

type BillingReservationService

type BillingReservationService struct {
	Options []option.RequestOption
}

BillingReservationService contains methods and other services that help with interacting with the gcore API.

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

func NewBillingReservationService

func NewBillingReservationService(opts ...option.RequestOption) (r BillingReservationService)

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

func (*BillingReservationService) Get

func (r *BillingReservationService) Get(ctx context.Context, reservationID int64, opts ...option.RequestOption) (res *BillingReservation, err error)

Get specific reservation

func (*BillingReservationService) List

List reservations

func (*BillingReservationService) ListAutoPaging

List reservations

type BlackholePort

type BlackholePort struct {
	// A date-time string giving the time that the alarm ended
	AlarmEnd time.Time `json:"AlarmEnd,required" format:"date-time"`
	// A date-time string giving the time that the alarm started
	AlarmStart time.Time `json:"AlarmStart,required" format:"date-time"`
	// Current state of alarm
	//
	// Any of "ACK_REQ", "ALARM", "ARCHIVED", "CLEAR", "CLEARING", "CLEARING_FAIL",
	// "END_GRACE", "END_WAIT", "MANUAL_CLEAR", "MANUAL_CLEARING",
	// "MANUAL_CLEARING_FAIL", "MANUAL_MITIGATING", "MANUAL_STARTING",
	// "MANUAL_STARTING_FAIL", "MITIGATING", "STARTING", "STARTING_FAIL", "START_WAIT",
	// "ack_req", "alarm", "archived", "clear", "clearing", "clearing_fail",
	// "end_grace", "end_wait", "manual_clear", "manual_clearing",
	// "manual_clearing_fail", "manual_mitigating", "manual_starting",
	// "manual_starting_fail", "mitigating", "start_wait", "starting", "starting_fail".
	AlarmState BlackholePortAlarmState `json:"AlarmState,required"`
	// Total alert duration
	AlertDuration string `json:"AlertDuration,required"`
	// Notification destination IP address
	DestinationIP string `json:"DestinationIP,required"`
	ID            int64  `json:"ID,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AlarmEnd      respjson.Field
		AlarmStart    respjson.Field
		AlarmState    respjson.Field
		AlertDuration respjson.Field
		DestinationIP respjson.Field
		ID            respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (BlackholePort) RawJSON

func (r BlackholePort) RawJSON() string

Returns the unmodified JSON received from the API

func (*BlackholePort) UnmarshalJSON

func (r *BlackholePort) UnmarshalJSON(data []byte) error

type BlackholePortAlarmState

type BlackholePortAlarmState string

Current state of alarm

const (
	BlackholePortAlarmStateAckReqUppercase             BlackholePortAlarmState = "ACK_REQ"
	BlackholePortAlarmStateAlarmUppercase              BlackholePortAlarmState = "ALARM"
	BlackholePortAlarmStateArchivedUppercase           BlackholePortAlarmState = "ARCHIVED"
	BlackholePortAlarmStateClearUppercase              BlackholePortAlarmState = "CLEAR"
	BlackholePortAlarmStateClearingUppercase           BlackholePortAlarmState = "CLEARING"
	BlackholePortAlarmStateClearingFailUppercase       BlackholePortAlarmState = "CLEARING_FAIL"
	BlackholePortAlarmStateEndGraceUppercase           BlackholePortAlarmState = "END_GRACE"
	BlackholePortAlarmStateEndWaitUppercase            BlackholePortAlarmState = "END_WAIT"
	BlackholePortAlarmStateManualClearUppercase        BlackholePortAlarmState = "MANUAL_CLEAR"
	BlackholePortAlarmStateManualClearingUppercase     BlackholePortAlarmState = "MANUAL_CLEARING"
	BlackholePortAlarmStateManualClearingFailUppercase BlackholePortAlarmState = "MANUAL_CLEARING_FAIL"
	BlackholePortAlarmStateManualMitigatingUppercase   BlackholePortAlarmState = "MANUAL_MITIGATING"
	BlackholePortAlarmStateManualStartingUppercase     BlackholePortAlarmState = "MANUAL_STARTING"
	BlackholePortAlarmStateManualStartingFailUppercase BlackholePortAlarmState = "MANUAL_STARTING_FAIL"
	BlackholePortAlarmStateMitigatingUppercase         BlackholePortAlarmState = "MITIGATING"
	BlackholePortAlarmStateStartingUppercase           BlackholePortAlarmState = "STARTING"
	BlackholePortAlarmStateStartingFailUppercase       BlackholePortAlarmState = "STARTING_FAIL"
	BlackholePortAlarmStateStartWaitUppercase          BlackholePortAlarmState = "START_WAIT"
	BlackholePortAlarmStateAckReq                      BlackholePortAlarmState = "ack_req"
	BlackholePortAlarmStateAlarm                       BlackholePortAlarmState = "alarm"
	BlackholePortAlarmStateArchived                    BlackholePortAlarmState = "archived"
	BlackholePortAlarmStateClear                       BlackholePortAlarmState = "clear"
	BlackholePortAlarmStateClearing                    BlackholePortAlarmState = "clearing"
	BlackholePortAlarmStateClearingFail                BlackholePortAlarmState = "clearing_fail"
	BlackholePortAlarmStateEndGrace                    BlackholePortAlarmState = "end_grace"
	BlackholePortAlarmStateEndWait                     BlackholePortAlarmState = "end_wait"
	BlackholePortAlarmStateManualClear                 BlackholePortAlarmState = "manual_clear"
	BlackholePortAlarmStateManualClearing              BlackholePortAlarmState = "manual_clearing"
	BlackholePortAlarmStateManualClearingFail          BlackholePortAlarmState = "manual_clearing_fail"
	BlackholePortAlarmStateManualMitigating            BlackholePortAlarmState = "manual_mitigating"
	BlackholePortAlarmStateManualStarting              BlackholePortAlarmState = "manual_starting"
	BlackholePortAlarmStateManualStartingFail          BlackholePortAlarmState = "manual_starting_fail"
	BlackholePortAlarmStateMitigating                  BlackholePortAlarmState = "mitigating"
	BlackholePortAlarmStateStartWait                   BlackholePortAlarmState = "start_wait"
	BlackholePortAlarmStateStarting                    BlackholePortAlarmState = "starting"
	BlackholePortAlarmStateStartingFail                BlackholePortAlarmState = "starting_fail"
)

type CandidatePort

type CandidatePort struct {
	// ID of the instance that owns the port
	InstanceID string `json:"instance_id,required" format:"uuid4"`
	// Name of the instance that owns the port
	InstanceName string `json:"instance_name,required"`
	// IP addresses assigned to this port
	IPAssignments []IPWithSubnet `json:"ip_assignments,required"`
	// Network details
	Network Network `json:"network,required"`
	// Port ID that shares VIP
	PortID string `json:"port_id,required" format:"uuid4"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		InstanceID    respjson.Field
		InstanceName  respjson.Field
		IPAssignments respjson.Field
		Network       respjson.Field
		PortID        respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CandidatePort) RawJSON

func (r CandidatePort) RawJSON() string

Returns the unmodified JSON received from the API

func (*CandidatePort) UnmarshalJSON

func (r *CandidatePort) UnmarshalJSON(data []byte) error

type CandidatePortList

type CandidatePortList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []CandidatePort `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (CandidatePortList) RawJSON

func (r CandidatePortList) RawJSON() string

Returns the unmodified JSON received from the API

func (*CandidatePortList) UnmarshalJSON

func (r *CandidatePortList) UnmarshalJSON(data []byte) error

type Capacity

type Capacity struct {
	// Available capacity.
	Capacity int64 `json:"capacity,required"`
	// Flavor name.
	FlavorName string `json:"flavor_name,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Capacity    respjson.Field
		FlavorName  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Capacity) RawJSON

func (r Capacity) RawJSON() string

Returns the unmodified JSON received from the API

func (*Capacity) UnmarshalJSON

func (r *Capacity) UnmarshalJSON(data []byte) error

type CloudService

type CloudService struct {
	Options              []option.RequestOption
	Projects             ProjectService
	Tasks                TaskService
	Regions              RegionService
	Quotas               QuotaService
	Secrets              SecretService
	SSHKeys              SSHKeyService
	IPRanges             IPRangeService
	LoadBalancers        LoadBalancerService
	ReservedFixedIPs     ReservedFixedIPService
	Networks             NetworkService
	Volumes              VolumeService
	FloatingIPs          FloatingIPService
	SecurityGroups       SecurityGroupService
	Users                UserService
	Inference            InferenceService
	PlacementGroups      PlacementGroupService
	Baremetal            BaremetalService
	Registries           RegistryService
	FileShares           FileShareService
	BillingReservations  BillingReservationService
	GPUBaremetalClusters GPUBaremetalClusterService
	Instances            InstanceService
}

CloudService contains methods and other services that help with interacting with the gcore API.

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

func NewCloudService

func NewCloudService(opts ...option.RequestOption) (r CloudService)

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

type ConnectedPort

type ConnectedPort struct {
	// ID of the instance that owns the port
	InstanceID string `json:"instance_id,required" format:"uuid4"`
	// Name of the instance that owns the port
	InstanceName string `json:"instance_name,required"`
	// IP addresses assigned to this port
	IPAssignments []IPWithSubnet `json:"ip_assignments,required"`
	// Network details
	Network Network `json:"network,required"`
	// Port ID that shares VIP
	PortID string `json:"port_id,required" format:"uuid4"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		InstanceID    respjson.Field
		InstanceName  respjson.Field
		IPAssignments respjson.Field
		Network       respjson.Field
		PortID        respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ConnectedPort) RawJSON

func (r ConnectedPort) RawJSON() string

Returns the unmodified JSON received from the API

func (*ConnectedPort) UnmarshalJSON

func (r *ConnectedPort) UnmarshalJSON(data []byte) error

type ConnectedPortList

type ConnectedPortList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []ConnectedPort `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ConnectedPortList) RawJSON

func (r ConnectedPortList) RawJSON() string

Returns the unmodified JSON received from the API

func (*ConnectedPortList) UnmarshalJSON

func (r *ConnectedPortList) UnmarshalJSON(data []byte) error

type Console

type Console struct {
	// Remote console information
	RemoteConsole ConsoleRemoteConsole `json:"remote_console,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		RemoteConsole respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Console) RawJSON

func (r Console) RawJSON() string

Returns the unmodified JSON received from the API

func (*Console) UnmarshalJSON

func (r *Console) UnmarshalJSON(data []byte) error

type ConsoleRemoteConsole

type ConsoleRemoteConsole struct {
	Protocol string `json:"protocol,required"`
	Type     string `json:"type,required"`
	URL      string `json:"url,required" format:"uri"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Protocol    respjson.Field
		Type        respjson.Field
		URL         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Remote console information

func (ConsoleRemoteConsole) RawJSON

func (r ConsoleRemoteConsole) RawJSON() string

Returns the unmodified JSON received from the API

func (*ConsoleRemoteConsole) UnmarshalJSON

func (r *ConsoleRemoteConsole) UnmarshalJSON(data []byte) error

type Container

type Container struct {
	// Address of the inference instance
	Address string `json:"address,required" format:"uri"`
	// Status of the containers deployment
	DeployStatus DeployStatus `json:"deploy_status,required"`
	// Error message if the container deployment failed
	ErrorMessage string `json:"error_message,required"`
	// Region name for the container
	RegionID int64 `json:"region_id,required"`
	// Scale for the container
	Scale ContainerScale `json:"scale,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Address      respjson.Field
		DeployStatus respjson.Field
		ErrorMessage respjson.Field
		RegionID     respjson.Field
		Scale        respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Container) RawJSON

func (r Container) RawJSON() string

Returns the unmodified JSON received from the API

func (*Container) UnmarshalJSON

func (r *Container) UnmarshalJSON(data []byte) error

type ContainerProbe

type ContainerProbe struct {
	// Exec probe configuration
	Exec ContainerProbeExec `json:"exec,required"`
	// The number of consecutive probe failures that mark the container as unhealthy.
	FailureThreshold int64 `json:"failure_threshold,required"`
	// HTTP GET probe configuration
	HTTPGet ContainerProbeHTTPGet `json:"http_get,required"`
	// The initial delay before starting the first probe.
	InitialDelaySeconds int64 `json:"initial_delay_seconds,required"`
	// How often (in seconds) to perform the probe.
	PeriodSeconds int64 `json:"period_seconds,required"`
	// The number of consecutive successful probes that mark the container as healthy.
	SuccessThreshold int64 `json:"success_threshold,required"`
	// TCP socket probe configuration
	TcpSocket ContainerProbeTcpSocket `json:"tcp_socket,required"`
	// The timeout for each probe.
	TimeoutSeconds int64 `json:"timeout_seconds,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Exec                respjson.Field
		FailureThreshold    respjson.Field
		HTTPGet             respjson.Field
		InitialDelaySeconds respjson.Field
		PeriodSeconds       respjson.Field
		SuccessThreshold    respjson.Field
		TcpSocket           respjson.Field
		TimeoutSeconds      respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContainerProbe) RawJSON

func (r ContainerProbe) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContainerProbe) UnmarshalJSON

func (r *ContainerProbe) UnmarshalJSON(data []byte) error

type ContainerProbeConfig

type ContainerProbeConfig struct {
	// Whether the probe is enabled or not.
	Enabled bool `json:"enabled,required"`
	// Probe configuration (exec, http_get or tcp_socket)
	Probe ContainerProbe `json:"probe,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Enabled     respjson.Field
		Probe       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContainerProbeConfig) RawJSON

func (r ContainerProbeConfig) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContainerProbeConfig) UnmarshalJSON

func (r *ContainerProbeConfig) UnmarshalJSON(data []byte) error

type ContainerProbeConfigCreateParam

type ContainerProbeConfigCreateParam struct {
	// Whether the probe is enabled or not.
	Enabled bool `json:"enabled,required"`
	// Probe configuration (exec, http_get or tcp_socket)
	Probe ContainerProbeCreateParam `json:"probe,omitzero"`
	// contains filtered or unexported fields
}

The property Enabled is required.

func (ContainerProbeConfigCreateParam) MarshalJSON

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

type ContainerProbeCreateParam

type ContainerProbeCreateParam struct {
	// The number of consecutive probe failures that mark the container as unhealthy.
	FailureThreshold param.Opt[int64] `json:"failure_threshold,omitzero"`
	// The initial delay before starting the first probe.
	InitialDelaySeconds param.Opt[int64] `json:"initial_delay_seconds,omitzero"`
	// How often (in seconds) to perform the probe.
	PeriodSeconds param.Opt[int64] `json:"period_seconds,omitzero"`
	// The number of consecutive successful probes that mark the container as healthy.
	SuccessThreshold param.Opt[int64] `json:"success_threshold,omitzero"`
	// The timeout for each probe.
	TimeoutSeconds param.Opt[int64] `json:"timeout_seconds,omitzero"`
	// Exec probe configuration
	Exec ContainerProbeExecCreateParam `json:"exec,omitzero"`
	// HTTP GET probe configuration
	HTTPGet ContainerProbeHTTPGetCreateParam `json:"http_get,omitzero"`
	// TCP socket probe configuration
	TcpSocket ContainerProbeTcpSocketCreateParam `json:"tcp_socket,omitzero"`
	// contains filtered or unexported fields
}

func (ContainerProbeCreateParam) MarshalJSON

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

type ContainerProbeExec

type ContainerProbeExec struct {
	// Command to be executed inside the running container.
	Command []string `json:"command,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Command     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContainerProbeExec) RawJSON

func (r ContainerProbeExec) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContainerProbeExec) UnmarshalJSON

func (r *ContainerProbeExec) UnmarshalJSON(data []byte) error

type ContainerProbeExecCreateParam

type ContainerProbeExecCreateParam struct {
	// Command to be executed inside the running container.
	Command []string `json:"command,omitzero,required"`
	// contains filtered or unexported fields
}

The property Command is required.

func (ContainerProbeExecCreateParam) MarshalJSON

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

type ContainerProbeHTTPGet

type ContainerProbeHTTPGet struct {
	// HTTP headers to be sent with the request.
	Headers map[string]string `json:"headers,required"`
	// Host name to send HTTP request to.
	Host string `json:"host,required"`
	// The endpoint to send the HTTP request to.
	Path string `json:"path,required"`
	// Port number the probe should connect to.
	Port int64 `json:"port,required"`
	// Schema to use for the HTTP request.
	Schema string `json:"schema,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Headers     respjson.Field
		Host        respjson.Field
		Path        respjson.Field
		Port        respjson.Field
		Schema      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContainerProbeHTTPGet) RawJSON

func (r ContainerProbeHTTPGet) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContainerProbeHTTPGet) UnmarshalJSON

func (r *ContainerProbeHTTPGet) UnmarshalJSON(data []byte) error

type ContainerProbeHTTPGetCreateParam

type ContainerProbeHTTPGetCreateParam struct {
	// Port number the probe should connect to.
	Port int64 `json:"port,required"`
	// Host name to send HTTP request to.
	Host param.Opt[string] `json:"host,omitzero"`
	// The endpoint to send the HTTP request to.
	Path param.Opt[string] `json:"path,omitzero"`
	// Schema to use for the HTTP request.
	Schema param.Opt[string] `json:"schema,omitzero"`
	// HTTP headers to be sent with the request.
	Headers map[string]string `json:"headers,omitzero"`
	// contains filtered or unexported fields
}

The property Port is required.

func (ContainerProbeHTTPGetCreateParam) MarshalJSON

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

type ContainerProbeTcpSocket

type ContainerProbeTcpSocket struct {
	// Port number to check if it's open.
	Port int64 `json:"port,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Port        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContainerProbeTcpSocket) RawJSON

func (r ContainerProbeTcpSocket) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContainerProbeTcpSocket) UnmarshalJSON

func (r *ContainerProbeTcpSocket) UnmarshalJSON(data []byte) error

type ContainerProbeTcpSocketCreateParam

type ContainerProbeTcpSocketCreateParam struct {
	// Port number to check if it's open.
	Port int64 `json:"port,required"`
	// contains filtered or unexported fields
}

The property Port is required.

func (ContainerProbeTcpSocketCreateParam) MarshalJSON

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

type ContainerScale

type ContainerScale struct {
	// Cooldown period between scaling actions in seconds
	CooldownPeriod int64 `json:"cooldown_period,required"`
	// Maximum scale for the container
	Max int64 `json:"max,required"`
	// Minimum scale for the container
	Min int64 `json:"min,required"`
	// Polling interval for scaling triggers in seconds
	PollingInterval int64 `json:"polling_interval,required"`
	// Triggers for scaling actions
	Triggers ContainerScaleTriggers `json:"triggers,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CooldownPeriod  respjson.Field
		Max             respjson.Field
		Min             respjson.Field
		PollingInterval respjson.Field
		Triggers        respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContainerScale) RawJSON

func (r ContainerScale) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContainerScale) UnmarshalJSON

func (r *ContainerScale) UnmarshalJSON(data []byte) error

type ContainerScaleTriggerRate

type ContainerScaleTriggerRate struct {
	// Request count per 'window' seconds for the http trigger
	Rate int64 `json:"rate,required"`
	// Time window for rate calculation in seconds
	Window int64 `json:"window,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Rate        respjson.Field
		Window      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContainerScaleTriggerRate) RawJSON

func (r ContainerScaleTriggerRate) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContainerScaleTriggerRate) UnmarshalJSON

func (r *ContainerScaleTriggerRate) UnmarshalJSON(data []byte) error

type ContainerScaleTriggerSqs

type ContainerScaleTriggerSqs struct {
	// Number of messages for activation
	ActivationQueueLength int64 `json:"activation_queue_length,required"`
	// Custom AWS endpoint
	AwsEndpoint string `json:"aws_endpoint,required"`
	// AWS region
	AwsRegion string `json:"aws_region,required"`
	// Number of messages for one replica
	QueueLength int64 `json:"queue_length,required"`
	// SQS queue URL
	QueueURL string `json:"queue_url,required"`
	// Scale on delayed messages
	ScaleOnDelayed bool `json:"scale_on_delayed,required"`
	// Scale on in-flight messages
	ScaleOnFlight bool `json:"scale_on_flight,required"`
	// Auth secret name
	SecretName string `json:"secret_name,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ActivationQueueLength respjson.Field
		AwsEndpoint           respjson.Field
		AwsRegion             respjson.Field
		QueueLength           respjson.Field
		QueueURL              respjson.Field
		ScaleOnDelayed        respjson.Field
		ScaleOnFlight         respjson.Field
		SecretName            respjson.Field
		ExtraFields           map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContainerScaleTriggerSqs) RawJSON

func (r ContainerScaleTriggerSqs) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContainerScaleTriggerSqs) UnmarshalJSON

func (r *ContainerScaleTriggerSqs) UnmarshalJSON(data []byte) error

type ContainerScaleTriggerThreshold

type ContainerScaleTriggerThreshold struct {
	// Threshold value for the trigger in percentage
	Threshold int64 `json:"threshold,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Threshold   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContainerScaleTriggerThreshold) RawJSON

Returns the unmodified JSON received from the API

func (*ContainerScaleTriggerThreshold) UnmarshalJSON

func (r *ContainerScaleTriggerThreshold) UnmarshalJSON(data []byte) error

type ContainerScaleTriggers

type ContainerScaleTriggers struct {
	// CPU trigger configuration
	CPU ContainerScaleTriggerThreshold `json:"cpu,required"`
	// GPU memory trigger configuration. Calculated by DCGM_FI_DEV_MEM_COPY_UTIL metric
	GPUMemory ContainerScaleTriggerThreshold `json:"gpu_memory,required"`
	// GPU utilization trigger configuration. Calculated by DCGM_FI_DEV_GPU_UTIL metric
	GPUUtilization ContainerScaleTriggerThreshold `json:"gpu_utilization,required"`
	// HTTP trigger configuration
	HTTP ContainerScaleTriggerRate `json:"http,required"`
	// Memory trigger configuration
	Memory ContainerScaleTriggerThreshold `json:"memory,required"`
	// SQS trigger configuration
	Sqs ContainerScaleTriggerSqs `json:"sqs,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CPU            respjson.Field
		GPUMemory      respjson.Field
		GPUUtilization respjson.Field
		HTTP           respjson.Field
		Memory         respjson.Field
		Sqs            respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ContainerScaleTriggers) RawJSON

func (r ContainerScaleTriggers) RawJSON() string

Returns the unmodified JSON received from the API

func (*ContainerScaleTriggers) UnmarshalJSON

func (r *ContainerScaleTriggers) UnmarshalJSON(data []byte) error

type DDOSProfile

type DDOSProfile struct {
	// DDoS protection profile ID
	ID int64 `json:"id,required"`
	// Template data
	ProfileTemplate DDOSProfileTemplate   `json:"profile_template,required"`
	Fields          []DDOSProfileField    `json:"fields"`
	Options         DDOSProfileOptionList `json:"options,nullable"`
	// DDoS profile template description
	ProfileTemplateDescription string `json:"profile_template_description,nullable"`
	// List of protocols
	Protocols []any             `json:"protocols,nullable"`
	Site      string            `json:"site,nullable"`
	Status    DDOSProfileStatus `json:"status,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                         respjson.Field
		ProfileTemplate            respjson.Field
		Fields                     respjson.Field
		Options                    respjson.Field
		ProfileTemplateDescription respjson.Field
		Protocols                  respjson.Field
		Site                       respjson.Field
		Status                     respjson.Field
		ExtraFields                map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (DDOSProfile) RawJSON

func (r DDOSProfile) RawJSON() string

Returns the unmodified JSON received from the API

func (*DDOSProfile) UnmarshalJSON

func (r *DDOSProfile) UnmarshalJSON(data []byte) error

type DDOSProfileField

type DDOSProfileField struct {
	ID               int64  `json:"id,required"`
	Default          any    `json:"default,required"`
	Description      string `json:"description,required"`
	FieldValue       any    `json:"field_value,required"`
	Name             string `json:"name,required"`
	BaseField        int64  `json:"base_field,nullable"`
	FieldName        string `json:"field_name,nullable"`
	FieldType        string `json:"field_type,nullable"`
	Required         bool   `json:"required,nullable"`
	ValidationSchema any    `json:"validation_schema"`
	Value            string `json:"value,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		Default          respjson.Field
		Description      respjson.Field
		FieldValue       respjson.Field
		Name             respjson.Field
		BaseField        respjson.Field
		FieldName        respjson.Field
		FieldType        respjson.Field
		Required         respjson.Field
		ValidationSchema respjson.Field
		Value            respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (DDOSProfileField) RawJSON

func (r DDOSProfileField) RawJSON() string

Returns the unmodified JSON received from the API

func (*DDOSProfileField) UnmarshalJSON

func (r *DDOSProfileField) UnmarshalJSON(data []byte) error

type DDOSProfileOptionList

type DDOSProfileOptionList struct {
	// Activate profile.
	Active bool `json:"active,nullable"`
	// Activate BGP protocol.
	Bgp bool `json:"bgp,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Active      respjson.Field
		Bgp         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (DDOSProfileOptionList) RawJSON

func (r DDOSProfileOptionList) RawJSON() string

Returns the unmodified JSON received from the API

func (*DDOSProfileOptionList) UnmarshalJSON

func (r *DDOSProfileOptionList) UnmarshalJSON(data []byte) error

type DDOSProfileStatus

type DDOSProfileStatus struct {
	// Description of the error, if it exists
	ErrorDescription string `json:"error_description,required"`
	// Profile status
	Status string `json:"status,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ErrorDescription respjson.Field
		Status           respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (DDOSProfileStatus) RawJSON

func (r DDOSProfileStatus) RawJSON() string

Returns the unmodified JSON received from the API

func (*DDOSProfileStatus) UnmarshalJSON

func (r *DDOSProfileStatus) UnmarshalJSON(data []byte) error

type DDOSProfileTemplate

type DDOSProfileTemplate struct {
	ID          int64                      `json:"id,required"`
	Name        string                     `json:"name,required"`
	Description string                     `json:"description,nullable"`
	Fields      []DDOSProfileTemplateField `json:"fields"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Name        respjson.Field
		Description respjson.Field
		Fields      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (DDOSProfileTemplate) RawJSON

func (r DDOSProfileTemplate) RawJSON() string

Returns the unmodified JSON received from the API

func (*DDOSProfileTemplate) UnmarshalJSON

func (r *DDOSProfileTemplate) UnmarshalJSON(data []byte) error

type DDOSProfileTemplateField

type DDOSProfileTemplateField struct {
	ID               int64  `json:"id,required"`
	Name             string `json:"name,required"`
	Default          string `json:"default,nullable"`
	Description      string `json:"description,nullable"`
	FieldType        string `json:"field_type,nullable"`
	Required         bool   `json:"required,nullable"`
	ValidationSchema any    `json:"validation_schema"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		Name             respjson.Field
		Default          respjson.Field
		Description      respjson.Field
		FieldType        respjson.Field
		Required         respjson.Field
		ValidationSchema respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (DDOSProfileTemplateField) RawJSON

func (r DDOSProfileTemplateField) RawJSON() string

Returns the unmodified JSON received from the API

func (*DDOSProfileTemplateField) UnmarshalJSON

func (r *DDOSProfileTemplateField) UnmarshalJSON(data []byte) error

type DeployStatus

type DeployStatus struct {
	// Number of ready instances
	Ready int64 `json:"ready,required"`
	// Total number of instances
	Total int64 `json:"total,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Ready       respjson.Field
		Total       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (DeployStatus) RawJSON

func (r DeployStatus) RawJSON() string

Returns the unmodified JSON received from the API

func (*DeployStatus) UnmarshalJSON

func (r *DeployStatus) UnmarshalJSON(data []byte) error

type Error

type Error = apierror.Error

type FileShare

type FileShare struct {
	// File share ID
	ID string `json:"id,required" format:"uuid4"`
	// Connection point. Can be null during File share creation
	ConnectionPoint string `json:"connection_point,required"`
	// Datetime when the file share was created
	CreatedAt string `json:"created_at,required"`
	// Task that created this entity
	CreatorTaskID string `json:"creator_task_id,required" format:"uuid4"`
	// File share name
	Name string `json:"name,required"`
	// Network ID.
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// Network name.
	NetworkName string `json:"network_name,required"`
	// Project ID
	ProjectID int64 `json:"project_id,required"`
	// File share protocol
	Protocol string `json:"protocol,required"`
	// Region name
	Region string `json:"region,required"`
	// Region ID
	RegionID int64 `json:"region_id,required"`
	// Share network name. May be null if the file share was created with volume type
	// VAST
	ShareNetworkName string `json:"share_network_name,required"`
	// File share size, GiB
	Size int64 `json:"size,required"`
	// File share status
	//
	// Any of "available", "awaiting_transfer", "backup_creating", "backup_restoring",
	// "backup_restoring_error", "creating", "creating_from_snapshot", "deleted",
	// "deleting", "ensuring", "error", "error_deleting", "extending",
	// "extending_error", "inactive", "manage_error", "manage_starting", "migrating",
	// "migrating_to", "replication_change", "reverting", "reverting_error",
	// "shrinking", "shrinking_error", "shrinking_possible_data_loss_error",
	// "unmanage_error", "unmanage_starting", "unmanaged".
	Status FileShareStatus `json:"status,required"`
	// Subnet ID.
	SubnetID string `json:"subnet_id,required" format:"uuid4"`
	// Subnet name.
	SubnetName string `json:"subnet_name,required"`
	// List of key-value tags associated with the resource. A tag is a key-value pair
	// that can be associated with a resource, enabling efficient filtering and
	// grouping for better organization and management. Some tags are read-only and
	// cannot be modified by the user. Tags are also integrated with cost reports,
	// allowing cost data to be filtered based on tag keys or values.
	Tags []Tag `json:"tags,required"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,required" format:"uuid4"`
	// File share disk type
	//
	// Any of "default_share_type", "vast_share_type".
	VolumeType FileShareVolumeType `json:"volume_type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID               respjson.Field
		ConnectionPoint  respjson.Field
		CreatedAt        respjson.Field
		CreatorTaskID    respjson.Field
		Name             respjson.Field
		NetworkID        respjson.Field
		NetworkName      respjson.Field
		ProjectID        respjson.Field
		Protocol         respjson.Field
		Region           respjson.Field
		RegionID         respjson.Field
		ShareNetworkName respjson.Field
		Size             respjson.Field
		Status           respjson.Field
		SubnetID         respjson.Field
		SubnetName       respjson.Field
		Tags             respjson.Field
		TaskID           respjson.Field
		VolumeType       respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FileShare) RawJSON

func (r FileShare) RawJSON() string

Returns the unmodified JSON received from the API

func (*FileShare) UnmarshalJSON

func (r *FileShare) UnmarshalJSON(data []byte) error

type FileShareAccessRuleDeleteParams

type FileShareAccessRuleDeleteParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// File Share ID
	FileShareID string `path:"file_share_id,required" format:"uuid4" json:"-"`
	// contains filtered or unexported fields
}

type FileShareAccessRuleListParams

type FileShareAccessRuleListParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type FileShareAccessRuleNewParams

type FileShareAccessRuleNewParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Access mode
	//
	// Any of "ro", "rw".
	AccessMode FileShareAccessRuleNewParamsAccessMode `json:"access_mode,omitzero,required"`
	// Source IP or network
	IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
	// contains filtered or unexported fields
}

func (FileShareAccessRuleNewParams) MarshalJSON

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

type FileShareAccessRuleNewParamsAccessMode

type FileShareAccessRuleNewParamsAccessMode string

Access mode

const (
	FileShareAccessRuleNewParamsAccessModeRo FileShareAccessRuleNewParamsAccessMode = "ro"
	FileShareAccessRuleNewParamsAccessModeRw FileShareAccessRuleNewParamsAccessMode = "rw"
)

type FileShareAccessRuleService

type FileShareAccessRuleService struct {
	Options []option.RequestOption
}

FileShareAccessRuleService contains methods and other services that help with interacting with the gcore API.

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

func NewFileShareAccessRuleService

func NewFileShareAccessRuleService(opts ...option.RequestOption) (r FileShareAccessRuleService)

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

func (*FileShareAccessRuleService) Delete

Delete file share access rule

func (*FileShareAccessRuleService) List

Get file share access rules

func (*FileShareAccessRuleService) New

Create file share access rule

type FileShareDeleteParams

type FileShareDeleteParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type FileShareGetParams

type FileShareGetParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type FileShareListParams

type FileShareListParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Optional. Limit the number of returned items
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Optional. Offset value is used to exclude the first set of records from the
	// result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (FileShareListParams) URLQuery

func (r FileShareListParams) URLQuery() (v url.Values, err error)

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

type FileShareNewParams

type FileShareNewParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`

	// This field is a request body variant, only one variant field can be set.
	OfCreateStandardFileShareSerializer *FileShareNewParamsBodyCreateStandardFileShareSerializer `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	OfCreateVastFileShareSerializer *FileShareNewParamsBodyCreateVastFileShareSerializer `json:",inline"`
	// contains filtered or unexported fields
}

func (FileShareNewParams) MarshalJSON

func (u FileShareNewParams) MarshalJSON() ([]byte, error)

type FileShareNewParamsBodyCreateStandardFileShareSerializer

type FileShareNewParamsBodyCreateStandardFileShareSerializer struct {
	// File share name
	Name string `json:"name,required"`
	// File share network configuration
	Network FileShareNewParamsBodyCreateStandardFileShareSerializerNetwork `json:"network,omitzero,required"`
	// File share size
	Size int64 `json:"size,required"`
	// Access Rules
	Access []FileShareNewParamsBodyCreateStandardFileShareSerializerAccess `json:"access,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// File share volume type
	//
	// Any of "default_share_type".
	VolumeType string `json:"volume_type,omitzero"`
	// File share protocol
	//
	// This field can be elided, and will marshal its zero value as "NFS".
	Protocol constant.Nfs `json:"protocol,required"`
	// contains filtered or unexported fields
}

The properties Name, Network, Protocol, Size are required.

func (FileShareNewParamsBodyCreateStandardFileShareSerializer) MarshalJSON

type FileShareNewParamsBodyCreateStandardFileShareSerializerAccess

type FileShareNewParamsBodyCreateStandardFileShareSerializerAccess struct {
	// Access mode
	//
	// Any of "ro", "rw".
	AccessMode string `json:"access_mode,omitzero,required"`
	// Source IP or network
	IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
	// contains filtered or unexported fields
}

The properties AccessMode, IPAddress are required.

func (FileShareNewParamsBodyCreateStandardFileShareSerializerAccess) MarshalJSON

type FileShareNewParamsBodyCreateStandardFileShareSerializerNetwork

type FileShareNewParamsBodyCreateStandardFileShareSerializerNetwork struct {
	// Network ID.
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// Subnetwork ID. If the subnet is not selected, it will be selected automatically.
	SubnetID param.Opt[string] `json:"subnet_id,omitzero" format:"uuid4"`
	// contains filtered or unexported fields
}

File share network configuration

The property NetworkID is required.

func (FileShareNewParamsBodyCreateStandardFileShareSerializerNetwork) MarshalJSON

type FileShareNewParamsBodyCreateVastFileShareSerializer

type FileShareNewParamsBodyCreateVastFileShareSerializer struct {
	// File share name
	Name string `json:"name,required"`
	// File share size
	Size int64 `json:"size,required"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// File share protocol
	//
	// This field can be elided, and will marshal its zero value as "NFS".
	Protocol constant.Nfs `json:"protocol,required"`
	// File share volume type
	//
	// This field can be elided, and will marshal its zero value as "vast_share_type".
	VolumeType constant.VastShareType `json:"volume_type,required"`
	// contains filtered or unexported fields
}

The properties Name, Protocol, Size, VolumeType are required.

func (FileShareNewParamsBodyCreateVastFileShareSerializer) MarshalJSON

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

type FileShareResizeParams

type FileShareResizeParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// File Share new size in GiB.
	Size int64 `json:"size,required"`
	// contains filtered or unexported fields
}

func (FileShareResizeParams) MarshalJSON

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

type FileShareService

type FileShareService struct {
	Options     []option.RequestOption
	AccessRules FileShareAccessRuleService
}

FileShareService contains methods and other services that help with interacting with the gcore API.

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

func NewFileShareService

func NewFileShareService(opts ...option.RequestOption) (r FileShareService)

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

func (*FileShareService) Delete

func (r *FileShareService) Delete(ctx context.Context, fileShareID string, body FileShareDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Delete file share

func (*FileShareService) Get

func (r *FileShareService) Get(ctx context.Context, fileShareID string, query FileShareGetParams, opts ...option.RequestOption) (res *FileShare, err error)

Get file share

func (*FileShareService) List

List file shares

func (*FileShareService) ListAutoPaging

List file shares

func (*FileShareService) New

func (r *FileShareService) New(ctx context.Context, params FileShareNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Create file share

func (*FileShareService) Resize

func (r *FileShareService) Resize(ctx context.Context, fileShareID string, params FileShareResizeParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Resize file share

func (*FileShareService) Update

func (r *FileShareService) Update(ctx context.Context, fileShareID string, params FileShareUpdateParams, opts ...option.RequestOption) (res *FileShare, err error)

Rename file share

type FileShareStatus

type FileShareStatus string

File share status

const (
	FileShareStatusAvailable                      FileShareStatus = "available"
	FileShareStatusAwaitingTransfer               FileShareStatus = "awaiting_transfer"
	FileShareStatusBackupCreating                 FileShareStatus = "backup_creating"
	FileShareStatusBackupRestoring                FileShareStatus = "backup_restoring"
	FileShareStatusBackupRestoringError           FileShareStatus = "backup_restoring_error"
	FileShareStatusCreating                       FileShareStatus = "creating"
	FileShareStatusCreatingFromSnapshot           FileShareStatus = "creating_from_snapshot"
	FileShareStatusDeleted                        FileShareStatus = "deleted"
	FileShareStatusDeleting                       FileShareStatus = "deleting"
	FileShareStatusEnsuring                       FileShareStatus = "ensuring"
	FileShareStatusError                          FileShareStatus = "error"
	FileShareStatusErrorDeleting                  FileShareStatus = "error_deleting"
	FileShareStatusExtending                      FileShareStatus = "extending"
	FileShareStatusExtendingError                 FileShareStatus = "extending_error"
	FileShareStatusInactive                       FileShareStatus = "inactive"
	FileShareStatusManageError                    FileShareStatus = "manage_error"
	FileShareStatusManageStarting                 FileShareStatus = "manage_starting"
	FileShareStatusMigrating                      FileShareStatus = "migrating"
	FileShareStatusMigratingTo                    FileShareStatus = "migrating_to"
	FileShareStatusReplicationChange              FileShareStatus = "replication_change"
	FileShareStatusReverting                      FileShareStatus = "reverting"
	FileShareStatusRevertingError                 FileShareStatus = "reverting_error"
	FileShareStatusShrinking                      FileShareStatus = "shrinking"
	FileShareStatusShrinkingError                 FileShareStatus = "shrinking_error"
	FileShareStatusShrinkingPossibleDataLossError FileShareStatus = "shrinking_possible_data_loss_error"
	FileShareStatusUnmanageError                  FileShareStatus = "unmanage_error"
	FileShareStatusUnmanageStarting               FileShareStatus = "unmanage_starting"
	FileShareStatusUnmanaged                      FileShareStatus = "unmanaged"
)

type FileShareUpdateParams

type FileShareUpdateParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Name.
	Name string `json:"name,required"`
	// contains filtered or unexported fields
}

func (FileShareUpdateParams) MarshalJSON

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

type FileShareVolumeType

type FileShareVolumeType string

File share disk type

const (
	FileShareVolumeTypeDefaultShareType FileShareVolumeType = "default_share_type"
	FileShareVolumeTypeVastShareType    FileShareVolumeType = "vast_share_type"
)

type FixedAddress

type FixedAddress struct {
	// IP address
	Addr string `json:"addr,required"`
	// Interface name. This field will be `null` if `with_interfaces_name=true` is not
	// set in the request when listing instances. It will also be `null` if the
	// `interface_name` was not specified during instance creation or when attaching
	// the interface.
	InterfaceName string `json:"interface_name,required"`
	// The unique identifier of the subnet associated with this address. Included only
	// in the response for a single-resource lookup (GET by ID). For the trunk
	// subports, this field is always set.
	SubnetID string `json:"subnet_id,required"`
	// The name of the subnet associated with this address. Included only in the
	// response for a single-resource lookup (GET by ID). For the trunk subports, this
	// field is always set.
	SubnetName string `json:"subnet_name,required"`
	// Type of the address
	Type constant.Fixed `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Addr          respjson.Field
		InterfaceName respjson.Field
		SubnetID      respjson.Field
		SubnetName    respjson.Field
		Type          respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Schema for `fixed` addresses. This schema is used when fetching a single instance.

func (FixedAddress) RawJSON

func (r FixedAddress) RawJSON() string

Returns the unmodified JSON received from the API

func (*FixedAddress) UnmarshalJSON

func (r *FixedAddress) UnmarshalJSON(data []byte) error

type FixedAddressShort

type FixedAddressShort struct {
	// IP address
	Addr string `json:"addr,required"`
	// Interface name. This field will be `null` if `with_interfaces_name=true` is not
	// set in the request when listing instances. It will also be `null` if the
	// `interface_name` was not specified during instance creation or when attaching
	// the interface.
	InterfaceName string `json:"interface_name,required"`
	// Type of the address
	Type constant.Fixed `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Addr          respjson.Field
		InterfaceName respjson.Field
		Type          respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Schema for `fixed` addresses. This schema is used when listing instances. It omits the `subnet_name` and `subnet_id` fields.

func (FixedAddressShort) RawJSON

func (r FixedAddressShort) RawJSON() string

Returns the unmodified JSON received from the API

func (*FixedAddressShort) UnmarshalJSON

func (r *FixedAddressShort) UnmarshalJSON(data []byte) error

type FlavorHardwareDescription

type FlavorHardwareDescription struct {
	// Human-readable CPU description
	CPU string `json:"cpu,nullable"`
	// Human-readable disk description
	Disk string `json:"disk,nullable"`
	// Human-readable ephemeral disk description
	Ephemeral string `json:"ephemeral,nullable"`
	// Human-readable GPU description
	GPU string `json:"gpu,nullable"`
	// Human-readable NIC description
	Network string `json:"network,nullable"`
	// Human-readable RAM description
	Ram string `json:"ram,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CPU         respjson.Field
		Disk        respjson.Field
		Ephemeral   respjson.Field
		GPU         respjson.Field
		Network     respjson.Field
		Ram         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FlavorHardwareDescription) RawJSON

func (r FlavorHardwareDescription) RawJSON() string

Returns the unmodified JSON received from the API

func (*FlavorHardwareDescription) UnmarshalJSON

func (r *FlavorHardwareDescription) UnmarshalJSON(data []byte) error

type FloatingAddress

type FloatingAddress struct {
	// Address
	Addr string `json:"addr,required"`
	// Type of the address
	Type constant.Floating `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Addr        respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Schema for `floating` addresses.

func (FloatingAddress) RawJSON

func (r FloatingAddress) RawJSON() string

Returns the unmodified JSON received from the API

func (*FloatingAddress) UnmarshalJSON

func (r *FloatingAddress) UnmarshalJSON(data []byte) error

type FloatingIP

type FloatingIP struct {
	// Floating IP ID
	ID string `json:"id,required" format:"uuid4"`
	// Datetime when the floating IP was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Task that created this entity
	CreatorTaskID string `json:"creator_task_id,required" format:"uuid4"`
	// This field is deprecated and can be ignored
	//
	// Deprecated: deprecated
	DNSDomain string `json:"dns_domain,required"`
	// This field is deprecated and can be ignored
	//
	// Deprecated: deprecated
	DNSName string `json:"dns_name,required"`
	// IP address of the port the floating IP is attached to
	FixedIPAddress string `json:"fixed_ip_address,required" format:"ipvanyaddress"`
	// IP Address of the floating IP
	FloatingIPAddress string `json:"floating_ip_address,required" format:"ipvanyaddress"`
	// Port ID the floating IP is attached to. The `fixed_ip_address` is the IP address
	// of the port.
	PortID string `json:"port_id,required" format:"uuid4"`
	// Project ID
	ProjectID int64 `json:"project_id,required"`
	// Region name
	Region string `json:"region,required"`
	// Region ID
	RegionID int64 `json:"region_id,required"`
	// Router ID
	RouterID string `json:"router_id,required" format:"uuid4"`
	// Floating IP status
	//
	// Any of "ACTIVE", "DOWN", "ERROR".
	Status FloatingIPStatus `json:"status,required"`
	// This field is deprecated and can be ignored
	//
	// Deprecated: deprecated
	SubnetID string `json:"subnet_id,required" format:"uuid4"`
	// List of key-value tags associated with the resource. A tag is a key-value pair
	// that can be associated with a resource, enabling efficient filtering and
	// grouping for better organization and management. Some tags are read-only and
	// cannot be modified by the user. Tags are also integrated with cost reports,
	// allowing cost data to be filtered based on tag keys or values.
	Tags []Tag `json:"tags,required"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,required" format:"uuid4"`
	// Datetime when the floating IP was last updated
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                respjson.Field
		CreatedAt         respjson.Field
		CreatorTaskID     respjson.Field
		DNSDomain         respjson.Field
		DNSName           respjson.Field
		FixedIPAddress    respjson.Field
		FloatingIPAddress respjson.Field
		PortID            respjson.Field
		ProjectID         respjson.Field
		Region            respjson.Field
		RegionID          respjson.Field
		RouterID          respjson.Field
		Status            respjson.Field
		SubnetID          respjson.Field
		Tags              respjson.Field
		TaskID            respjson.Field
		UpdatedAt         respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FloatingIP) RawJSON

func (r FloatingIP) RawJSON() string

Returns the unmodified JSON received from the API

func (*FloatingIP) UnmarshalJSON

func (r *FloatingIP) UnmarshalJSON(data []byte) error

type FloatingIPAssignParams

type FloatingIPAssignParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Port ID
	PortID string `json:"port_id,required" format:"uuid4"`
	// Fixed IP address
	FixedIPAddress param.Opt[string] `json:"fixed_ip_address,omitzero" format:"ipvanyaddress"`
	// contains filtered or unexported fields
}

func (FloatingIPAssignParams) MarshalJSON

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

type FloatingIPDeleteParams

type FloatingIPDeleteParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type FloatingIPDetailed

type FloatingIPDetailed struct {
	// Floating IP ID
	ID string `json:"id,required" format:"uuid4"`
	// Datetime when the floating IP was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Task that created this entity
	CreatorTaskID string `json:"creator_task_id,required" format:"uuid4"`
	// This field is deprecated and can be ignored
	//
	// Deprecated: deprecated
	DNSDomain string `json:"dns_domain,required"`
	// This field is deprecated and can be ignored
	//
	// Deprecated: deprecated
	DNSName string `json:"dns_name,required"`
	// IP address of the port the floating IP is attached to
	FixedIPAddress string `json:"fixed_ip_address,required" format:"ipvanyaddress"`
	// IP Address of the floating IP
	FloatingIPAddress string `json:"floating_ip_address,required" format:"ipvanyaddress"`
	// Instance the floating IP is attached to
	Instance FloatingIPDetailedInstance `json:"instance,required"`
	// Load balancer the floating IP is attached to
	Loadbalancer LoadBalancer `json:"loadbalancer,required"`
	// Port ID
	PortID string `json:"port_id,required" format:"uuid4"`
	// Project ID
	ProjectID int64 `json:"project_id,required"`
	// Region name
	Region string `json:"region,required"`
	// Region ID
	RegionID int64 `json:"region_id,required"`
	// Router ID
	RouterID string `json:"router_id,required" format:"uuid4"`
	// Floating IP status
	//
	// Any of "ACTIVE", "DOWN", "ERROR".
	Status FloatingIPStatus `json:"status,required"`
	// This field is deprecated and can be ignored
	//
	// Deprecated: deprecated
	SubnetID string `json:"subnet_id,required" format:"uuid4"`
	// List of key-value tags associated with the resource. A tag is a key-value pair
	// that can be associated with a resource, enabling efficient filtering and
	// grouping for better organization and management. Some tags are read-only and
	// cannot be modified by the user. Tags are also integrated with cost reports,
	// allowing cost data to be filtered based on tag keys or values.
	Tags []Tag `json:"tags,required"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,required" format:"uuid4"`
	// Datetime when the floating IP was last updated
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                respjson.Field
		CreatedAt         respjson.Field
		CreatorTaskID     respjson.Field
		DNSDomain         respjson.Field
		DNSName           respjson.Field
		FixedIPAddress    respjson.Field
		FloatingIPAddress respjson.Field
		Instance          respjson.Field
		Loadbalancer      respjson.Field
		PortID            respjson.Field
		ProjectID         respjson.Field
		Region            respjson.Field
		RegionID          respjson.Field
		RouterID          respjson.Field
		Status            respjson.Field
		SubnetID          respjson.Field
		Tags              respjson.Field
		TaskID            respjson.Field
		UpdatedAt         respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FloatingIPDetailed) RawJSON

func (r FloatingIPDetailed) RawJSON() string

Returns the unmodified JSON received from the API

func (*FloatingIPDetailed) UnmarshalJSON

func (r *FloatingIPDetailed) UnmarshalJSON(data []byte) error

type FloatingIPDetailedInstance

type FloatingIPDetailedInstance struct {
	// Instance ID
	ID string `json:"id,required" format:"uuid4"`
	// Map of network_name to list of addresses in that network
	Addresses map[string][]FloatingIPDetailedInstanceAddressUnion `json:"addresses,required"`
	// Datetime when instance was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Task that created this entity
	CreatorTaskID string `json:"creator_task_id,required"`
	// Flavor
	Flavor FloatingIPDetailedInstanceFlavor `json:"flavor,required"`
	// Instance description
	InstanceDescription string `json:"instance_description,required"`
	// Instance name
	Name string `json:"name,required"`
	// Project ID
	ProjectID int64 `json:"project_id,required"`
	// Region name
	Region string `json:"region,required"`
	// Region ID
	RegionID int64 `json:"region_id,required"`
	// Security groups
	SecurityGroups []FloatingIPDetailedInstanceSecurityGroup `json:"security_groups,required"`
	// SSH key name assigned to instance
	SSHKeyName string `json:"ssh_key_name,required"`
	// Instance status
	//
	// Any of "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING",
	// "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE",
	// "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED",
	// "UNKNOWN", "VERIFY_RESIZE".
	Status string `json:"status,required"`
	// List of key-value tags associated with the resource. A tag is a key-value pair
	// that can be associated with a resource, enabling efficient filtering and
	// grouping for better organization and management. Some tags are read-only and
	// cannot be modified by the user. Tags are also integrated with cost reports,
	// allowing cost data to be filtered based on tag keys or values.
	Tags []Tag `json:"tags,required"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,required"`
	// Task state
	TaskState string `json:"task_state,required"`
	// Virtual machine state (active)
	//
	// Any of "active", "building", "deleted", "error", "paused", "rescued", "resized",
	// "shelved", "shelved_offloaded", "soft-deleted", "stopped", "suspended".
	VmState string `json:"vm_state,required"`
	// List of volumes
	Volumes []FloatingIPDetailedInstanceVolume `json:"volumes,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		Addresses           respjson.Field
		CreatedAt           respjson.Field
		CreatorTaskID       respjson.Field
		Flavor              respjson.Field
		InstanceDescription respjson.Field
		Name                respjson.Field
		ProjectID           respjson.Field
		Region              respjson.Field
		RegionID            respjson.Field
		SecurityGroups      respjson.Field
		SSHKeyName          respjson.Field
		Status              respjson.Field
		Tags                respjson.Field
		TaskID              respjson.Field
		TaskState           respjson.Field
		VmState             respjson.Field
		Volumes             respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Instance the floating IP is attached to

func (FloatingIPDetailedInstance) RawJSON

func (r FloatingIPDetailedInstance) RawJSON() string

Returns the unmodified JSON received from the API

func (*FloatingIPDetailedInstance) UnmarshalJSON

func (r *FloatingIPDetailedInstance) UnmarshalJSON(data []byte) error

type FloatingIPDetailedInstanceAddressUnion

type FloatingIPDetailedInstanceAddressUnion struct {
	Addr          string `json:"addr"`
	Type          string `json:"type"`
	InterfaceName string `json:"interface_name"`
	// This field is from variant [FixedAddress].
	SubnetID string `json:"subnet_id"`
	// This field is from variant [FixedAddress].
	SubnetName string `json:"subnet_name"`
	JSON       struct {
		Addr          respjson.Field
		Type          respjson.Field
		InterfaceName respjson.Field
		SubnetID      respjson.Field
		SubnetName    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

FloatingIPDetailedInstanceAddressUnion contains all possible properties and values from FloatingAddress, FixedAddressShort, FixedAddress.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (FloatingIPDetailedInstanceAddressUnion) AsFixedIPAddress

func (u FloatingIPDetailedInstanceAddressUnion) AsFixedIPAddress() (v FixedAddress)

func (FloatingIPDetailedInstanceAddressUnion) AsFixedIPAddressShort

func (u FloatingIPDetailedInstanceAddressUnion) AsFixedIPAddressShort() (v FixedAddressShort)

func (FloatingIPDetailedInstanceAddressUnion) AsFloatingIPAddress

func (u FloatingIPDetailedInstanceAddressUnion) AsFloatingIPAddress() (v FloatingAddress)

func (FloatingIPDetailedInstanceAddressUnion) RawJSON

Returns the unmodified JSON received from the API

func (*FloatingIPDetailedInstanceAddressUnion) UnmarshalJSON

func (r *FloatingIPDetailedInstanceAddressUnion) UnmarshalJSON(data []byte) error

type FloatingIPDetailedInstanceFlavor

type FloatingIPDetailedInstanceFlavor struct {
	// Flavor ID is the same as name
	FlavorID string `json:"flavor_id,required"`
	// Flavor name
	FlavorName string `json:"flavor_name,required"`
	// RAM size in MiB
	Ram int64 `json:"ram,required"`
	// Virtual CPU count. For bare metal flavors, it's a physical CPU count
	Vcpus int64 `json:"vcpus,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FlavorID    respjson.Field
		FlavorName  respjson.Field
		Ram         respjson.Field
		Vcpus       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Flavor

func (FloatingIPDetailedInstanceFlavor) RawJSON

Returns the unmodified JSON received from the API

func (*FloatingIPDetailedInstanceFlavor) UnmarshalJSON

func (r *FloatingIPDetailedInstanceFlavor) UnmarshalJSON(data []byte) error

type FloatingIPDetailedInstanceSecurityGroup

type FloatingIPDetailedInstanceSecurityGroup struct {
	// Name.
	Name string `json:"name,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Name        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FloatingIPDetailedInstanceSecurityGroup) RawJSON

Returns the unmodified JSON received from the API

func (*FloatingIPDetailedInstanceSecurityGroup) UnmarshalJSON

func (r *FloatingIPDetailedInstanceSecurityGroup) UnmarshalJSON(data []byte) error

type FloatingIPDetailedInstanceVolume

type FloatingIPDetailedInstanceVolume struct {
	// Volume ID
	ID string `json:"id,required"`
	// Whether the volume is deleted together with the VM
	DeleteOnTermination bool `json:"delete_on_termination,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		DeleteOnTermination respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (FloatingIPDetailedInstanceVolume) RawJSON

Returns the unmodified JSON received from the API

func (*FloatingIPDetailedInstanceVolume) UnmarshalJSON

func (r *FloatingIPDetailedInstanceVolume) UnmarshalJSON(data []byte) error

type FloatingIPGetParams

type FloatingIPGetParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type FloatingIPListParams

type FloatingIPListParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Optional. Limit the number of returned items
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Optional. Offset value is used to exclude the first set of records from the
	// result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Optional. Filter by tag key-value pairs. curl -G --data-urlencode
	// "tag_key_value={"key": "value"}" --url
	// "https://example.com/cloud/v1/resource/1/1"
	TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
	// Optional. Filter by tag keys. ?tag_key=key1&tag_key=key2
	TagKey []string `query:"tag_key,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (FloatingIPListParams) URLQuery

func (r FloatingIPListParams) URLQuery() (v url.Values, err error)

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

type FloatingIPNewParams

type FloatingIPNewParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// If the port has multiple IP addresses, a specific one can be selected using this
	// field. If not specified, the first IP in the port's list will be used by
	// default.
	FixedIPAddress param.Opt[string] `json:"fixed_ip_address,omitzero" format:"ipv4"`
	// If provided, the floating IP will be immediately attached to the specified port.
	PortID param.Opt[string] `json:"port_id,omitzero" format:"uuid4"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// contains filtered or unexported fields
}

func (FloatingIPNewParams) MarshalJSON

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

type FloatingIPService

type FloatingIPService struct {
	Options []option.RequestOption
}

FloatingIPService contains methods and other services that help with interacting with the gcore API.

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

func NewFloatingIPService

func NewFloatingIPService(opts ...option.RequestOption) (r FloatingIPService)

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

func (*FloatingIPService) Assign

func (r *FloatingIPService) Assign(ctx context.Context, floatingIPID string, params FloatingIPAssignParams, opts ...option.RequestOption) (res *FloatingIP, err error)

Assign floating IP to instance or loadbalancer

func (*FloatingIPService) Delete

func (r *FloatingIPService) Delete(ctx context.Context, floatingIPID string, body FloatingIPDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Delete floating IP

func (*FloatingIPService) Get

func (r *FloatingIPService) Get(ctx context.Context, floatingIPID string, query FloatingIPGetParams, opts ...option.RequestOption) (res *FloatingIP, err error)

Get floating IP

func (*FloatingIPService) List

List floating IPs

func (*FloatingIPService) ListAutoPaging

List floating IPs

func (*FloatingIPService) New

func (r *FloatingIPService) New(ctx context.Context, params FloatingIPNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Create floating IP

func (*FloatingIPService) Unassign

func (r *FloatingIPService) Unassign(ctx context.Context, floatingIPID string, body FloatingIPUnassignParams, opts ...option.RequestOption) (res *FloatingIP, err error)

Unassign floating IP from the instance

type FloatingIPStatus

type FloatingIPStatus string
const (
	FloatingIPStatusActive FloatingIPStatus = "ACTIVE"
	FloatingIPStatusDown   FloatingIPStatus = "DOWN"
	FloatingIPStatusError  FloatingIPStatus = "ERROR"
)

type FloatingIPUnassignParams

type FloatingIPUnassignParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type GPUBaremetalCluster

type GPUBaremetalCluster struct {
	// GPU Cluster ID
	ClusterID string `json:"cluster_id,required" format:"uuid4"`
	// GPU Cluster Name
	ClusterName string `json:"cluster_name,required"`
	// GPU Cluster status
	//
	// Any of "ACTIVE", "ERROR", "PENDING", "SUSPENDED".
	ClusterStatus GPUBaremetalClusterClusterStatus `json:"cluster_status,required"`
	// Datetime when the cluster was created
	CreatedAt string `json:"created_at,required"`
	// Task that created this entity
	CreatorTaskID string `json:"creator_task_id,required" format:"uuid4"`
	// Flavor ID is the same as the name
	Flavor string `json:"flavor,required"`
	// Image ID
	ImageID string `json:"image_id,required" format:"uuid4"`
	// Image name
	ImageName string `json:"image_name,required"`
	// Networks managed by user and associated with the cluster
	Interfaces []GPUBaremetalClusterInterface `json:"interfaces,required"`
	// A password for a bare metal server. This parameter is used to set a password for
	// the "Admin" user on a Windows instance, a default user or a new user on a Linux
	// instance
	Password string `json:"password,required"`
	// Project ID
	ProjectID int64 `json:"project_id,required"`
	// Region name
	Region string `json:"region,required"`
	// Region ID
	RegionID int64 `json:"region_id,required"`
	// GPU cluster servers
	Servers []GPUBaremetalClusterServer `json:"servers,required"`
	// Keypair name to inject into new cluster(s)
	SSHKeyName string `json:"ssh_key_name,required"`
	// List of key-value tags associated with the resource. A tag is a key-value pair
	// that can be associated with a resource, enabling efficient filtering and
	// grouping for better organization and management. Some tags are read-only and
	// cannot be modified by the user. Tags are also integrated with cost reports,
	// allowing cost data to be filtered based on tag keys or values.
	Tags []Tag `json:"tags,required"`
	// Task ID associated with the cluster
	TaskID string `json:"task_id,required" format:"uuid4"`
	// Task status
	//
	// Any of "CLUSTER_CLEAN_UP", "CLUSTER_RESIZE", "CLUSTER_RESUME",
	// "CLUSTER_SUSPEND", "ERROR", "FINISHED", "IPU_SERVERS", "NETWORK",
	// "POPLAR_SERVERS", "POST_DEPLOY_SETUP", "VIPU_CONTROLLER".
	TaskStatus GPUBaremetalClusterTaskStatus `json:"task_status,required"`
	// String in base64 format. Must not be passed together with 'username' or
	// 'password'. Examples of the user_data:
	// https://cloudinit.readthedocs.io/en/latest/topics/examples.html
	UserData string `json:"user_data,required"`
	// A name of a new user in the Linux instance. It may be passed with a 'password'
	// parameter
	Username string `json:"username,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ClusterID     respjson.Field
		ClusterName   respjson.Field
		ClusterStatus respjson.Field
		CreatedAt     respjson.Field
		CreatorTaskID respjson.Field
		Flavor        respjson.Field
		ImageID       respjson.Field
		ImageName     respjson.Field
		Interfaces    respjson.Field
		Password      respjson.Field
		ProjectID     respjson.Field
		Region        respjson.Field
		RegionID      respjson.Field
		Servers       respjson.Field
		SSHKeyName    respjson.Field
		Tags          respjson.Field
		TaskID        respjson.Field
		TaskStatus    respjson.Field
		UserData      respjson.Field
		Username      respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (GPUBaremetalCluster) RawJSON

func (r GPUBaremetalCluster) RawJSON() string

Returns the unmodified JSON received from the API

func (*GPUBaremetalCluster) UnmarshalJSON

func (r *GPUBaremetalCluster) UnmarshalJSON(data []byte) error

type GPUBaremetalClusterClusterStatus

type GPUBaremetalClusterClusterStatus string

GPU Cluster status

const (
	GPUBaremetalClusterClusterStatusActive    GPUBaremetalClusterClusterStatus = "ACTIVE"
	GPUBaremetalClusterClusterStatusError     GPUBaremetalClusterClusterStatus = "ERROR"
	GPUBaremetalClusterClusterStatusPending   GPUBaremetalClusterClusterStatus = "PENDING"
	GPUBaremetalClusterClusterStatusSuspended GPUBaremetalClusterClusterStatus = "SUSPENDED"
)

type GPUBaremetalClusterDeleteParams

type GPUBaremetalClusterDeleteParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// True if it is required to delete floating IPs assigned to the servers. Can't be
	// used with floatings.
	DeleteFloatings param.Opt[bool] `query:"delete_floatings,omitzero" json:"-"`
	// Comma separated list of floating ids that should be deleted. Can't be used with
	// delete_floatings.
	Floatings param.Opt[string] `query:"floatings,omitzero" json:"-"`
	// Comma separated list of port IDs to be deleted with the servers
	ReservedFixedIPs param.Opt[string] `query:"reserved_fixed_ips,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (GPUBaremetalClusterDeleteParams) URLQuery

func (r GPUBaremetalClusterDeleteParams) URLQuery() (v url.Values, err error)

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

type GPUBaremetalClusterFlavorListParams

type GPUBaremetalClusterFlavorListParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Set to `true` to remove the disabled flavors from the response.
	HideDisabled param.Opt[bool] `query:"hide_disabled,omitzero" json:"-"`
	// Set to `true` if the response should include flavor prices.
	IncludePrices param.Opt[bool] `query:"include_prices,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (GPUBaremetalClusterFlavorListParams) URLQuery

func (r GPUBaremetalClusterFlavorListParams) URLQuery() (v url.Values, err error)

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

type GPUBaremetalClusterFlavorService

type GPUBaremetalClusterFlavorService struct {
	Options []option.RequestOption
}

GPUBaremetalClusterFlavorService contains methods and other services that help with interacting with the gcore API.

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

func NewGPUBaremetalClusterFlavorService

func NewGPUBaremetalClusterFlavorService(opts ...option.RequestOption) (r GPUBaremetalClusterFlavorService)

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

func (*GPUBaremetalClusterFlavorService) List

List bare metal GPU flavors

type GPUBaremetalClusterGetParams

type GPUBaremetalClusterGetParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type GPUBaremetalClusterImageDeleteParams

type GPUBaremetalClusterImageDeleteParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type GPUBaremetalClusterImageGetParams

type GPUBaremetalClusterImageGetParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type GPUBaremetalClusterImageListParams

type GPUBaremetalClusterImageListParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type GPUBaremetalClusterImageService

type GPUBaremetalClusterImageService struct {
	Options []option.RequestOption
}

GPUBaremetalClusterImageService contains methods and other services that help with interacting with the gcore API.

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

func NewGPUBaremetalClusterImageService

func NewGPUBaremetalClusterImageService(opts ...option.RequestOption) (r GPUBaremetalClusterImageService)

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

func (*GPUBaremetalClusterImageService) Delete

Delete bare metal GPU image by ID

func (*GPUBaremetalClusterImageService) Get

Get bare metal GPU image by ID

func (*GPUBaremetalClusterImageService) List

List bare metal GPU images

func (*GPUBaremetalClusterImageService) Upload

Upload new bare metal GPU image

type GPUBaremetalClusterImageUploadParams

type GPUBaremetalClusterImageUploadParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Image name
	Name string `json:"name,required"`
	// Image URL
	URL string `json:"url,required" format:"uri"`
	// OS Distribution, i.e. Debian, CentOS, Ubuntu, CoreOS etc.
	OsDistro param.Opt[string] `json:"os_distro,omitzero"`
	// OS version, i.e. 19.04 (for Ubuntu) or 9.4 for Debian
	OsVersion param.Opt[string] `json:"os_version,omitzero"`
	// When True, image cannot be deleted unless all volumes, created from it, are
	// deleted.
	CowFormat param.Opt[bool] `json:"cow_format,omitzero"`
	// Image architecture type: aarch64, x86_64
	//
	// Any of "aarch64", "x86_64".
	Architecture GPUBaremetalClusterImageUploadParamsArchitecture `json:"architecture,omitzero"`
	// Specifies the type of firmware with which to boot the guest.
	//
	// Any of "bios", "uefi".
	HwFirmwareType GPUBaremetalClusterImageUploadParamsHwFirmwareType `json:"hw_firmware_type,omitzero"`
	// The operating system installed on the image. Linux by default
	//
	// Any of "linux", "windows".
	OsType GPUBaremetalClusterImageUploadParamsOsType `json:"os_type,omitzero"`
	// Permission to use a ssh key in instances
	//
	// Any of "allow", "deny", "required".
	SSHKey GPUBaremetalClusterImageUploadParamsSSHKey `json:"ssh_key,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// contains filtered or unexported fields
}

func (GPUBaremetalClusterImageUploadParams) MarshalJSON

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

type GPUBaremetalClusterImageUploadParamsArchitecture

type GPUBaremetalClusterImageUploadParamsArchitecture string

Image architecture type: aarch64, x86_64

const (
	GPUBaremetalClusterImageUploadParamsArchitectureAarch64 GPUBaremetalClusterImageUploadParamsArchitecture = "aarch64"
	GPUBaremetalClusterImageUploadParamsArchitectureX86_64  GPUBaremetalClusterImageUploadParamsArchitecture = "x86_64"
)

type GPUBaremetalClusterImageUploadParamsHwFirmwareType

type GPUBaremetalClusterImageUploadParamsHwFirmwareType string

Specifies the type of firmware with which to boot the guest.

const (
	GPUBaremetalClusterImageUploadParamsHwFirmwareTypeBios GPUBaremetalClusterImageUploadParamsHwFirmwareType = "bios"
	GPUBaremetalClusterImageUploadParamsHwFirmwareTypeUefi GPUBaremetalClusterImageUploadParamsHwFirmwareType = "uefi"
)

type GPUBaremetalClusterImageUploadParamsOsType

type GPUBaremetalClusterImageUploadParamsOsType string

The operating system installed on the image. Linux by default

const (
	GPUBaremetalClusterImageUploadParamsOsTypeLinux   GPUBaremetalClusterImageUploadParamsOsType = "linux"
	GPUBaremetalClusterImageUploadParamsOsTypeWindows GPUBaremetalClusterImageUploadParamsOsType = "windows"
)

type GPUBaremetalClusterImageUploadParamsSSHKey

type GPUBaremetalClusterImageUploadParamsSSHKey string

Permission to use a ssh key in instances

const (
	GPUBaremetalClusterImageUploadParamsSSHKeyAllow    GPUBaremetalClusterImageUploadParamsSSHKey = "allow"
	GPUBaremetalClusterImageUploadParamsSSHKeyDeny     GPUBaremetalClusterImageUploadParamsSSHKey = "deny"
	GPUBaremetalClusterImageUploadParamsSSHKeyRequired GPUBaremetalClusterImageUploadParamsSSHKey = "required"
)

type GPUBaremetalClusterInterface

type GPUBaremetalClusterInterface struct {
	// Network ID
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// Network ID the subnet belongs to. Port will be plugged in this network
	PortID string `json:"port_id,required" format:"uuid4"`
	// Port is assigned to IP address from the subnet
	SubnetID string `json:"subnet_id,required" format:"uuid4"`
	// Network type
	Type string `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		NetworkID   respjson.Field
		PortID      respjson.Field
		SubnetID    respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (GPUBaremetalClusterInterface) RawJSON

Returns the unmodified JSON received from the API

func (*GPUBaremetalClusterInterface) UnmarshalJSON

func (r *GPUBaremetalClusterInterface) UnmarshalJSON(data []byte) error

type GPUBaremetalClusterInterfaceListParams

type GPUBaremetalClusterInterfaceListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type GPUBaremetalClusterInterfaceService

type GPUBaremetalClusterInterfaceService struct {
	Options []option.RequestOption
}

GPUBaremetalClusterInterfaceService contains methods and other services that help with interacting with the gcore API.

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

func NewGPUBaremetalClusterInterfaceService

func NewGPUBaremetalClusterInterfaceService(opts ...option.RequestOption) (r GPUBaremetalClusterInterfaceService)

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

func (*GPUBaremetalClusterInterfaceService) List

Returns the network interfaces attached to the servers in the cluster.

type GPUBaremetalClusterListParams

type GPUBaremetalClusterListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Limit the number of returned clusters
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Offset value is used to exclude the first set of records from the result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (GPUBaremetalClusterListParams) URLQuery

func (r GPUBaremetalClusterListParams) URLQuery() (v url.Values, err error)

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

type GPUBaremetalClusterNewParams

type GPUBaremetalClusterNewParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Flavor name
	Flavor string `json:"flavor,required"`
	// Image ID
	ImageID string `json:"image_id,required" format:"uuid4"`
	// A list of network interfaces for the server. You can create one or more
	// interfaces - private, public, or both.
	Interfaces []GPUBaremetalClusterNewParamsInterfaceUnion `json:"interfaces,omitzero,required"`
	// GPU Cluster name
	Name string `json:"name,required"`
	// Number of servers to create
	InstancesCount param.Opt[int64] `json:"instances_count,omitzero"`
	// Specifies the name of the SSH keypair, created via the
	// <a href="#operation/SSHKeyCollectionViewSet.post">/v1/ssh_keys endpoint</a>.
	SSHKeyName param.Opt[string] `json:"ssh_key_name,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// contains filtered or unexported fields
}

func (GPUBaremetalClusterNewParams) MarshalJSON

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

type GPUBaremetalClusterNewParamsInterfaceAnySubnet

type GPUBaremetalClusterNewParamsInterfaceAnySubnet struct {
	// The network where the server will be connected.
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// Interface name. Defaults to `null` and is returned as `null` in the API response
	// if not set.
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// You can specify a specific IP address from your subnet.
	IPAddress param.Opt[string] `json:"ip_address,omitzero" format:"ipvanyaddress"`
	// Allows the server to have a public IP that can be reached from the internet.
	FloatingIP GPUBaremetalClusterNewParamsInterfaceAnySubnetFloatingIP `json:"floating_ip,omitzero"`
	// Specify `ipv4`, `ipv6`, or `dual` to enable both.
	//
	// Any of "dual", "ipv4", "ipv6".
	IPFamily InterfaceIPFamily `json:"ip_family,omitzero"`
	// Server will be attached to a subnet with the largest count of free IPs.
	//
	// This field can be elided, and will marshal its zero value as "any_subnet".
	Type constant.AnySubnet `json:"type,required"`
	// contains filtered or unexported fields
}

The properties NetworkID, Type are required.

func (GPUBaremetalClusterNewParamsInterfaceAnySubnet) MarshalJSON

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

type GPUBaremetalClusterNewParamsInterfaceAnySubnetFloatingIP

type GPUBaremetalClusterNewParamsInterfaceAnySubnetFloatingIP struct {
	Source constant.New `json:"source,required"`
	// contains filtered or unexported fields
}

Allows the server to have a public IP that can be reached from the internet.

This struct has a constant value, construct it with NewGPUBaremetalClusterNewParamsInterfaceAnySubnetFloatingIP.

func (GPUBaremetalClusterNewParamsInterfaceAnySubnetFloatingIP) MarshalJSON

type GPUBaremetalClusterNewParamsInterfaceExternal

type GPUBaremetalClusterNewParamsInterfaceExternal struct {
	// Interface name. Defaults to `null` and is returned as `null` in the API response
	// if not set.
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// Specify `ipv4`, `ipv6`, or `dual` to enable both.
	//
	// Any of "dual", "ipv4", "ipv6".
	IPFamily InterfaceIPFamily `json:"ip_family,omitzero"`
	// A public IP address will be assigned to the server.
	//
	// This field can be elided, and will marshal its zero value as "external".
	Type constant.External `json:"type,required"`
	// contains filtered or unexported fields
}

The property Type is required.

func (GPUBaremetalClusterNewParamsInterfaceExternal) MarshalJSON

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

type GPUBaremetalClusterNewParamsInterfaceSubnet

type GPUBaremetalClusterNewParamsInterfaceSubnet struct {
	// The network where the server will be connected.
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// The server will get an IP address from this subnet.
	SubnetID string `json:"subnet_id,required" format:"uuid4"`
	// Interface name. Defaults to `null` and is returned as `null` in the API response
	// if not set.
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// Floating IP config for this subnet attachment
	FloatingIP GPUBaremetalClusterNewParamsInterfaceSubnetFloatingIP `json:"floating_ip,omitzero"`
	// The instance will get an IP address from the selected network. If you choose to
	// add a floating IP, the instance will be reachable from the internet. Otherwise,
	// it will only have a private IP within the network.
	//
	// This field can be elided, and will marshal its zero value as "subnet".
	Type constant.Subnet `json:"type,required"`
	// contains filtered or unexported fields
}

The properties NetworkID, SubnetID, Type are required.

func (GPUBaremetalClusterNewParamsInterfaceSubnet) MarshalJSON

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

type GPUBaremetalClusterNewParamsInterfaceSubnetFloatingIP

type GPUBaremetalClusterNewParamsInterfaceSubnetFloatingIP struct {
	Source constant.New `json:"source,required"`
	// contains filtered or unexported fields
}

Floating IP config for this subnet attachment

This struct has a constant value, construct it with NewGPUBaremetalClusterNewParamsInterfaceSubnetFloatingIP.

func (GPUBaremetalClusterNewParamsInterfaceSubnetFloatingIP) MarshalJSON

type GPUBaremetalClusterNewParamsInterfaceUnion

type GPUBaremetalClusterNewParamsInterfaceUnion struct {
	OfExternal  *GPUBaremetalClusterNewParamsInterfaceExternal  `json:",omitzero,inline"`
	OfSubnet    *GPUBaremetalClusterNewParamsInterfaceSubnet    `json:",omitzero,inline"`
	OfAnySubnet *GPUBaremetalClusterNewParamsInterfaceAnySubnet `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (GPUBaremetalClusterNewParamsInterfaceUnion) GetFloatingIP

func (u GPUBaremetalClusterNewParamsInterfaceUnion) GetFloatingIP() (res gpuBaremetalClusterNewParamsInterfaceUnionFloatingIP)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (GPUBaremetalClusterNewParamsInterfaceUnion) GetIPAddress

Returns a pointer to the underlying variant's property, if present.

func (GPUBaremetalClusterNewParamsInterfaceUnion) GetIPFamily

Returns a pointer to the underlying variant's property, if present.

func (GPUBaremetalClusterNewParamsInterfaceUnion) GetInterfaceName

func (u GPUBaremetalClusterNewParamsInterfaceUnion) GetInterfaceName() *string

Returns a pointer to the underlying variant's property, if present.

func (GPUBaremetalClusterNewParamsInterfaceUnion) GetNetworkID

Returns a pointer to the underlying variant's property, if present.

func (GPUBaremetalClusterNewParamsInterfaceUnion) GetSubnetID

Returns a pointer to the underlying variant's property, if present.

func (GPUBaremetalClusterNewParamsInterfaceUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (GPUBaremetalClusterNewParamsInterfaceUnion) MarshalJSON

type GPUBaremetalClusterPowercycleAllServersParams

type GPUBaremetalClusterPowercycleAllServersParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type GPUBaremetalClusterRebootAllServersParams

type GPUBaremetalClusterRebootAllServersParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type GPUBaremetalClusterRebuildParams

type GPUBaremetalClusterRebuildParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// List of nodes uuids to be rebuild
	Nodes []string `json:"nodes,omitzero,required"`
	// AI GPU image ID
	ImageID param.Opt[string] `json:"image_id,omitzero"`
	// String in base64 format.Examples of the user_data:
	// https://cloudinit.readthedocs.io/en/latest/topics/examples.html
	UserData param.Opt[string] `json:"user_data,omitzero"`
	// contains filtered or unexported fields
}

func (GPUBaremetalClusterRebuildParams) MarshalJSON

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

type GPUBaremetalClusterResizeParams

type GPUBaremetalClusterResizeParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Resized (total) number of instances
	InstancesCount int64 `json:"instances_count,required"`
	// contains filtered or unexported fields
}

func (GPUBaremetalClusterResizeParams) MarshalJSON

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

type GPUBaremetalClusterServer

type GPUBaremetalClusterServer struct {
	// GPU server ID
	ID string `json:"id,required" format:"uuid4"`
	// Map of network_name to list of addresses in that network
	Addresses map[string][]GPUBaremetalClusterServerAddressUnion `json:"addresses,required"`
	// IP addresses of the instances that are blackholed by DDoS mitigation system
	BlackholePorts []BlackholePort `json:"blackhole_ports,required"`
	// Datetime when GPU server was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Task that created this entity
	CreatorTaskID string `json:"creator_task_id,required"`
	// Advanced DDoS protection profile. It is always `null` if query parameter
	// `with_ddos=true` is not set.
	DDOSProfile DDOSProfile `json:"ddos_profile,required"`
	// Fixed IP assigned to instance
	FixedIPAssignments []GPUBaremetalClusterServerFixedIPAssignment `json:"fixed_ip_assignments,required"`
	// Flavor
	Flavor GPUBaremetalClusterServerFlavor `json:"flavor,required"`
	// Instance description
	InstanceDescription string `json:"instance_description,required"`
	// Instance isolation information
	InstanceIsolation InstanceIsolation `json:"instance_isolation,required"`
	// GPU server name
	Name string `json:"name,required"`
	// Project ID
	ProjectID int64 `json:"project_id,required"`
	// Region name
	Region string `json:"region,required"`
	// Region ID
	RegionID int64 `json:"region_id,required"`
	// Security groups
	SecurityGroups []GPUBaremetalClusterServerSecurityGroup `json:"security_groups,required"`
	// SSH key name assigned to instance
	SSHKeyName string `json:"ssh_key_name,required"`
	// Instance status
	//
	// Any of "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING",
	// "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE",
	// "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED",
	// "UNKNOWN", "VERIFY_RESIZE".
	Status GPUBaremetalClusterServerStatus `json:"status,required"`
	// List of key-value tags associated with the resource. A tag is a key-value pair
	// that can be associated with a resource, enabling efficient filtering and
	// grouping for better organization and management. Some tags are read-only and
	// cannot be modified by the user. Tags are also integrated with cost reports,
	// allowing cost data to be filtered based on tag keys or values.
	Tags []Tag `json:"tags,required"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,required"`
	// Task state
	TaskState string `json:"task_state,required"`
	// Virtual machine state (active)
	//
	// Any of "active", "building", "deleted", "error", "paused", "rescued", "resized",
	// "shelved", "shelved_offloaded", "soft-deleted", "stopped", "suspended".
	VmState GPUBaremetalClusterServerVmState `json:"vm_state,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		Addresses           respjson.Field
		BlackholePorts      respjson.Field
		CreatedAt           respjson.Field
		CreatorTaskID       respjson.Field
		DDOSProfile         respjson.Field
		FixedIPAssignments  respjson.Field
		Flavor              respjson.Field
		InstanceDescription respjson.Field
		InstanceIsolation   respjson.Field
		Name                respjson.Field
		ProjectID           respjson.Field
		Region              respjson.Field
		RegionID            respjson.Field
		SecurityGroups      respjson.Field
		SSHKeyName          respjson.Field
		Status              respjson.Field
		Tags                respjson.Field
		TaskID              respjson.Field
		TaskState           respjson.Field
		VmState             respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (GPUBaremetalClusterServer) RawJSON

func (r GPUBaremetalClusterServer) RawJSON() string

Returns the unmodified JSON received from the API

func (*GPUBaremetalClusterServer) UnmarshalJSON

func (r *GPUBaremetalClusterServer) UnmarshalJSON(data []byte) error

type GPUBaremetalClusterServerAddressUnion

type GPUBaremetalClusterServerAddressUnion struct {
	Addr          string `json:"addr"`
	Type          string `json:"type"`
	InterfaceName string `json:"interface_name"`
	// This field is from variant [FixedAddress].
	SubnetID string `json:"subnet_id"`
	// This field is from variant [FixedAddress].
	SubnetName string `json:"subnet_name"`
	JSON       struct {
		Addr          respjson.Field
		Type          respjson.Field
		InterfaceName respjson.Field
		SubnetID      respjson.Field
		SubnetName    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

GPUBaremetalClusterServerAddressUnion contains all possible properties and values from FloatingAddress, FixedAddressShort, FixedAddress.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (GPUBaremetalClusterServerAddressUnion) AsFixedIPAddress

func (u GPUBaremetalClusterServerAddressUnion) AsFixedIPAddress() (v FixedAddress)

func (GPUBaremetalClusterServerAddressUnion) AsFixedIPAddressShort

func (u GPUBaremetalClusterServerAddressUnion) AsFixedIPAddressShort() (v FixedAddressShort)

func (GPUBaremetalClusterServerAddressUnion) AsFloatingIPAddress

func (u GPUBaremetalClusterServerAddressUnion) AsFloatingIPAddress() (v FloatingAddress)

func (GPUBaremetalClusterServerAddressUnion) RawJSON

Returns the unmodified JSON received from the API

func (*GPUBaremetalClusterServerAddressUnion) UnmarshalJSON

func (r *GPUBaremetalClusterServerAddressUnion) UnmarshalJSON(data []byte) error

type GPUBaremetalClusterServerAttachInterfaceParams

type GPUBaremetalClusterServerAttachInterfaceParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`

	// This field is a request body variant, only one variant field can be set.
	// Instance will be attached to default external network
	OfNewInterfaceExternalExtendSchemaWithDDOS *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOS `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	// Instance will be attached to specified subnet
	OfNewInterfaceSpecificSubnetSchema *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchema `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	// Instance will be attached to the network subnet with the largest count of
	// available ips
	OfNewInterfaceAnySubnetSchema *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchema `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	// Instance will be attached to the given port. Floating IP will be created and
	// attached to that IP
	OfNewInterfaceReservedFixedIPSchema *GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchema `json:",inline"`
	// contains filtered or unexported fields
}

func (GPUBaremetalClusterServerAttachInterfaceParams) MarshalJSON

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchema

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchema struct {
	// Port will get an IP address in this network subnet
	NetworkID string `json:"network_id,required"`
	// Interface name
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// Each group will be added to the separate trunk.
	PortGroup param.Opt[int64] `json:"port_group,omitzero"`
	// Must be 'any_subnet'
	Type param.Opt[string] `json:"type,omitzero"`
	// Advanced DDoS protection.
	DDOSProfile GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile `json:"ddos_profile,omitzero"`
	// Which subnets should be selected: IPv4, IPv6 or use dual stack.
	//
	// Any of "dual", "ipv4", "ipv6".
	IPFamily string `json:"ip_family,omitzero"`
	// List of security group IDs
	SecurityGroups []GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup `json:"security_groups,omitzero"`
	// contains filtered or unexported fields
}

Instance will be attached to the network subnet with the largest count of available ips

The property NetworkID is required.

func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchema) MarshalJSON

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile struct {
	// DDoS profile template ID.
	ProfileTemplate int64 `json:"profile_template,required"`
	// DDoS profile template name.
	ProfileTemplateName param.Opt[string] `json:"profile_template_name,omitzero"`
	// Protection parameters.
	Fields []GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField `json:"fields,omitzero"`
	// contains filtered or unexported fields
}

Advanced DDoS protection.

The property ProfileTemplate is required.

func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile) MarshalJSON

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField struct {
	// ID of DDoS profile field
	BaseField param.Opt[int64] `json:"base_field,omitzero"`
	// Name of DDoS profile field
	FieldName param.Opt[string] `json:"field_name,omitzero"`
	// Basic type value. Only one of 'value' or 'field_value' must be specified.
	Value param.Opt[string] `json:"value,omitzero"`
	// Complex value. Only one of 'value' or 'field_value' must be specified.
	FieldValue any `json:"field_value,omitzero"`
	// contains filtered or unexported fields
}

func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField) MarshalJSON

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup struct {
	// Resource ID
	ID string `json:"id,required"`
	// contains filtered or unexported fields
}

MandatoryIdSchema schema

The property ID is required.

func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup) MarshalJSON

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOS

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOS struct {
	// Interface name
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// Each group will be added to the separate trunk.
	PortGroup param.Opt[int64] `json:"port_group,omitzero"`
	// Must be 'external'. Union tag
	Type param.Opt[string] `json:"type,omitzero"`
	// Advanced DDoS protection.
	DDOSProfile GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile `json:"ddos_profile,omitzero"`
	// Which subnets should be selected: IPv4, IPv6 or use dual stack.
	//
	// Any of "dual", "ipv4", "ipv6".
	IPFamily string `json:"ip_family,omitzero"`
	// List of security group IDs
	SecurityGroups []GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup `json:"security_groups,omitzero"`
	// contains filtered or unexported fields
}

Instance will be attached to default external network

func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOS) MarshalJSON

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile struct {
	// DDoS profile template ID.
	ProfileTemplate int64 `json:"profile_template,required"`
	// DDoS profile template name.
	ProfileTemplateName param.Opt[string] `json:"profile_template_name,omitzero"`
	// Protection parameters.
	Fields []GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField `json:"fields,omitzero"`
	// contains filtered or unexported fields
}

Advanced DDoS protection.

The property ProfileTemplate is required.

func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile) MarshalJSON

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField struct {
	// ID of DDoS profile field
	BaseField param.Opt[int64] `json:"base_field,omitzero"`
	// Name of DDoS profile field
	FieldName param.Opt[string] `json:"field_name,omitzero"`
	// Basic type value. Only one of 'value' or 'field_value' must be specified.
	Value param.Opt[string] `json:"value,omitzero"`
	// Complex value. Only one of 'value' or 'field_value' must be specified.
	FieldValue any `json:"field_value,omitzero"`
	// contains filtered or unexported fields
}

func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField) MarshalJSON

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup struct {
	// Resource ID
	ID string `json:"id,required"`
	// contains filtered or unexported fields
}

MandatoryIdSchema schema

The property ID is required.

func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup) MarshalJSON

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchema

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchema struct {
	// Port ID
	PortID string `json:"port_id,required"`
	// Interface name
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// Each group will be added to the separate trunk.
	PortGroup param.Opt[int64] `json:"port_group,omitzero"`
	// Must be 'reserved_fixed_ip'. Union tag
	Type param.Opt[string] `json:"type,omitzero"`
	// Advanced DDoS protection.
	DDOSProfile GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile `json:"ddos_profile,omitzero"`
	// List of security group IDs
	SecurityGroups []GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup `json:"security_groups,omitzero"`
	// contains filtered or unexported fields
}

Instance will be attached to the given port. Floating IP will be created and attached to that IP

The property PortID is required.

func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchema) MarshalJSON

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile struct {
	// DDoS profile template ID.
	ProfileTemplate int64 `json:"profile_template,required"`
	// DDoS profile template name.
	ProfileTemplateName param.Opt[string] `json:"profile_template_name,omitzero"`
	// Protection parameters.
	Fields []GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField `json:"fields,omitzero"`
	// contains filtered or unexported fields
}

Advanced DDoS protection.

The property ProfileTemplate is required.

func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile) MarshalJSON

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField struct {
	// ID of DDoS profile field
	BaseField param.Opt[int64] `json:"base_field,omitzero"`
	// Name of DDoS profile field
	FieldName param.Opt[string] `json:"field_name,omitzero"`
	// Basic type value. Only one of 'value' or 'field_value' must be specified.
	Value param.Opt[string] `json:"value,omitzero"`
	// Complex value. Only one of 'value' or 'field_value' must be specified.
	FieldValue any `json:"field_value,omitzero"`
	// contains filtered or unexported fields
}

func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField) MarshalJSON

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup struct {
	// Resource ID
	ID string `json:"id,required"`
	// contains filtered or unexported fields
}

MandatoryIdSchema schema

The property ID is required.

func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup) MarshalJSON

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchema

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchema struct {
	// Port will get an IP address from this subnet
	SubnetID string `json:"subnet_id,required"`
	// Interface name
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// Each group will be added to the separate trunk.
	PortGroup param.Opt[int64] `json:"port_group,omitzero"`
	// Must be 'subnet'
	Type param.Opt[string] `json:"type,omitzero"`
	// Advanced DDoS protection.
	DDOSProfile GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile `json:"ddos_profile,omitzero"`
	// List of security group IDs
	SecurityGroups []GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup `json:"security_groups,omitzero"`
	// contains filtered or unexported fields
}

Instance will be attached to specified subnet

The property SubnetID is required.

func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchema) MarshalJSON

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile struct {
	// DDoS profile template ID.
	ProfileTemplate int64 `json:"profile_template,required"`
	// DDoS profile template name.
	ProfileTemplateName param.Opt[string] `json:"profile_template_name,omitzero"`
	// Protection parameters.
	Fields []GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField `json:"fields,omitzero"`
	// contains filtered or unexported fields
}

Advanced DDoS protection.

The property ProfileTemplate is required.

func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile) MarshalJSON

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField struct {
	// ID of DDoS profile field
	BaseField param.Opt[int64] `json:"base_field,omitzero"`
	// Name of DDoS profile field
	FieldName param.Opt[string] `json:"field_name,omitzero"`
	// Basic type value. Only one of 'value' or 'field_value' must be specified.
	Value param.Opt[string] `json:"value,omitzero"`
	// Complex value. Only one of 'value' or 'field_value' must be specified.
	FieldValue any `json:"field_value,omitzero"`
	// contains filtered or unexported fields
}

func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField) MarshalJSON

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup

type GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup struct {
	// Resource ID
	ID string `json:"id,required"`
	// contains filtered or unexported fields
}

MandatoryIdSchema schema

The property ID is required.

func (GPUBaremetalClusterServerAttachInterfaceParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup) MarshalJSON

type GPUBaremetalClusterServerDeleteParams

type GPUBaremetalClusterServerDeleteParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	ClusterID string           `path:"cluster_id,required" json:"-"`
	// Set False if you do not want to delete assigned floating IPs. By default, it's
	// True.
	DeleteFloatings param.Opt[bool] `query:"delete_floatings,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (GPUBaremetalClusterServerDeleteParams) URLQuery

func (r GPUBaremetalClusterServerDeleteParams) URLQuery() (v url.Values, err error)

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

type GPUBaremetalClusterServerDetachInterfaceParams

type GPUBaremetalClusterServerDetachInterfaceParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// IP address
	IPAddress string `json:"ip_address,required"`
	// ID of the port
	PortID string `json:"port_id,required"`
	// contains filtered or unexported fields
}

func (GPUBaremetalClusterServerDetachInterfaceParams) MarshalJSON

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

type GPUBaremetalClusterServerFixedIPAssignment

type GPUBaremetalClusterServerFixedIPAssignment struct {
	// Is network external
	External bool `json:"external,required"`
	// Ip address
	IPAddress string `json:"ip_address,required"`
	// Interface subnet id
	SubnetID string `json:"subnet_id,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		External    respjson.Field
		IPAddress   respjson.Field
		SubnetID    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (GPUBaremetalClusterServerFixedIPAssignment) RawJSON

Returns the unmodified JSON received from the API

func (*GPUBaremetalClusterServerFixedIPAssignment) UnmarshalJSON

func (r *GPUBaremetalClusterServerFixedIPAssignment) UnmarshalJSON(data []byte) error

type GPUBaremetalClusterServerFlavor

type GPUBaremetalClusterServerFlavor struct {
	// CPU architecture
	Architecture string `json:"architecture,required"`
	// Flavor ID is the same as name
	FlavorID string `json:"flavor_id,required"`
	// Flavor name
	FlavorName string `json:"flavor_name,required"`
	// Additional hardware description
	HardwareDescription GPUBaremetalClusterServerFlavorHardwareDescription `json:"hardware_description,required"`
	// Operating system
	OsType string `json:"os_type,required"`
	// RAM size in MiB
	Ram int64 `json:"ram,required"`
	// Flavor resource class for mapping to hardware capacity
	ResourceClass string `json:"resource_class,required"`
	// Virtual CPU count. For bare metal flavors, it's a physical CPU count
	Vcpus int64 `json:"vcpus,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Architecture        respjson.Field
		FlavorID            respjson.Field
		FlavorName          respjson.Field
		HardwareDescription respjson.Field
		OsType              respjson.Field
		Ram                 respjson.Field
		ResourceClass       respjson.Field
		Vcpus               respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Flavor

func (GPUBaremetalClusterServerFlavor) RawJSON

Returns the unmodified JSON received from the API

func (*GPUBaremetalClusterServerFlavor) UnmarshalJSON

func (r *GPUBaremetalClusterServerFlavor) UnmarshalJSON(data []byte) error

type GPUBaremetalClusterServerFlavorHardwareDescription

type GPUBaremetalClusterServerFlavorHardwareDescription struct {
	// Human-readable CPU description
	CPU string `json:"cpu,required"`
	// Human-readable disk description
	Disk string `json:"disk,required"`
	// Human-readable GPU description
	GPU string `json:"gpu,required"`
	// If the flavor is licensed, this field contains the license type
	License string `json:"license,required"`
	// Human-readable NIC description
	Network string `json:"network,required"`
	// Human-readable RAM description
	Ram string `json:"ram,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CPU         respjson.Field
		Disk        respjson.Field
		GPU         respjson.Field
		License     respjson.Field
		Network     respjson.Field
		Ram         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Additional hardware description

func (GPUBaremetalClusterServerFlavorHardwareDescription) RawJSON

Returns the unmodified JSON received from the API

func (*GPUBaremetalClusterServerFlavorHardwareDescription) UnmarshalJSON

type GPUBaremetalClusterServerGetConsoleParams

type GPUBaremetalClusterServerGetConsoleParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type GPUBaremetalClusterServerList

type GPUBaremetalClusterServerList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []GPUBaremetalClusterServer `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (GPUBaremetalClusterServerList) RawJSON

Returns the unmodified JSON received from the API

func (*GPUBaremetalClusterServerList) UnmarshalJSON

func (r *GPUBaremetalClusterServerList) UnmarshalJSON(data []byte) error

type GPUBaremetalClusterServerPowercycleParams

type GPUBaremetalClusterServerPowercycleParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type GPUBaremetalClusterServerRebootParams

type GPUBaremetalClusterServerRebootParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type GPUBaremetalClusterServerSecurityGroup

type GPUBaremetalClusterServerSecurityGroup struct {
	// Name.
	Name string `json:"name,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Name        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (GPUBaremetalClusterServerSecurityGroup) RawJSON

Returns the unmodified JSON received from the API

func (*GPUBaremetalClusterServerSecurityGroup) UnmarshalJSON

func (r *GPUBaremetalClusterServerSecurityGroup) UnmarshalJSON(data []byte) error

type GPUBaremetalClusterServerService

type GPUBaremetalClusterServerService struct {
	Options []option.RequestOption
}

GPUBaremetalClusterServerService contains methods and other services that help with interacting with the gcore API.

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

func NewGPUBaremetalClusterServerService

func NewGPUBaremetalClusterServerService(opts ...option.RequestOption) (r GPUBaremetalClusterServerService)

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

func (*GPUBaremetalClusterServerService) AttachInterface

Attach interface to bare metal GPU cluster server

func (*GPUBaremetalClusterServerService) Delete

Delete bare metal GPU server from cluster

func (*GPUBaremetalClusterServerService) DetachInterface

Detach interface from bare metal GPU cluster server

func (*GPUBaremetalClusterServerService) GetConsole

Get bare metal GPU cluster server console URL

func (*GPUBaremetalClusterServerService) Powercycle

Stops and then starts the server, effectively performing a hard reboot.

func (*GPUBaremetalClusterServerService) Reboot

Reboot one bare metal GPU cluster server

type GPUBaremetalClusterServerStatus

type GPUBaremetalClusterServerStatus string

Instance status

const (
	GPUBaremetalClusterServerStatusActive           GPUBaremetalClusterServerStatus = "ACTIVE"
	GPUBaremetalClusterServerStatusBuild            GPUBaremetalClusterServerStatus = "BUILD"
	GPUBaremetalClusterServerStatusDeleted          GPUBaremetalClusterServerStatus = "DELETED"
	GPUBaremetalClusterServerStatusError            GPUBaremetalClusterServerStatus = "ERROR"
	GPUBaremetalClusterServerStatusHardReboot       GPUBaremetalClusterServerStatus = "HARD_REBOOT"
	GPUBaremetalClusterServerStatusMigrating        GPUBaremetalClusterServerStatus = "MIGRATING"
	GPUBaremetalClusterServerStatusPassword         GPUBaremetalClusterServerStatus = "PASSWORD"
	GPUBaremetalClusterServerStatusPaused           GPUBaremetalClusterServerStatus = "PAUSED"
	GPUBaremetalClusterServerStatusReboot           GPUBaremetalClusterServerStatus = "REBOOT"
	GPUBaremetalClusterServerStatusRebuild          GPUBaremetalClusterServerStatus = "REBUILD"
	GPUBaremetalClusterServerStatusRescue           GPUBaremetalClusterServerStatus = "RESCUE"
	GPUBaremetalClusterServerStatusResize           GPUBaremetalClusterServerStatus = "RESIZE"
	GPUBaremetalClusterServerStatusRevertResize     GPUBaremetalClusterServerStatus = "REVERT_RESIZE"
	GPUBaremetalClusterServerStatusShelved          GPUBaremetalClusterServerStatus = "SHELVED"
	GPUBaremetalClusterServerStatusShelvedOffloaded GPUBaremetalClusterServerStatus = "SHELVED_OFFLOADED"
	GPUBaremetalClusterServerStatusShutoff          GPUBaremetalClusterServerStatus = "SHUTOFF"
	GPUBaremetalClusterServerStatusSoftDeleted      GPUBaremetalClusterServerStatus = "SOFT_DELETED"
	GPUBaremetalClusterServerStatusSuspended        GPUBaremetalClusterServerStatus = "SUSPENDED"
	GPUBaremetalClusterServerStatusUnknown          GPUBaremetalClusterServerStatus = "UNKNOWN"
	GPUBaremetalClusterServerStatusVerifyResize     GPUBaremetalClusterServerStatus = "VERIFY_RESIZE"
)

type GPUBaremetalClusterServerVmState

type GPUBaremetalClusterServerVmState string

Virtual machine state (active)

const (
	GPUBaremetalClusterServerVmStateActive           GPUBaremetalClusterServerVmState = "active"
	GPUBaremetalClusterServerVmStateBuilding         GPUBaremetalClusterServerVmState = "building"
	GPUBaremetalClusterServerVmStateDeleted          GPUBaremetalClusterServerVmState = "deleted"
	GPUBaremetalClusterServerVmStateError            GPUBaremetalClusterServerVmState = "error"
	GPUBaremetalClusterServerVmStatePaused           GPUBaremetalClusterServerVmState = "paused"
	GPUBaremetalClusterServerVmStateRescued          GPUBaremetalClusterServerVmState = "rescued"
	GPUBaremetalClusterServerVmStateResized          GPUBaremetalClusterServerVmState = "resized"
	GPUBaremetalClusterServerVmStateShelved          GPUBaremetalClusterServerVmState = "shelved"
	GPUBaremetalClusterServerVmStateShelvedOffloaded GPUBaremetalClusterServerVmState = "shelved_offloaded"
	GPUBaremetalClusterServerVmStateSoftDeleted      GPUBaremetalClusterServerVmState = "soft-deleted"
	GPUBaremetalClusterServerVmStateStopped          GPUBaremetalClusterServerVmState = "stopped"
	GPUBaremetalClusterServerVmStateSuspended        GPUBaremetalClusterServerVmState = "suspended"
)

type GPUBaremetalClusterService

GPUBaremetalClusterService contains methods and other services that help with interacting with the gcore API.

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

func NewGPUBaremetalClusterService

func NewGPUBaremetalClusterService(opts ...option.RequestOption) (r GPUBaremetalClusterService)

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

func (*GPUBaremetalClusterService) Delete

Delete bare metal GPU cluster

func (*GPUBaremetalClusterService) Get

Get bare metal GPU cluster

func (*GPUBaremetalClusterService) List

List bare metal GPU clusters

func (*GPUBaremetalClusterService) ListAutoPaging

List bare metal GPU clusters

func (*GPUBaremetalClusterService) New

Create bare metal GPU cluster

func (*GPUBaremetalClusterService) PowercycleAllServers

Stops and then starts all cluster servers, effectively performing a hard reboot.

func (*GPUBaremetalClusterService) RebootAllServers

Reboot all bare metal GPU cluster servers

func (*GPUBaremetalClusterService) Rebuild

All cluster nodes must be specified to update the cluster image.

func (*GPUBaremetalClusterService) Resize

Resize bare metal GPU cluster

type GPUBaremetalClusterTaskStatus

type GPUBaremetalClusterTaskStatus string

Task status

const (
	GPUBaremetalClusterTaskStatusClusterCleanUp  GPUBaremetalClusterTaskStatus = "CLUSTER_CLEAN_UP"
	GPUBaremetalClusterTaskStatusClusterResize   GPUBaremetalClusterTaskStatus = "CLUSTER_RESIZE"
	GPUBaremetalClusterTaskStatusClusterResume   GPUBaremetalClusterTaskStatus = "CLUSTER_RESUME"
	GPUBaremetalClusterTaskStatusClusterSuspend  GPUBaremetalClusterTaskStatus = "CLUSTER_SUSPEND"
	GPUBaremetalClusterTaskStatusError           GPUBaremetalClusterTaskStatus = "ERROR"
	GPUBaremetalClusterTaskStatusFinished        GPUBaremetalClusterTaskStatus = "FINISHED"
	GPUBaremetalClusterTaskStatusIpuServers      GPUBaremetalClusterTaskStatus = "IPU_SERVERS"
	GPUBaremetalClusterTaskStatusNetwork         GPUBaremetalClusterTaskStatus = "NETWORK"
	GPUBaremetalClusterTaskStatusPoplarServers   GPUBaremetalClusterTaskStatus = "POPLAR_SERVERS"
	GPUBaremetalClusterTaskStatusPostDeploySetup GPUBaremetalClusterTaskStatus = "POST_DEPLOY_SETUP"
	GPUBaremetalClusterTaskStatusVipuController  GPUBaremetalClusterTaskStatus = "VIPU_CONTROLLER"
)

type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice

type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice struct {
	// Flavor architecture type
	Architecture string `json:"architecture,required"`
	// Number of available instances of given flavor
	Capacity int64 `json:"capacity,required"`
	// If the flavor is disabled, new resources cannot be created using this flavor.
	Disabled bool `json:"disabled,required"`
	// Additional virtual hardware description
	HardwareDescription GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareDescription `json:"hardware_description,required"`
	// Additional bare metal hardware properties
	HardwareProperties GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareProperties `json:"hardware_properties,required"`
	// Flavor name
	Name string `json:"name,required"`
	// Flavor price
	Price GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPricePrice `json:"price,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Architecture        respjson.Field
		Capacity            respjson.Field
		Disabled            respjson.Field
		HardwareDescription respjson.Field
		HardwareProperties  respjson.Field
		Name                respjson.Field
		Price               respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice) RawJSON

Returns the unmodified JSON received from the API

func (*GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice) UnmarshalJSON

type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareDescription

type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareDescription struct {
	// Human-readable CPU description
	CPU string `json:"cpu,required"`
	// Human-readable disk description
	Disk string `json:"disk,required"`
	// Human-readable GPU description
	GPU string `json:"gpu,required"`
	// Human-readable NIC description
	Network string `json:"network,required"`
	// Human-readable RAM description
	Ram string `json:"ram,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CPU         respjson.Field
		Disk        respjson.Field
		GPU         respjson.Field
		Network     respjson.Field
		Ram         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Additional virtual hardware description

func (GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareDescription) RawJSON

Returns the unmodified JSON received from the API

func (*GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareDescription) UnmarshalJSON

type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareProperties

type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareProperties struct {
	// The total count of available GPUs.
	GPUCount int64 `json:"gpu_count,required"`
	// The manufacturer of the graphics processing GPU
	GPUManufacturer string `json:"gpu_manufacturer,required"`
	// GPU model
	GPUModel string `json:"gpu_model,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		GPUCount        respjson.Field
		GPUManufacturer respjson.Field
		GPUModel        respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Additional bare metal hardware properties

func (GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareProperties) RawJSON

Returns the unmodified JSON received from the API

func (*GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareProperties) UnmarshalJSON

type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPricePrice

type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPricePrice struct {
	// Currency code. Shown if the include_prices query parameter if set to true
	CurrencyCode string `json:"currency_code,required"`
	// Price per hour. Shown if the include_prices query parameter if set to true
	PricePerHour float64 `json:"price_per_hour,required"`
	// Price per month. Shown if the include_prices query parameter if set to true
	PricePerMonth float64 `json:"price_per_month,required"`
	// Price status for the UI
	//
	// Any of "error", "hide", "show".
	PriceStatus string `json:"price_status,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CurrencyCode  respjson.Field
		PricePerHour  respjson.Field
		PricePerMonth respjson.Field
		PriceStatus   respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Flavor price

func (GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPricePrice) RawJSON

Returns the unmodified JSON received from the API

func (*GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPricePrice) UnmarshalJSON

type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPrice

type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPrice struct {
	// Flavor architecture type
	Architecture string `json:"architecture,required"`
	// Number of available instances of given flavor
	Capacity int64 `json:"capacity,required"`
	// If the flavor is disabled, new resources cannot be created using this flavor.
	Disabled bool `json:"disabled,required"`
	// Additional bare metal hardware description
	HardwareDescription GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareDescription `json:"hardware_description,required"`
	// Additional bare metal hardware properties
	HardwareProperties GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareProperties `json:"hardware_properties,required"`
	// Flavor name
	Name string `json:"name,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Architecture        respjson.Field
		Capacity            respjson.Field
		Disabled            respjson.Field
		HardwareDescription respjson.Field
		HardwareProperties  respjson.Field
		Name                respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPrice) RawJSON

Returns the unmodified JSON received from the API

func (*GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPrice) UnmarshalJSON

type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareDescription

type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareDescription struct {
	// Human-readable CPU description
	CPU string `json:"cpu,required"`
	// Human-readable disk description
	Disk string `json:"disk,required"`
	// Human-readable GPU description
	GPU string `json:"gpu,required"`
	// Human-readable NIC description
	Network string `json:"network,required"`
	// Human-readable RAM description
	Ram string `json:"ram,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CPU         respjson.Field
		Disk        respjson.Field
		GPU         respjson.Field
		Network     respjson.Field
		Ram         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Additional bare metal hardware description

func (GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareDescription) RawJSON

Returns the unmodified JSON received from the API

func (*GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareDescription) UnmarshalJSON

type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareProperties

type GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareProperties struct {
	// The total count of available GPUs.
	GPUCount int64 `json:"gpu_count,required"`
	// The manufacturer of the graphics processing GPU
	GPUManufacturer string `json:"gpu_manufacturer,required"`
	// GPU model
	GPUModel string `json:"gpu_model,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		GPUCount        respjson.Field
		GPUManufacturer respjson.Field
		GPUModel        respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Additional bare metal hardware properties

func (GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareProperties) RawJSON

Returns the unmodified JSON received from the API

func (*GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareProperties) UnmarshalJSON

type GPUBaremetalFlavorList

type GPUBaremetalFlavorList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []GPUBaremetalFlavorUnion `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (GPUBaremetalFlavorList) RawJSON

func (r GPUBaremetalFlavorList) RawJSON() string

Returns the unmodified JSON received from the API

func (*GPUBaremetalFlavorList) UnmarshalJSON

func (r *GPUBaremetalFlavorList) UnmarshalJSON(data []byte) error

type GPUBaremetalFlavorUnion

type GPUBaremetalFlavorUnion struct {
	Architecture string `json:"architecture"`
	Capacity     int64  `json:"capacity"`
	Disabled     bool   `json:"disabled"`
	// This field is a union of
	// [GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareDescription],
	// [GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareDescription]
	HardwareDescription GPUBaremetalFlavorUnionHardwareDescription `json:"hardware_description"`
	// This field is a union of
	// [GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPriceHardwareProperties],
	// [GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPriceHardwareProperties]
	HardwareProperties GPUBaremetalFlavorUnionHardwareProperties `json:"hardware_properties"`
	Name               string                                    `json:"name"`
	// This field is from variant
	// [GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice].
	Price GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPricePrice `json:"price"`
	JSON  struct {
		Architecture        respjson.Field
		Capacity            respjson.Field
		Disabled            respjson.Field
		HardwareDescription respjson.Field
		HardwareProperties  respjson.Field
		Name                respjson.Field
		Price               respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

GPUBaremetalFlavorUnion contains all possible properties and values from GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPrice, GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (GPUBaremetalFlavorUnion) AsBareMetalGPUFlavorsChemaWithPrice

func (u GPUBaremetalFlavorUnion) AsBareMetalGPUFlavorsChemaWithPrice() (v GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithPrice)

func (GPUBaremetalFlavorUnion) AsBareMetalGPUFlavorsChemaWithoutPrice

func (u GPUBaremetalFlavorUnion) AsBareMetalGPUFlavorsChemaWithoutPrice() (v GPUBaremetalFlavorBareMetalGPUFlavorsChemaWithoutPrice)

func (GPUBaremetalFlavorUnion) RawJSON

func (u GPUBaremetalFlavorUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*GPUBaremetalFlavorUnion) UnmarshalJSON

func (r *GPUBaremetalFlavorUnion) UnmarshalJSON(data []byte) error

type GPUBaremetalFlavorUnionHardwareDescription

type GPUBaremetalFlavorUnionHardwareDescription struct {
	CPU     string `json:"cpu"`
	Disk    string `json:"disk"`
	GPU     string `json:"gpu"`
	Network string `json:"network"`
	Ram     string `json:"ram"`
	JSON    struct {
		CPU     respjson.Field
		Disk    respjson.Field
		GPU     respjson.Field
		Network respjson.Field
		Ram     respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

GPUBaremetalFlavorUnionHardwareDescription is an implicit subunion of GPUBaremetalFlavorUnion. GPUBaremetalFlavorUnionHardwareDescription provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the GPUBaremetalFlavorUnion.

func (*GPUBaremetalFlavorUnionHardwareDescription) UnmarshalJSON

func (r *GPUBaremetalFlavorUnionHardwareDescription) UnmarshalJSON(data []byte) error

type GPUBaremetalFlavorUnionHardwareProperties

type GPUBaremetalFlavorUnionHardwareProperties struct {
	GPUCount        int64  `json:"gpu_count"`
	GPUManufacturer string `json:"gpu_manufacturer"`
	GPUModel        string `json:"gpu_model"`
	JSON            struct {
		GPUCount        respjson.Field
		GPUManufacturer respjson.Field
		GPUModel        respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

GPUBaremetalFlavorUnionHardwareProperties is an implicit subunion of GPUBaremetalFlavorUnion. GPUBaremetalFlavorUnionHardwareProperties provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the GPUBaremetalFlavorUnion.

func (*GPUBaremetalFlavorUnionHardwareProperties) UnmarshalJSON

func (r *GPUBaremetalFlavorUnionHardwareProperties) UnmarshalJSON(data []byte) error

type GPUImage

type GPUImage struct {
	// Image ID
	ID string `json:"id,required" format:"uuid4"`
	// Datetime when the image was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Minimal boot volume required
	MinDisk int64 `json:"min_disk,required"`
	// Minimal VM RAM required
	MinRam int64 `json:"min_ram,required"`
	// Image name
	Name string `json:"name,required"`
	// Image status
	Status string `json:"status,required"`
	// List of key-value tags associated with the resource. A tag is a key-value pair
	// that can be associated with a resource, enabling efficient filtering and
	// grouping for better organization and management. Some tags are read-only and
	// cannot be modified by the user. Tags are also integrated with cost reports,
	// allowing cost data to be filtered based on tag keys or values.
	Tags []Tag `json:"tags,required"`
	// Datetime when the image was updated
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// Image visibility. Globally visible images are public
	Visibility string `json:"visibility,required"`
	// Image architecture type
	Architecture string `json:"architecture,nullable"`
	// OS Distribution
	OsDistro string `json:"os_distro,nullable"`
	// The operating system installed on the image
	OsType string `json:"os_type,nullable"`
	// OS version, i.e. 19.04 (for Ubuntu) or 9.4 for Debian
	OsVersion string `json:"os_version,nullable"`
	// Image size in bytes.
	Size int64 `json:"size"`
	// Whether the image supports SSH key or not
	SSHKey string `json:"ssh_key,nullable"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		CreatedAt    respjson.Field
		MinDisk      respjson.Field
		MinRam       respjson.Field
		Name         respjson.Field
		Status       respjson.Field
		Tags         respjson.Field
		UpdatedAt    respjson.Field
		Visibility   respjson.Field
		Architecture respjson.Field
		OsDistro     respjson.Field
		OsType       respjson.Field
		OsVersion    respjson.Field
		Size         respjson.Field
		SSHKey       respjson.Field
		TaskID       respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (GPUImage) RawJSON

func (r GPUImage) RawJSON() string

Returns the unmodified JSON received from the API

func (*GPUImage) UnmarshalJSON

func (r *GPUImage) UnmarshalJSON(data []byte) error

type GPUImageList

type GPUImageList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []GPUImage `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (GPUImageList) RawJSON

func (r GPUImageList) RawJSON() string

Returns the unmodified JSON received from the API

func (*GPUImageList) UnmarshalJSON

func (r *GPUImageList) UnmarshalJSON(data []byte) error

type HTTPMethod

type HTTPMethod string
const (
	HTTPMethodConnect HTTPMethod = "CONNECT"
	HTTPMethodDelete  HTTPMethod = "DELETE"
	HTTPMethodGet     HTTPMethod = "GET"
	HTTPMethodHead    HTTPMethod = "HEAD"
	HTTPMethodOptions HTTPMethod = "OPTIONS"
	HTTPMethodPatch   HTTPMethod = "PATCH"
	HTTPMethodPost    HTTPMethod = "POST"
	HTTPMethodPut     HTTPMethod = "PUT"
	HTTPMethodTrace   HTTPMethod = "TRACE"
)

type HealthMonitor

type HealthMonitor struct {
	// Health monitor ID
	ID string `json:"id,required" format:"uuid4"`
	// true if enabled. Defaults to true
	AdminStateUp bool `json:"admin_state_up,required"`
	// The time, in seconds, between sending probes to members
	Delay int64 `json:"delay,required"`
	// Number of successes before the member is switched to ONLINE state
	MaxRetries int64 `json:"max_retries,required"`
	// Number of failures before the member is switched to ERROR state
	MaxRetriesDown int64 `json:"max_retries_down,required"`
	// Health Monitor operating status
	//
	// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
	OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
	// Health monitor lifecycle status
	//
	// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
	// "PENDING_UPDATE".
	ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
	// The maximum time to connect. Must be less than the delay value
	Timeout int64 `json:"timeout,required"`
	// Health monitor type. Once health monitor is created, cannot be changed.
	//
	// Any of "HTTP", "HTTPS", "K8S", "PING", "TCP", "TLS-HELLO", "UDP-CONNECT".
	Type          LbHealthMonitorType `json:"type,required"`
	ExpectedCodes string              `json:"expected_codes,nullable"`
	// HTTP method
	//
	// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
	// "TRACE".
	HTTPMethod HTTPMethod `json:"http_method,nullable"`
	// URL Path. Defaults to '/'
	URLPath string `json:"url_path,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                 respjson.Field
		AdminStateUp       respjson.Field
		Delay              respjson.Field
		MaxRetries         respjson.Field
		MaxRetriesDown     respjson.Field
		OperatingStatus    respjson.Field
		ProvisioningStatus respjson.Field
		Timeout            respjson.Field
		Type               respjson.Field
		ExpectedCodes      respjson.Field
		HTTPMethod         respjson.Field
		URLPath            respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (HealthMonitor) RawJSON

func (r HealthMonitor) RawJSON() string

Returns the unmodified JSON received from the API

func (*HealthMonitor) UnmarshalJSON

func (r *HealthMonitor) UnmarshalJSON(data []byte) error

type HealthMonitorStatus

type HealthMonitorStatus struct {
	// UUID of the entity
	ID string `json:"id,required" format:"uuid"`
	// Operating status of the entity
	//
	// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
	OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
	// Provisioning status of the entity
	//
	// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
	// "PENDING_UPDATE".
	ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
	// Type of the Health Monitor
	//
	// Any of "HTTP", "HTTPS", "K8S", "PING", "TCP", "TLS-HELLO", "UDP-CONNECT".
	Type LbHealthMonitorType `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                 respjson.Field
		OperatingStatus    respjson.Field
		ProvisioningStatus respjson.Field
		Type               respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (HealthMonitorStatus) RawJSON

func (r HealthMonitorStatus) RawJSON() string

Returns the unmodified JSON received from the API

func (*HealthMonitorStatus) UnmarshalJSON

func (r *HealthMonitorStatus) UnmarshalJSON(data []byte) error

type IPAssignment

type IPAssignment struct {
	// IP address
	IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
	// ID of the subnet that allocated the IP
	SubnetID string `json:"subnet_id,required" format:"uuid4"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IPAddress   respjson.Field
		SubnetID    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (IPAssignment) RawJSON

func (r IPAssignment) RawJSON() string

Returns the unmodified JSON received from the API

func (*IPAssignment) UnmarshalJSON

func (r *IPAssignment) UnmarshalJSON(data []byte) error

type IPRangeService

type IPRangeService struct {
	Options []option.RequestOption
}

IPRangeService contains methods and other services that help with interacting with the gcore API.

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

func NewIPRangeService

func NewIPRangeService(opts ...option.RequestOption) (r IPRangeService)

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

func (*IPRangeService) List

func (r *IPRangeService) List(ctx context.Context, opts ...option.RequestOption) (res *IPRanges, err error)

List of all Edge Cloud Egress Public IPs.

type IPRanges

type IPRanges struct {
	// IP ranges list
	Ranges []string `json:"ranges,required" format:"ipv4interface"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Ranges      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (IPRanges) RawJSON

func (r IPRanges) RawJSON() string

Returns the unmodified JSON received from the API

func (*IPRanges) UnmarshalJSON

func (r *IPRanges) UnmarshalJSON(data []byte) error

type IPVersion

type IPVersion int64
const (
	IPVersion4 IPVersion = 4
	IPVersion6 IPVersion = 6
)

type IPWithSubnet

type IPWithSubnet struct {
	// IP address
	IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
	// Subnet details
	Subnet Subnet `json:"subnet,required"`
	// ID of the subnet that allocated the IP
	SubnetID string `json:"subnet_id,required" format:"uuid4"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IPAddress   respjson.Field
		Subnet      respjson.Field
		SubnetID    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (IPWithSubnet) RawJSON

func (r IPWithSubnet) RawJSON() string

Returns the unmodified JSON received from the API

func (*IPWithSubnet) UnmarshalJSON

func (r *IPWithSubnet) UnmarshalJSON(data []byte) error

type Image

type Image struct {
	// Image ID
	ID string `json:"id,required"`
	// Datetime when the image was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Disk format
	DiskFormat string `json:"disk_format,required"`
	// Minimal boot volume required
	MinDisk int64 `json:"min_disk,required"`
	// Minimal VM RAM required
	MinRam int64 `json:"min_ram,required"`
	// Image display name
	Name string `json:"name,required"`
	// OS Distribution, i.e. Debian, CentOS, Ubuntu, CoreOS etc.
	OsDistro string `json:"os_distro,required"`
	// The operating system installed on the image.
	//
	// Any of "linux", "windows".
	OsType ImageOsType `json:"os_type,required"`
	// OS version, i.e. 19.04 (for Ubuntu) or 9.4 for Debian
	OsVersion string `json:"os_version,required"`
	// Project ID
	ProjectID int64 `json:"project_id,required"`
	// Region name
	Region string `json:"region,required"`
	// Region ID
	RegionID int64 `json:"region_id,required"`
	// Image size in bytes
	Size int64 `json:"size,required"`
	// Image status, i.e. active
	Status string `json:"status,required"`
	// List of key-value tags associated with the resource. A tag is a key-value pair
	// that can be associated with a resource, enabling efficient filtering and
	// grouping for better organization and management. Some tags are read-only and
	// cannot be modified by the user. Tags are also integrated with cost reports,
	// allowing cost data to be filtered based on tag keys or values.
	Tags []Tag `json:"tags,required"`
	// Datetime when the image was updated
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// Image visibility. Globally visible images are public
	Visibility string `json:"visibility,required"`
	// An image architecture type: aarch64, x86_64
	//
	// Any of "aarch64", "x86_64".
	Architecture ImageArchitecture `json:"architecture"`
	// Task that created this entity
	CreatorTaskID string `json:"creator_task_id,nullable"`
	// Image description
	Description  string `json:"description,nullable"`
	DisplayOrder int64  `json:"display_order,nullable"`
	// Specifies the type of firmware with which to boot the guest.
	//
	// Any of "bios", "uefi".
	HwFirmwareType ImageHwFirmwareType `json:"hw_firmware_type,nullable"`
	// A virtual chipset type.
	//
	// Any of "pc", "q35".
	HwMachineType ImageHwMachineType `json:"hw_machine_type,nullable"`
	// Set to true if the image will be used by bare metal servers. Defaults to false.
	IsBaremetal bool `json:"is_baremetal,nullable"`
	// Whether the image supports SSH key or not
	//
	// Any of "allow", "deny", "required".
	SSHKey ImageSSHKey `json:"ssh_key,nullable"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID             respjson.Field
		CreatedAt      respjson.Field
		DiskFormat     respjson.Field
		MinDisk        respjson.Field
		MinRam         respjson.Field
		Name           respjson.Field
		OsDistro       respjson.Field
		OsType         respjson.Field
		OsVersion      respjson.Field
		ProjectID      respjson.Field
		Region         respjson.Field
		RegionID       respjson.Field
		Size           respjson.Field
		Status         respjson.Field
		Tags           respjson.Field
		UpdatedAt      respjson.Field
		Visibility     respjson.Field
		Architecture   respjson.Field
		CreatorTaskID  respjson.Field
		Description    respjson.Field
		DisplayOrder   respjson.Field
		HwFirmwareType respjson.Field
		HwMachineType  respjson.Field
		IsBaremetal    respjson.Field
		SSHKey         respjson.Field
		TaskID         respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Image) RawJSON

func (r Image) RawJSON() string

Returns the unmodified JSON received from the API

func (*Image) UnmarshalJSON

func (r *Image) UnmarshalJSON(data []byte) error

type ImageArchitecture

type ImageArchitecture string

An image architecture type: aarch64, x86_64

const (
	ImageArchitectureAarch64 ImageArchitecture = "aarch64"
	ImageArchitectureX86_64  ImageArchitecture = "x86_64"
)

type ImageHwFirmwareType

type ImageHwFirmwareType string

Specifies the type of firmware with which to boot the guest.

const (
	ImageHwFirmwareTypeBios ImageHwFirmwareType = "bios"
	ImageHwFirmwareTypeUefi ImageHwFirmwareType = "uefi"
)

type ImageHwMachineType

type ImageHwMachineType string

A virtual chipset type.

const (
	ImageHwMachineTypePc  ImageHwMachineType = "pc"
	ImageHwMachineTypeQ35 ImageHwMachineType = "q35"
)

type ImageList

type ImageList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []Image `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ImageList) RawJSON

func (r ImageList) RawJSON() string

Returns the unmodified JSON received from the API

func (*ImageList) UnmarshalJSON

func (r *ImageList) UnmarshalJSON(data []byte) error

type ImageOsType

type ImageOsType string

The operating system installed on the image.

const (
	ImageOsTypeLinux   ImageOsType = "linux"
	ImageOsTypeWindows ImageOsType = "windows"
)

type ImageSSHKey

type ImageSSHKey string

Whether the image supports SSH key or not

const (
	ImageSSHKeyAllow    ImageSSHKey = "allow"
	ImageSSHKeyDeny     ImageSSHKey = "deny"
	ImageSSHKeyRequired ImageSSHKey = "required"
)

type Inference

type Inference struct {
	// Address of the inference instance
	Address string `json:"address,required" format:"uri"`
	// `true` if instance uses API key authentication.
	// `"Authorization": "Bearer *****"` or `"X-Api-Key": "*****"` header is required
	// for the requests to the instance if enabled.
	AuthEnabled bool `json:"auth_enabled,required"`
	// Command to be executed when running a container from an image.
	Command string `json:"command,required"`
	// List of containers for the inference instance
	Containers []Container `json:"containers,required"`
	// Inference instance creation date in ISO 8601 format.
	CreatedAt string `json:"created_at,required"`
	// Registry credentials name
	CredentialsName string `json:"credentials_name,required"`
	// Inference instance description.
	Description string `json:"description,required"`
	// Environment variables for the inference instance
	Envs map[string]string `json:"envs,required"`
	// Flavor name for the inference instance
	FlavorName string `json:"flavor_name,required"`
	// Docker image for the inference instance. This field should contain the image
	// name and tag in the format 'name:tag', e.g., 'nginx:latest'. It defaults to
	// Docker Hub as the image registry, but any accessible Docker image URL can be
	// specified.
	Image string `json:"image,required"`
	// Ingress options for the inference instance
	IngressOpts IngressOptsOut `json:"ingress_opts,required"`
	// Listening port for the inference instance.
	ListeningPort int64 `json:"listening_port,required"`
	// Logging configuration for the inference instance
	Logging Logging `json:"logging,required"`
	// Inference instance name.
	Name string `json:"name,required"`
	// Probes configured for all containers of the inference instance.
	Probes InferenceProbes `json:"probes,required"`
	// Project ID. If not provided, your default project ID will be used.
	ProjectID int64 `json:"project_id,required"`
	// Inference instance status.
	//
	// Value can be one of the following:
	//
	//   - `DEPLOYING` - The instance is being deployed. Containers are not yet created.
	//   - `PARTIALLYDEPLOYED` - All containers have been created, but some may not be
	//     ready yet. Instances stuck in this state typically indicate either image being
	//     pulled, or a failure of some kind. In the latter case, the `error_message`
	//     field of the respective container object in the `containers` collection
	//     explains the failure reason.
	//   - `ACTIVE` - The instance is running and ready to accept requests.
	//   - `DISABLED` - The instance is disabled and not accepting any requests.
	//   - `DELETING` - The instance is being deleted.
	//
	// Any of "ACTIVE", "DELETING", "DEPLOYING", "DISABLED", "PARTIALLYDEPLOYED".
	Status InferenceStatus `json:"status,required"`
	// Specifies the duration in seconds without any requests after which the
	// containers will be downscaled to their minimum scale value as defined by
	// `scale.min`. If set, this helps in optimizing resource usage by reducing the
	// number of container instances during periods of inactivity.
	Timeout int64 `json:"timeout,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Address         respjson.Field
		AuthEnabled     respjson.Field
		Command         respjson.Field
		Containers      respjson.Field
		CreatedAt       respjson.Field
		CredentialsName respjson.Field
		Description     respjson.Field
		Envs            respjson.Field
		FlavorName      respjson.Field
		Image           respjson.Field
		IngressOpts     respjson.Field
		ListeningPort   respjson.Field
		Logging         respjson.Field
		Name            respjson.Field
		Probes          respjson.Field
		ProjectID       respjson.Field
		Status          respjson.Field
		Timeout         respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Inference) RawJSON

func (r Inference) RawJSON() string

Returns the unmodified JSON received from the API

func (*Inference) UnmarshalJSON

func (r *Inference) UnmarshalJSON(data []byte) error

type InferenceApikeySecret

type InferenceApikeySecret struct {
	// API key secret
	Secret string `json:"secret,required"`
	// API key status
	//
	// Any of "PENDING", "READY".
	Status InferenceApikeySecretStatus `json:"status,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Secret      respjson.Field
		Status      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InferenceApikeySecret) RawJSON

func (r InferenceApikeySecret) RawJSON() string

Returns the unmodified JSON received from the API

func (*InferenceApikeySecret) UnmarshalJSON

func (r *InferenceApikeySecret) UnmarshalJSON(data []byte) error

type InferenceApikeySecretStatus

type InferenceApikeySecretStatus string

API key status

const (
	InferenceApikeySecretStatusPending InferenceApikeySecretStatus = "PENDING"
	InferenceApikeySecretStatusReady   InferenceApikeySecretStatus = "READY"
)

type InferenceDeploymentDeleteParams

type InferenceDeploymentDeleteParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type InferenceDeploymentGetAPIKeyParams

type InferenceDeploymentGetAPIKeyParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type InferenceDeploymentGetParams

type InferenceDeploymentGetParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type InferenceDeploymentListParams

type InferenceDeploymentListParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Optional. Limit the number of returned items
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Optional. Offset value is used to exclude the first set of records from the
	// result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (InferenceDeploymentListParams) URLQuery

func (r InferenceDeploymentListParams) URLQuery() (v url.Values, err error)

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

type InferenceDeploymentLogListParams

type InferenceDeploymentLogListParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `query:"region_id,omitzero" json:"-"`
	// Optional. Limit the number of returned items
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Optional. Offset value is used to exclude the first set of records from the
	// result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Order by field
	//
	// Any of "time.asc", "time.desc".
	OrderBy InferenceDeploymentLogListParamsOrderBy `query:"order_by,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (InferenceDeploymentLogListParams) URLQuery

func (r InferenceDeploymentLogListParams) URLQuery() (v url.Values, err error)

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

type InferenceDeploymentLogListParamsOrderBy

type InferenceDeploymentLogListParamsOrderBy string

Order by field

const (
	InferenceDeploymentLogListParamsOrderByTimeAsc  InferenceDeploymentLogListParamsOrderBy = "time.asc"
	InferenceDeploymentLogListParamsOrderByTimeDesc InferenceDeploymentLogListParamsOrderBy = "time.desc"
)

type InferenceDeploymentLogService

type InferenceDeploymentLogService struct {
	Options []option.RequestOption
}

InferenceDeploymentLogService contains methods and other services that help with interacting with the gcore API.

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

func NewInferenceDeploymentLogService

func NewInferenceDeploymentLogService(opts ...option.RequestOption) (r InferenceDeploymentLogService)

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

func (*InferenceDeploymentLogService) List

Get inference deployment logs

func (*InferenceDeploymentLogService) ListAutoPaging

Get inference deployment logs

type InferenceDeploymentNewParams

type InferenceDeploymentNewParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// List of containers for the inference instance.
	Containers []InferenceDeploymentNewParamsContainer `json:"containers,omitzero,required"`
	// Flavor name for the inference instance.
	FlavorName string `json:"flavor_name,required"`
	// Docker image for the inference instance. This field should contain the image
	// name and tag in the format 'name:tag', e.g., 'nginx:latest'. It defaults to
	// Docker Hub as the image registry, but any accessible Docker image URL can be
	// specified.
	Image string `json:"image,required"`
	// Listening port for the inference instance.
	ListeningPort int64 `json:"listening_port,required"`
	// Inference instance name.
	Name string `json:"name,required"`
	// Registry credentials name
	CredentialsName param.Opt[string] `json:"credentials_name,omitzero"`
	// Inference instance description.
	Description param.Opt[string] `json:"description,omitzero"`
	// Specifies the duration in seconds without any requests after which the
	// containers will be downscaled to their minimum scale value as defined by
	// `scale.min`. If set, this helps in optimizing resource usage by reducing the
	// number of container instances during periods of inactivity. The default value
	// when the parameter is not set is 120.
	Timeout param.Opt[int64] `json:"timeout,omitzero"`
	// Set to `true` to enable API key authentication for the inference instance.
	// `"Authorization": "Bearer *****"` or `"X-Api-Key": "*****"` header is required
	// for the requests to the instance if enabled
	AuthEnabled param.Opt[bool] `json:"auth_enabled,omitzero"`
	// Command to be executed when running a container from an image.
	Command []string `json:"command,omitzero"`
	// Logging configuration for the inference instance
	Logging InferenceDeploymentNewParamsLogging `json:"logging,omitzero"`
	// Probes configured for all containers of the inference instance. If probes are
	// not provided, and the image_name is from a the Model Catalog registry, the
	// default probes will be used.
	Probes InferenceDeploymentNewParamsProbes `json:"probes,omitzero"`
	// Environment variables for the inference instance.
	Envs map[string]string `json:"envs,omitzero"`
	// Ingress options for the inference instance
	IngressOpts IngressOptsParam `json:"ingress_opts,omitzero"`
	// contains filtered or unexported fields
}

func (InferenceDeploymentNewParams) MarshalJSON

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

type InferenceDeploymentNewParamsContainer

type InferenceDeploymentNewParamsContainer struct {
	// Region id for the container
	RegionID int64 `json:"region_id,required"`
	// Scale for the container
	Scale InferenceDeploymentNewParamsContainerScale `json:"scale,omitzero,required"`
	// contains filtered or unexported fields
}

The properties RegionID, Scale are required.

func (InferenceDeploymentNewParamsContainer) MarshalJSON

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

type InferenceDeploymentNewParamsContainerScale

type InferenceDeploymentNewParamsContainerScale struct {
	// Maximum scale for the container
	Max int64 `json:"max,required"`
	// Minimum scale for the container
	Min int64 `json:"min,required"`
	// Cooldown period between scaling actions in seconds
	CooldownPeriod param.Opt[int64] `json:"cooldown_period,omitzero"`
	// Polling interval for scaling triggers in seconds
	PollingInterval param.Opt[int64] `json:"polling_interval,omitzero"`
	// Triggers for scaling actions
	Triggers InferenceDeploymentNewParamsContainerScaleTriggers `json:"triggers,omitzero"`
	// contains filtered or unexported fields
}

Scale for the container

The properties Max, Min are required.

func (InferenceDeploymentNewParamsContainerScale) MarshalJSON

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

type InferenceDeploymentNewParamsContainerScaleTriggers

type InferenceDeploymentNewParamsContainerScaleTriggers struct {
	// CPU trigger configuration
	CPU InferenceDeploymentNewParamsContainerScaleTriggersCPU `json:"cpu,omitzero"`
	// GPU memory trigger configuration. Calculated by DCGM_FI_DEV_MEM_COPY_UTIL metric
	GPUMemory InferenceDeploymentNewParamsContainerScaleTriggersGPUMemory `json:"gpu_memory,omitzero"`
	// GPU utilization trigger configuration. Calculated by DCGM_FI_DEV_GPU_UTIL metric
	GPUUtilization InferenceDeploymentNewParamsContainerScaleTriggersGPUUtilization `json:"gpu_utilization,omitzero"`
	// HTTP trigger configuration
	HTTP InferenceDeploymentNewParamsContainerScaleTriggersHTTP `json:"http,omitzero"`
	// Memory trigger configuration
	Memory InferenceDeploymentNewParamsContainerScaleTriggersMemory `json:"memory,omitzero"`
	// SQS trigger configuration
	Sqs InferenceDeploymentNewParamsContainerScaleTriggersSqs `json:"sqs,omitzero"`
	// contains filtered or unexported fields
}

Triggers for scaling actions

func (InferenceDeploymentNewParamsContainerScaleTriggers) MarshalJSON

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

type InferenceDeploymentNewParamsContainerScaleTriggersCPU

type InferenceDeploymentNewParamsContainerScaleTriggersCPU struct {
	// Threshold value for the trigger in percentage
	Threshold int64 `json:"threshold,required"`
	// contains filtered or unexported fields
}

CPU trigger configuration

The property Threshold is required.

func (InferenceDeploymentNewParamsContainerScaleTriggersCPU) MarshalJSON

type InferenceDeploymentNewParamsContainerScaleTriggersGPUMemory

type InferenceDeploymentNewParamsContainerScaleTriggersGPUMemory struct {
	// Threshold value for the trigger in percentage
	Threshold int64 `json:"threshold,required"`
	// contains filtered or unexported fields
}

GPU memory trigger configuration. Calculated by DCGM_FI_DEV_MEM_COPY_UTIL metric

The property Threshold is required.

func (InferenceDeploymentNewParamsContainerScaleTriggersGPUMemory) MarshalJSON

type InferenceDeploymentNewParamsContainerScaleTriggersGPUUtilization

type InferenceDeploymentNewParamsContainerScaleTriggersGPUUtilization struct {
	// Threshold value for the trigger in percentage
	Threshold int64 `json:"threshold,required"`
	// contains filtered or unexported fields
}

GPU utilization trigger configuration. Calculated by DCGM_FI_DEV_GPU_UTIL metric

The property Threshold is required.

func (InferenceDeploymentNewParamsContainerScaleTriggersGPUUtilization) MarshalJSON

type InferenceDeploymentNewParamsContainerScaleTriggersHTTP

type InferenceDeploymentNewParamsContainerScaleTriggersHTTP struct {
	// Request count per 'window' seconds for the http trigger
	Rate int64 `json:"rate,required"`
	// Time window for rate calculation in seconds
	Window int64 `json:"window,required"`
	// contains filtered or unexported fields
}

HTTP trigger configuration

The properties Rate, Window are required.

func (InferenceDeploymentNewParamsContainerScaleTriggersHTTP) MarshalJSON

type InferenceDeploymentNewParamsContainerScaleTriggersMemory

type InferenceDeploymentNewParamsContainerScaleTriggersMemory struct {
	// Threshold value for the trigger in percentage
	Threshold int64 `json:"threshold,required"`
	// contains filtered or unexported fields
}

Memory trigger configuration

The property Threshold is required.

func (InferenceDeploymentNewParamsContainerScaleTriggersMemory) MarshalJSON

type InferenceDeploymentNewParamsContainerScaleTriggersSqs

type InferenceDeploymentNewParamsContainerScaleTriggersSqs struct {
	// Number of messages for activation
	ActivationQueueLength int64 `json:"activation_queue_length,required"`
	// AWS region
	AwsRegion string `json:"aws_region,required"`
	// Number of messages for one replica
	QueueLength int64 `json:"queue_length,required"`
	// SQS queue URL
	QueueURL string `json:"queue_url,required"`
	// Auth secret name
	SecretName string `json:"secret_name,required"`
	// Custom AWS endpoint
	AwsEndpoint param.Opt[string] `json:"aws_endpoint,omitzero"`
	// Scale on delayed messages
	ScaleOnDelayed param.Opt[bool] `json:"scale_on_delayed,omitzero"`
	// Scale on in-flight messages
	ScaleOnFlight param.Opt[bool] `json:"scale_on_flight,omitzero"`
	// contains filtered or unexported fields
}

SQS trigger configuration

The properties ActivationQueueLength, AwsRegion, QueueLength, QueueURL, SecretName are required.

func (InferenceDeploymentNewParamsContainerScaleTriggersSqs) MarshalJSON

type InferenceDeploymentNewParamsLogging

type InferenceDeploymentNewParamsLogging struct {
	// ID of the region in which the logs will be stored
	DestinationRegionID param.Opt[int64] `json:"destination_region_id,omitzero"`
	// The topic name to stream logs to
	TopicName param.Opt[string] `json:"topic_name,omitzero"`
	// Enable or disable log streaming
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// Logs retention policy
	RetentionPolicy LaasIndexRetentionPolicyParam `json:"retention_policy,omitzero"`
	// contains filtered or unexported fields
}

Logging configuration for the inference instance

func (InferenceDeploymentNewParamsLogging) MarshalJSON

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

type InferenceDeploymentNewParamsProbes

type InferenceDeploymentNewParamsProbes struct {
	// Liveness probe configuration
	LivenessProbe ContainerProbeConfigCreateParam `json:"liveness_probe,omitzero"`
	// Readiness probe configuration
	ReadinessProbe ContainerProbeConfigCreateParam `json:"readiness_probe,omitzero"`
	// Startup probe configuration
	StartupProbe ContainerProbeConfigCreateParam `json:"startup_probe,omitzero"`
	// contains filtered or unexported fields
}

Probes configured for all containers of the inference instance. If probes are not provided, and the image_name is from a the Model Catalog registry, the default probes will be used.

func (InferenceDeploymentNewParamsProbes) MarshalJSON

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

type InferenceDeploymentService

type InferenceDeploymentService struct {
	Options []option.RequestOption
	Logs    InferenceDeploymentLogService
}

InferenceDeploymentService contains methods and other services that help with interacting with the gcore API.

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

func NewInferenceDeploymentService

func NewInferenceDeploymentService(opts ...option.RequestOption) (r InferenceDeploymentService)

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

func (*InferenceDeploymentService) Delete

func (r *InferenceDeploymentService) Delete(ctx context.Context, deploymentName string, body InferenceDeploymentDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Delete inference deployment

func (*InferenceDeploymentService) Get

func (r *InferenceDeploymentService) Get(ctx context.Context, deploymentName string, query InferenceDeploymentGetParams, opts ...option.RequestOption) (res *Inference, err error)

Get inference deployment

func (*InferenceDeploymentService) GetAPIKey

Get inference deployment API key

func (*InferenceDeploymentService) List

List inference deployments

func (*InferenceDeploymentService) ListAutoPaging

List inference deployments

func (*InferenceDeploymentService) New

Create inference deployment

func (*InferenceDeploymentService) Start

func (r *InferenceDeploymentService) Start(ctx context.Context, deploymentName string, body InferenceDeploymentStartParams, opts ...option.RequestOption) (err error)

This operation initializes an inference deployment after it was stopped, making it available to handle inference requests again. The instance will launch with the **minimum** number of replicas defined in the scaling settings.

  • If the minimum replicas are set to **0**, the instance will initially start with **0** replicas.
  • It will automatically scale up when it receives requests or SQS messages, according to the configured scaling rules.

func (*InferenceDeploymentService) Stop

func (r *InferenceDeploymentService) Stop(ctx context.Context, deploymentName string, body InferenceDeploymentStopParams, opts ...option.RequestOption) (err error)

This operation shuts down an inference deployment, making it unavailable for handling requests. The deployment will scale down to **0** replicas, overriding any minimum replica settings.

  • Once stopped, the deployment will **not** process any inference requests or SQS messages.
  • It will **not** restart automatically and must be started manually.
  • While stopped, the deployment will **not** incur any charges.

func (*InferenceDeploymentService) Update

func (r *InferenceDeploymentService) Update(ctx context.Context, deploymentName string, params InferenceDeploymentUpdateParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Update inference deployment

type InferenceDeploymentStartParams

type InferenceDeploymentStartParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type InferenceDeploymentStopParams

type InferenceDeploymentStopParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type InferenceDeploymentUpdateParams

type InferenceDeploymentUpdateParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Set to `true` to enable API key authentication for the inference instance.
	// `"Authorization": "Bearer *****"` or `"X-Api-Key": "*****"` header is required
	// for the requests to the instance if enabled
	AuthEnabled param.Opt[bool] `json:"auth_enabled,omitzero"`
	// Registry credentials name
	CredentialsName param.Opt[string] `json:"credentials_name,omitzero"`
	// Inference instance description.
	Description param.Opt[string] `json:"description,omitzero"`
	// Flavor name for the inference instance.
	FlavorName param.Opt[string] `json:"flavor_name,omitzero"`
	// Docker image for the inference instance. This field should contain the image
	// name and tag in the format 'name:tag', e.g., 'nginx:latest'. It defaults to
	// Docker Hub as the image registry, but any accessible Docker image URL can be
	// specified.
	Image param.Opt[string] `json:"image,omitzero"`
	// Listening port for the inference instance.
	ListeningPort param.Opt[int64] `json:"listening_port,omitzero"`
	// Specifies the duration in seconds without any requests after which the
	// containers will be downscaled to their minimum scale value as defined by
	// `scale.min`. If set, this helps in optimizing resource usage by reducing the
	// number of container instances during periods of inactivity. The default value
	// when the parameter is not set is 120.
	Timeout param.Opt[int64] `json:"timeout,omitzero"`
	// Command to be executed when running a container from an image.
	Command []string `json:"command,omitzero"`
	// List of containers for the inference instance.
	Containers []InferenceDeploymentUpdateParamsContainer `json:"containers,omitzero"`
	// Environment variables for the inference instance.
	Envs map[string]string `json:"envs,omitzero"`
	// Logging configuration for the inference instance
	Logging InferenceDeploymentUpdateParamsLogging `json:"logging,omitzero"`
	// Probes configured for all containers of the inference instance.
	Probes InferenceDeploymentUpdateParamsProbes `json:"probes,omitzero"`
	// Ingress options for the inference instance
	IngressOpts IngressOptsParam `json:"ingress_opts,omitzero"`
	// contains filtered or unexported fields
}

func (InferenceDeploymentUpdateParams) MarshalJSON

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

type InferenceDeploymentUpdateParamsContainer

type InferenceDeploymentUpdateParamsContainer struct {
	// Region id for the container
	RegionID param.Opt[int64] `json:"region_id,omitzero,required"`
	// Scale for the container
	Scale InferenceDeploymentUpdateParamsContainerScale `json:"scale,omitzero,required"`
	// contains filtered or unexported fields
}

The properties RegionID, Scale are required.

func (InferenceDeploymentUpdateParamsContainer) MarshalJSON

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

type InferenceDeploymentUpdateParamsContainerScale

type InferenceDeploymentUpdateParamsContainerScale struct {
	// Maximum scale for the container
	Max int64 `json:"max,required"`
	// Minimum scale for the container
	Min int64 `json:"min,required"`
	// Cooldown period between scaling actions in seconds
	CooldownPeriod param.Opt[int64] `json:"cooldown_period,omitzero"`
	// Polling interval for scaling triggers in seconds
	PollingInterval param.Opt[int64] `json:"polling_interval,omitzero"`
	// Triggers for scaling actions
	Triggers InferenceDeploymentUpdateParamsContainerScaleTriggers `json:"triggers,omitzero"`
	// contains filtered or unexported fields
}

Scale for the container

The properties Max, Min are required.

func (InferenceDeploymentUpdateParamsContainerScale) MarshalJSON

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

type InferenceDeploymentUpdateParamsContainerScaleTriggers

type InferenceDeploymentUpdateParamsContainerScaleTriggers struct {
	// CPU trigger configuration
	CPU InferenceDeploymentUpdateParamsContainerScaleTriggersCPU `json:"cpu,omitzero"`
	// GPU memory trigger configuration. Calculated by DCGM_FI_DEV_MEM_COPY_UTIL metric
	GPUMemory InferenceDeploymentUpdateParamsContainerScaleTriggersGPUMemory `json:"gpu_memory,omitzero"`
	// GPU utilization trigger configuration. Calculated by DCGM_FI_DEV_GPU_UTIL metric
	GPUUtilization InferenceDeploymentUpdateParamsContainerScaleTriggersGPUUtilization `json:"gpu_utilization,omitzero"`
	// HTTP trigger configuration
	HTTP InferenceDeploymentUpdateParamsContainerScaleTriggersHTTP `json:"http,omitzero"`
	// Memory trigger configuration
	Memory InferenceDeploymentUpdateParamsContainerScaleTriggersMemory `json:"memory,omitzero"`
	// SQS trigger configuration
	Sqs InferenceDeploymentUpdateParamsContainerScaleTriggersSqs `json:"sqs,omitzero"`
	// contains filtered or unexported fields
}

Triggers for scaling actions

func (InferenceDeploymentUpdateParamsContainerScaleTriggers) MarshalJSON

type InferenceDeploymentUpdateParamsContainerScaleTriggersCPU

type InferenceDeploymentUpdateParamsContainerScaleTriggersCPU struct {
	// Threshold value for the trigger in percentage
	Threshold int64 `json:"threshold,required"`
	// contains filtered or unexported fields
}

CPU trigger configuration

The property Threshold is required.

func (InferenceDeploymentUpdateParamsContainerScaleTriggersCPU) MarshalJSON

type InferenceDeploymentUpdateParamsContainerScaleTriggersGPUMemory

type InferenceDeploymentUpdateParamsContainerScaleTriggersGPUMemory struct {
	// Threshold value for the trigger in percentage
	Threshold int64 `json:"threshold,required"`
	// contains filtered or unexported fields
}

GPU memory trigger configuration. Calculated by DCGM_FI_DEV_MEM_COPY_UTIL metric

The property Threshold is required.

func (InferenceDeploymentUpdateParamsContainerScaleTriggersGPUMemory) MarshalJSON

type InferenceDeploymentUpdateParamsContainerScaleTriggersGPUUtilization

type InferenceDeploymentUpdateParamsContainerScaleTriggersGPUUtilization struct {
	// Threshold value for the trigger in percentage
	Threshold int64 `json:"threshold,required"`
	// contains filtered or unexported fields
}

GPU utilization trigger configuration. Calculated by DCGM_FI_DEV_GPU_UTIL metric

The property Threshold is required.

func (InferenceDeploymentUpdateParamsContainerScaleTriggersGPUUtilization) MarshalJSON

type InferenceDeploymentUpdateParamsContainerScaleTriggersHTTP

type InferenceDeploymentUpdateParamsContainerScaleTriggersHTTP struct {
	// Request count per 'window' seconds for the http trigger
	Rate int64 `json:"rate,required"`
	// Time window for rate calculation in seconds
	Window int64 `json:"window,required"`
	// contains filtered or unexported fields
}

HTTP trigger configuration

The properties Rate, Window are required.

func (InferenceDeploymentUpdateParamsContainerScaleTriggersHTTP) MarshalJSON

type InferenceDeploymentUpdateParamsContainerScaleTriggersMemory

type InferenceDeploymentUpdateParamsContainerScaleTriggersMemory struct {
	// Threshold value for the trigger in percentage
	Threshold int64 `json:"threshold,required"`
	// contains filtered or unexported fields
}

Memory trigger configuration

The property Threshold is required.

func (InferenceDeploymentUpdateParamsContainerScaleTriggersMemory) MarshalJSON

type InferenceDeploymentUpdateParamsContainerScaleTriggersSqs

type InferenceDeploymentUpdateParamsContainerScaleTriggersSqs struct {
	// Number of messages for activation
	ActivationQueueLength int64 `json:"activation_queue_length,required"`
	// AWS region
	AwsRegion string `json:"aws_region,required"`
	// Number of messages for one replica
	QueueLength int64 `json:"queue_length,required"`
	// SQS queue URL
	QueueURL string `json:"queue_url,required"`
	// Auth secret name
	SecretName string `json:"secret_name,required"`
	// Custom AWS endpoint
	AwsEndpoint param.Opt[string] `json:"aws_endpoint,omitzero"`
	// Scale on delayed messages
	ScaleOnDelayed param.Opt[bool] `json:"scale_on_delayed,omitzero"`
	// Scale on in-flight messages
	ScaleOnFlight param.Opt[bool] `json:"scale_on_flight,omitzero"`
	// contains filtered or unexported fields
}

SQS trigger configuration

The properties ActivationQueueLength, AwsRegion, QueueLength, QueueURL, SecretName are required.

func (InferenceDeploymentUpdateParamsContainerScaleTriggersSqs) MarshalJSON

type InferenceDeploymentUpdateParamsLogging

type InferenceDeploymentUpdateParamsLogging struct {
	// ID of the region in which the logs will be stored
	DestinationRegionID param.Opt[int64] `json:"destination_region_id,omitzero"`
	// The topic name to stream logs to
	TopicName param.Opt[string] `json:"topic_name,omitzero"`
	// Enable or disable log streaming
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// Logs retention policy
	RetentionPolicy LaasIndexRetentionPolicyParam `json:"retention_policy,omitzero"`
	// contains filtered or unexported fields
}

Logging configuration for the inference instance

func (InferenceDeploymentUpdateParamsLogging) MarshalJSON

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

type InferenceDeploymentUpdateParamsProbes

type InferenceDeploymentUpdateParamsProbes struct {
	// Liveness probe configuration
	LivenessProbe ContainerProbeConfigCreateParam `json:"liveness_probe,omitzero"`
	// Readiness probe configuration
	ReadinessProbe ContainerProbeConfigCreateParam `json:"readiness_probe,omitzero"`
	// Startup probe configuration
	StartupProbe ContainerProbeConfigCreateParam `json:"startup_probe,omitzero"`
	// contains filtered or unexported fields
}

Probes configured for all containers of the inference instance.

func (InferenceDeploymentUpdateParamsProbes) MarshalJSON

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

type InferenceFlavor

type InferenceFlavor struct {
	// Inference flavor cpu count.
	CPU float64 `json:"cpu,required"`
	// Inference flavor description.
	Description string `json:"description,required"`
	// Inference flavor gpu count.
	GPU int64 `json:"gpu,required"`
	// Inference flavor gpu compute capability.
	GPUComputeCapability string `json:"gpu_compute_capability,required"`
	// Inference flavor gpu memory in Gi.
	GPUMemory float64 `json:"gpu_memory,required"`
	// Inference flavor gpu model.
	GPUModel string `json:"gpu_model,required"`
	// Inference flavor is gpu shared.
	IsGPUShared bool `json:"is_gpu_shared,required"`
	// Inference flavor memory in Gi.
	Memory float64 `json:"memory,required"`
	// Inference flavor name.
	Name string `json:"name,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CPU                  respjson.Field
		Description          respjson.Field
		GPU                  respjson.Field
		GPUComputeCapability respjson.Field
		GPUMemory            respjson.Field
		GPUModel             respjson.Field
		IsGPUShared          respjson.Field
		Memory               respjson.Field
		Name                 respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InferenceFlavor) RawJSON

func (r InferenceFlavor) RawJSON() string

Returns the unmodified JSON received from the API

func (*InferenceFlavor) UnmarshalJSON

func (r *InferenceFlavor) UnmarshalJSON(data []byte) error

type InferenceFlavorListParams

type InferenceFlavorListParams struct {
	// Optional. Limit the number of returned items
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Optional. Offset value is used to exclude the first set of records from the
	// result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (InferenceFlavorListParams) URLQuery

func (r InferenceFlavorListParams) URLQuery() (v url.Values, err error)

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

type InferenceFlavorService

type InferenceFlavorService struct {
	Options []option.RequestOption
}

InferenceFlavorService contains methods and other services that help with interacting with the gcore API.

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

func NewInferenceFlavorService

func NewInferenceFlavorService(opts ...option.RequestOption) (r InferenceFlavorService)

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

func (*InferenceFlavorService) Get

func (r *InferenceFlavorService) Get(ctx context.Context, flavorName string, opts ...option.RequestOption) (res *InferenceFlavor, err error)

Get inference flavor

func (*InferenceFlavorService) List

List inference flavors

func (*InferenceFlavorService) ListAutoPaging

List inference flavors

type InferenceLog

type InferenceLog struct {
	// Log message.
	Message string `json:"message,required"`
	// Pod name.
	Pod string `json:"pod,required"`
	// Region ID where the container is deployed.
	RegionID int64 `json:"region_id,required"`
	// Log message timestamp in ISO 8601 format.
	Time time.Time `json:"time,required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Message     respjson.Field
		Pod         respjson.Field
		RegionID    respjson.Field
		Time        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InferenceLog) RawJSON

func (r InferenceLog) RawJSON() string

Returns the unmodified JSON received from the API

func (*InferenceLog) UnmarshalJSON

func (r *InferenceLog) UnmarshalJSON(data []byte) error

type InferenceModelListParams

type InferenceModelListParams struct {
	// Optional. Limit the number of returned items
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Optional. Offset value is used to exclude the first set of records from the
	// result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Order instances by transmitted fields and directions
	//
	// Any of "name.asc", "name.desc".
	OrderBy MlcatalogOrderByChoices `query:"order_by,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (InferenceModelListParams) URLQuery

func (r InferenceModelListParams) URLQuery() (v url.Values, err error)

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

type InferenceModelService

type InferenceModelService struct {
	Options []option.RequestOption
}

InferenceModelService contains methods and other services that help with interacting with the gcore API.

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

func NewInferenceModelService

func NewInferenceModelService(opts ...option.RequestOption) (r InferenceModelService)

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

func (*InferenceModelService) Get

func (r *InferenceModelService) Get(ctx context.Context, modelID string, opts ...option.RequestOption) (res *MlcatalogModelCard, err error)

Get model from catalog

func (*InferenceModelService) List

List models from catalog

func (*InferenceModelService) ListAutoPaging

List models from catalog

type InferenceProbes

type InferenceProbes struct {
	// Liveness probe configuration
	LivenessProbe ContainerProbeConfig `json:"liveness_probe,required"`
	// Readiness probe configuration
	ReadinessProbe ContainerProbeConfig `json:"readiness_probe,required"`
	// Startup probe configuration
	StartupProbe ContainerProbeConfig `json:"startup_probe,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		LivenessProbe  respjson.Field
		ReadinessProbe respjson.Field
		StartupProbe   respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InferenceProbes) RawJSON

func (r InferenceProbes) RawJSON() string

Returns the unmodified JSON received from the API

func (*InferenceProbes) UnmarshalJSON

func (r *InferenceProbes) UnmarshalJSON(data []byte) error

type InferenceRegistryCredential

type InferenceRegistryCredential struct {
	// Registry credential name.
	Name string `json:"name,required"`
	// Project ID to which the inference registry credentials belongs.
	ProjectID int64 `json:"project_id,required"`
	// Registry URL.
	RegistryURL string `json:"registry_url,required"`
	// Registry username.
	Username string `json:"username,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Name        respjson.Field
		ProjectID   respjson.Field
		RegistryURL respjson.Field
		Username    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InferenceRegistryCredential) RawJSON

func (r InferenceRegistryCredential) RawJSON() string

Returns the unmodified JSON received from the API

func (*InferenceRegistryCredential) UnmarshalJSON

func (r *InferenceRegistryCredential) UnmarshalJSON(data []byte) error

type InferenceRegistryCredentialDeleteParams

type InferenceRegistryCredentialDeleteParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type InferenceRegistryCredentialFull

type InferenceRegistryCredentialFull struct {
	// Registry credential name.
	Name string `json:"name,required"`
	// Registry password.
	Password string `json:"password,required"`
	// Project ID to which the inference registry credentials belongs.
	ProjectID int64 `json:"project_id,required"`
	// Registry URL.
	RegistryURL string `json:"registry_url,required"`
	// Registry username.
	Username string `json:"username,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Name        respjson.Field
		Password    respjson.Field
		ProjectID   respjson.Field
		RegistryURL respjson.Field
		Username    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InferenceRegistryCredentialFull) RawJSON

Returns the unmodified JSON received from the API

func (*InferenceRegistryCredentialFull) UnmarshalJSON

func (r *InferenceRegistryCredentialFull) UnmarshalJSON(data []byte) error

type InferenceRegistryCredentialGetParams

type InferenceRegistryCredentialGetParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type InferenceRegistryCredentialListParams

type InferenceRegistryCredentialListParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Optional. Limit the number of returned items
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Optional. Offset value is used to exclude the first set of records from the
	// result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (InferenceRegistryCredentialListParams) URLQuery

func (r InferenceRegistryCredentialListParams) URLQuery() (v url.Values, err error)

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

type InferenceRegistryCredentialNewParams

type InferenceRegistryCredentialNewParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Registry credential name.
	Name string `json:"name,required"`
	// Registry password.
	Password string `json:"password,required"`
	// Registry URL.
	RegistryURL string `json:"registry_url,required"`
	// Registry username.
	Username string `json:"username,required"`
	// contains filtered or unexported fields
}

func (InferenceRegistryCredentialNewParams) MarshalJSON

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

type InferenceRegistryCredentialReplaceParams

type InferenceRegistryCredentialReplaceParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Registry password.
	Password string `json:"password,required"`
	// Registry URL.
	RegistryURL string `json:"registry_url,required"`
	// Registry username.
	Username string `json:"username,required"`
	// contains filtered or unexported fields
}

func (InferenceRegistryCredentialReplaceParams) MarshalJSON

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

type InferenceRegistryCredentialService

type InferenceRegistryCredentialService struct {
	Options []option.RequestOption
}

InferenceRegistryCredentialService contains methods and other services that help with interacting with the gcore API.

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

func NewInferenceRegistryCredentialService

func NewInferenceRegistryCredentialService(opts ...option.RequestOption) (r InferenceRegistryCredentialService)

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

func (*InferenceRegistryCredentialService) Delete

Delete inference registry credential

func (*InferenceRegistryCredentialService) Get

Get inference registry credential

func (*InferenceRegistryCredentialService) List

List inference registry credentials

func (*InferenceRegistryCredentialService) ListAutoPaging

List inference registry credentials

func (*InferenceRegistryCredentialService) New

Create inference registry credential

func (*InferenceRegistryCredentialService) Replace

Update inference registry credential

type InferenceSecret

type InferenceSecret struct {
	// Secret data.
	Data AwsIamData `json:"data,required"`
	// Secret name.
	Name string `json:"name,required"`
	// Secret type.
	Type string `json:"type,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Data        respjson.Field
		Name        respjson.Field
		Type        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InferenceSecret) RawJSON

func (r InferenceSecret) RawJSON() string

Returns the unmodified JSON received from the API

func (*InferenceSecret) UnmarshalJSON

func (r *InferenceSecret) UnmarshalJSON(data []byte) error

type InferenceSecretDeleteParams

type InferenceSecretDeleteParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type InferenceSecretGetParams

type InferenceSecretGetParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type InferenceSecretListParams

type InferenceSecretListParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Optional. Limit the number of returned items
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Optional. Offset value is used to exclude the first set of records from the
	// result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (InferenceSecretListParams) URLQuery

func (r InferenceSecretListParams) URLQuery() (v url.Values, err error)

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

type InferenceSecretNewParams

type InferenceSecretNewParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Secret data.
	Data AwsIamDataParam `json:"data,omitzero,required"`
	// Secret name.
	Name string `json:"name,required"`
	// Secret type. Currently only `aws-iam` is supported.
	Type string `json:"type,required"`
	// contains filtered or unexported fields
}

func (InferenceSecretNewParams) MarshalJSON

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

type InferenceSecretReplaceParams

type InferenceSecretReplaceParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Secret data.
	Data AwsIamDataParam `json:"data,omitzero,required"`
	// Secret type.
	Type string `json:"type,required"`
	// contains filtered or unexported fields
}

func (InferenceSecretReplaceParams) MarshalJSON

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

type InferenceSecretService

type InferenceSecretService struct {
	Options []option.RequestOption
}

InferenceSecretService contains methods and other services that help with interacting with the gcore API.

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

func NewInferenceSecretService

func NewInferenceSecretService(opts ...option.RequestOption) (r InferenceSecretService)

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

func (*InferenceSecretService) Delete

func (r *InferenceSecretService) Delete(ctx context.Context, secretName string, body InferenceSecretDeleteParams, opts ...option.RequestOption) (err error)

Delete Inference Secret

func (*InferenceSecretService) Get

Get Inference Secret

func (*InferenceSecretService) List

List Secrets for Inference

func (*InferenceSecretService) ListAutoPaging

List Secrets for Inference

func (*InferenceSecretService) New

Create Inference Secret

func (*InferenceSecretService) Replace

func (r *InferenceSecretService) Replace(ctx context.Context, secretName string, params InferenceSecretReplaceParams, opts ...option.RequestOption) (res *InferenceSecret, err error)

Update Inference Secret

type InferenceService

type InferenceService struct {
	Options             []option.RequestOption
	Flavors             InferenceFlavorService
	Models              InferenceModelService
	Deployments         InferenceDeploymentService
	RegistryCredentials InferenceRegistryCredentialService
	Secrets             InferenceSecretService
}

InferenceService contains methods and other services that help with interacting with the gcore API.

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

func NewInferenceService

func NewInferenceService(opts ...option.RequestOption) (r InferenceService)

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

func (*InferenceService) GetCapacityByRegion

func (r *InferenceService) GetCapacityByRegion(ctx context.Context, opts ...option.RequestOption) (res *RegionCapacityList, err error)

Get inference capacity by region

type InferenceStatus

type InferenceStatus string

Inference instance status.

Value can be one of the following:

  • `DEPLOYING` - The instance is being deployed. Containers are not yet created.
  • `PARTIALLYDEPLOYED` - All containers have been created, but some may not be ready yet. Instances stuck in this state typically indicate either image being pulled, or a failure of some kind. In the latter case, the `error_message` field of the respective container object in the `containers` collection explains the failure reason.
  • `ACTIVE` - The instance is running and ready to accept requests.
  • `DISABLED` - The instance is disabled and not accepting any requests.
  • `DELETING` - The instance is being deleted.
const (
	InferenceStatusActive            InferenceStatus = "ACTIVE"
	InferenceStatusDeleting          InferenceStatus = "DELETING"
	InferenceStatusDeploying         InferenceStatus = "DEPLOYING"
	InferenceStatusDisabled          InferenceStatus = "DISABLED"
	InferenceStatusPartiallydeployed InferenceStatus = "PARTIALLYDEPLOYED"
)

type IngressOptsOut

type IngressOptsOut struct {
	// Disable response buffering if true. A client usually has a much slower
	// connection and can not consume the response data as fast as it is produced by an
	// upstream application. Ingress tries to buffer the whole response in order to
	// release the upstream application as soon as possible.By default, the response
	// buffering is enabled.
	DisableResponseBuffering bool `json:"disable_response_buffering,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DisableResponseBuffering respjson.Field
		ExtraFields              map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (IngressOptsOut) RawJSON

func (r IngressOptsOut) RawJSON() string

Returns the unmodified JSON received from the API

func (*IngressOptsOut) UnmarshalJSON

func (r *IngressOptsOut) UnmarshalJSON(data []byte) error

type IngressOptsParam

type IngressOptsParam struct {
	// Disable response buffering if true. A client usually has a much slower
	// connection and can not consume the response data as fast as it is produced by an
	// upstream application. Ingress tries to buffer the whole response in order to
	// release the upstream application as soon as possible.By default, the response
	// buffering is enabled.
	DisableResponseBuffering param.Opt[bool] `json:"disable_response_buffering,omitzero"`
	// contains filtered or unexported fields
}

func (IngressOptsParam) MarshalJSON

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

type Instance

type Instance struct {
	// Instance ID
	ID string `json:"id,required" format:"uuid4"`
	// Map of network_name to list of addresses in that network
	Addresses map[string][]InstanceAddressUnion `json:"addresses,required"`
	// IP addresses of the instances that are blackholed by DDoS mitigation system
	BlackholePorts []BlackholePort `json:"blackhole_ports,required"`
	// Datetime when instance was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Task that created this entity
	CreatorTaskID string `json:"creator_task_id,required"`
	// Advanced DDoS protection profile. It is always `null` if query parameter
	// `with_ddos=true` is not set.
	DDOSProfile DDOSProfile `json:"ddos_profile,required"`
	// Fixed IP assigned to instance
	FixedIPAssignments []InstanceFixedIPAssignment `json:"fixed_ip_assignments,required"`
	// Flavor
	Flavor InstanceFlavorUnion `json:"flavor,required"`
	// Instance description
	InstanceDescription string `json:"instance_description,required"`
	// Instance isolation information
	InstanceIsolation InstanceIsolation `json:"instance_isolation,required"`
	// Instance name
	Name string `json:"name,required"`
	// Project ID
	ProjectID int64 `json:"project_id,required"`
	// Region name
	Region string `json:"region,required"`
	// Region ID
	RegionID int64 `json:"region_id,required"`
	// Security groups
	SecurityGroups []InstanceSecurityGroup `json:"security_groups,required"`
	// SSH key assigned to instance
	SSHKeyName string `json:"ssh_key_name,required"`
	// Instance status
	//
	// Any of "ACTIVE", "BUILD", "DELETED", "ERROR", "HARD_REBOOT", "MIGRATING",
	// "PASSWORD", "PAUSED", "REBOOT", "REBUILD", "RESCUE", "RESIZE", "REVERT_RESIZE",
	// "SHELVED", "SHELVED_OFFLOADED", "SHUTOFF", "SOFT_DELETED", "SUSPENDED",
	// "UNKNOWN", "VERIFY_RESIZE".
	Status InstanceStatus `json:"status,required"`
	// List of key-value tags associated with the resource. A tag is a key-value pair
	// that can be associated with a resource, enabling efficient filtering and
	// grouping for better organization and management. Some tags are read-only and
	// cannot be modified by the user. Tags are also integrated with cost reports,
	// allowing cost data to be filtered based on tag keys or values.
	Tags []Tag `json:"tags,required"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,required"`
	// Task state
	TaskState string `json:"task_state,required"`
	// Virtual machine state (active)
	//
	// Any of "active", "building", "deleted", "error", "paused", "rescued", "resized",
	// "shelved", "shelved_offloaded", "soft-deleted", "stopped", "suspended".
	VmState InstanceVmState `json:"vm_state,required"`
	// List of volumes
	Volumes []InstanceVolume `json:"volumes,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		Addresses           respjson.Field
		BlackholePorts      respjson.Field
		CreatedAt           respjson.Field
		CreatorTaskID       respjson.Field
		DDOSProfile         respjson.Field
		FixedIPAssignments  respjson.Field
		Flavor              respjson.Field
		InstanceDescription respjson.Field
		InstanceIsolation   respjson.Field
		Name                respjson.Field
		ProjectID           respjson.Field
		Region              respjson.Field
		RegionID            respjson.Field
		SecurityGroups      respjson.Field
		SSHKeyName          respjson.Field
		Status              respjson.Field
		Tags                respjson.Field
		TaskID              respjson.Field
		TaskState           respjson.Field
		VmState             respjson.Field
		Volumes             respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Instance) RawJSON

func (r Instance) RawJSON() string

Returns the unmodified JSON received from the API

func (*Instance) UnmarshalJSON

func (r *Instance) UnmarshalJSON(data []byte) error

type InstanceActionParams

type InstanceActionParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`

	// This field is a request body variant, only one variant field can be set.
	OfStartActionInstanceSerializer *InstanceActionParamsBodyStartActionInstanceSerializer `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	OfBasicActionInstanceSerializer *InstanceActionParamsBodyBasicActionInstanceSerializer `json:",inline"`
	// contains filtered or unexported fields
}

func (InstanceActionParams) MarshalJSON

func (u InstanceActionParams) MarshalJSON() ([]byte, error)

type InstanceActionParamsBodyBasicActionInstanceSerializer

type InstanceActionParamsBodyBasicActionInstanceSerializer struct {
	// Instance action name
	//
	// Any of "reboot", "reboot_hard", "resume", "stop", "suspend".
	Action string `json:"action,omitzero,required"`
	// contains filtered or unexported fields
}

The property Action is required.

func (InstanceActionParamsBodyBasicActionInstanceSerializer) MarshalJSON

type InstanceActionParamsBodyStartActionInstanceSerializer

type InstanceActionParamsBodyStartActionInstanceSerializer struct {
	// Used on start instance to activate Advanced DDoS profile
	ActivateProfile param.Opt[bool] `json:"activate_profile,omitzero"`
	// Instance action name
	//
	// This field can be elided, and will marshal its zero value as "start".
	Action constant.Start `json:"action,required"`
	// contains filtered or unexported fields
}

The property Action is required.

func (InstanceActionParamsBodyStartActionInstanceSerializer) MarshalJSON

type InstanceAddToPlacementGroupParams

type InstanceAddToPlacementGroupParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Anti-affinity or affinity or soft-anti-affinity server group ID.
	ServergroupID string `json:"servergroup_id,required"`
	// contains filtered or unexported fields
}

func (InstanceAddToPlacementGroupParams) MarshalJSON

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

type InstanceAddressUnion

type InstanceAddressUnion struct {
	Addr          string `json:"addr"`
	Type          string `json:"type"`
	InterfaceName string `json:"interface_name"`
	// This field is from variant [FixedAddress].
	SubnetID string `json:"subnet_id"`
	// This field is from variant [FixedAddress].
	SubnetName string `json:"subnet_name"`
	JSON       struct {
		Addr          respjson.Field
		Type          respjson.Field
		InterfaceName respjson.Field
		SubnetID      respjson.Field
		SubnetName    respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

InstanceAddressUnion contains all possible properties and values from FloatingAddress, FixedAddressShort, FixedAddress.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (InstanceAddressUnion) AsFixedIPAddress

func (u InstanceAddressUnion) AsFixedIPAddress() (v FixedAddress)

func (InstanceAddressUnion) AsFixedIPAddressShort

func (u InstanceAddressUnion) AsFixedIPAddressShort() (v FixedAddressShort)

func (InstanceAddressUnion) AsFloatingIPAddress

func (u InstanceAddressUnion) AsFloatingIPAddress() (v FloatingAddress)

func (InstanceAddressUnion) RawJSON

func (u InstanceAddressUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*InstanceAddressUnion) UnmarshalJSON

func (r *InstanceAddressUnion) UnmarshalJSON(data []byte) error

type InstanceAssignSecurityGroupParams

type InstanceAssignSecurityGroupParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Security group name, applies to all ports
	Name param.Opt[string] `json:"name,omitzero"`
	// Port security groups mapping
	PortsSecurityGroupNames []InstanceAssignSecurityGroupParamsPortsSecurityGroupName `json:"ports_security_group_names,omitzero"`
	// contains filtered or unexported fields
}

func (InstanceAssignSecurityGroupParams) MarshalJSON

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

type InstanceAssignSecurityGroupParamsPortsSecurityGroupName

type InstanceAssignSecurityGroupParamsPortsSecurityGroupName struct {
	// Port ID. If None, security groups will be applied to all ports
	PortID param.Opt[string] `json:"port_id,omitzero,required"`
	// List of security group names
	SecurityGroupNames []string `json:"security_group_names,omitzero,required"`
	// contains filtered or unexported fields
}

Port security group names

The properties PortID, SecurityGroupNames are required.

func (InstanceAssignSecurityGroupParamsPortsSecurityGroupName) MarshalJSON

type InstanceDeleteParams

type InstanceDeleteParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// True if it is required to delete floating IPs assigned to the instance. Can't be
	// used with `floatings`.
	DeleteFloatings param.Opt[bool] `query:"delete_floatings,omitzero" json:"-"`
	// Comma separated list of floating ids that should be deleted. Can't be used with
	// `delete_floatings`.
	Floatings param.Opt[string] `query:"floatings,omitzero" json:"-"`
	// Comma separated list of port IDs to be deleted with the instance
	ReservedFixedIPs param.Opt[string] `query:"reserved_fixed_ips,omitzero" json:"-"`
	// Comma separated list of volume IDs to be deleted with the instance
	Volumes param.Opt[string] `query:"volumes,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (InstanceDeleteParams) URLQuery

func (r InstanceDeleteParams) URLQuery() (v url.Values, err error)

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

type InstanceDisablePortSecurityParams

type InstanceDisablePortSecurityParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type InstanceEnablePortSecurityParams

type InstanceEnablePortSecurityParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type InstanceFixedIPAssignment

type InstanceFixedIPAssignment struct {
	// Is network external
	External bool `json:"external,required"`
	// Ip address
	IPAddress string `json:"ip_address,required"`
	// Interface subnet id
	SubnetID string `json:"subnet_id,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		External    respjson.Field
		IPAddress   respjson.Field
		SubnetID    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InstanceFixedIPAssignment) RawJSON

func (r InstanceFixedIPAssignment) RawJSON() string

Returns the unmodified JSON received from the API

func (*InstanceFixedIPAssignment) UnmarshalJSON

func (r *InstanceFixedIPAssignment) UnmarshalJSON(data []byte) error

type InstanceFlavor

type InstanceFlavor struct {
	// Flavor architecture type
	Architecture string `json:"architecture,required"`
	// Disabled flavor flag
	Disabled bool `json:"disabled,required"`
	// Flavor ID is the same as name
	FlavorID string `json:"flavor_id,required"`
	// Flavor name
	FlavorName string `json:"flavor_name,required"`
	// Flavor operating system
	OsType string `json:"os_type,required"`
	// RAM size in MiB
	Ram int64 `json:"ram,required"`
	// Virtual CPU count. For bare metal flavors, it's a physical CPU count
	Vcpus int64 `json:"vcpus,required"`
	// Number of available instances of given configuration
	Capacity int64 `json:"capacity,nullable"`
	// Currency code. Shown if the include_prices query parameter if set to true
	CurrencyCode string `json:"currency_code,nullable"`
	// Additional hardware description
	HardwareDescription map[string]string `json:"hardware_description"`
	// Price per hour. Shown if the include_prices query parameter if set to true
	PricePerHour float64 `json:"price_per_hour,nullable"`
	// Price per month. Shown if the include_prices query parameter if set to true
	PricePerMonth float64 `json:"price_per_month,nullable"`
	// Price status for the UI
	//
	// Any of "error", "hide", "show".
	PriceStatus InstanceFlavorPriceStatus `json:"price_status,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Architecture        respjson.Field
		Disabled            respjson.Field
		FlavorID            respjson.Field
		FlavorName          respjson.Field
		OsType              respjson.Field
		Ram                 respjson.Field
		Vcpus               respjson.Field
		Capacity            respjson.Field
		CurrencyCode        respjson.Field
		HardwareDescription respjson.Field
		PricePerHour        respjson.Field
		PricePerMonth       respjson.Field
		PriceStatus         respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Instances flavor schema

func (InstanceFlavor) RawJSON

func (r InstanceFlavor) RawJSON() string

Returns the unmodified JSON received from the API

func (*InstanceFlavor) UnmarshalJSON

func (r *InstanceFlavor) UnmarshalJSON(data []byte) error

type InstanceFlavorBareMetalFlavor

type InstanceFlavorBareMetalFlavor struct {
	// CPU architecture
	Architecture string `json:"architecture,required"`
	// Flavor ID is the same as name
	FlavorID string `json:"flavor_id,required"`
	// Flavor name
	FlavorName string `json:"flavor_name,required"`
	// Additional hardware description
	HardwareDescription InstanceFlavorBareMetalFlavorHardwareDescription `json:"hardware_description,required"`
	// Operating system
	OsType string `json:"os_type,required"`
	// RAM size in MiB
	Ram int64 `json:"ram,required"`
	// Flavor resource class for mapping to hardware capacity
	ResourceClass string `json:"resource_class,required"`
	// Virtual CPU count. For bare metal flavors, it's a physical CPU count
	Vcpus int64 `json:"vcpus,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Architecture        respjson.Field
		FlavorID            respjson.Field
		FlavorName          respjson.Field
		HardwareDescription respjson.Field
		OsType              respjson.Field
		Ram                 respjson.Field
		ResourceClass       respjson.Field
		Vcpus               respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Bare metal flavor schema embedded into instance schema

func (InstanceFlavorBareMetalFlavor) RawJSON

Returns the unmodified JSON received from the API

func (*InstanceFlavorBareMetalFlavor) UnmarshalJSON

func (r *InstanceFlavorBareMetalFlavor) UnmarshalJSON(data []byte) error

type InstanceFlavorBareMetalFlavorHardwareDescription

type InstanceFlavorBareMetalFlavorHardwareDescription struct {
	// Human-readable CPU description
	CPU string `json:"cpu,required"`
	// Human-readable disk description
	Disk string `json:"disk,required"`
	// If the flavor is licensed, this field contains the license type
	License string `json:"license,required"`
	// Human-readable NIC description
	Network string `json:"network,required"`
	// Human-readable RAM description
	Ram string `json:"ram,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CPU         respjson.Field
		Disk        respjson.Field
		License     respjson.Field
		Network     respjson.Field
		Ram         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Additional hardware description

func (InstanceFlavorBareMetalFlavorHardwareDescription) RawJSON

Returns the unmodified JSON received from the API

func (*InstanceFlavorBareMetalFlavorHardwareDescription) UnmarshalJSON

type InstanceFlavorGPUClusterFlavor

type InstanceFlavorGPUClusterFlavor struct {
	// CPU architecture
	Architecture string `json:"architecture,required"`
	// Flavor ID is the same as name
	FlavorID string `json:"flavor_id,required"`
	// Flavor name
	FlavorName string `json:"flavor_name,required"`
	// Additional hardware description
	HardwareDescription InstanceFlavorGPUClusterFlavorHardwareDescription `json:"hardware_description,required"`
	// Operating system
	OsType string `json:"os_type,required"`
	// RAM size in MiB
	Ram int64 `json:"ram,required"`
	// Flavor resource class for mapping to hardware capacity
	ResourceClass string `json:"resource_class,required"`
	// Virtual CPU count. For bare metal flavors, it's a physical CPU count
	Vcpus int64 `json:"vcpus,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Architecture        respjson.Field
		FlavorID            respjson.Field
		FlavorName          respjson.Field
		HardwareDescription respjson.Field
		OsType              respjson.Field
		Ram                 respjson.Field
		ResourceClass       respjson.Field
		Vcpus               respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

GPU cluster flavor schema embedded into instance schema

func (InstanceFlavorGPUClusterFlavor) RawJSON

Returns the unmodified JSON received from the API

func (*InstanceFlavorGPUClusterFlavor) UnmarshalJSON

func (r *InstanceFlavorGPUClusterFlavor) UnmarshalJSON(data []byte) error

type InstanceFlavorGPUClusterFlavorHardwareDescription

type InstanceFlavorGPUClusterFlavorHardwareDescription struct {
	// Human-readable CPU description
	CPU string `json:"cpu,required"`
	// Human-readable disk description
	Disk string `json:"disk,required"`
	// Human-readable GPU description
	GPU string `json:"gpu,required"`
	// If the flavor is licensed, this field contains the license type
	License string `json:"license,required"`
	// Human-readable NIC description
	Network string `json:"network,required"`
	// Human-readable RAM description
	Ram string `json:"ram,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CPU         respjson.Field
		Disk        respjson.Field
		GPU         respjson.Field
		License     respjson.Field
		Network     respjson.Field
		Ram         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Additional hardware description

func (InstanceFlavorGPUClusterFlavorHardwareDescription) RawJSON

Returns the unmodified JSON received from the API

func (*InstanceFlavorGPUClusterFlavorHardwareDescription) UnmarshalJSON

type InstanceFlavorInstanceFlavor

type InstanceFlavorInstanceFlavor struct {
	// CPU architecture
	Architecture string `json:"architecture,required"`
	// Flavor ID is the same as name
	FlavorID string `json:"flavor_id,required"`
	// Flavor name
	FlavorName string `json:"flavor_name,required"`
	// Additional hardware description
	HardwareDescription InstanceFlavorInstanceFlavorHardwareDescription `json:"hardware_description,required"`
	// Flavor operating system
	OsType string `json:"os_type,required"`
	// RAM size in MiB
	Ram int64 `json:"ram,required"`
	// Virtual CPU count. For bare metal flavors, it's a physical CPU count
	Vcpus int64 `json:"vcpus,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Architecture        respjson.Field
		FlavorID            respjson.Field
		FlavorName          respjson.Field
		HardwareDescription respjson.Field
		OsType              respjson.Field
		Ram                 respjson.Field
		Vcpus               respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Instances flavor schema embedded into instance schema

func (InstanceFlavorInstanceFlavor) RawJSON

Returns the unmodified JSON received from the API

func (*InstanceFlavorInstanceFlavor) UnmarshalJSON

func (r *InstanceFlavorInstanceFlavor) UnmarshalJSON(data []byte) error

type InstanceFlavorInstanceFlavorHardwareDescription

type InstanceFlavorInstanceFlavorHardwareDescription struct {
	// RAM description
	Ram string `json:"ram,required"`
	// CPU description
	Vcpus string `json:"vcpus,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Ram         respjson.Field
		Vcpus       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Additional hardware description

func (InstanceFlavorInstanceFlavorHardwareDescription) RawJSON

Returns the unmodified JSON received from the API

func (*InstanceFlavorInstanceFlavorHardwareDescription) UnmarshalJSON

type InstanceFlavorList

type InstanceFlavorList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []InstanceFlavor `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InstanceFlavorList) RawJSON

func (r InstanceFlavorList) RawJSON() string

Returns the unmodified JSON received from the API

func (*InstanceFlavorList) UnmarshalJSON

func (r *InstanceFlavorList) UnmarshalJSON(data []byte) error

type InstanceFlavorListForResizeParams

type InstanceFlavorListForResizeParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Set to true if flavor listing should include flavor prices
	IncludePrices param.Opt[bool] `query:"include_prices,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (InstanceFlavorListForResizeParams) URLQuery

func (r InstanceFlavorListForResizeParams) URLQuery() (v url.Values, err error)

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

type InstanceFlavorListParams

type InstanceFlavorListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Flag for filtering disabled flavors in the region. Defaults to true
	Disabled param.Opt[bool] `query:"disabled,omitzero" json:"-"`
	// Set to true to exclude flavors dedicated to linux images. Default False
	ExcludeLinux param.Opt[bool] `query:"exclude_linux,omitzero" json:"-"`
	// Set to true to exclude flavors dedicated to windows images. Default False
	ExcludeWindows param.Opt[bool] `query:"exclude_windows,omitzero" json:"-"`
	// Set to true if the response should include flavor prices
	IncludePrices param.Opt[bool] `query:"include_prices,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (InstanceFlavorListParams) URLQuery

func (r InstanceFlavorListParams) URLQuery() (v url.Values, err error)

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

type InstanceFlavorListSuitableParams

type InstanceFlavorListSuitableParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Volumes details. Non-important info such as names may be omitted.
	Volumes []InstanceFlavorListSuitableParamsVolume `json:"volumes,omitzero,required"`
	// Set to true if flavor listing should include flavor prices
	IncludePrices param.Opt[bool] `query:"include_prices,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (InstanceFlavorListSuitableParams) MarshalJSON

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

func (InstanceFlavorListSuitableParams) URLQuery

func (r InstanceFlavorListSuitableParams) URLQuery() (v url.Values, err error)

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

type InstanceFlavorListSuitableParamsVolume

type InstanceFlavorListSuitableParamsVolume struct {
	// Volume source
	//
	// Any of "apptemplate", "existing-volume", "image", "new-volume", "snapshot".
	Source string            `json:"source,omitzero,required"`
	Name   param.Opt[string] `json:"name,omitzero"`
	// App template ID. Mandatory if volume is created from marketplace template
	ApptemplateID param.Opt[string] `json:"apptemplate_id,omitzero"`
	// 0 should be set for primary boot device Unique positive values for other
	// bootable devices.Negative - boot prohibited
	BootIndex param.Opt[int64] `json:"boot_index,omitzero"`
	// Image ID. Mandatory if volume is created from image
	ImageID param.Opt[string] `json:"image_id,omitzero"`
	// Volume size. Must be specified when source is 'new-volume' or 'image'. If
	// specified for source 'snapshot' or 'existing-volume', value must be equal to
	// respective snapshot or volume size
	Size param.Opt[int64] `json:"size,omitzero"`
	// Volume snapshot ID. Mandatory if volume is created from a snapshot
	SnapshotID param.Opt[string] `json:"snapshot_id,omitzero"`
	// Volume ID. Mandatory if volume is pre-existing volume
	VolumeID param.Opt[string] `json:"volume_id,omitzero"`
	// One of 'standard', 'ssd_hiiops', 'ssd_local', 'ssd_lowlatency', 'cold', 'ultra'
	//
	// Any of "cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra".
	TypeName string `json:"type_name,omitzero"`
	// contains filtered or unexported fields
}

The property Source is required.

func (InstanceFlavorListSuitableParamsVolume) MarshalJSON

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

type InstanceFlavorPriceStatus

type InstanceFlavorPriceStatus string

Price status for the UI

const (
	InstanceFlavorPriceStatusError InstanceFlavorPriceStatus = "error"
	InstanceFlavorPriceStatusHide  InstanceFlavorPriceStatus = "hide"
	InstanceFlavorPriceStatusShow  InstanceFlavorPriceStatus = "show"
)

type InstanceFlavorService

type InstanceFlavorService struct {
	Options []option.RequestOption
}

InstanceFlavorService contains methods and other services that help with interacting with the gcore API.

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

func NewInstanceFlavorService

func NewInstanceFlavorService(opts ...option.RequestOption) (r InstanceFlavorService)

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

func (*InstanceFlavorService) List

Retrieve a list of flavors. When the include_prices query parameter is specified, the list shows prices. A client in trial mode gets all price values as 0. If you get Pricing Error contact the support

func (*InstanceFlavorService) ListForResize

func (r *InstanceFlavorService) ListForResize(ctx context.Context, instanceID string, params InstanceFlavorListForResizeParams, opts ...option.RequestOption) (res *InstanceFlavorList, err error)

List suitable flavors for instance resize

func (*InstanceFlavorService) ListSuitable

List suitable flavors for instance creation

type InstanceFlavorUnion

type InstanceFlavorUnion struct {
	Architecture string `json:"architecture"`
	FlavorID     string `json:"flavor_id"`
	FlavorName   string `json:"flavor_name"`
	// This field is a union of [InstanceFlavorInstanceFlavorHardwareDescription],
	// [InstanceFlavorBareMetalFlavorHardwareDescription],
	// [InstanceFlavorGPUClusterFlavorHardwareDescription]
	HardwareDescription InstanceFlavorUnionHardwareDescription `json:"hardware_description"`
	OsType              string                                 `json:"os_type"`
	Ram                 int64                                  `json:"ram"`
	Vcpus               int64                                  `json:"vcpus"`
	ResourceClass       string                                 `json:"resource_class"`
	JSON                struct {
		Architecture        respjson.Field
		FlavorID            respjson.Field
		FlavorName          respjson.Field
		HardwareDescription respjson.Field
		OsType              respjson.Field
		Ram                 respjson.Field
		Vcpus               respjson.Field
		ResourceClass       respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

InstanceFlavorUnion contains all possible properties and values from InstanceFlavorInstanceFlavor, InstanceFlavorBareMetalFlavor, InstanceFlavorGPUClusterFlavor.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (InstanceFlavorUnion) AsBareMetalFlavor

func (u InstanceFlavorUnion) AsBareMetalFlavor() (v InstanceFlavorBareMetalFlavor)

func (InstanceFlavorUnion) AsGPUClusterFlavor

func (u InstanceFlavorUnion) AsGPUClusterFlavor() (v InstanceFlavorGPUClusterFlavor)

func (InstanceFlavorUnion) AsInstanceFlavor

func (u InstanceFlavorUnion) AsInstanceFlavor() (v InstanceFlavorInstanceFlavor)

func (InstanceFlavorUnion) RawJSON

func (u InstanceFlavorUnion) RawJSON() string

Returns the unmodified JSON received from the API

func (*InstanceFlavorUnion) UnmarshalJSON

func (r *InstanceFlavorUnion) UnmarshalJSON(data []byte) error

type InstanceFlavorUnionHardwareDescription

type InstanceFlavorUnionHardwareDescription struct {
	Ram string `json:"ram"`
	// This field is from variant [InstanceFlavorInstanceFlavorHardwareDescription].
	Vcpus   string `json:"vcpus"`
	CPU     string `json:"cpu"`
	Disk    string `json:"disk"`
	License string `json:"license"`
	Network string `json:"network"`
	// This field is from variant [InstanceFlavorGPUClusterFlavorHardwareDescription].
	GPU  string `json:"gpu"`
	JSON struct {
		Ram     respjson.Field
		Vcpus   respjson.Field
		CPU     respjson.Field
		Disk    respjson.Field
		License respjson.Field
		Network respjson.Field
		GPU     respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

InstanceFlavorUnionHardwareDescription is an implicit subunion of InstanceFlavorUnion. InstanceFlavorUnionHardwareDescription provides convenient access to the sub-properties of the union.

For type safety it is recommended to directly use a variant of the InstanceFlavorUnion.

func (*InstanceFlavorUnionHardwareDescription) UnmarshalJSON

func (r *InstanceFlavorUnionHardwareDescription) UnmarshalJSON(data []byte) error

type InstanceGetConsoleParams

type InstanceGetConsoleParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Console type
	ConsoleType param.Opt[string] `query:"console_type,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (InstanceGetConsoleParams) URLQuery

func (r InstanceGetConsoleParams) URLQuery() (v url.Values, err error)

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

type InstanceGetParams

type InstanceGetParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type InstanceImageDeleteParams

type InstanceImageDeleteParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type InstanceImageGetParams

type InstanceImageGetParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Show price
	IncludePrices param.Opt[bool] `query:"include_prices,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (InstanceImageGetParams) URLQuery

func (r InstanceImageGetParams) URLQuery() (v url.Values, err error)

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

type InstanceImageListParams

type InstanceImageListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Show price
	IncludePrices param.Opt[bool] `query:"include_prices,omitzero" json:"-"`
	// Any value to show private images
	Private param.Opt[string] `query:"private,omitzero" json:"-"`
	// Filter by tag key-value pairs. Must be a valid JSON string. 'curl -G
	// --data-urlencode 'tag_key_value={"key": "value"}' --url
	// 'http://localhost:1111/v1/images/1/1'"
	TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
	// Filter by tag keys.
	TagKey []string `query:"tag_key,omitzero" json:"-"`
	// Image visibility. Globally visible images are public
	//
	// Any of "private", "public", "shared".
	Visibility InstanceImageListParamsVisibility `query:"visibility,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (InstanceImageListParams) URLQuery

func (r InstanceImageListParams) URLQuery() (v url.Values, err error)

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

type InstanceImageListParamsVisibility

type InstanceImageListParamsVisibility string

Image visibility. Globally visible images are public

const (
	InstanceImageListParamsVisibilityPrivate InstanceImageListParamsVisibility = "private"
	InstanceImageListParamsVisibilityPublic  InstanceImageListParamsVisibility = "public"
	InstanceImageListParamsVisibilityShared  InstanceImageListParamsVisibility = "shared"
)

type InstanceImageNewFromVolumeParams

type InstanceImageNewFromVolumeParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Image name
	Name string `json:"name,required"`
	// Required if source is volume. Volume id
	VolumeID string `json:"volume_id,required" format:"uuid4"`
	// Set to true if the image will be used by bare metal servers. Defaults to false.
	IsBaremetal param.Opt[bool] `json:"is_baremetal,omitzero"`
	// Specifies the type of firmware with which to boot the guest.
	//
	// Any of "bios", "uefi".
	HwFirmwareType InstanceImageNewFromVolumeParamsHwFirmwareType `json:"hw_firmware_type,omitzero"`
	// A virtual chipset type.
	//
	// Any of "pc", "q35".
	HwMachineType InstanceImageNewFromVolumeParamsHwMachineType `json:"hw_machine_type,omitzero"`
	// Image CPU architecture type: `aarch64`, `x86_64`
	//
	// Any of "aarch64", "x86_64".
	Architecture InstanceImageNewFromVolumeParamsArchitecture `json:"architecture,omitzero"`
	// The operating system installed on the image.
	//
	// Any of "linux", "windows".
	OsType InstanceImageNewFromVolumeParamsOsType `json:"os_type,omitzero"`
	// Image source
	//
	// Any of "volume".
	Source InstanceImageNewFromVolumeParamsSource `json:"source,omitzero"`
	// Whether the image supports SSH key or not
	//
	// Any of "allow", "deny", "required".
	SSHKey InstanceImageNewFromVolumeParamsSSHKey `json:"ssh_key,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// contains filtered or unexported fields
}

func (InstanceImageNewFromVolumeParams) MarshalJSON

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

type InstanceImageNewFromVolumeParamsArchitecture

type InstanceImageNewFromVolumeParamsArchitecture string

Image CPU architecture type: `aarch64`, `x86_64`

const (
	InstanceImageNewFromVolumeParamsArchitectureAarch64 InstanceImageNewFromVolumeParamsArchitecture = "aarch64"
	InstanceImageNewFromVolumeParamsArchitectureX86_64  InstanceImageNewFromVolumeParamsArchitecture = "x86_64"
)

type InstanceImageNewFromVolumeParamsHwFirmwareType

type InstanceImageNewFromVolumeParamsHwFirmwareType string

Specifies the type of firmware with which to boot the guest.

const (
	InstanceImageNewFromVolumeParamsHwFirmwareTypeBios InstanceImageNewFromVolumeParamsHwFirmwareType = "bios"
	InstanceImageNewFromVolumeParamsHwFirmwareTypeUefi InstanceImageNewFromVolumeParamsHwFirmwareType = "uefi"
)

type InstanceImageNewFromVolumeParamsHwMachineType

type InstanceImageNewFromVolumeParamsHwMachineType string

A virtual chipset type.

const (
	InstanceImageNewFromVolumeParamsHwMachineTypePc  InstanceImageNewFromVolumeParamsHwMachineType = "pc"
	InstanceImageNewFromVolumeParamsHwMachineTypeQ35 InstanceImageNewFromVolumeParamsHwMachineType = "q35"
)

type InstanceImageNewFromVolumeParamsOsType

type InstanceImageNewFromVolumeParamsOsType string

The operating system installed on the image.

const (
	InstanceImageNewFromVolumeParamsOsTypeLinux   InstanceImageNewFromVolumeParamsOsType = "linux"
	InstanceImageNewFromVolumeParamsOsTypeWindows InstanceImageNewFromVolumeParamsOsType = "windows"
)

type InstanceImageNewFromVolumeParamsSSHKey

type InstanceImageNewFromVolumeParamsSSHKey string

Whether the image supports SSH key or not

const (
	InstanceImageNewFromVolumeParamsSSHKeyAllow    InstanceImageNewFromVolumeParamsSSHKey = "allow"
	InstanceImageNewFromVolumeParamsSSHKeyDeny     InstanceImageNewFromVolumeParamsSSHKey = "deny"
	InstanceImageNewFromVolumeParamsSSHKeyRequired InstanceImageNewFromVolumeParamsSSHKey = "required"
)

type InstanceImageNewFromVolumeParamsSource

type InstanceImageNewFromVolumeParamsSource string

Image source

const (
	InstanceImageNewFromVolumeParamsSourceVolume InstanceImageNewFromVolumeParamsSource = "volume"
)

type InstanceImageService

type InstanceImageService struct {
	Options []option.RequestOption
	// contains filtered or unexported fields
}

InstanceImageService contains methods and other services that help with interacting with the gcore API.

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

func NewInstanceImageService

func NewInstanceImageService(opts ...option.RequestOption) (r InstanceImageService)

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

func (*InstanceImageService) Delete

func (r *InstanceImageService) Delete(ctx context.Context, imageID string, body InstanceImageDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Delete the image

func (*InstanceImageService) DeleteAndPoll

func (r *InstanceImageService) DeleteAndPoll(ctx context.Context, imageID string, body InstanceImageDeleteParams, opts ...option.RequestOption) error

DeleteAndPoll delete the image and poll for completion

func (*InstanceImageService) Get

func (r *InstanceImageService) Get(ctx context.Context, imageID string, params InstanceImageGetParams, opts ...option.RequestOption) (res *Image, err error)

Get image

func (*InstanceImageService) List

Retrieve an available images list. Returned entities owned by the project and public OR shared with the client

func (*InstanceImageService) NewFromVolume

func (r *InstanceImageService) NewFromVolume(ctx context.Context, params InstanceImageNewFromVolumeParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Create image from volume

func (*InstanceImageService) NewFromVolumeAndPoll

func (r *InstanceImageService) NewFromVolumeAndPoll(ctx context.Context, params InstanceImageNewFromVolumeParams, opts ...option.RequestOption) (*Image, error)

NewFromVolumeAndPoll create image from volume and poll for the result

func (*InstanceImageService) Update

func (r *InstanceImageService) Update(ctx context.Context, imageID string, params InstanceImageUpdateParams, opts ...option.RequestOption) (res *Image, err error)

Update image fields

func (*InstanceImageService) Upload

Upload image

func (*InstanceImageService) UploadAndPoll

func (r *InstanceImageService) UploadAndPoll(ctx context.Context, params InstanceImageUploadParams, opts ...option.RequestOption) (*Image, error)

UploadAndPoll upload image and poll for the result

type InstanceImageUpdateParams

type InstanceImageUpdateParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Set to true if the image will be used by bare metal servers.
	IsBaremetal param.Opt[bool] `json:"is_baremetal,omitzero"`
	// Image display name
	Name param.Opt[string] `json:"name,omitzero"`
	// Specifies the type of firmware with which to boot the guest.
	//
	// Any of "bios", "uefi".
	HwFirmwareType InstanceImageUpdateParamsHwFirmwareType `json:"hw_firmware_type,omitzero"`
	// A virtual chipset type.
	//
	// Any of "pc", "q35".
	HwMachineType InstanceImageUpdateParamsHwMachineType `json:"hw_machine_type,omitzero"`
	// The operating system installed on the image.
	//
	// Any of "linux", "windows".
	OsType InstanceImageUpdateParamsOsType `json:"os_type,omitzero"`
	// Whether the image supports SSH key or not
	//
	// Any of "allow", "deny", "required".
	SSHKey InstanceImageUpdateParamsSSHKey `json:"ssh_key,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// contains filtered or unexported fields
}

func (InstanceImageUpdateParams) MarshalJSON

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

type InstanceImageUpdateParamsHwFirmwareType

type InstanceImageUpdateParamsHwFirmwareType string

Specifies the type of firmware with which to boot the guest.

const (
	InstanceImageUpdateParamsHwFirmwareTypeBios InstanceImageUpdateParamsHwFirmwareType = "bios"
	InstanceImageUpdateParamsHwFirmwareTypeUefi InstanceImageUpdateParamsHwFirmwareType = "uefi"
)

type InstanceImageUpdateParamsHwMachineType

type InstanceImageUpdateParamsHwMachineType string

A virtual chipset type.

const (
	InstanceImageUpdateParamsHwMachineTypePc  InstanceImageUpdateParamsHwMachineType = "pc"
	InstanceImageUpdateParamsHwMachineTypeQ35 InstanceImageUpdateParamsHwMachineType = "q35"
)

type InstanceImageUpdateParamsOsType

type InstanceImageUpdateParamsOsType string

The operating system installed on the image.

const (
	InstanceImageUpdateParamsOsTypeLinux   InstanceImageUpdateParamsOsType = "linux"
	InstanceImageUpdateParamsOsTypeWindows InstanceImageUpdateParamsOsType = "windows"
)

type InstanceImageUpdateParamsSSHKey

type InstanceImageUpdateParamsSSHKey string

Whether the image supports SSH key or not

const (
	InstanceImageUpdateParamsSSHKeyAllow    InstanceImageUpdateParamsSSHKey = "allow"
	InstanceImageUpdateParamsSSHKeyDeny     InstanceImageUpdateParamsSSHKey = "deny"
	InstanceImageUpdateParamsSSHKeyRequired InstanceImageUpdateParamsSSHKey = "required"
)

type InstanceImageUploadParams

type InstanceImageUploadParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Image name
	Name string `json:"name,required"`
	// URL
	URL string `json:"url,required" format:"uri"`
	// OS Distribution, i.e. Debian, CentOS, Ubuntu, CoreOS etc.
	OsDistro param.Opt[string] `json:"os_distro,omitzero"`
	// OS version, i.e. 22.04 (for Ubuntu) or 9.4 for Debian
	OsVersion param.Opt[string] `json:"os_version,omitzero"`
	// When True, image cannot be deleted unless all volumes, created from it, are
	// deleted.
	CowFormat param.Opt[bool] `json:"cow_format,omitzero"`
	// Set to true if the image will be used by bare metal servers. Defaults to false.
	IsBaremetal param.Opt[bool] `json:"is_baremetal,omitzero"`
	// Specifies the type of firmware with which to boot the guest.
	//
	// Any of "bios", "uefi".
	HwFirmwareType InstanceImageUploadParamsHwFirmwareType `json:"hw_firmware_type,omitzero"`
	// A virtual chipset type.
	//
	// Any of "pc", "q35".
	HwMachineType InstanceImageUploadParamsHwMachineType `json:"hw_machine_type,omitzero"`
	// Image CPU architecture type: `aarch64`, `x86_64`
	//
	// Any of "aarch64", "x86_64".
	Architecture InstanceImageUploadParamsArchitecture `json:"architecture,omitzero"`
	// The operating system installed on the image.
	//
	// Any of "linux", "windows".
	OsType InstanceImageUploadParamsOsType `json:"os_type,omitzero"`
	// Whether the image supports SSH key or not
	//
	// Any of "allow", "deny", "required".
	SSHKey InstanceImageUploadParamsSSHKey `json:"ssh_key,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// contains filtered or unexported fields
}

func (InstanceImageUploadParams) MarshalJSON

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

type InstanceImageUploadParamsArchitecture

type InstanceImageUploadParamsArchitecture string

Image CPU architecture type: `aarch64`, `x86_64`

const (
	InstanceImageUploadParamsArchitectureAarch64 InstanceImageUploadParamsArchitecture = "aarch64"
	InstanceImageUploadParamsArchitectureX86_64  InstanceImageUploadParamsArchitecture = "x86_64"
)

type InstanceImageUploadParamsHwFirmwareType

type InstanceImageUploadParamsHwFirmwareType string

Specifies the type of firmware with which to boot the guest.

const (
	InstanceImageUploadParamsHwFirmwareTypeBios InstanceImageUploadParamsHwFirmwareType = "bios"
	InstanceImageUploadParamsHwFirmwareTypeUefi InstanceImageUploadParamsHwFirmwareType = "uefi"
)

type InstanceImageUploadParamsHwMachineType

type InstanceImageUploadParamsHwMachineType string

A virtual chipset type.

const (
	InstanceImageUploadParamsHwMachineTypePc  InstanceImageUploadParamsHwMachineType = "pc"
	InstanceImageUploadParamsHwMachineTypeQ35 InstanceImageUploadParamsHwMachineType = "q35"
)

type InstanceImageUploadParamsOsType

type InstanceImageUploadParamsOsType string

The operating system installed on the image.

const (
	InstanceImageUploadParamsOsTypeLinux   InstanceImageUploadParamsOsType = "linux"
	InstanceImageUploadParamsOsTypeWindows InstanceImageUploadParamsOsType = "windows"
)

type InstanceImageUploadParamsSSHKey

type InstanceImageUploadParamsSSHKey string

Whether the image supports SSH key or not

const (
	InstanceImageUploadParamsSSHKeyAllow    InstanceImageUploadParamsSSHKey = "allow"
	InstanceImageUploadParamsSSHKeyDeny     InstanceImageUploadParamsSSHKey = "deny"
	InstanceImageUploadParamsSSHKeyRequired InstanceImageUploadParamsSSHKey = "required"
)

type InstanceInterface

type InstanceInterface struct {
	// Group of subnet masks and/or IP addresses that share the current IP as VIP
	AllowedAddressPairs []AllowedAddressPairs `json:"allowed_address_pairs,required"`
	// Bodies of floating IPs that are NAT-ing IPs of this port
	FloatingipDetails []FloatingIP `json:"floatingip_details,required"`
	// IP addresses assigned to this port
	IPAssignments []IPAssignment `json:"ip_assignments,required"`
	// Body of the network this port is attached to
	NetworkDetails NetworkDetails `json:"network_details,required"`
	// ID of the network the port is attached to
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// ID of virtual ethernet port object
	PortID string `json:"port_id,required" format:"uuid4"`
	// Port security status
	PortSecurityEnabled bool `json:"port_security_enabled,required"`
	// Interface name
	InterfaceName string `json:"interface_name,nullable"`
	// MAC address of the virtual port
	MacAddress string `json:"mac_address,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowedAddressPairs respjson.Field
		FloatingipDetails   respjson.Field
		IPAssignments       respjson.Field
		NetworkDetails      respjson.Field
		NetworkID           respjson.Field
		PortID              respjson.Field
		PortSecurityEnabled respjson.Field
		InterfaceName       respjson.Field
		MacAddress          respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InstanceInterface) RawJSON

func (r InstanceInterface) RawJSON() string

Returns the unmodified JSON received from the API

func (*InstanceInterface) UnmarshalJSON

func (r *InstanceInterface) UnmarshalJSON(data []byte) error

type InstanceInterfaceAttachParams

type InstanceInterfaceAttachParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`

	// This field is a request body variant, only one variant field can be set.
	// Instance will be attached to default external network
	OfNewInterfaceExternalExtendSchemaWithDDOS *InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOS `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	// Instance will be attached to specified subnet
	OfNewInterfaceSpecificSubnetSchema *InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchema `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	// Instance will be attached to the network subnet with the largest count of
	// available ips
	OfNewInterfaceAnySubnetSchema *InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchema `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	// Instance will be attached to the given port. Floating IP will be created and
	// attached to that IP
	OfNewInterfaceReservedFixedIPSchema *InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchema `json:",inline"`
	// contains filtered or unexported fields
}

func (InstanceInterfaceAttachParams) MarshalJSON

func (u InstanceInterfaceAttachParams) MarshalJSON() ([]byte, error)

type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchema

type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchema struct {
	// Port will get an IP address in this network subnet
	NetworkID string `json:"network_id,required"`
	// Interface name
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// Each group will be added to the separate trunk.
	PortGroup param.Opt[int64] `json:"port_group,omitzero"`
	// Must be 'any_subnet'
	Type param.Opt[string] `json:"type,omitzero"`
	// Advanced DDoS protection.
	DDOSProfile InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile `json:"ddos_profile,omitzero"`
	// Which subnets should be selected: IPv4, IPv6 or use dual stack.
	//
	// Any of "dual", "ipv4", "ipv6".
	IPFamily string `json:"ip_family,omitzero"`
	// List of security group IDs
	SecurityGroups []InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup `json:"security_groups,omitzero"`
	// contains filtered or unexported fields
}

Instance will be attached to the network subnet with the largest count of available ips

The property NetworkID is required.

func (InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchema) MarshalJSON

type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile

type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile struct {
	// DDoS profile template ID.
	ProfileTemplate int64 `json:"profile_template,required"`
	// DDoS profile template name.
	ProfileTemplateName param.Opt[string] `json:"profile_template_name,omitzero"`
	// Protection parameters.
	Fields []InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField `json:"fields,omitzero"`
	// contains filtered or unexported fields
}

Advanced DDoS protection.

The property ProfileTemplate is required.

func (InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfile) MarshalJSON

type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField

type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField struct {
	// ID of DDoS profile field
	BaseField param.Opt[int64] `json:"base_field,omitzero"`
	// Name of DDoS profile field
	FieldName param.Opt[string] `json:"field_name,omitzero"`
	// Basic type value. Only one of 'value' or 'field_value' must be specified.
	Value param.Opt[string] `json:"value,omitzero"`
	// Complex value. Only one of 'value' or 'field_value' must be specified.
	FieldValue any `json:"field_value,omitzero"`
	// contains filtered or unexported fields
}

func (InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaDDOSProfileField) MarshalJSON

type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup

type InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup struct {
	// Resource ID
	ID string `json:"id,required"`
	// contains filtered or unexported fields
}

MandatoryIdSchema schema

The property ID is required.

func (InstanceInterfaceAttachParamsBodyNewInterfaceAnySubnetSchemaSecurityGroup) MarshalJSON

type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOS

type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOS struct {
	// Interface name
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// Each group will be added to the separate trunk.
	PortGroup param.Opt[int64] `json:"port_group,omitzero"`
	// Must be 'external'. Union tag
	Type param.Opt[string] `json:"type,omitzero"`
	// Advanced DDoS protection.
	DDOSProfile InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile `json:"ddos_profile,omitzero"`
	// Which subnets should be selected: IPv4, IPv6 or use dual stack.
	//
	// Any of "dual", "ipv4", "ipv6".
	IPFamily string `json:"ip_family,omitzero"`
	// List of security group IDs
	SecurityGroups []InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup `json:"security_groups,omitzero"`
	// contains filtered or unexported fields
}

Instance will be attached to default external network

func (InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOS) MarshalJSON

type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile

type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile struct {
	// DDoS profile template ID.
	ProfileTemplate int64 `json:"profile_template,required"`
	// DDoS profile template name.
	ProfileTemplateName param.Opt[string] `json:"profile_template_name,omitzero"`
	// Protection parameters.
	Fields []InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField `json:"fields,omitzero"`
	// contains filtered or unexported fields
}

Advanced DDoS protection.

The property ProfileTemplate is required.

func (InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfile) MarshalJSON

type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField

type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField struct {
	// ID of DDoS profile field
	BaseField param.Opt[int64] `json:"base_field,omitzero"`
	// Name of DDoS profile field
	FieldName param.Opt[string] `json:"field_name,omitzero"`
	// Basic type value. Only one of 'value' or 'field_value' must be specified.
	Value param.Opt[string] `json:"value,omitzero"`
	// Complex value. Only one of 'value' or 'field_value' must be specified.
	FieldValue any `json:"field_value,omitzero"`
	// contains filtered or unexported fields
}

func (InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSDDOSProfileField) MarshalJSON

type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup

type InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup struct {
	// Resource ID
	ID string `json:"id,required"`
	// contains filtered or unexported fields
}

MandatoryIdSchema schema

The property ID is required.

func (InstanceInterfaceAttachParamsBodyNewInterfaceExternalExtendSchemaWithDDOSSecurityGroup) MarshalJSON

type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchema

type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchema struct {
	// Port ID
	PortID string `json:"port_id,required"`
	// Interface name
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// Each group will be added to the separate trunk.
	PortGroup param.Opt[int64] `json:"port_group,omitzero"`
	// Must be 'reserved_fixed_ip'. Union tag
	Type param.Opt[string] `json:"type,omitzero"`
	// Advanced DDoS protection.
	DDOSProfile InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile `json:"ddos_profile,omitzero"`
	// List of security group IDs
	SecurityGroups []InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup `json:"security_groups,omitzero"`
	// contains filtered or unexported fields
}

Instance will be attached to the given port. Floating IP will be created and attached to that IP

The property PortID is required.

func (InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchema) MarshalJSON

type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile

type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile struct {
	// DDoS profile template ID.
	ProfileTemplate int64 `json:"profile_template,required"`
	// DDoS profile template name.
	ProfileTemplateName param.Opt[string] `json:"profile_template_name,omitzero"`
	// Protection parameters.
	Fields []InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField `json:"fields,omitzero"`
	// contains filtered or unexported fields
}

Advanced DDoS protection.

The property ProfileTemplate is required.

func (InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfile) MarshalJSON

type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField

type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField struct {
	// ID of DDoS profile field
	BaseField param.Opt[int64] `json:"base_field,omitzero"`
	// Name of DDoS profile field
	FieldName param.Opt[string] `json:"field_name,omitzero"`
	// Basic type value. Only one of 'value' or 'field_value' must be specified.
	Value param.Opt[string] `json:"value,omitzero"`
	// Complex value. Only one of 'value' or 'field_value' must be specified.
	FieldValue any `json:"field_value,omitzero"`
	// contains filtered or unexported fields
}

func (InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaDDOSProfileField) MarshalJSON

type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup

type InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup struct {
	// Resource ID
	ID string `json:"id,required"`
	// contains filtered or unexported fields
}

MandatoryIdSchema schema

The property ID is required.

func (InstanceInterfaceAttachParamsBodyNewInterfaceReservedFixedIPSchemaSecurityGroup) MarshalJSON

type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchema

type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchema struct {
	// Port will get an IP address from this subnet
	SubnetID string `json:"subnet_id,required"`
	// Interface name
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// Each group will be added to the separate trunk.
	PortGroup param.Opt[int64] `json:"port_group,omitzero"`
	// Must be 'subnet'
	Type param.Opt[string] `json:"type,omitzero"`
	// Advanced DDoS protection.
	DDOSProfile InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile `json:"ddos_profile,omitzero"`
	// List of security group IDs
	SecurityGroups []InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup `json:"security_groups,omitzero"`
	// contains filtered or unexported fields
}

Instance will be attached to specified subnet

The property SubnetID is required.

func (InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchema) MarshalJSON

type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile

type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile struct {
	// DDoS profile template ID.
	ProfileTemplate int64 `json:"profile_template,required"`
	// DDoS profile template name.
	ProfileTemplateName param.Opt[string] `json:"profile_template_name,omitzero"`
	// Protection parameters.
	Fields []InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField `json:"fields,omitzero"`
	// contains filtered or unexported fields
}

Advanced DDoS protection.

The property ProfileTemplate is required.

func (InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfile) MarshalJSON

type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField

type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField struct {
	// ID of DDoS profile field
	BaseField param.Opt[int64] `json:"base_field,omitzero"`
	// Name of DDoS profile field
	FieldName param.Opt[string] `json:"field_name,omitzero"`
	// Basic type value. Only one of 'value' or 'field_value' must be specified.
	Value param.Opt[string] `json:"value,omitzero"`
	// Complex value. Only one of 'value' or 'field_value' must be specified.
	FieldValue any `json:"field_value,omitzero"`
	// contains filtered or unexported fields
}

func (InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaDDOSProfileField) MarshalJSON

type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup

type InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup struct {
	// Resource ID
	ID string `json:"id,required"`
	// contains filtered or unexported fields
}

MandatoryIdSchema schema

The property ID is required.

func (InstanceInterfaceAttachParamsBodyNewInterfaceSpecificSubnetSchemaSecurityGroup) MarshalJSON

type InstanceInterfaceDetachParams

type InstanceInterfaceDetachParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// IP address
	IPAddress string `json:"ip_address,required"`
	// ID of the port
	PortID string `json:"port_id,required"`
	// contains filtered or unexported fields
}

func (InstanceInterfaceDetachParams) MarshalJSON

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

type InstanceInterfaceListParams

type InstanceInterfaceListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type InstanceInterfaceService

type InstanceInterfaceService struct {
	Options []option.RequestOption
	// contains filtered or unexported fields
}

InstanceInterfaceService contains methods and other services that help with interacting with the gcore API.

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

func NewInstanceInterfaceService

func NewInstanceInterfaceService(opts ...option.RequestOption) (r InstanceInterfaceService)

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

func (*InstanceInterfaceService) Attach

func (r *InstanceInterfaceService) Attach(ctx context.Context, instanceID string, params InstanceInterfaceAttachParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Attach interface to instance

func (*InstanceInterfaceService) AttachAndPoll

AttachAndPoll attach interface to instance and poll for the result

func (*InstanceInterfaceService) Detach

func (r *InstanceInterfaceService) Detach(ctx context.Context, instanceID string, params InstanceInterfaceDetachParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Detach interface from instance

func (*InstanceInterfaceService) DetachAndPoll

DetachAndPoll interface from instance and poll for the result

func (*InstanceInterfaceService) List

List network interfaces attached to the instance

type InstanceIsolation

type InstanceIsolation struct {
	// The reason of instance isolation if it is isolated from external internet.
	Reason string `json:"reason,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Reason      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InstanceIsolation) RawJSON

func (r InstanceIsolation) RawJSON() string

Returns the unmodified JSON received from the API

func (*InstanceIsolation) UnmarshalJSON

func (r *InstanceIsolation) UnmarshalJSON(data []byte) error

type InstanceList

type InstanceList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []Instance `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InstanceList) RawJSON

func (r InstanceList) RawJSON() string

Returns the unmodified JSON received from the API

func (*InstanceList) UnmarshalJSON

func (r *InstanceList) UnmarshalJSON(data []byte) error

type InstanceListParams

type InstanceListParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Only show instances which are able to handle floating address
	AvailableFloating param.Opt[bool] `query:"available_floating,omitzero" json:"-"`
	// Filters the instances by a date and time stamp when the instances last changed.
	ChangesBefore param.Opt[time.Time] `query:"changes-before,omitzero" format:"date-time" json:"-"`
	// Filters the instances by a date and time stamp when the instances last changed
	// status.
	ChangesSince param.Opt[time.Time] `query:"changes-since,omitzero" format:"date-time" json:"-"`
	// Exclude instances with specified flavor prefix
	ExcludeFlavorPrefix param.Opt[string] `query:"exclude_flavor_prefix,omitzero" json:"-"`
	// Exclude instances with specified security group name
	ExcludeSecgroup param.Opt[string] `query:"exclude_secgroup,omitzero" json:"-"`
	// Filter out instances by flavor_id. Flavor id must match exactly.
	FlavorID param.Opt[string] `query:"flavor_id,omitzero" json:"-"`
	// Filter out instances by flavor_prefix.
	FlavorPrefix param.Opt[string] `query:"flavor_prefix,omitzero" json:"-"`
	// Include GPU clusters' servers
	IncludeAI param.Opt[bool] `query:"include_ai,omitzero" json:"-"`
	// Include bare metal servers. Please, use `GET /v1/bminstances/` instead
	IncludeBaremetal param.Opt[bool] `query:"include_baremetal,omitzero" json:"-"`
	// Include managed k8s worker nodes
	IncludeK8s param.Opt[bool] `query:"include_k8s,omitzero" json:"-"`
	// An IPv4 address to filter results by. Note: partial matches are allowed. For
	// example, searching for 192.168.0.1 will return 192.168.0.1, 192.168.0.10,
	// 192.168.0.110, and so on.
	IP param.Opt[string] `query:"ip,omitzero" json:"-"`
	// Optional. Limit the number of returned items
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter instances by name. You can provide a full or partial name, instances with
	// matching names will be returned. For example, entering 'test' will return all
	// instances that contain 'test' in their name.
	Name param.Opt[string] `query:"name,omitzero" json:"-"`
	// Optional. Offset value is used to exclude the first set of records from the
	// result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Include only isolated instances
	OnlyIsolated param.Opt[bool] `query:"only_isolated,omitzero" json:"-"`
	// Return bare metals only with external fixed IP addresses.
	OnlyWithFixedExternalIP param.Opt[bool] `query:"only_with_fixed_external_ip,omitzero" json:"-"`
	// Filter result by ddos protection profile name. Effective only with with_ddos set
	// to true.
	ProfileName param.Opt[string] `query:"profile_name,omitzero" json:"-"`
	// Optional. Filter by tag key-value pairs. curl -G --data-urlencode
	// "tag_key_value={"key": "value"}" --url
	// "https://example.com/cloud/v1/resource/1/1"
	TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
	// Filter the server list result by the UUID of the server. Allowed UUID part
	Uuid param.Opt[string] `query:"uuid,omitzero" json:"-"`
	// Include DDoS profile information in the response when set to `true`. Otherwise,
	// the `ddos_profile` field in the response is `null` by default.
	WithDDOS param.Opt[bool] `query:"with_ddos,omitzero" json:"-"`
	// Include `interface_name` in the addresses
	WithInterfacesName param.Opt[bool] `query:"with_interfaces_name,omitzero" json:"-"`
	// Order by field and direction.
	//
	// Any of "created.asc", "created.desc", "name.asc", "name.desc".
	OrderBy InstanceListParamsOrderBy `query:"order_by,omitzero" json:"-"`
	// Filter result by DDoS protection_status. if parameter is provided. Effective
	// only with with_ddos set to true. (Active, Queued or Error)
	//
	// Any of "Active", "Queued", "Error".
	ProtectionStatus InstanceListParamsProtectionStatus `query:"protection_status,omitzero" json:"-"`
	// Filters instances by status.
	//
	// Any of "ACTIVE", "BUILD", "ERROR", "HARD_REBOOT", "MIGRATING", "PAUSED",
	// "REBOOT", "REBUILD", "RESIZE", "REVERT_RESIZE", "SHELVED", "SHELVED_OFFLOADED",
	// "SHUTOFF", "SOFT_DELETED", "SUSPENDED", "VERIFY_RESIZE".
	Status InstanceListParamsStatus `query:"status,omitzero" json:"-"`
	// Optional. Filter by tag values. ?tag_value=value1&tag_value=value2
	TagValue []string `query:"tag_value,omitzero" json:"-"`
	// Return bare metals either only with advanced or only basic DDoS protection.
	// Effective only with with_ddos set to true. (advanced or basic)
	//
	// Any of "basic", "advanced".
	TypeDDOSProfile InstanceListParamsTypeDDOSProfile `query:"type_ddos_profile,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (InstanceListParams) URLQuery

func (r InstanceListParams) URLQuery() (v url.Values, err error)

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

type InstanceListParamsOrderBy

type InstanceListParamsOrderBy string

Order by field and direction.

const (
	InstanceListParamsOrderByCreatedAsc  InstanceListParamsOrderBy = "created.asc"
	InstanceListParamsOrderByCreatedDesc InstanceListParamsOrderBy = "created.desc"
	InstanceListParamsOrderByNameAsc     InstanceListParamsOrderBy = "name.asc"
	InstanceListParamsOrderByNameDesc    InstanceListParamsOrderBy = "name.desc"
)

type InstanceListParamsProtectionStatus

type InstanceListParamsProtectionStatus string

Filter result by DDoS protection_status. if parameter is provided. Effective only with with_ddos set to true. (Active, Queued or Error)

const (
	InstanceListParamsProtectionStatusActive InstanceListParamsProtectionStatus = "Active"
	InstanceListParamsProtectionStatusQueued InstanceListParamsProtectionStatus = "Queued"
	InstanceListParamsProtectionStatusError  InstanceListParamsProtectionStatus = "Error"
)

type InstanceListParamsStatus

type InstanceListParamsStatus string

Filters instances by status.

const (
	InstanceListParamsStatusActive           InstanceListParamsStatus = "ACTIVE"
	InstanceListParamsStatusBuild            InstanceListParamsStatus = "BUILD"
	InstanceListParamsStatusError            InstanceListParamsStatus = "ERROR"
	InstanceListParamsStatusHardReboot       InstanceListParamsStatus = "HARD_REBOOT"
	InstanceListParamsStatusMigrating        InstanceListParamsStatus = "MIGRATING"
	InstanceListParamsStatusPaused           InstanceListParamsStatus = "PAUSED"
	InstanceListParamsStatusReboot           InstanceListParamsStatus = "REBOOT"
	InstanceListParamsStatusRebuild          InstanceListParamsStatus = "REBUILD"
	InstanceListParamsStatusResize           InstanceListParamsStatus = "RESIZE"
	InstanceListParamsStatusRevertResize     InstanceListParamsStatus = "REVERT_RESIZE"
	InstanceListParamsStatusShelved          InstanceListParamsStatus = "SHELVED"
	InstanceListParamsStatusShelvedOffloaded InstanceListParamsStatus = "SHELVED_OFFLOADED"
	InstanceListParamsStatusShutoff          InstanceListParamsStatus = "SHUTOFF"
	InstanceListParamsStatusSoftDeleted      InstanceListParamsStatus = "SOFT_DELETED"
	InstanceListParamsStatusSuspended        InstanceListParamsStatus = "SUSPENDED"
	InstanceListParamsStatusVerifyResize     InstanceListParamsStatus = "VERIFY_RESIZE"
)

type InstanceListParamsTypeDDOSProfile

type InstanceListParamsTypeDDOSProfile string

Return bare metals either only with advanced or only basic DDoS protection. Effective only with with_ddos set to true. (advanced or basic)

const (
	InstanceListParamsTypeDDOSProfileBasic    InstanceListParamsTypeDDOSProfile = "basic"
	InstanceListParamsTypeDDOSProfileAdvanced InstanceListParamsTypeDDOSProfile = "advanced"
)

type InstanceMetricListParams

type InstanceMetricListParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Time interval.
	TimeInterval int64 `json:"time_interval,required"`
	// Time interval unit.
	//
	// Any of "day", "hour".
	TimeUnit InstanceMetricsTimeUnit `json:"time_unit,omitzero,required"`
	// contains filtered or unexported fields
}

func (InstanceMetricListParams) MarshalJSON

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

type InstanceMetricService

type InstanceMetricService struct {
	Options []option.RequestOption
}

InstanceMetricService contains methods and other services that help with interacting with the gcore API.

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

func NewInstanceMetricService

func NewInstanceMetricService(opts ...option.RequestOption) (r InstanceMetricService)

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

func (*InstanceMetricService) List

func (r *InstanceMetricService) List(ctx context.Context, instanceID string, params InstanceMetricListParams, opts ...option.RequestOption) (res *MetricsList, err error)

Get instance metrics, including cpu, memory, network and disk metrics

type InstanceMetricsTimeUnit

type InstanceMetricsTimeUnit string
const (
	InstanceMetricsTimeUnitDay  InstanceMetricsTimeUnit = "day"
	InstanceMetricsTimeUnitHour InstanceMetricsTimeUnit = "hour"
)

type InstanceNewParams

type InstanceNewParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// The flavor of the instance.
	Flavor string `json:"flavor,required"`
	// A list of network interfaces for the instance. You can create one or more
	// interfaces - private, public, or both.
	Interfaces []InstanceNewParamsInterfaceUnion `json:"interfaces,omitzero,required"`
	// List of volumes that will be attached to the instance.
	Volumes []InstanceNewParamsVolumeUnion `json:"volumes,omitzero,required"`
	// Specifies the name of the SSH keypair, created via the
	// <a href="#operation/SSHKeyCollectionViewSet.post">/v1/ssh_keys endpoint</a>.
	SSHKeyName param.Opt[string] `json:"ssh_key_name,omitzero"`
	// Set to `true` if creating the instance from an `apptemplate`. This allows
	// application ports in the security group for instances created from a marketplace
	// application template.
	AllowAppPorts param.Opt[bool] `json:"allow_app_ports,omitzero"`
	// Instance name.
	Name param.Opt[string] `json:"name,omitzero"`
	// If you want the instance name to be automatically generated based on IP
	// addresses, you can provide a name template instead of specifying the name
	// manually. The template should include a placeholder that will be replaced during
	// provisioning. Supported placeholders are: `{ip_octets}` (last 3 octets of the
	// IP), `{two_ip_octets}`, and `{one_ip_octet}`.
	NameTemplate param.Opt[string] `json:"name_template,omitzero"`
	// For Linux instances, 'username' and 'password' are used to create a new user.
	// When only 'password' is provided, it is set as the password for the default user
	// of the image. For Windows instances, 'username' cannot be specified. Use the
	// 'password' field to set the password for the 'Admin' user on Windows. Use the
	// 'user_data' field to provide a script to create new users on Windows. The
	// password of the Admin user cannot be updated via 'user_data'.
	Password param.Opt[string] `json:"password,omitzero"`
	// Placement group ID for instance placement policy.
	//
	// Supported group types:
	//
	//   - `anti-affinity`: Ensures instances are placed on different hosts for high
	//     availability.
	//   - `affinity`: Places instances on the same host for low-latency communication.
	//   - `soft-anti-affinity`: Tries to place instances on different hosts but allows
	//     sharing if needed.
	ServergroupID param.Opt[string] `json:"servergroup_id,omitzero" format:"uuid4"`
	// String in base64 format. For Linux instances, 'user_data' is ignored when
	// 'password' field is provided. For Windows instances, Admin user password is set
	// by 'password' field and cannot be updated via 'user_data'. Examples of the
	// user_data: https://cloudinit.readthedocs.io/en/latest/topics/examples.html
	UserData param.Opt[string] `json:"user_data,omitzero"`
	// For Linux instances, 'username' and 'password' are used to create a new user.
	// For Windows instances, 'username' cannot be specified. Use 'password' field to
	// set the password for the 'Admin' user on Windows.
	Username param.Opt[string] `json:"username,omitzero"`
	// Parameters for the application template if creating the instance from an
	// `apptemplate`.
	Configuration any `json:"configuration,omitzero"`
	// Specifies security group UUIDs to be applied to all instance network interfaces.
	SecurityGroups []InstanceNewParamsSecurityGroup `json:"security_groups,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// contains filtered or unexported fields
}

func (InstanceNewParams) MarshalJSON

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

type InstanceNewParamsInterfaceAnySubnet

type InstanceNewParamsInterfaceAnySubnet struct {
	// The network where the instance will be connected.
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// Interface name. Defaults to `null` and is returned as `null` in the API response
	// if not set.
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// You can specify a specific IP address from your subnet.
	IPAddress param.Opt[string] `json:"ip_address,omitzero" format:"ipvanyaddress"`
	// Allows the instance to have a public IP that can be reached from the internet.
	FloatingIP InstanceNewParamsInterfaceAnySubnetFloatingIPUnion `json:"floating_ip,omitzero"`
	// Specify `ipv4`, `ipv6`, or `dual` to enable both.
	//
	// Any of "dual", "ipv4", "ipv6".
	IPFamily InterfaceIPFamily `json:"ip_family,omitzero"`
	// Specifies security group UUIDs to be applied to the instance network interface.
	SecurityGroups []InstanceNewParamsInterfaceAnySubnetSecurityGroup `json:"security_groups,omitzero"`
	// Instance will be attached to a subnet with the largest count of free IPs.
	//
	// This field can be elided, and will marshal its zero value as "any_subnet".
	Type constant.AnySubnet `json:"type,required"`
	// contains filtered or unexported fields
}

The properties NetworkID, Type are required.

func (InstanceNewParamsInterfaceAnySubnet) MarshalJSON

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

type InstanceNewParamsInterfaceAnySubnetFloatingIPExisting

type InstanceNewParamsInterfaceAnySubnetFloatingIPExisting struct {
	// An existing available floating IP id must be specified if the source is set to
	// `existing`
	ExistingFloatingID string `json:"existing_floating_id,required" format:"uuid4"`
	// An existing available floating IP will be attached to the instance. A floating
	// IP is a public IP that makes the instance accessible from the internet, even if
	// it only has a private IP. It works like SNAT, allowing outgoing and incoming
	// traffic.
	//
	// This field can be elided, and will marshal its zero value as "existing".
	Source constant.Existing `json:"source,required"`
	// contains filtered or unexported fields
}

The properties ExistingFloatingID, Source are required.

func (InstanceNewParamsInterfaceAnySubnetFloatingIPExisting) MarshalJSON

type InstanceNewParamsInterfaceAnySubnetFloatingIPNew

type InstanceNewParamsInterfaceAnySubnetFloatingIPNew struct {
	// A new floating IP will be created and attached to the instance. A floating IP is
	// a public IP that makes the instance accessible from the internet, even if it
	// only has a private IP. It works like SNAT, allowing outgoing and incoming
	// traffic.
	Source constant.New `json:"source,required"`
	// contains filtered or unexported fields
}

This struct has a constant value, construct it with NewInstanceNewParamsInterfaceAnySubnetFloatingIPNew.

func NewInstanceNewParamsInterfaceAnySubnetFloatingIPNew

func NewInstanceNewParamsInterfaceAnySubnetFloatingIPNew() InstanceNewParamsInterfaceAnySubnetFloatingIPNew

func (InstanceNewParamsInterfaceAnySubnetFloatingIPNew) MarshalJSON

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

type InstanceNewParamsInterfaceAnySubnetFloatingIPUnion

type InstanceNewParamsInterfaceAnySubnetFloatingIPUnion struct {
	OfNew      *InstanceNewParamsInterfaceAnySubnetFloatingIPNew      `json:",omitzero,inline"`
	OfExisting *InstanceNewParamsInterfaceAnySubnetFloatingIPExisting `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (InstanceNewParamsInterfaceAnySubnetFloatingIPUnion) GetExistingFloatingID

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsInterfaceAnySubnetFloatingIPUnion) GetSource

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsInterfaceAnySubnetFloatingIPUnion) MarshalJSON

type InstanceNewParamsInterfaceAnySubnetSecurityGroup

type InstanceNewParamsInterfaceAnySubnetSecurityGroup struct {
	// Resource ID
	ID string `json:"id,required" format:"uuid4"`
	// contains filtered or unexported fields
}

The property ID is required.

func (InstanceNewParamsInterfaceAnySubnetSecurityGroup) MarshalJSON

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

type InstanceNewParamsInterfaceExternal

type InstanceNewParamsInterfaceExternal struct {
	// Interface name. Defaults to `null` and is returned as `null` in the API response
	// if not set.
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// Specify `ipv4`, `ipv6`, or `dual` to enable both.
	//
	// Any of "dual", "ipv4", "ipv6".
	IPFamily InterfaceIPFamily `json:"ip_family,omitzero"`
	// Specifies security group UUIDs to be applied to the instance network interface.
	SecurityGroups []InstanceNewParamsInterfaceExternalSecurityGroup `json:"security_groups,omitzero"`
	// A public IP address will be assigned to the instance.
	//
	// This field can be elided, and will marshal its zero value as "external".
	Type constant.External `json:"type,required"`
	// contains filtered or unexported fields
}

Instance will be attached to default external network

The property Type is required.

func (InstanceNewParamsInterfaceExternal) MarshalJSON

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

type InstanceNewParamsInterfaceExternalSecurityGroup

type InstanceNewParamsInterfaceExternalSecurityGroup struct {
	// Resource ID
	ID string `json:"id,required" format:"uuid4"`
	// contains filtered or unexported fields
}

The property ID is required.

func (InstanceNewParamsInterfaceExternalSecurityGroup) MarshalJSON

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

type InstanceNewParamsInterfaceReservedFixedIP

type InstanceNewParamsInterfaceReservedFixedIP struct {
	// Network ID the subnet belongs to. Port will be plugged in this network.
	PortID string `json:"port_id,required"`
	// Interface name. Defaults to `null` and is returned as `null` in the API response
	// if not set.
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// Allows the instance to have a public IP that can be reached from the internet.
	FloatingIP InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion `json:"floating_ip,omitzero"`
	// Specifies security group UUIDs to be applied to the instance network interface.
	SecurityGroups []InstanceNewParamsInterfaceReservedFixedIPSecurityGroup `json:"security_groups,omitzero"`
	// An existing available reserved fixed IP will be attached to the instance. If the
	// reserved IP is not public and you choose to add a floating IP, the instance will
	// be accessible from the internet.
	//
	// This field can be elided, and will marshal its zero value as
	// "reserved_fixed_ip".
	Type constant.ReservedFixedIP `json:"type,required"`
	// contains filtered or unexported fields
}

The properties PortID, Type are required.

func (InstanceNewParamsInterfaceReservedFixedIP) MarshalJSON

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

type InstanceNewParamsInterfaceReservedFixedIPFloatingIPExisting

type InstanceNewParamsInterfaceReservedFixedIPFloatingIPExisting struct {
	// An existing available floating IP id must be specified if the source is set to
	// `existing`
	ExistingFloatingID string `json:"existing_floating_id,required" format:"uuid4"`
	// An existing available floating IP will be attached to the instance. A floating
	// IP is a public IP that makes the instance accessible from the internet, even if
	// it only has a private IP. It works like SNAT, allowing outgoing and incoming
	// traffic.
	//
	// This field can be elided, and will marshal its zero value as "existing".
	Source constant.Existing `json:"source,required"`
	// contains filtered or unexported fields
}

The properties ExistingFloatingID, Source are required.

func (InstanceNewParamsInterfaceReservedFixedIPFloatingIPExisting) MarshalJSON

type InstanceNewParamsInterfaceReservedFixedIPFloatingIPNew

type InstanceNewParamsInterfaceReservedFixedIPFloatingIPNew struct {
	// A new floating IP will be created and attached to the instance. A floating IP is
	// a public IP that makes the instance accessible from the internet, even if it
	// only has a private IP. It works like SNAT, allowing outgoing and incoming
	// traffic.
	Source constant.New `json:"source,required"`
	// contains filtered or unexported fields
}

This struct has a constant value, construct it with NewInstanceNewParamsInterfaceReservedFixedIPFloatingIPNew.

func (InstanceNewParamsInterfaceReservedFixedIPFloatingIPNew) MarshalJSON

type InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion

type InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion struct {
	OfNew      *InstanceNewParamsInterfaceReservedFixedIPFloatingIPNew      `json:",omitzero,inline"`
	OfExisting *InstanceNewParamsInterfaceReservedFixedIPFloatingIPExisting `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion) GetExistingFloatingID

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion) GetSource

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsInterfaceReservedFixedIPFloatingIPUnion) MarshalJSON

type InstanceNewParamsInterfaceReservedFixedIPSecurityGroup

type InstanceNewParamsInterfaceReservedFixedIPSecurityGroup struct {
	// Resource ID
	ID string `json:"id,required" format:"uuid4"`
	// contains filtered or unexported fields
}

The property ID is required.

func (InstanceNewParamsInterfaceReservedFixedIPSecurityGroup) MarshalJSON

type InstanceNewParamsInterfaceSubnet

type InstanceNewParamsInterfaceSubnet struct {
	// The network where the instance will be connected.
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// The instance will get an IP address from this subnet.
	SubnetID string `json:"subnet_id,required" format:"uuid4"`
	// Interface name. Defaults to `null` and is returned as `null` in the API response
	// if not set.
	InterfaceName param.Opt[string] `json:"interface_name,omitzero"`
	// Allows the instance to have a public IP that can be reached from the internet.
	FloatingIP InstanceNewParamsInterfaceSubnetFloatingIPUnion `json:"floating_ip,omitzero"`
	// Specifies security group UUIDs to be applied to the instance network interface.
	SecurityGroups []InstanceNewParamsInterfaceSubnetSecurityGroup `json:"security_groups,omitzero"`
	// The instance will get an IP address from the selected network. If you choose to
	// add a floating IP, the instance will be reachable from the internet. Otherwise,
	// it will only have a private IP within the network.
	//
	// This field can be elided, and will marshal its zero value as "subnet".
	Type constant.Subnet `json:"type,required"`
	// contains filtered or unexported fields
}

The instance will get an IP address from the selected network. If you choose to add a floating IP, the instance will be reachable from the internet. Otherwise, it will only have a private IP within the network.

The properties NetworkID, SubnetID, Type are required.

func (InstanceNewParamsInterfaceSubnet) MarshalJSON

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

type InstanceNewParamsInterfaceSubnetFloatingIPExisting

type InstanceNewParamsInterfaceSubnetFloatingIPExisting struct {
	// An existing available floating IP id must be specified if the source is set to
	// `existing`
	ExistingFloatingID string `json:"existing_floating_id,required" format:"uuid4"`
	// An existing available floating IP will be attached to the instance. A floating
	// IP is a public IP that makes the instance accessible from the internet, even if
	// it only has a private IP. It works like SNAT, allowing outgoing and incoming
	// traffic.
	//
	// This field can be elided, and will marshal its zero value as "existing".
	Source constant.Existing `json:"source,required"`
	// contains filtered or unexported fields
}

The properties ExistingFloatingID, Source are required.

func (InstanceNewParamsInterfaceSubnetFloatingIPExisting) MarshalJSON

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

type InstanceNewParamsInterfaceSubnetFloatingIPNew

type InstanceNewParamsInterfaceSubnetFloatingIPNew struct {
	// A new floating IP will be created and attached to the instance. A floating IP is
	// a public IP that makes the instance accessible from the internet, even if it
	// only has a private IP. It works like SNAT, allowing outgoing and incoming
	// traffic.
	Source constant.New `json:"source,required"`
	// contains filtered or unexported fields
}

This struct has a constant value, construct it with NewInstanceNewParamsInterfaceSubnetFloatingIPNew.

func NewInstanceNewParamsInterfaceSubnetFloatingIPNew

func NewInstanceNewParamsInterfaceSubnetFloatingIPNew() InstanceNewParamsInterfaceSubnetFloatingIPNew

func (InstanceNewParamsInterfaceSubnetFloatingIPNew) MarshalJSON

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

type InstanceNewParamsInterfaceSubnetFloatingIPUnion

type InstanceNewParamsInterfaceSubnetFloatingIPUnion struct {
	OfNew      *InstanceNewParamsInterfaceSubnetFloatingIPNew      `json:",omitzero,inline"`
	OfExisting *InstanceNewParamsInterfaceSubnetFloatingIPExisting `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (InstanceNewParamsInterfaceSubnetFloatingIPUnion) GetExistingFloatingID

func (u InstanceNewParamsInterfaceSubnetFloatingIPUnion) GetExistingFloatingID() *string

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsInterfaceSubnetFloatingIPUnion) GetSource

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsInterfaceSubnetFloatingIPUnion) MarshalJSON

type InstanceNewParamsInterfaceSubnetSecurityGroup

type InstanceNewParamsInterfaceSubnetSecurityGroup struct {
	// Resource ID
	ID string `json:"id,required" format:"uuid4"`
	// contains filtered or unexported fields
}

The property ID is required.

func (InstanceNewParamsInterfaceSubnetSecurityGroup) MarshalJSON

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

type InstanceNewParamsInterfaceUnion

type InstanceNewParamsInterfaceUnion struct {
	OfExternal        *InstanceNewParamsInterfaceExternal        `json:",omitzero,inline"`
	OfSubnet          *InstanceNewParamsInterfaceSubnet          `json:",omitzero,inline"`
	OfAnySubnet       *InstanceNewParamsInterfaceAnySubnet       `json:",omitzero,inline"`
	OfReservedFixedIP *InstanceNewParamsInterfaceReservedFixedIP `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (InstanceNewParamsInterfaceUnion) GetFloatingIP

func (u InstanceNewParamsInterfaceUnion) GetFloatingIP() (res instanceNewParamsInterfaceUnionFloatingIP)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (InstanceNewParamsInterfaceUnion) GetIPAddress

func (u InstanceNewParamsInterfaceUnion) GetIPAddress() *string

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsInterfaceUnion) GetIPFamily

func (u InstanceNewParamsInterfaceUnion) GetIPFamily() *string

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsInterfaceUnion) GetInterfaceName

func (u InstanceNewParamsInterfaceUnion) GetInterfaceName() *string

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsInterfaceUnion) GetNetworkID

func (u InstanceNewParamsInterfaceUnion) GetNetworkID() *string

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsInterfaceUnion) GetPortID

func (u InstanceNewParamsInterfaceUnion) GetPortID() *string

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsInterfaceUnion) GetSecurityGroups

func (u InstanceNewParamsInterfaceUnion) GetSecurityGroups() (res instanceNewParamsInterfaceUnionSecurityGroups)

Returns a subunion which exports methods to access subproperties

Or use AsAny() to get the underlying value

func (InstanceNewParamsInterfaceUnion) GetSubnetID

func (u InstanceNewParamsInterfaceUnion) GetSubnetID() *string

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsInterfaceUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsInterfaceUnion) MarshalJSON

func (u InstanceNewParamsInterfaceUnion) MarshalJSON() ([]byte, error)

type InstanceNewParamsSecurityGroup

type InstanceNewParamsSecurityGroup struct {
	// Resource ID
	ID string `json:"id,required" format:"uuid4"`
	// contains filtered or unexported fields
}

The property ID is required.

func (InstanceNewParamsSecurityGroup) MarshalJSON

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

type InstanceNewParamsVolumeApptemplate

type InstanceNewParamsVolumeApptemplate struct {
	// App template ID.
	ApptemplateID string `json:"apptemplate_id,required"`
	// Block device attachment tag (not exposed in the normal tags)
	AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
	// - `0` means that this is the primary boot device;
	// - A unique positive value is set for the secondary bootable devices;
	// - A negative number means that the boot is prohibited.
	BootIndex param.Opt[int64] `json:"boot_index,omitzero"`
	// Set to `true` to automatically delete the volume when the instance is deleted.
	DeleteOnTermination param.Opt[bool] `json:"delete_on_termination,omitzero"`
	// The name of the volume. If not specified, a name will be generated
	// automatically.
	Name param.Opt[string] `json:"name,omitzero"`
	// Volume size in GiB.
	Size param.Opt[int64] `json:"size,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// Volume type name. Supported values:
	//
	//   - `standard` - Network SSD block storage offering stable performance with high
	//     random I/O and data reliability (6 IOPS per 1 GiB, 0.4 MB/s per 1 GiB). Max
	//     IOPS: 4500. Max bandwidth: 300 MB/s.
	//   - `ssd_hiiops` - High-performance SSD storage for latency-sensitive
	//     transactional workloads (60 IOPS per 1 GiB, 2.5 MB/s per 1 GiB). Max
	//     IOPS: 9000. Max bandwidth: 500 MB/s.
	//   - `ssd_lowlatency` - SSD storage optimized for low-latency and real-time
	//     processing. Max IOPS: 5000. Average latency: 300 µs. Snapshots and volume
	//     resizing are **not** supported for `ssd_lowlatency`.
	//
	// Any of "cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra".
	TypeName string `json:"type_name,omitzero"`
	// New volume will be created from the app template and attached to the instance.
	//
	// This field can be elided, and will marshal its zero value as "apptemplate".
	Source constant.Apptemplate `json:"source,required"`
	// contains filtered or unexported fields
}

The properties ApptemplateID, Source are required.

func (InstanceNewParamsVolumeApptemplate) MarshalJSON

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

type InstanceNewParamsVolumeExistingVolume

type InstanceNewParamsVolumeExistingVolume struct {
	// Volume ID.
	VolumeID string `json:"volume_id,required" format:"uuid4"`
	// Block device attachment tag (not exposed in the normal tags)
	AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
	// - `0` means that this is the primary boot device;
	// - A unique positive value is set for the secondary bootable devices;
	// - A negative number means that the boot is prohibited.
	BootIndex param.Opt[int64] `json:"boot_index,omitzero"`
	// Set to `true` to automatically delete the volume when the instance is deleted.
	DeleteOnTermination param.Opt[bool] `json:"delete_on_termination,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// Existing available volume will be attached to the instance.
	//
	// This field can be elided, and will marshal its zero value as "existing-volume".
	Source constant.ExistingVolume `json:"source,required"`
	// contains filtered or unexported fields
}

The properties Source, VolumeID are required.

func (InstanceNewParamsVolumeExistingVolume) MarshalJSON

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

type InstanceNewParamsVolumeImage

type InstanceNewParamsVolumeImage struct {
	// Image ID.
	ImageID string `json:"image_id,required" format:"uuid4"`
	// Block device attachment tag (not exposed in the normal tags)
	AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
	// - `0` means that this is the primary boot device;
	// - A unique positive value is set for the secondary bootable devices;
	// - A negative number means that the boot is prohibited.
	BootIndex param.Opt[int64] `json:"boot_index,omitzero"`
	// Set to `true` to automatically delete the volume when the instance is deleted.
	DeleteOnTermination param.Opt[bool] `json:"delete_on_termination,omitzero"`
	// The name of the volume. If not specified, a name will be generated
	// automatically.
	Name param.Opt[string] `json:"name,omitzero"`
	// Volume size in GiB.
	//
	// - For instances: **specify the desired volume size explicitly**.
	// - For basic VMs: the size is set automatically based on the flavor.
	Size param.Opt[int64] `json:"size,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// Volume type name. Supported values:
	//
	//   - `standard` - Network SSD block storage offering stable performance with high
	//     random I/O and data reliability (6 IOPS per 1 GiB, 0.4 MB/s per 1 GiB). Max
	//     IOPS: 4500. Max bandwidth: 300 MB/s.
	//   - `ssd_hiiops` - High-performance SSD storage for latency-sensitive
	//     transactional workloads (60 IOPS per 1 GiB, 2.5 MB/s per 1 GiB). Max
	//     IOPS: 9000. Max bandwidth: 500 MB/s.
	//   - `ssd_lowlatency` - SSD storage optimized for low-latency and real-time
	//     processing. Max IOPS: 5000. Average latency: 300 µs. Snapshots and volume
	//     resizing are **not** supported for `ssd_lowlatency`.
	//
	// Any of "cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra".
	TypeName string `json:"type_name,omitzero"`
	// New volume will be created from the image and attached to the instance. Specify
	// `boot_index=0` to boot from this volume.
	//
	// This field can be elided, and will marshal its zero value as "image".
	Source constant.Image `json:"source,required"`
	// contains filtered or unexported fields
}

The properties ImageID, Source are required.

func (InstanceNewParamsVolumeImage) MarshalJSON

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

type InstanceNewParamsVolumeNewVolume

type InstanceNewParamsVolumeNewVolume struct {
	// Volume size in GiB.
	Size int64 `json:"size,required"`
	// Block device attachment tag (not exposed in the normal tags)
	AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
	// Set to `true` to automatically delete the volume when the instance is deleted.
	DeleteOnTermination param.Opt[bool] `json:"delete_on_termination,omitzero"`
	// The name of the volume. If not specified, a name will be generated
	// automatically.
	Name param.Opt[string] `json:"name,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// Volume type name. Supported values:
	//
	//   - `standard` - Network SSD block storage offering stable performance with high
	//     random I/O and data reliability (6 IOPS per 1 GiB, 0.4 MB/s per 1 GiB). Max
	//     IOPS: 4500. Max bandwidth: 300 MB/s.
	//   - `ssd_hiiops` - High-performance SSD storage for latency-sensitive
	//     transactional workloads (60 IOPS per 1 GiB, 2.5 MB/s per 1 GiB). Max
	//     IOPS: 9000. Max bandwidth: 500 MB/s.
	//   - `ssd_lowlatency` - SSD storage optimized for low-latency and real-time
	//     processing. Max IOPS: 5000. Average latency: 300 µs. Snapshots and volume
	//     resizing are **not** supported for `ssd_lowlatency`.
	//
	// Any of "cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra".
	TypeName string `json:"type_name,omitzero"`
	// New volume will be created from scratch and attached to the instance.
	//
	// This field can be elided, and will marshal its zero value as "new-volume".
	Source constant.NewVolume `json:"source,required"`
	// contains filtered or unexported fields
}

The properties Size, Source are required.

func (InstanceNewParamsVolumeNewVolume) MarshalJSON

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

type InstanceNewParamsVolumeSnapshot

type InstanceNewParamsVolumeSnapshot struct {
	// Volume size in GiB.
	Size int64 `json:"size,required"`
	// Snapshot ID.
	SnapshotID string `json:"snapshot_id,required" format:"uuid4"`
	// Block device attachment tag (not exposed in the normal tags)
	AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
	// - `0` means that this is the primary boot device;
	// - A unique positive value is set for the secondary bootable devices;
	// - A negative number means that the boot is prohibited.
	BootIndex param.Opt[int64] `json:"boot_index,omitzero"`
	// Set to `true` to automatically delete the volume when the instance is deleted.
	DeleteOnTermination param.Opt[bool] `json:"delete_on_termination,omitzero"`
	// The name of the volume. If not specified, a name will be generated
	// automatically.
	Name param.Opt[string] `json:"name,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// Specifies the volume type. If omitted, the type from the source volume will be
	// used by default.
	//
	// Any of "ssd_hiiops", "standard".
	TypeName string `json:"type_name,omitzero"`
	// New volume will be created from the snapshot and attached to the instance.
	//
	// This field can be elided, and will marshal its zero value as "snapshot".
	Source constant.Snapshot `json:"source,required"`
	// contains filtered or unexported fields
}

The properties Size, SnapshotID, Source are required.

func (InstanceNewParamsVolumeSnapshot) MarshalJSON

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

type InstanceNewParamsVolumeUnion

type InstanceNewParamsVolumeUnion struct {
	OfNewVolume      *InstanceNewParamsVolumeNewVolume      `json:",omitzero,inline"`
	OfImage          *InstanceNewParamsVolumeImage          `json:",omitzero,inline"`
	OfSnapshot       *InstanceNewParamsVolumeSnapshot       `json:",omitzero,inline"`
	OfApptemplate    *InstanceNewParamsVolumeApptemplate    `json:",omitzero,inline"`
	OfExistingVolume *InstanceNewParamsVolumeExistingVolume `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (InstanceNewParamsVolumeUnion) GetApptemplateID

func (u InstanceNewParamsVolumeUnion) GetApptemplateID() *string

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsVolumeUnion) GetAttachmentTag

func (u InstanceNewParamsVolumeUnion) GetAttachmentTag() *string

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsVolumeUnion) GetBootIndex

func (u InstanceNewParamsVolumeUnion) GetBootIndex() *int64

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsVolumeUnion) GetDeleteOnTermination

func (u InstanceNewParamsVolumeUnion) GetDeleteOnTermination() *bool

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsVolumeUnion) GetImageID

func (u InstanceNewParamsVolumeUnion) GetImageID() *string

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsVolumeUnion) GetName

func (u InstanceNewParamsVolumeUnion) GetName() *string

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsVolumeUnion) GetSize

func (u InstanceNewParamsVolumeUnion) GetSize() *int64

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsVolumeUnion) GetSnapshotID

func (u InstanceNewParamsVolumeUnion) GetSnapshotID() *string

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsVolumeUnion) GetSource

func (u InstanceNewParamsVolumeUnion) GetSource() *string

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsVolumeUnion) GetTags

Returns a pointer to the underlying variant's Tags property, if present.

func (InstanceNewParamsVolumeUnion) GetTypeName

func (u InstanceNewParamsVolumeUnion) GetTypeName() *string

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsVolumeUnion) GetVolumeID

func (u InstanceNewParamsVolumeUnion) GetVolumeID() *string

Returns a pointer to the underlying variant's property, if present.

func (InstanceNewParamsVolumeUnion) MarshalJSON

func (u InstanceNewParamsVolumeUnion) MarshalJSON() ([]byte, error)

type InstanceRemoveFromPlacementGroupParams

type InstanceRemoveFromPlacementGroupParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type InstanceResizeParams

type InstanceResizeParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Flavor ID
	FlavorID string `json:"flavor_id,required"`
	// contains filtered or unexported fields
}

func (InstanceResizeParams) MarshalJSON

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

type InstanceSecurityGroup

type InstanceSecurityGroup struct {
	// Name.
	Name string `json:"name,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Name        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InstanceSecurityGroup) RawJSON

func (r InstanceSecurityGroup) RawJSON() string

Returns the unmodified JSON received from the API

func (*InstanceSecurityGroup) UnmarshalJSON

func (r *InstanceSecurityGroup) UnmarshalJSON(data []byte) error

type InstanceService

type InstanceService struct {
	Options    []option.RequestOption
	Flavors    InstanceFlavorService
	Interfaces InstanceInterfaceService
	Images     InstanceImageService
	Metrics    InstanceMetricService
	// contains filtered or unexported fields
}

InstanceService contains methods and other services that help with interacting with the gcore API.

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

func NewInstanceService

func NewInstanceService(opts ...option.RequestOption) (r InstanceService)

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

func (*InstanceService) Action

func (r *InstanceService) Action(ctx context.Context, instanceID string, params InstanceActionParams, opts ...option.RequestOption) (res *TaskIDList, err error)

The action can be one of: start, stop, reboot, powercycle, suspend or resume. Suspend and resume are not available for baremetal instances.

func (*InstanceService) ActionAndPoll

func (r *InstanceService) ActionAndPoll(ctx context.Context, instanceID string, params InstanceActionParams, opts ...option.RequestOption) (*Instance, error)

ActionAndPoll perform an action on the instance and poll for completion

func (*InstanceService) AddToPlacementGroup

func (r *InstanceService) AddToPlacementGroup(ctx context.Context, instanceID string, params InstanceAddToPlacementGroupParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Put instance into the server group

func (*InstanceService) AddToPlacementGroupAndPoll

func (r *InstanceService) AddToPlacementGroupAndPoll(ctx context.Context, instanceID string, params InstanceAddToPlacementGroupParams, opts ...option.RequestOption) (*Instance, error)

AddToPlacementGroupAndPoll add instance to placement group and poll for completion

func (*InstanceService) AssignSecurityGroup

func (r *InstanceService) AssignSecurityGroup(ctx context.Context, instanceID string, params InstanceAssignSecurityGroupParams, opts ...option.RequestOption) (err error)

Assign the security group to the server. To assign multiple security groups to all ports, use the NULL value for the port_id field

func (*InstanceService) Delete

func (r *InstanceService) Delete(ctx context.Context, instanceID string, params InstanceDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Delete instance

func (*InstanceService) DeleteAndPoll

func (r *InstanceService) DeleteAndPoll(ctx context.Context, instanceID string, params InstanceDeleteParams, opts ...option.RequestOption) error

DeleteAndPoll delete instance and poll for completion

func (*InstanceService) DisablePortSecurity

func (r *InstanceService) DisablePortSecurity(ctx context.Context, portID string, body InstanceDisablePortSecurityParams, opts ...option.RequestOption) (res *InstanceInterface, err error)

Disable port security for instance interface

func (*InstanceService) EnablePortSecurity

func (r *InstanceService) EnablePortSecurity(ctx context.Context, portID string, body InstanceEnablePortSecurityParams, opts ...option.RequestOption) (res *InstanceInterface, err error)

Enable port security for instance interface

func (*InstanceService) Get

func (r *InstanceService) Get(ctx context.Context, instanceID string, query InstanceGetParams, opts ...option.RequestOption) (res *Instance, err error)

**Cookie Parameters**:

  • `language` (str, optional): Language for the response content. Affects the `ddos_profile` field. Supported values:
  • `'en'` (default)
  • `'de'`
  • `'ru'`

func (*InstanceService) GetConsole

func (r *InstanceService) GetConsole(ctx context.Context, instanceID string, params InstanceGetConsoleParams, opts ...option.RequestOption) (res *Console, err error)

Get instance console URL

func (*InstanceService) List

List instances

func (*InstanceService) ListAutoPaging

List instances

func (*InstanceService) New

func (r *InstanceService) New(ctx context.Context, params InstanceNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)

For Linux,

  • Use the `user_data` field to provide a <a href=https://cloudinit.readthedocs.io/en/latest/reference/examples.html>cloud-init script</a> in base64 to apply configurations to the instance.
  • Specify the `username` and `password` to create a new user.
  • When only `password` is provided, it is set as the password for the default user of the image.
  • The `user_data` is ignored when the `password` is specified.

For Windows,

  • Use the `user_data` field to provide a <a href=https://cloudbase-init.readthedocs.io/en/latest/userdata.html#cloud-config>cloudbase-init script</a> in base64 to create new users on Windows.
  • Use the `password` field to set the password for the 'Admin' user on Windows.
  • The password of the Admin user cannot be updated via `user_data`.
  • The `username` cannot be specified in the request.

func (*InstanceService) NewAndPoll

func (r *InstanceService) NewAndPoll(ctx context.Context, params InstanceNewParams, opts ...option.RequestOption) (v *Instance, err error)

NewAndPoll create instance and poll for the result

func (*InstanceService) RemoveFromPlacementGroup

func (r *InstanceService) RemoveFromPlacementGroup(ctx context.Context, instanceID string, body InstanceRemoveFromPlacementGroupParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Remove instance from the server group

func (*InstanceService) RemoveFromPlacementGroupAndPoll

func (r *InstanceService) RemoveFromPlacementGroupAndPoll(ctx context.Context, instanceID string, body InstanceRemoveFromPlacementGroupParams, opts ...option.RequestOption) (*Instance, error)

RRemoveFromPlacementGroupAndPoll remove instance from placement group and poll for completion

func (*InstanceService) Resize

func (r *InstanceService) Resize(ctx context.Context, instanceID string, params InstanceResizeParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Change flavor of the instance

func (*InstanceService) UnassignSecurityGroup

func (r *InstanceService) UnassignSecurityGroup(ctx context.Context, instanceID string, params InstanceUnassignSecurityGroupParams, opts ...option.RequestOption) (err error)

Un-assign the security group to the server. To un-assign multiple security groups to all ports, use the NULL value for the port_id field

func (*InstanceService) Update

func (r *InstanceService) Update(ctx context.Context, instanceID string, params InstanceUpdateParams, opts ...option.RequestOption) (res *Instance, err error)

Rename instance

type InstanceStatus

type InstanceStatus string

Instance status

const (
	InstanceStatusActive           InstanceStatus = "ACTIVE"
	InstanceStatusBuild            InstanceStatus = "BUILD"
	InstanceStatusDeleted          InstanceStatus = "DELETED"
	InstanceStatusError            InstanceStatus = "ERROR"
	InstanceStatusHardReboot       InstanceStatus = "HARD_REBOOT"
	InstanceStatusMigrating        InstanceStatus = "MIGRATING"
	InstanceStatusPassword         InstanceStatus = "PASSWORD"
	InstanceStatusPaused           InstanceStatus = "PAUSED"
	InstanceStatusReboot           InstanceStatus = "REBOOT"
	InstanceStatusRebuild          InstanceStatus = "REBUILD"
	InstanceStatusRescue           InstanceStatus = "RESCUE"
	InstanceStatusResize           InstanceStatus = "RESIZE"
	InstanceStatusRevertResize     InstanceStatus = "REVERT_RESIZE"
	InstanceStatusShelved          InstanceStatus = "SHELVED"
	InstanceStatusShelvedOffloaded InstanceStatus = "SHELVED_OFFLOADED"
	InstanceStatusShutoff          InstanceStatus = "SHUTOFF"
	InstanceStatusSoftDeleted      InstanceStatus = "SOFT_DELETED"
	InstanceStatusSuspended        InstanceStatus = "SUSPENDED"
	InstanceStatusUnknown          InstanceStatus = "UNKNOWN"
	InstanceStatusVerifyResize     InstanceStatus = "VERIFY_RESIZE"
)

type InstanceUnassignSecurityGroupParams

type InstanceUnassignSecurityGroupParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Security group name, applies to all ports
	Name param.Opt[string] `json:"name,omitzero"`
	// Port security groups mapping
	PortsSecurityGroupNames []InstanceUnassignSecurityGroupParamsPortsSecurityGroupName `json:"ports_security_group_names,omitzero"`
	// contains filtered or unexported fields
}

func (InstanceUnassignSecurityGroupParams) MarshalJSON

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

type InstanceUnassignSecurityGroupParamsPortsSecurityGroupName

type InstanceUnassignSecurityGroupParamsPortsSecurityGroupName struct {
	// Port ID. If None, security groups will be applied to all ports
	PortID param.Opt[string] `json:"port_id,omitzero,required"`
	// List of security group names
	SecurityGroupNames []string `json:"security_group_names,omitzero,required"`
	// contains filtered or unexported fields
}

Port security group names

The properties PortID, SecurityGroupNames are required.

func (InstanceUnassignSecurityGroupParamsPortsSecurityGroupName) MarshalJSON

type InstanceUpdateParams

type InstanceUpdateParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Name.
	Name string `json:"name,required"`
	// contains filtered or unexported fields
}

func (InstanceUpdateParams) MarshalJSON

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

type InstanceVmState

type InstanceVmState string

Virtual machine state (active)

const (
	InstanceVmStateActive           InstanceVmState = "active"
	InstanceVmStateBuilding         InstanceVmState = "building"
	InstanceVmStateDeleted          InstanceVmState = "deleted"
	InstanceVmStateError            InstanceVmState = "error"
	InstanceVmStatePaused           InstanceVmState = "paused"
	InstanceVmStateRescued          InstanceVmState = "rescued"
	InstanceVmStateResized          InstanceVmState = "resized"
	InstanceVmStateShelved          InstanceVmState = "shelved"
	InstanceVmStateShelvedOffloaded InstanceVmState = "shelved_offloaded"
	InstanceVmStateSoftDeleted      InstanceVmState = "soft-deleted"
	InstanceVmStateStopped          InstanceVmState = "stopped"
	InstanceVmStateSuspended        InstanceVmState = "suspended"
)

type InstanceVolume

type InstanceVolume struct {
	// Volume ID
	ID string `json:"id,required"`
	// Whether the volume is deleted together with the VM
	DeleteOnTermination bool `json:"delete_on_termination,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		DeleteOnTermination respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (InstanceVolume) RawJSON

func (r InstanceVolume) RawJSON() string

Returns the unmodified JSON received from the API

func (*InstanceVolume) UnmarshalJSON

func (r *InstanceVolume) UnmarshalJSON(data []byte) error

type InterfaceIPFamily

type InterfaceIPFamily string
const (
	InterfaceIPFamilyDual InterfaceIPFamily = "dual"
	InterfaceIPFamilyIpv4 InterfaceIPFamily = "ipv4"
	InterfaceIPFamilyIpv6 InterfaceIPFamily = "ipv6"
)

type LaasIndexRetentionPolicy

type LaasIndexRetentionPolicy struct {
	// Duration of days for which logs must be kept.
	Period int64 `json:"period,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Period      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LaasIndexRetentionPolicy) RawJSON

func (r LaasIndexRetentionPolicy) RawJSON() string

Returns the unmodified JSON received from the API

func (LaasIndexRetentionPolicy) ToParam

ToParam converts this LaasIndexRetentionPolicy to a LaasIndexRetentionPolicyParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with LaasIndexRetentionPolicyParam.Overrides()

func (*LaasIndexRetentionPolicy) UnmarshalJSON

func (r *LaasIndexRetentionPolicy) UnmarshalJSON(data []byte) error

type LaasIndexRetentionPolicyParam

type LaasIndexRetentionPolicyParam struct {
	// Duration of days for which logs must be kept.
	Period param.Opt[int64] `json:"period,omitzero,required"`
	// contains filtered or unexported fields
}

The property Period is required.

func (LaasIndexRetentionPolicyParam) MarshalJSON

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

type LbAlgorithm

type LbAlgorithm string
const (
	LbAlgorithmLeastConnections LbAlgorithm = "LEAST_CONNECTIONS"
	LbAlgorithmRoundRobin       LbAlgorithm = "ROUND_ROBIN"
	LbAlgorithmSourceIP         LbAlgorithm = "SOURCE_IP"
)

type LbHealthMonitorType

type LbHealthMonitorType string
const (
	LbHealthMonitorTypeHTTP       LbHealthMonitorType = "HTTP"
	LbHealthMonitorTypeHTTPS      LbHealthMonitorType = "HTTPS"
	LbHealthMonitorTypeK8S        LbHealthMonitorType = "K8S"
	LbHealthMonitorTypePing       LbHealthMonitorType = "PING"
	LbHealthMonitorTypeTcp        LbHealthMonitorType = "TCP"
	LbHealthMonitorTypeTlsHello   LbHealthMonitorType = "TLS-HELLO"
	LbHealthMonitorTypeUdpConnect LbHealthMonitorType = "UDP-CONNECT"
)

type LbListenerProtocol

type LbListenerProtocol string
const (
	LbListenerProtocolHTTP            LbListenerProtocol = "HTTP"
	LbListenerProtocolHTTPS           LbListenerProtocol = "HTTPS"
	LbListenerProtocolPrometheus      LbListenerProtocol = "PROMETHEUS"
	LbListenerProtocolTcp             LbListenerProtocol = "TCP"
	LbListenerProtocolTerminatedHTTPS LbListenerProtocol = "TERMINATED_HTTPS"
	LbListenerProtocolUdp             LbListenerProtocol = "UDP"
)

type LbPoolProtocol

type LbPoolProtocol string
const (
	LbPoolProtocolHTTP    LbPoolProtocol = "HTTP"
	LbPoolProtocolHTTPS   LbPoolProtocol = "HTTPS"
	LbPoolProtocolProxy   LbPoolProtocol = "PROXY"
	LbPoolProtocolProxyv2 LbPoolProtocol = "PROXYV2"
	LbPoolProtocolTcp     LbPoolProtocol = "TCP"
	LbPoolProtocolUdp     LbPoolProtocol = "UDP"
)

type LbSessionPersistenceType

type LbSessionPersistenceType string
const (
	LbSessionPersistenceTypeAppCookie  LbSessionPersistenceType = "APP_COOKIE"
	LbSessionPersistenceTypeHTTPCookie LbSessionPersistenceType = "HTTP_COOKIE"
	LbSessionPersistenceTypeSourceIP   LbSessionPersistenceType = "SOURCE_IP"
)

type ListenerStatus

type ListenerStatus struct {
	// UUID of the entity
	ID string `json:"id,required" format:"uuid"`
	// Name of the load balancer listener
	Name string `json:"name,required"`
	// Operating status of the entity
	//
	// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
	OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
	// Pools of the Listeners
	Pools []PoolStatus `json:"pools,required"`
	// Provisioning status of the entity
	//
	// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
	// "PENDING_UPDATE".
	ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                 respjson.Field
		Name               respjson.Field
		OperatingStatus    respjson.Field
		Pools              respjson.Field
		ProvisioningStatus respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ListenerStatus) RawJSON

func (r ListenerStatus) RawJSON() string

Returns the unmodified JSON received from the API

func (*ListenerStatus) UnmarshalJSON

func (r *ListenerStatus) UnmarshalJSON(data []byte) error

type LoadBalancer

type LoadBalancer struct {
	// Load balancer ID
	ID string `json:"id,required" format:"uuid4"`
	// Datetime when the load balancer was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Load balancer name
	Name string `json:"name,required"`
	// Load balancer operating status
	//
	// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
	OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
	// Project ID
	ProjectID int64 `json:"project_id,required"`
	// Load balancer lifecycle status
	//
	// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
	// "PENDING_UPDATE".
	ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
	// Region name
	Region string `json:"region,required"`
	// Region ID
	RegionID int64 `json:"region_id,required"`
	// List of key-value tags associated with the resource. A tag is a key-value pair
	// that can be associated with a resource, enabling efficient filtering and
	// grouping for better organization and management. Some tags are read-only and
	// cannot be modified by the user. Tags are also integrated with cost reports,
	// allowing cost data to be filtered based on tag keys or values.
	TagsV2 []Tag `json:"tags_v2,required"`
	// List of additional IP addresses
	AdditionalVips []LoadBalancerAdditionalVip `json:"additional_vips"`
	// Task that created this entity
	CreatorTaskID string `json:"creator_task_id,nullable" format:"uuid4"`
	// Loadbalancer advanced DDoS protection profile.
	DDOSProfile DDOSProfile `json:"ddos_profile,nullable"`
	// Load balancer flavor (if not default)
	Flavor LoadBalancerFlavor `json:"flavor,nullable"`
	// List of assigned floating IPs
	FloatingIPs []FloatingIP `json:"floating_ips"`
	// Load balancer listeners
	Listeners []LoadBalancerListener `json:"listeners"`
	// Logging configuration
	Logging Logging `json:"logging,nullable"`
	// Preferred option to establish connectivity between load balancer and its pools
	// members
	//
	// Any of "L2", "L3".
	PreferredConnectivity LoadBalancerMemberConnectivity `json:"preferred_connectivity"`
	// Statistics of load balancer.
	Stats LoadBalancerStatistics `json:"stats,nullable"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,nullable" format:"uuid4"`
	// Datetime when the load balancer was last updated
	UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
	// Load balancer IP address
	VipAddress string `json:"vip_address,nullable" format:"ipvanyaddress"`
	// Load balancer IP family
	//
	// Any of "dual", "ipv4", "ipv6".
	VipIPFamily InterfaceIPFamily `json:"vip_ip_family,nullable"`
	// The ID of the Virtual IP (VIP) port.
	VipPortID string `json:"vip_port_id,nullable" format:"uuid4"`
	// List of VRRP IP addresses
	VrrpIPs []LoadBalancerVrrpIP `json:"vrrp_ips"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                    respjson.Field
		CreatedAt             respjson.Field
		Name                  respjson.Field
		OperatingStatus       respjson.Field
		ProjectID             respjson.Field
		ProvisioningStatus    respjson.Field
		Region                respjson.Field
		RegionID              respjson.Field
		TagsV2                respjson.Field
		AdditionalVips        respjson.Field
		CreatorTaskID         respjson.Field
		DDOSProfile           respjson.Field
		Flavor                respjson.Field
		FloatingIPs           respjson.Field
		Listeners             respjson.Field
		Logging               respjson.Field
		PreferredConnectivity respjson.Field
		Stats                 respjson.Field
		TaskID                respjson.Field
		UpdatedAt             respjson.Field
		VipAddress            respjson.Field
		VipIPFamily           respjson.Field
		VipPortID             respjson.Field
		VrrpIPs               respjson.Field
		ExtraFields           map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancer) RawJSON

func (r LoadBalancer) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancer) UnmarshalJSON

func (r *LoadBalancer) UnmarshalJSON(data []byte) error

type LoadBalancerAdditionalVip

type LoadBalancerAdditionalVip struct {
	// IP address
	IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
	// Subnet UUID
	SubnetID string `json:"subnet_id,required" format:"uuid4"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IPAddress   respjson.Field
		SubnetID    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerAdditionalVip) RawJSON

func (r LoadBalancerAdditionalVip) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerAdditionalVip) UnmarshalJSON

func (r *LoadBalancerAdditionalVip) UnmarshalJSON(data []byte) error

type LoadBalancerDeleteParams

type LoadBalancerDeleteParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type LoadBalancerFailoverParams

type LoadBalancerFailoverParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Validate current load balancer status before failover or not.
	Force param.Opt[bool] `json:"force,omitzero"`
	// contains filtered or unexported fields
}

func (LoadBalancerFailoverParams) MarshalJSON

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

type LoadBalancerFlavor

type LoadBalancerFlavor struct {
	// Flavor ID is the same as name
	FlavorID string `json:"flavor_id,required"`
	// Flavor name
	FlavorName string `json:"flavor_name,required"`
	// RAM size in MiB
	Ram int64 `json:"ram,required"`
	// Virtual CPU count. For bare metal flavors, it's a physical CPU count
	Vcpus int64 `json:"vcpus,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FlavorID    respjson.Field
		FlavorName  respjson.Field
		Ram         respjson.Field
		Vcpus       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Load balancer flavor (if not default)

func (LoadBalancerFlavor) RawJSON

func (r LoadBalancerFlavor) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerFlavor) UnmarshalJSON

func (r *LoadBalancerFlavor) UnmarshalJSON(data []byte) error

type LoadBalancerFlavorDetail

type LoadBalancerFlavorDetail struct {
	// Flavor ID is the same as name
	FlavorID string `json:"flavor_id,required"`
	// Flavor name
	FlavorName string `json:"flavor_name,required"`
	// Additional hardware description.
	HardwareDescription FlavorHardwareDescription `json:"hardware_description,required"`
	// RAM size in MiB
	Ram int64 `json:"ram,required"`
	// Virtual CPU count. For bare metal flavors, it's a physical CPU count
	Vcpus int64 `json:"vcpus,required"`
	// Currency code. Shown if the include_prices query parameter if set to true
	CurrencyCode string `json:"currency_code,nullable"`
	// Price per hour. Shown if the include_prices query parameter if set to true
	PricePerHour float64 `json:"price_per_hour,nullable"`
	// Price per month. Shown if the include_prices query parameter if set to true
	PricePerMonth float64 `json:"price_per_month,nullable"`
	// Price status for the UI
	//
	// Any of "error", "hide", "show".
	PriceStatus LoadBalancerFlavorDetailPriceStatus `json:"price_status,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		FlavorID            respjson.Field
		FlavorName          respjson.Field
		HardwareDescription respjson.Field
		Ram                 respjson.Field
		Vcpus               respjson.Field
		CurrencyCode        respjson.Field
		PricePerHour        respjson.Field
		PricePerMonth       respjson.Field
		PriceStatus         respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerFlavorDetail) RawJSON

func (r LoadBalancerFlavorDetail) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerFlavorDetail) UnmarshalJSON

func (r *LoadBalancerFlavorDetail) UnmarshalJSON(data []byte) error

type LoadBalancerFlavorDetailPriceStatus

type LoadBalancerFlavorDetailPriceStatus string

Price status for the UI

const (
	LoadBalancerFlavorDetailPriceStatusError LoadBalancerFlavorDetailPriceStatus = "error"
	LoadBalancerFlavorDetailPriceStatusHide  LoadBalancerFlavorDetailPriceStatus = "hide"
	LoadBalancerFlavorDetailPriceStatusShow  LoadBalancerFlavorDetailPriceStatus = "show"
)

type LoadBalancerFlavorList

type LoadBalancerFlavorList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []LoadBalancerFlavorDetail `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerFlavorList) RawJSON

func (r LoadBalancerFlavorList) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerFlavorList) UnmarshalJSON

func (r *LoadBalancerFlavorList) UnmarshalJSON(data []byte) error

type LoadBalancerFlavorListParams

type LoadBalancerFlavorListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Set to true if the response should include flavor prices
	IncludePrices param.Opt[bool] `query:"include_prices,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (LoadBalancerFlavorListParams) URLQuery

func (r LoadBalancerFlavorListParams) URLQuery() (v url.Values, err error)

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

type LoadBalancerFlavorService

type LoadBalancerFlavorService struct {
	Options []option.RequestOption
}

LoadBalancerFlavorService contains methods and other services that help with interacting with the gcore API.

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

func NewLoadBalancerFlavorService

func NewLoadBalancerFlavorService(opts ...option.RequestOption) (r LoadBalancerFlavorService)

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

func (*LoadBalancerFlavorService) List

Retrieve a list of load balancer flavors. When the include_prices query parameter is specified, the list shows prices. A client in trial mode gets all price values as 0. If you get Pricing Error contact the support

type LoadBalancerGetParams

type LoadBalancerGetParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Show statistics
	ShowStats param.Opt[bool] `query:"show_stats,omitzero" json:"-"`
	// Show DDoS profile
	WithDDOS param.Opt[bool] `query:"with_ddos,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (LoadBalancerGetParams) URLQuery

func (r LoadBalancerGetParams) URLQuery() (v url.Values, err error)

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

type LoadBalancerInstanceRole

type LoadBalancerInstanceRole string
const (
	LoadBalancerInstanceRoleBackup     LoadBalancerInstanceRole = "BACKUP"
	LoadBalancerInstanceRoleMaster     LoadBalancerInstanceRole = "MASTER"
	LoadBalancerInstanceRoleStandalone LoadBalancerInstanceRole = "STANDALONE"
)

type LoadBalancerL7Policy

type LoadBalancerL7Policy struct {
	// ID
	ID string `json:"id"`
	// Action
	//
	// Any of "REDIRECT_PREFIX", "REDIRECT_TO_POOL", "REDIRECT_TO_URL", "REJECT".
	Action LoadBalancerL7PolicyAction `json:"action"`
	// Listener ID
	ListenerID string `json:"listener_id"`
	// Human-readable name of the policy
	Name string `json:"name"`
	// L7 policy operating status
	//
	// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
	OperatingStatus LoadBalancerL7PolicyOperatingStatus `json:"operating_status"`
	// The position of this policy on the listener. Positions start at 1.
	Position int64 `json:"position"`
	// Project ID
	ProjectID int64 `json:"project_id"`
	// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
	// "PENDING_UPDATE".
	ProvisioningStatus LoadBalancerL7PolicyProvisioningStatus `json:"provisioning_status"`
	// Requests matching this policy will be redirected to the specified URL or Prefix
	// URL with the HTTP response code. Valid if action is REDIRECT_TO_URL or
	// REDIRECT_PREFIX. Valid options are 301, 302, 303, 307, or 308. Default is 302.
	RedirectHTTPCode int64 `json:"redirect_http_code"`
	// Requests matching this policy will be redirected to the pool with this ID. Only
	// valid if action is REDIRECT_TO_POOL.
	RedirectPoolID string `json:"redirect_pool_id"`
	// Requests matching this policy will be redirected to this Prefix URL. Only valid
	// if action is REDIRECT_PREFIX.
	RedirectPrefix string `json:"redirect_prefix"`
	// Requests matching this policy will be redirected to this URL. Only valid if
	// action is REDIRECT_TO_URL.
	RedirectURL string `json:"redirect_url"`
	// Region name
	Region string `json:"region"`
	// Region ID
	RegionID int64 `json:"region_id"`
	// Rules. All the rules associated with a given policy are logically ANDed
	// together. A request must match all the policy’s rules to match the policy.If you
	// need to express a logical OR operation between rules, then do this by creating
	// multiple policies with the same action.
	Rules []LoadBalancerL7Rule `json:"rules"`
	// A list of simple strings assigned to the resource.
	Tags []string `json:"tags"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                 respjson.Field
		Action             respjson.Field
		ListenerID         respjson.Field
		Name               respjson.Field
		OperatingStatus    respjson.Field
		Position           respjson.Field
		ProjectID          respjson.Field
		ProvisioningStatus respjson.Field
		RedirectHTTPCode   respjson.Field
		RedirectPoolID     respjson.Field
		RedirectPrefix     respjson.Field
		RedirectURL        respjson.Field
		Region             respjson.Field
		RegionID           respjson.Field
		Rules              respjson.Field
		Tags               respjson.Field
		TaskID             respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

L7Policy schema

func (LoadBalancerL7Policy) RawJSON

func (r LoadBalancerL7Policy) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerL7Policy) UnmarshalJSON

func (r *LoadBalancerL7Policy) UnmarshalJSON(data []byte) error

type LoadBalancerL7PolicyAction

type LoadBalancerL7PolicyAction string

Action

const (
	LoadBalancerL7PolicyActionRedirectPrefix LoadBalancerL7PolicyAction = "REDIRECT_PREFIX"
	LoadBalancerL7PolicyActionRedirectToPool LoadBalancerL7PolicyAction = "REDIRECT_TO_POOL"
	LoadBalancerL7PolicyActionRedirectToURL  LoadBalancerL7PolicyAction = "REDIRECT_TO_URL"
	LoadBalancerL7PolicyActionReject         LoadBalancerL7PolicyAction = "REJECT"
)

type LoadBalancerL7PolicyDeleteParams

type LoadBalancerL7PolicyDeleteParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type LoadBalancerL7PolicyGetParams

type LoadBalancerL7PolicyGetParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type LoadBalancerL7PolicyList

type LoadBalancerL7PolicyList struct {
	// Number of objects
	Count int64 `json:"count"`
	// Objects
	Results []LoadBalancerL7Policy `json:"results"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerL7PolicyList) RawJSON

func (r LoadBalancerL7PolicyList) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerL7PolicyList) UnmarshalJSON

func (r *LoadBalancerL7PolicyList) UnmarshalJSON(data []byte) error

type LoadBalancerL7PolicyListParams

type LoadBalancerL7PolicyListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type LoadBalancerL7PolicyNewParams

type LoadBalancerL7PolicyNewParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Action
	//
	// Any of "REDIRECT_PREFIX", "REDIRECT_TO_POOL", "REDIRECT_TO_URL", "REJECT".
	Action LoadBalancerL7PolicyNewParamsAction `json:"action,omitzero,required"`
	// Listener ID
	ListenerID string `json:"listener_id,required"`
	// Human-readable name of the policy
	Name param.Opt[string] `json:"name,omitzero"`
	// The position of this policy on the listener. Positions start at 1.
	Position param.Opt[int64] `json:"position,omitzero"`
	// Requests matching this policy will be redirected to the specified URL or Prefix
	// URL with the HTTP response code. Valid if action is REDIRECT_TO_URL or
	// REDIRECT_PREFIX. Valid options are 301, 302, 303, 307, or 308. Default is 302.
	RedirectHTTPCode param.Opt[int64] `json:"redirect_http_code,omitzero"`
	// Requests matching this policy will be redirected to the pool withthis ID. Only
	// valid if action is REDIRECT_TO_POOL.
	RedirectPoolID param.Opt[string] `json:"redirect_pool_id,omitzero"`
	// Requests matching this policy will be redirected to this Prefix URL. Only valid
	// if action is REDIRECT_PREFIX.
	RedirectPrefix param.Opt[string] `json:"redirect_prefix,omitzero"`
	// Requests matching this policy will be redirected to this URL. Only valid if
	// action is REDIRECT_TO_URL.
	RedirectURL param.Opt[string] `json:"redirect_url,omitzero"`
	// A list of simple strings assigned to the resource.
	Tags []string `json:"tags,omitzero"`
	// contains filtered or unexported fields
}

func (LoadBalancerL7PolicyNewParams) MarshalJSON

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

type LoadBalancerL7PolicyNewParamsAction

type LoadBalancerL7PolicyNewParamsAction string

Action

const (
	LoadBalancerL7PolicyNewParamsActionRedirectPrefix LoadBalancerL7PolicyNewParamsAction = "REDIRECT_PREFIX"
	LoadBalancerL7PolicyNewParamsActionRedirectToPool LoadBalancerL7PolicyNewParamsAction = "REDIRECT_TO_POOL"
	LoadBalancerL7PolicyNewParamsActionRedirectToURL  LoadBalancerL7PolicyNewParamsAction = "REDIRECT_TO_URL"
	LoadBalancerL7PolicyNewParamsActionReject         LoadBalancerL7PolicyNewParamsAction = "REJECT"
)

type LoadBalancerL7PolicyOperatingStatus

type LoadBalancerL7PolicyOperatingStatus string

L7 policy operating status

const (
	LoadBalancerL7PolicyOperatingStatusDegraded  LoadBalancerL7PolicyOperatingStatus = "DEGRADED"
	LoadBalancerL7PolicyOperatingStatusDraining  LoadBalancerL7PolicyOperatingStatus = "DRAINING"
	LoadBalancerL7PolicyOperatingStatusError     LoadBalancerL7PolicyOperatingStatus = "ERROR"
	LoadBalancerL7PolicyOperatingStatusNoMonitor LoadBalancerL7PolicyOperatingStatus = "NO_MONITOR"
	LoadBalancerL7PolicyOperatingStatusOffline   LoadBalancerL7PolicyOperatingStatus = "OFFLINE"
	LoadBalancerL7PolicyOperatingStatusOnline    LoadBalancerL7PolicyOperatingStatus = "ONLINE"
)

type LoadBalancerL7PolicyProvisioningStatus

type LoadBalancerL7PolicyProvisioningStatus string
const (
	LoadBalancerL7PolicyProvisioningStatusActive        LoadBalancerL7PolicyProvisioningStatus = "ACTIVE"
	LoadBalancerL7PolicyProvisioningStatusDeleted       LoadBalancerL7PolicyProvisioningStatus = "DELETED"
	LoadBalancerL7PolicyProvisioningStatusError         LoadBalancerL7PolicyProvisioningStatus = "ERROR"
	LoadBalancerL7PolicyProvisioningStatusPendingCreate LoadBalancerL7PolicyProvisioningStatus = "PENDING_CREATE"
	LoadBalancerL7PolicyProvisioningStatusPendingDelete LoadBalancerL7PolicyProvisioningStatus = "PENDING_DELETE"
	LoadBalancerL7PolicyProvisioningStatusPendingUpdate LoadBalancerL7PolicyProvisioningStatus = "PENDING_UPDATE"
)

type LoadBalancerL7PolicyReplaceParams

type LoadBalancerL7PolicyReplaceParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Action
	//
	// Any of "REDIRECT_PREFIX", "REDIRECT_TO_POOL", "REDIRECT_TO_URL", "REJECT".
	Action LoadBalancerL7PolicyReplaceParamsAction `json:"action,omitzero,required"`
	// Human-readable name of the policy
	Name param.Opt[string] `json:"name,omitzero"`
	// The position of this policy on the listener. Positions start at 1.
	Position param.Opt[int64] `json:"position,omitzero"`
	// Requests matching this policy will be redirected to the specified URL or Prefix
	// URL with the HTTP response code. Valid if action is REDIRECT_TO_URL or
	// REDIRECT_PREFIX. Valid options are 301, 302, 303, 307, or 308. Default is 302.
	RedirectHTTPCode param.Opt[int64] `json:"redirect_http_code,omitzero"`
	// Requests matching this policy will be redirected to the pool with this ID. Only
	// valid if action is REDIRECT_TO_POOL.
	RedirectPoolID param.Opt[string] `json:"redirect_pool_id,omitzero"`
	// Requests matching this policy will be redirected to this Prefix URL. Only valid
	// if action is REDIRECT_PREFIX.
	RedirectPrefix param.Opt[string] `json:"redirect_prefix,omitzero"`
	// Requests matching this policy will be redirected to this URL. Only valid if
	// action is REDIRECT_TO_URL.
	RedirectURL param.Opt[string] `json:"redirect_url,omitzero"`
	// A list of simple strings assigned to the resource.
	Tags []string `json:"tags,omitzero"`
	// contains filtered or unexported fields
}

func (LoadBalancerL7PolicyReplaceParams) MarshalJSON

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

type LoadBalancerL7PolicyReplaceParamsAction

type LoadBalancerL7PolicyReplaceParamsAction string

Action

const (
	LoadBalancerL7PolicyReplaceParamsActionRedirectPrefix LoadBalancerL7PolicyReplaceParamsAction = "REDIRECT_PREFIX"
	LoadBalancerL7PolicyReplaceParamsActionRedirectToPool LoadBalancerL7PolicyReplaceParamsAction = "REDIRECT_TO_POOL"
	LoadBalancerL7PolicyReplaceParamsActionRedirectToURL  LoadBalancerL7PolicyReplaceParamsAction = "REDIRECT_TO_URL"
	LoadBalancerL7PolicyReplaceParamsActionReject         LoadBalancerL7PolicyReplaceParamsAction = "REJECT"
)

type LoadBalancerL7PolicyRuleDeleteParams

type LoadBalancerL7PolicyRuleDeleteParams struct {
	ProjectID  param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID   param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	L7policyID string           `path:"l7policy_id,required" json:"-"`
	// contains filtered or unexported fields
}

type LoadBalancerL7PolicyRuleGetParams

type LoadBalancerL7PolicyRuleGetParams struct {
	ProjectID  param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID   param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	L7policyID string           `path:"l7policy_id,required" json:"-"`
	// contains filtered or unexported fields
}

type LoadBalancerL7PolicyRuleListParams

type LoadBalancerL7PolicyRuleListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type LoadBalancerL7PolicyRuleNewParams

type LoadBalancerL7PolicyRuleNewParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// The comparison type for the L7 rule
	//
	// Any of "CONTAINS", "ENDS_WITH", "EQUAL_TO", "REGEX", "STARTS_WITH".
	CompareType LoadBalancerL7PolicyRuleNewParamsCompareType `json:"compare_type,omitzero,required"`
	// The L7 rule type
	//
	// Any of "COOKIE", "FILE_TYPE", "HEADER", "HOST_NAME", "PATH",
	// "SSL_CONN_HAS_CERT", "SSL_DN_FIELD", "SSL_VERIFY_RESULT".
	Type LoadBalancerL7PolicyRuleNewParamsType `json:"type,omitzero,required"`
	// The value to use for the comparison. For example, the file type to compare
	Value string `json:"value,required"`
	// When true the logic of the rule is inverted. For example, with invert true,
	// 'equal to' would become 'not equal to'. Default is false.
	Invert param.Opt[bool] `json:"invert,omitzero"`
	// The key to use for the comparison. For example, the name of the cookie to
	// evaluate.
	Key param.Opt[string] `json:"key,omitzero"`
	// A list of simple strings assigned to the l7 rule
	Tags []string `json:"tags,omitzero"`
	// contains filtered or unexported fields
}

func (LoadBalancerL7PolicyRuleNewParams) MarshalJSON

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

type LoadBalancerL7PolicyRuleNewParamsCompareType

type LoadBalancerL7PolicyRuleNewParamsCompareType string

The comparison type for the L7 rule

const (
	LoadBalancerL7PolicyRuleNewParamsCompareTypeContains   LoadBalancerL7PolicyRuleNewParamsCompareType = "CONTAINS"
	LoadBalancerL7PolicyRuleNewParamsCompareTypeEndsWith   LoadBalancerL7PolicyRuleNewParamsCompareType = "ENDS_WITH"
	LoadBalancerL7PolicyRuleNewParamsCompareTypeEqualTo    LoadBalancerL7PolicyRuleNewParamsCompareType = "EQUAL_TO"
	LoadBalancerL7PolicyRuleNewParamsCompareTypeRegex      LoadBalancerL7PolicyRuleNewParamsCompareType = "REGEX"
	LoadBalancerL7PolicyRuleNewParamsCompareTypeStartsWith LoadBalancerL7PolicyRuleNewParamsCompareType = "STARTS_WITH"
)

type LoadBalancerL7PolicyRuleNewParamsType

type LoadBalancerL7PolicyRuleNewParamsType string

The L7 rule type

const (
	LoadBalancerL7PolicyRuleNewParamsTypeCookie          LoadBalancerL7PolicyRuleNewParamsType = "COOKIE"
	LoadBalancerL7PolicyRuleNewParamsTypeFileType        LoadBalancerL7PolicyRuleNewParamsType = "FILE_TYPE"
	LoadBalancerL7PolicyRuleNewParamsTypeHeader          LoadBalancerL7PolicyRuleNewParamsType = "HEADER"
	LoadBalancerL7PolicyRuleNewParamsTypeHostName        LoadBalancerL7PolicyRuleNewParamsType = "HOST_NAME"
	LoadBalancerL7PolicyRuleNewParamsTypePath            LoadBalancerL7PolicyRuleNewParamsType = "PATH"
	LoadBalancerL7PolicyRuleNewParamsTypeSslConnHasCert  LoadBalancerL7PolicyRuleNewParamsType = "SSL_CONN_HAS_CERT"
	LoadBalancerL7PolicyRuleNewParamsTypeSslDnField      LoadBalancerL7PolicyRuleNewParamsType = "SSL_DN_FIELD"
	LoadBalancerL7PolicyRuleNewParamsTypeSslVerifyResult LoadBalancerL7PolicyRuleNewParamsType = "SSL_VERIFY_RESULT"
)

type LoadBalancerL7PolicyRuleReplaceParams

type LoadBalancerL7PolicyRuleReplaceParams struct {
	ProjectID  param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID   param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	L7policyID string           `path:"l7policy_id,required" json:"-"`
	// When true the logic of the rule is inverted. For example, with invert true,
	// 'equal to' would become 'not equal to'. Default is false.
	Invert param.Opt[bool] `json:"invert,omitzero"`
	// The key to use for the comparison. For example, the name of the cookie to
	// evaluate.
	Key param.Opt[string] `json:"key,omitzero"`
	// The value to use for the comparison. For example, the file type to compare
	Value param.Opt[string] `json:"value,omitzero"`
	// The comparison type for the L7 rule
	//
	// Any of "CONTAINS", "ENDS_WITH", "EQUAL_TO", "REGEX", "STARTS_WITH".
	CompareType LoadBalancerL7PolicyRuleReplaceParamsCompareType `json:"compare_type,omitzero"`
	// A list of simple strings assigned to the l7 rule
	Tags []string `json:"tags,omitzero"`
	// The L7 rule type
	//
	// Any of "COOKIE", "FILE_TYPE", "HEADER", "HOST_NAME", "PATH",
	// "SSL_CONN_HAS_CERT", "SSL_DN_FIELD", "SSL_VERIFY_RESULT".
	Type LoadBalancerL7PolicyRuleReplaceParamsType `json:"type,omitzero"`
	// contains filtered or unexported fields
}

func (LoadBalancerL7PolicyRuleReplaceParams) MarshalJSON

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

type LoadBalancerL7PolicyRuleReplaceParamsCompareType

type LoadBalancerL7PolicyRuleReplaceParamsCompareType string

The comparison type for the L7 rule

const (
	LoadBalancerL7PolicyRuleReplaceParamsCompareTypeContains   LoadBalancerL7PolicyRuleReplaceParamsCompareType = "CONTAINS"
	LoadBalancerL7PolicyRuleReplaceParamsCompareTypeEndsWith   LoadBalancerL7PolicyRuleReplaceParamsCompareType = "ENDS_WITH"
	LoadBalancerL7PolicyRuleReplaceParamsCompareTypeEqualTo    LoadBalancerL7PolicyRuleReplaceParamsCompareType = "EQUAL_TO"
	LoadBalancerL7PolicyRuleReplaceParamsCompareTypeRegex      LoadBalancerL7PolicyRuleReplaceParamsCompareType = "REGEX"
	LoadBalancerL7PolicyRuleReplaceParamsCompareTypeStartsWith LoadBalancerL7PolicyRuleReplaceParamsCompareType = "STARTS_WITH"
)

type LoadBalancerL7PolicyRuleReplaceParamsType

type LoadBalancerL7PolicyRuleReplaceParamsType string

The L7 rule type

const (
	LoadBalancerL7PolicyRuleReplaceParamsTypeCookie          LoadBalancerL7PolicyRuleReplaceParamsType = "COOKIE"
	LoadBalancerL7PolicyRuleReplaceParamsTypeFileType        LoadBalancerL7PolicyRuleReplaceParamsType = "FILE_TYPE"
	LoadBalancerL7PolicyRuleReplaceParamsTypeHeader          LoadBalancerL7PolicyRuleReplaceParamsType = "HEADER"
	LoadBalancerL7PolicyRuleReplaceParamsTypeHostName        LoadBalancerL7PolicyRuleReplaceParamsType = "HOST_NAME"
	LoadBalancerL7PolicyRuleReplaceParamsTypePath            LoadBalancerL7PolicyRuleReplaceParamsType = "PATH"
	LoadBalancerL7PolicyRuleReplaceParamsTypeSslConnHasCert  LoadBalancerL7PolicyRuleReplaceParamsType = "SSL_CONN_HAS_CERT"
	LoadBalancerL7PolicyRuleReplaceParamsTypeSslDnField      LoadBalancerL7PolicyRuleReplaceParamsType = "SSL_DN_FIELD"
	LoadBalancerL7PolicyRuleReplaceParamsTypeSslVerifyResult LoadBalancerL7PolicyRuleReplaceParamsType = "SSL_VERIFY_RESULT"
)

type LoadBalancerL7PolicyRuleService

type LoadBalancerL7PolicyRuleService struct {
	Options []option.RequestOption
}

LoadBalancerL7PolicyRuleService contains methods and other services that help with interacting with the gcore API.

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

func NewLoadBalancerL7PolicyRuleService

func NewLoadBalancerL7PolicyRuleService(opts ...option.RequestOption) (r LoadBalancerL7PolicyRuleService)

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

func (*LoadBalancerL7PolicyRuleService) Delete

Delete load balancer L7 rule

func (*LoadBalancerL7PolicyRuleService) Get

Get load balancer L7 rule

func (*LoadBalancerL7PolicyRuleService) List

List load balancer L7 policy rules

func (*LoadBalancerL7PolicyRuleService) New

Create load balancer L7 rule

func (*LoadBalancerL7PolicyRuleService) Replace

Replace load balancer L7 rule properties

type LoadBalancerL7PolicyService

type LoadBalancerL7PolicyService struct {
	Options []option.RequestOption
	Rules   LoadBalancerL7PolicyRuleService
}

LoadBalancerL7PolicyService contains methods and other services that help with interacting with the gcore API.

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

func NewLoadBalancerL7PolicyService

func NewLoadBalancerL7PolicyService(opts ...option.RequestOption) (r LoadBalancerL7PolicyService)

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

func (*LoadBalancerL7PolicyService) Delete

Delete load balancer L7 policy

func (*LoadBalancerL7PolicyService) Get

Get load balancer L7 policy

func (*LoadBalancerL7PolicyService) List

List load balancer L7 policies

func (*LoadBalancerL7PolicyService) New

Create load balancer L7 policy

func (*LoadBalancerL7PolicyService) Replace

Replace load balancer L7 policy properties

type LoadBalancerL7Rule

type LoadBalancerL7Rule struct {
	// L7Rule ID
	ID string `json:"id"`
	// The comparison type for the L7 rule
	//
	// Any of "CONTAINS", "ENDS_WITH", "EQUAL_TO", "REGEX", "STARTS_WITH".
	CompareType LoadBalancerL7RuleCompareType `json:"compare_type"`
	// When true the logic of the rule is inverted. For example, with invert true,
	// 'equal to' would become 'not equal to'. Default is false.
	Invert bool `json:"invert"`
	// The key to use for the comparison. For example, the name of the cookie to
	// evaluate.
	Key string `json:"key"`
	// L7 policy operating status
	//
	// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
	OperatingStatus LoadBalancerL7RuleOperatingStatus `json:"operating_status"`
	// Project ID
	ProjectID int64 `json:"project_id"`
	// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
	// "PENDING_UPDATE".
	ProvisioningStatus LoadBalancerL7RuleProvisioningStatus `json:"provisioning_status"`
	// Region name
	Region string `json:"region"`
	// Region ID
	RegionID int64 `json:"region_id"`
	// A list of simple strings assigned to the l7 rule
	Tags []string `json:"tags"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id"`
	// The L7 rule type
	//
	// Any of "COOKIE", "FILE_TYPE", "HEADER", "HOST_NAME", "PATH",
	// "SSL_CONN_HAS_CERT", "SSL_DN_FIELD", "SSL_VERIFY_RESULT".
	Type LoadBalancerL7RuleType `json:"type"`
	// The value to use for the comparison. For example, the file type to compare.
	Value string `json:"value"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                 respjson.Field
		CompareType        respjson.Field
		Invert             respjson.Field
		Key                respjson.Field
		OperatingStatus    respjson.Field
		ProjectID          respjson.Field
		ProvisioningStatus respjson.Field
		Region             respjson.Field
		RegionID           respjson.Field
		Tags               respjson.Field
		TaskID             respjson.Field
		Type               respjson.Field
		Value              respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

L7Rule schema All the rules associated with a given policy are logically ANDed together. A request must match all the policy’s rules to match the policy. If you need to express a logical OR operation between rules, then do this by creating multiple policies with the same action.

func (LoadBalancerL7Rule) RawJSON

func (r LoadBalancerL7Rule) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerL7Rule) UnmarshalJSON

func (r *LoadBalancerL7Rule) UnmarshalJSON(data []byte) error

type LoadBalancerL7RuleCompareType

type LoadBalancerL7RuleCompareType string

The comparison type for the L7 rule

const (
	LoadBalancerL7RuleCompareTypeContains   LoadBalancerL7RuleCompareType = "CONTAINS"
	LoadBalancerL7RuleCompareTypeEndsWith   LoadBalancerL7RuleCompareType = "ENDS_WITH"
	LoadBalancerL7RuleCompareTypeEqualTo    LoadBalancerL7RuleCompareType = "EQUAL_TO"
	LoadBalancerL7RuleCompareTypeRegex      LoadBalancerL7RuleCompareType = "REGEX"
	LoadBalancerL7RuleCompareTypeStartsWith LoadBalancerL7RuleCompareType = "STARTS_WITH"
)

type LoadBalancerL7RuleList

type LoadBalancerL7RuleList struct {
	// Number of objects
	Count int64 `json:"count"`
	// Objects
	Results []LoadBalancerL7Rule `json:"results"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerL7RuleList) RawJSON

func (r LoadBalancerL7RuleList) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerL7RuleList) UnmarshalJSON

func (r *LoadBalancerL7RuleList) UnmarshalJSON(data []byte) error

type LoadBalancerL7RuleOperatingStatus

type LoadBalancerL7RuleOperatingStatus string

L7 policy operating status

const (
	LoadBalancerL7RuleOperatingStatusDegraded  LoadBalancerL7RuleOperatingStatus = "DEGRADED"
	LoadBalancerL7RuleOperatingStatusDraining  LoadBalancerL7RuleOperatingStatus = "DRAINING"
	LoadBalancerL7RuleOperatingStatusError     LoadBalancerL7RuleOperatingStatus = "ERROR"
	LoadBalancerL7RuleOperatingStatusNoMonitor LoadBalancerL7RuleOperatingStatus = "NO_MONITOR"
	LoadBalancerL7RuleOperatingStatusOffline   LoadBalancerL7RuleOperatingStatus = "OFFLINE"
	LoadBalancerL7RuleOperatingStatusOnline    LoadBalancerL7RuleOperatingStatus = "ONLINE"
)

type LoadBalancerL7RuleProvisioningStatus

type LoadBalancerL7RuleProvisioningStatus string
const (
	LoadBalancerL7RuleProvisioningStatusActive        LoadBalancerL7RuleProvisioningStatus = "ACTIVE"
	LoadBalancerL7RuleProvisioningStatusDeleted       LoadBalancerL7RuleProvisioningStatus = "DELETED"
	LoadBalancerL7RuleProvisioningStatusError         LoadBalancerL7RuleProvisioningStatus = "ERROR"
	LoadBalancerL7RuleProvisioningStatusPendingCreate LoadBalancerL7RuleProvisioningStatus = "PENDING_CREATE"
	LoadBalancerL7RuleProvisioningStatusPendingDelete LoadBalancerL7RuleProvisioningStatus = "PENDING_DELETE"
	LoadBalancerL7RuleProvisioningStatusPendingUpdate LoadBalancerL7RuleProvisioningStatus = "PENDING_UPDATE"
)

type LoadBalancerL7RuleType

type LoadBalancerL7RuleType string

The L7 rule type

const (
	LoadBalancerL7RuleTypeCookie          LoadBalancerL7RuleType = "COOKIE"
	LoadBalancerL7RuleTypeFileType        LoadBalancerL7RuleType = "FILE_TYPE"
	LoadBalancerL7RuleTypeHeader          LoadBalancerL7RuleType = "HEADER"
	LoadBalancerL7RuleTypeHostName        LoadBalancerL7RuleType = "HOST_NAME"
	LoadBalancerL7RuleTypePath            LoadBalancerL7RuleType = "PATH"
	LoadBalancerL7RuleTypeSslConnHasCert  LoadBalancerL7RuleType = "SSL_CONN_HAS_CERT"
	LoadBalancerL7RuleTypeSslDnField      LoadBalancerL7RuleType = "SSL_DN_FIELD"
	LoadBalancerL7RuleTypeSslVerifyResult LoadBalancerL7RuleType = "SSL_VERIFY_RESULT"
)

type LoadBalancerListParams

type LoadBalancerListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// With or without assigned floating IP
	AssignedFloating param.Opt[bool] `query:"assigned_floating,omitzero" json:"-"`
	// Limit the number of returned limit request entities.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// With or without logging
	LoggingEnabled param.Opt[bool] `query:"logging_enabled,omitzero" json:"-"`
	// Filter by name
	Name param.Opt[string] `query:"name,omitzero" json:"-"`
	// Offset value is used to exclude the first set of records from the result.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Ordering Load Balancer list result by name, created_at, updated_at,
	// operating_status, provisioning_status, vip_address, vip_ip_family and flavor
	// fields of the load balancer and directions (name.asc), default is
	// "created_at.asc"
	OrderBy param.Opt[string] `query:"order_by,omitzero" json:"-"`
	// Show statistics
	ShowStats param.Opt[bool] `query:"show_stats,omitzero" json:"-"`
	// Filter by tag key-value pairs. Must be a valid JSON string. curl -G
	// --data-urlencode "tag_key_value={"key": "value"}" --url
	// "http://localhost:1111/v1/loadbalancers/1/1"
	TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
	// Show Advanced DDoS protection profile, if exists
	WithDDOS param.Opt[bool] `query:"with_ddos,omitzero" json:"-"`
	// Filter by tag keys.
	TagKey []string `query:"tag_key,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (LoadBalancerListParams) URLQuery

func (r LoadBalancerListParams) URLQuery() (v url.Values, err error)

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

type LoadBalancerListener

type LoadBalancerListener struct {
	// Listener ID
	ID string `json:"id,required" format:"uuid4"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerListener) RawJSON

func (r LoadBalancerListener) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerListener) UnmarshalJSON

func (r *LoadBalancerListener) UnmarshalJSON(data []byte) error

type LoadBalancerListenerDeleteParams

type LoadBalancerListenerDeleteParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type LoadBalancerListenerDetail

type LoadBalancerListenerDetail struct {
	// Load balancer listener ID
	ID string `json:"id,required" format:"uuid4"`
	// Limit of simultaneous connections
	ConnectionLimit int64 `json:"connection_limit,required"`
	// Dictionary of additional header insertion into HTTP headers. Only used with HTTP
	// and TERMINATED_HTTPS protocols.
	InsertHeaders any `json:"insert_headers,required"`
	// Load balancer listener name
	Name string `json:"name,required"`
	// Listener operating status
	//
	// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
	OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
	// Load balancer protocol
	//
	// Any of "HTTP", "HTTPS", "PROMETHEUS", "TCP", "TERMINATED_HTTPS", "UDP".
	Protocol LbListenerProtocol `json:"protocol,required"`
	// Protocol port
	ProtocolPort int64 `json:"protocol_port,required"`
	// Listener lifecycle status
	//
	// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
	// "PENDING_UPDATE".
	ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
	// Network CIDRs from which service will be accessible
	AllowedCidrs []string `json:"allowed_cidrs,nullable" format:"ipvanynetwork"`
	// Task that created this entity
	CreatorTaskID string `json:"creator_task_id,nullable" format:"uuid4"`
	// Load balancer ID
	LoadbalancerID string `json:"loadbalancer_id,nullable" format:"uuid4"`
	// Number of pools (for UI)
	PoolCount int64 `json:"pool_count,nullable"`
	// ID of the secret where PKCS12 file is stored for TERMINATED_HTTPS or PROMETHEUS
	// load balancer
	SecretID string `json:"secret_id,nullable"`
	// List of secret's ID containing PKCS12 format certificate/key bundles for
	// TERMINATED_HTTPS or PROMETHEUS listeners
	SniSecretID []string `json:"sni_secret_id,nullable"`
	// Statistics of the load balancer. It is available only in get functions by a
	// flag.
	Stats LoadBalancerStatistics `json:"stats,nullable"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,nullable" format:"uuid4"`
	// Frontend client inactivity timeout in milliseconds
	TimeoutClientData int64 `json:"timeout_client_data,nullable"`
	// Backend member connection timeout in milliseconds
	TimeoutMemberConnect int64 `json:"timeout_member_connect,nullable"`
	// Backend member inactivity timeout in milliseconds
	TimeoutMemberData int64 `json:"timeout_member_data,nullable"`
	// Load balancer listener users list
	UserList []LoadBalancerListenerDetailUserList `json:"user_list"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		ConnectionLimit      respjson.Field
		InsertHeaders        respjson.Field
		Name                 respjson.Field
		OperatingStatus      respjson.Field
		Protocol             respjson.Field
		ProtocolPort         respjson.Field
		ProvisioningStatus   respjson.Field
		AllowedCidrs         respjson.Field
		CreatorTaskID        respjson.Field
		LoadbalancerID       respjson.Field
		PoolCount            respjson.Field
		SecretID             respjson.Field
		SniSecretID          respjson.Field
		Stats                respjson.Field
		TaskID               respjson.Field
		TimeoutClientData    respjson.Field
		TimeoutMemberConnect respjson.Field
		TimeoutMemberData    respjson.Field
		UserList             respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerListenerDetail) RawJSON

func (r LoadBalancerListenerDetail) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerListenerDetail) UnmarshalJSON

func (r *LoadBalancerListenerDetail) UnmarshalJSON(data []byte) error

type LoadBalancerListenerDetailUserList

type LoadBalancerListenerDetailUserList struct {
	// Encrypted password to auth via Basic Authentication
	EncryptedPassword string `json:"encrypted_password,required"`
	// Username to auth via Basic Authentication
	Username string `json:"username,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		EncryptedPassword respjson.Field
		Username          respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerListenerDetailUserList) RawJSON

Returns the unmodified JSON received from the API

func (*LoadBalancerListenerDetailUserList) UnmarshalJSON

func (r *LoadBalancerListenerDetailUserList) UnmarshalJSON(data []byte) error

type LoadBalancerListenerGetParams

type LoadBalancerListenerGetParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Show statistics
	ShowStats param.Opt[bool] `query:"show_stats,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (LoadBalancerListenerGetParams) URLQuery

func (r LoadBalancerListenerGetParams) URLQuery() (v url.Values, err error)

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

type LoadBalancerListenerList

type LoadBalancerListenerList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []LoadBalancerListenerDetail `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerListenerList) RawJSON

func (r LoadBalancerListenerList) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerListenerList) UnmarshalJSON

func (r *LoadBalancerListenerList) UnmarshalJSON(data []byte) error

type LoadBalancerListenerListParams

type LoadBalancerListenerListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Load balancer ID
	LoadbalancerID param.Opt[string] `query:"loadbalancer_id,omitzero" json:"-"`
	// Show statistics
	ShowStats param.Opt[bool] `query:"show_stats,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (LoadBalancerListenerListParams) URLQuery

func (r LoadBalancerListenerListParams) URLQuery() (v url.Values, err error)

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

type LoadBalancerListenerNewParams

type LoadBalancerListenerNewParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Load balancer ID
	LoadbalancerID string `json:"loadbalancer_id,required" format:"uuid4"`
	// Load balancer listener name
	Name string `json:"name,required"`
	// Load balancer listener protocol
	//
	// Any of "HTTP", "HTTPS", "PROMETHEUS", "TCP", "TERMINATED_HTTPS", "UDP".
	Protocol LbListenerProtocol `json:"protocol,omitzero,required"`
	// Protocol port
	ProtocolPort int64 `json:"protocol_port,required"`
	// Frontend client inactivity timeout in milliseconds
	TimeoutClientData param.Opt[int64] `json:"timeout_client_data,omitzero"`
	// Backend member connection timeout in milliseconds
	TimeoutMemberConnect param.Opt[int64] `json:"timeout_member_connect,omitzero"`
	// Backend member inactivity timeout in milliseconds
	TimeoutMemberData param.Opt[int64] `json:"timeout_member_data,omitzero"`
	// Limit of the simultaneous connections
	ConnectionLimit param.Opt[int64] `json:"connection_limit,omitzero"`
	// Add headers X-Forwarded-For, X-Forwarded-Port, X-Forwarded-Proto to requests.
	// Only used with HTTP or TERMINATED_HTTPS protocols.
	InsertXForwarded param.Opt[bool] `json:"insert_x_forwarded,omitzero"`
	// ID of the secret where PKCS12 file is stored for TERMINATED_HTTPS or PROMETHEUS
	// listener
	SecretID param.Opt[string] `json:"secret_id,omitzero"`
	// Network CIDRs from which service will be accessible
	AllowedCidrs []string `json:"allowed_cidrs,omitzero" format:"ipvanynetwork"`
	// List of secrets IDs containing PKCS12 format certificate/key bundles for
	// TERMINATED_HTTPS or PROMETHEUS listeners
	SniSecretID []string `json:"sni_secret_id,omitzero" format:"uuid4"`
	// Load balancer listener list of username and encrypted password items
	UserList []LoadBalancerListenerNewParamsUserList `json:"user_list,omitzero"`
	// contains filtered or unexported fields
}

func (LoadBalancerListenerNewParams) MarshalJSON

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

type LoadBalancerListenerNewParamsUserList

type LoadBalancerListenerNewParamsUserList struct {
	// Encrypted password to auth via Basic Authentication
	EncryptedPassword string `json:"encrypted_password,required"`
	// Username to auth via Basic Authentication
	Username string `json:"username,required"`
	// contains filtered or unexported fields
}

The properties EncryptedPassword, Username are required.

func (LoadBalancerListenerNewParamsUserList) MarshalJSON

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

type LoadBalancerListenerService

type LoadBalancerListenerService struct {
	Options []option.RequestOption
}

LoadBalancerListenerService contains methods and other services that help with interacting with the gcore API.

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

func NewLoadBalancerListenerService

func NewLoadBalancerListenerService(opts ...option.RequestOption) (r LoadBalancerListenerService)

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

func (*LoadBalancerListenerService) Delete

Delete load balancer listener

func (*LoadBalancerListenerService) Get

Get listener

func (*LoadBalancerListenerService) List

List load balancer listeners

func (*LoadBalancerListenerService) New

Create load balancer listener

func (*LoadBalancerListenerService) Update

Update listener

type LoadBalancerListenerUpdateParams

type LoadBalancerListenerUpdateParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// ID of the secret where PKCS12 file is stored for TERMINATED_HTTPS or PROMETHEUS
	// load balancer
	SecretID param.Opt[string] `json:"secret_id,omitzero" format:"uuid4"`
	// Frontend client inactivity timeout in milliseconds
	TimeoutClientData param.Opt[int64] `json:"timeout_client_data,omitzero"`
	// Backend member connection timeout in milliseconds
	TimeoutMemberConnect param.Opt[int64] `json:"timeout_member_connect,omitzero"`
	// Backend member inactivity timeout in milliseconds
	TimeoutMemberData param.Opt[int64] `json:"timeout_member_data,omitzero"`
	// Limit of simultaneous connections
	ConnectionLimit param.Opt[int64] `json:"connection_limit,omitzero"`
	// Load balancer listener name
	Name param.Opt[string] `json:"name,omitzero"`
	// Network CIDRs from which service will be accessible
	AllowedCidrs []string `json:"allowed_cidrs,omitzero" format:"ipvanynetwork"`
	// List of secret's ID containing PKCS12 format certificate/key bundfles for
	// TERMINATED_HTTPS or PROMETHEUS listeners
	SniSecretID []string `json:"sni_secret_id,omitzero" format:"uuid4"`
	// Load balancer listener users list
	UserList []LoadBalancerListenerUpdateParamsUserList `json:"user_list,omitzero"`
	// contains filtered or unexported fields
}

func (LoadBalancerListenerUpdateParams) MarshalJSON

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

type LoadBalancerListenerUpdateParamsUserList

type LoadBalancerListenerUpdateParamsUserList struct {
	// Encrypted password to auth via Basic Authentication
	EncryptedPassword string `json:"encrypted_password,required"`
	// Username to auth via Basic Authentication
	Username string `json:"username,required"`
	// contains filtered or unexported fields
}

The properties EncryptedPassword, Username are required.

func (LoadBalancerListenerUpdateParamsUserList) MarshalJSON

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

type LoadBalancerMemberConnectivity

type LoadBalancerMemberConnectivity string
const (
	LoadBalancerMemberConnectivityL2 LoadBalancerMemberConnectivity = "L2"
	LoadBalancerMemberConnectivityL3 LoadBalancerMemberConnectivity = "L3"
)

type LoadBalancerMetricListParams

type LoadBalancerMetricListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Time interval
	TimeInterval int64 `json:"time_interval,required"`
	// Time interval unit
	//
	// Any of "day", "hour".
	TimeUnit InstanceMetricsTimeUnit `json:"time_unit,omitzero,required"`
	// contains filtered or unexported fields
}

func (LoadBalancerMetricListParams) MarshalJSON

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

type LoadBalancerMetricService

type LoadBalancerMetricService struct {
	Options []option.RequestOption
}

LoadBalancerMetricService contains methods and other services that help with interacting with the gcore API.

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

func NewLoadBalancerMetricService

func NewLoadBalancerMetricService(opts ...option.RequestOption) (r LoadBalancerMetricService)

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

func (*LoadBalancerMetricService) List

Get loadbalancer metrics, including cpu, memory and network

type LoadBalancerMetrics

type LoadBalancerMetrics struct {
	// CPU utilization, % (max 100% for multi-core)
	CPUUtil float64 `json:"cpu_util,nullable"`
	// RAM utilization, %
	MemoryUtil float64 `json:"memory_util,nullable"`
	// Network out, bytes per second
	NetworkBpsEgress float64 `json:"network_Bps_egress,nullable"`
	// Network in, bytes per second
	NetworkBpsIngress float64 `json:"network_Bps_ingress,nullable"`
	// Network out, packets per second
	NetworkPpsEgress float64 `json:"network_pps_egress,nullable"`
	// Network in, packets per second
	NetworkPpsIngress float64 `json:"network_pps_ingress,nullable"`
	// Timestamp
	Time string `json:"time,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		CPUUtil           respjson.Field
		MemoryUtil        respjson.Field
		NetworkBpsEgress  respjson.Field
		NetworkBpsIngress respjson.Field
		NetworkPpsEgress  respjson.Field
		NetworkPpsIngress respjson.Field
		Time              respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerMetrics) RawJSON

func (r LoadBalancerMetrics) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerMetrics) UnmarshalJSON

func (r *LoadBalancerMetrics) UnmarshalJSON(data []byte) error

type LoadBalancerMetricsList

type LoadBalancerMetricsList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []LoadBalancerMetrics `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerMetricsList) RawJSON

func (r LoadBalancerMetricsList) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerMetricsList) UnmarshalJSON

func (r *LoadBalancerMetricsList) UnmarshalJSON(data []byte) error

type LoadBalancerNewParams

type LoadBalancerNewParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Load balancer flavor name
	Flavor param.Opt[string] `json:"flavor,omitzero"`
	// Load balancer name
	Name param.Opt[string] `json:"name,omitzero"`
	// Load balancer name which will be changed by template.
	NameTemplate param.Opt[string] `json:"name_template,omitzero"`
	// Network ID for load balancer. If not specified, default external network will be
	// used. Mutually exclusive with vip_port_id
	VipNetworkID param.Opt[string] `json:"vip_network_id,omitzero" format:"uuid4"`
	// Existing Reserved Fixed IP port ID for load balancer. Mutually exclusive with
	// vip_network_id
	VipPortID param.Opt[string] `json:"vip_port_id,omitzero" format:"uuid4"`
	// Subnet ID for load balancer. If not specified, any subnet from vip_network_id
	// will be selected. Ignored when vip_network_id is not specified.
	VipSubnetID param.Opt[string] `json:"vip_subnet_id,omitzero" format:"uuid4"`
	// Floating IP configuration for assignment
	FloatingIP LoadBalancerNewParamsFloatingIPUnion `json:"floating_ip,omitzero"`
	// Load balancer listeners. Maximum 50 per LB (excluding Prometheus endpoint
	// listener).
	Listeners []LoadBalancerNewParamsListener `json:"listeners,omitzero"`
	// Logging configuration
	Logging LoadBalancerNewParamsLogging `json:"logging,omitzero"`
	// Preferred option to establish connectivity between load balancer and its pools
	// members. L2 provides best performance, L3 provides less IPs usage. It is taking
	// effect only if instance_id + ip_address is provided, not subnet_id + ip_address,
	// because we're considering this as intentional subnet_id specification.
	//
	// Any of "L2", "L3".
	PreferredConnectivity LoadBalancerMemberConnectivity `json:"preferred_connectivity,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// IP family for load balancer subnet auto-selection if vip_network_id is specified
	//
	// Any of "dual", "ipv4", "ipv6".
	VipIPFamily InterfaceIPFamily `json:"vip_ip_family,omitzero"`
	// contains filtered or unexported fields
}

func (LoadBalancerNewParams) MarshalJSON

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

type LoadBalancerNewParamsFloatingIPExisting

type LoadBalancerNewParamsFloatingIPExisting struct {
	// An existing available floating IP id must be specified if the source is set to
	// `existing`
	ExistingFloatingID string `json:"existing_floating_id,required" format:"uuid4"`
	// An existing available floating IP will be attached to the instance. A floating
	// IP is a public IP that makes the instance accessible from the internet, even if
	// it only has a private IP. It works like SNAT, allowing outgoing and incoming
	// traffic.
	//
	// This field can be elided, and will marshal its zero value as "existing".
	Source constant.Existing `json:"source,required"`
	// contains filtered or unexported fields
}

The properties ExistingFloatingID, Source are required.

func (LoadBalancerNewParamsFloatingIPExisting) MarshalJSON

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

type LoadBalancerNewParamsFloatingIPNew

type LoadBalancerNewParamsFloatingIPNew struct {
	// A new floating IP will be created and attached to the instance. A floating IP is
	// a public IP that makes the instance accessible from the internet, even if it
	// only has a private IP. It works like SNAT, allowing outgoing and incoming
	// traffic.
	Source constant.New `json:"source,required"`
	// contains filtered or unexported fields
}

This struct has a constant value, construct it with NewLoadBalancerNewParamsFloatingIPNew.

func NewLoadBalancerNewParamsFloatingIPNew

func NewLoadBalancerNewParamsFloatingIPNew() LoadBalancerNewParamsFloatingIPNew

func (LoadBalancerNewParamsFloatingIPNew) MarshalJSON

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

type LoadBalancerNewParamsFloatingIPUnion

type LoadBalancerNewParamsFloatingIPUnion struct {
	OfNew      *LoadBalancerNewParamsFloatingIPNew      `json:",omitzero,inline"`
	OfExisting *LoadBalancerNewParamsFloatingIPExisting `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (LoadBalancerNewParamsFloatingIPUnion) GetExistingFloatingID

func (u LoadBalancerNewParamsFloatingIPUnion) GetExistingFloatingID() *string

Returns a pointer to the underlying variant's property, if present.

func (LoadBalancerNewParamsFloatingIPUnion) GetSource

Returns a pointer to the underlying variant's property, if present.

func (LoadBalancerNewParamsFloatingIPUnion) MarshalJSON

func (u LoadBalancerNewParamsFloatingIPUnion) MarshalJSON() ([]byte, error)

type LoadBalancerNewParamsListener

type LoadBalancerNewParamsListener struct {
	// Load balancer listener name
	Name string `json:"name,required"`
	// Load balancer listener protocol
	//
	// Any of "HTTP", "HTTPS", "PROMETHEUS", "TCP", "TERMINATED_HTTPS", "UDP".
	Protocol LbListenerProtocol `json:"protocol,omitzero,required"`
	// Protocol port
	ProtocolPort int64 `json:"protocol_port,required"`
	// Frontend client inactivity timeout in milliseconds
	TimeoutClientData param.Opt[int64] `json:"timeout_client_data,omitzero"`
	// Backend member connection timeout in milliseconds
	TimeoutMemberConnect param.Opt[int64] `json:"timeout_member_connect,omitzero"`
	// Backend member inactivity timeout in milliseconds
	TimeoutMemberData param.Opt[int64] `json:"timeout_member_data,omitzero"`
	// Limit of the simultaneous connections
	ConnectionLimit param.Opt[int64] `json:"connection_limit,omitzero"`
	// Add headers X-Forwarded-For, X-Forwarded-Port, X-Forwarded-Proto to requests.
	// Only used with HTTP or TERMINATED_HTTPS protocols.
	InsertXForwarded param.Opt[bool] `json:"insert_x_forwarded,omitzero"`
	// ID of the secret where PKCS12 file is stored for TERMINATED_HTTPS or PROMETHEUS
	// listener
	SecretID param.Opt[string] `json:"secret_id,omitzero"`
	// Network CIDRs from which service will be accessible
	AllowedCidrs []string `json:"allowed_cidrs,omitzero" format:"ipvanynetwork"`
	// Member pools
	Pools []LoadBalancerNewParamsListenerPool `json:"pools,omitzero"`
	// List of secrets IDs containing PKCS12 format certificate/key bundles for
	// TERMINATED_HTTPS or PROMETHEUS listeners
	SniSecretID []string `json:"sni_secret_id,omitzero" format:"uuid4"`
	// Load balancer listener list of username and encrypted password items
	UserList []LoadBalancerNewParamsListenerUserList `json:"user_list,omitzero"`
	// contains filtered or unexported fields
}

The properties Name, Protocol, ProtocolPort are required.

func (LoadBalancerNewParamsListener) MarshalJSON

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

type LoadBalancerNewParamsListenerPool

type LoadBalancerNewParamsListenerPool struct {
	// Load balancer algorithm
	//
	// Any of "LEAST_CONNECTIONS", "ROUND_ROBIN", "SOURCE_IP".
	LbAlgorithm LbAlgorithm `json:"lb_algorithm,omitzero,required"`
	// Pool name
	Name string `json:"name,required"`
	// Protocol
	//
	// Any of "HTTP", "HTTPS", "PROXY", "PROXYV2", "TCP", "UDP".
	Protocol LbPoolProtocol `json:"protocol,omitzero,required"`
	// Secret ID of CA certificate bundle
	CaSecretID param.Opt[string] `json:"ca_secret_id,omitzero" format:"uuid4"`
	// Secret ID of CA revocation list file
	CrlSecretID param.Opt[string] `json:"crl_secret_id,omitzero" format:"uuid4"`
	// Listener ID
	ListenerID param.Opt[string] `json:"listener_id,omitzero" format:"uuid4"`
	// Loadbalancer ID
	LoadbalancerID param.Opt[string] `json:"loadbalancer_id,omitzero" format:"uuid4"`
	// Secret ID for TLS client authentication to the member servers
	SecretID param.Opt[string] `json:"secret_id,omitzero" format:"uuid4"`
	// Frontend client inactivity timeout in milliseconds
	TimeoutClientData param.Opt[int64] `json:"timeout_client_data,omitzero"`
	// Backend member connection timeout in milliseconds
	TimeoutMemberConnect param.Opt[int64] `json:"timeout_member_connect,omitzero"`
	// Backend member inactivity timeout in milliseconds
	TimeoutMemberData param.Opt[int64] `json:"timeout_member_data,omitzero"`
	// Health monitor details
	Healthmonitor LoadBalancerNewParamsListenerPoolHealthmonitor `json:"healthmonitor,omitzero"`
	// Pool members
	Members []LoadBalancerNewParamsListenerPoolMember `json:"members,omitzero"`
	// Session persistence details
	SessionPersistence LoadBalancerNewParamsListenerPoolSessionPersistence `json:"session_persistence,omitzero"`
	// contains filtered or unexported fields
}

The properties LbAlgorithm, Name, Protocol are required.

func (LoadBalancerNewParamsListenerPool) MarshalJSON

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

type LoadBalancerNewParamsListenerPoolHealthmonitor

type LoadBalancerNewParamsListenerPoolHealthmonitor struct {
	// The time, in seconds, between sending probes to members
	Delay int64 `json:"delay,required"`
	// Number of successes before the member is switched to ONLINE state
	MaxRetries int64 `json:"max_retries,required"`
	// The maximum time to connect. Must be less than the delay value
	Timeout int64 `json:"timeout,required"`
	// Health monitor type. Once health monitor is created, cannot be changed.
	//
	// Any of "HTTP", "HTTPS", "K8S", "PING", "TCP", "TLS-HELLO", "UDP-CONNECT".
	Type LbHealthMonitorType `json:"type,omitzero,required"`
	// Can only be used together with `HTTP` or `HTTPS` health monitor type.
	ExpectedCodes param.Opt[string] `json:"expected_codes,omitzero"`
	// Number of failures before the member is switched to ERROR state.
	MaxRetriesDown param.Opt[int64] `json:"max_retries_down,omitzero"`
	// URL Path. Defaults to '/'. Can only be used together with `HTTP` or `HTTPS`
	// health monitor type.
	URLPath param.Opt[string] `json:"url_path,omitzero"`
	// HTTP method. Can only be used together with `HTTP` or `HTTPS` health monitor
	// type.
	//
	// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
	// "TRACE".
	HTTPMethod HTTPMethod `json:"http_method,omitzero"`
	// contains filtered or unexported fields
}

Health monitor details

The properties Delay, MaxRetries, Timeout, Type are required.

func (LoadBalancerNewParamsListenerPoolHealthmonitor) MarshalJSON

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

type LoadBalancerNewParamsListenerPoolMember

type LoadBalancerNewParamsListenerPoolMember struct {
	// Member IP address
	Address string `json:"address,required" format:"ipvanyaddress"`
	// Member IP port
	ProtocolPort int64 `json:"protocol_port,required"`
	// true if enabled. Defaults to true
	AdminStateUp param.Opt[bool] `json:"admin_state_up,omitzero"`
	// Either subnet_id or instance_id should be provided
	InstanceID param.Opt[string] `json:"instance_id,omitzero" format:"uuid4"`
	// An alternate IP address used for health monitoring of a backend member. Default
	// is null which monitors the member address.
	MonitorAddress param.Opt[string] `json:"monitor_address,omitzero" format:"ipvanyaddress"`
	// An alternate protocol port used for health monitoring of a backend member.
	// Default is null which monitors the member protocol_port.
	MonitorPort param.Opt[int64] `json:"monitor_port,omitzero"`
	// Either subnet_id or instance_id should be provided
	SubnetID param.Opt[string] `json:"subnet_id,omitzero" format:"uuid4"`
	// Member weight. Valid values: 0 to 256, defaults to 1
	Weight param.Opt[int64] `json:"weight,omitzero"`
	// contains filtered or unexported fields
}

The properties Address, ProtocolPort are required.

func (LoadBalancerNewParamsListenerPoolMember) MarshalJSON

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

type LoadBalancerNewParamsListenerPoolSessionPersistence

type LoadBalancerNewParamsListenerPoolSessionPersistence struct {
	// Session persistence type
	//
	// Any of "APP_COOKIE", "HTTP_COOKIE", "SOURCE_IP".
	Type LbSessionPersistenceType `json:"type,omitzero,required"`
	// Should be set if app cookie or http cookie is used
	CookieName param.Opt[string] `json:"cookie_name,omitzero"`
	// Subnet mask if source_ip is used. For UDP ports only
	PersistenceGranularity param.Opt[string] `json:"persistence_granularity,omitzero"`
	// Session persistence timeout. For UDP ports only
	PersistenceTimeout param.Opt[int64] `json:"persistence_timeout,omitzero"`
	// contains filtered or unexported fields
}

Session persistence details

The property Type is required.

func (LoadBalancerNewParamsListenerPoolSessionPersistence) MarshalJSON

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

type LoadBalancerNewParamsListenerUserList

type LoadBalancerNewParamsListenerUserList struct {
	// Encrypted password to auth via Basic Authentication
	EncryptedPassword string `json:"encrypted_password,required"`
	// Username to auth via Basic Authentication
	Username string `json:"username,required"`
	// contains filtered or unexported fields
}

The properties EncryptedPassword, Username are required.

func (LoadBalancerNewParamsListenerUserList) MarshalJSON

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

type LoadBalancerNewParamsLogging

type LoadBalancerNewParamsLogging struct {
	// Destination region id to which the logs will be written
	DestinationRegionID param.Opt[int64] `json:"destination_region_id,omitzero"`
	// The topic name to which the logs will be written
	TopicName param.Opt[string] `json:"topic_name,omitzero"`
	// Enable/disable forwarding logs to LaaS
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// The logs retention policy
	RetentionPolicy LaasIndexRetentionPolicyParam `json:"retention_policy,omitzero"`
	// contains filtered or unexported fields
}

Logging configuration

func (LoadBalancerNewParamsLogging) MarshalJSON

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

type LoadBalancerOperatingStatus

type LoadBalancerOperatingStatus string
const (
	LoadBalancerOperatingStatusDegraded  LoadBalancerOperatingStatus = "DEGRADED"
	LoadBalancerOperatingStatusDraining  LoadBalancerOperatingStatus = "DRAINING"
	LoadBalancerOperatingStatusError     LoadBalancerOperatingStatus = "ERROR"
	LoadBalancerOperatingStatusNoMonitor LoadBalancerOperatingStatus = "NO_MONITOR"
	LoadBalancerOperatingStatusOffline   LoadBalancerOperatingStatus = "OFFLINE"
	LoadBalancerOperatingStatusOnline    LoadBalancerOperatingStatus = "ONLINE"
)

type LoadBalancerPool

type LoadBalancerPool struct {
	// Pool ID
	ID string `json:"id,required" format:"uuid4"`
	// Secret ID of CA certificate bundle
	CaSecretID string `json:"ca_secret_id,required" format:"uuid4"`
	// Secret ID of CA revocation list file
	CrlSecretID string `json:"crl_secret_id,required" format:"uuid4"`
	// Load balancer algorithm
	//
	// Any of "LEAST_CONNECTIONS", "ROUND_ROBIN", "SOURCE_IP".
	LbAlgorithm LbAlgorithm `json:"lb_algorithm,required"`
	// Listeners IDs
	Listeners []LoadBalancerPoolListener `json:"listeners,required"`
	// Load balancers IDs
	Loadbalancers []LoadBalancerPoolLoadbalancer `json:"loadbalancers,required"`
	// Pool members
	Members []Member `json:"members,required"`
	// Pool name
	Name string `json:"name,required"`
	// Pool operating status
	//
	// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
	OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
	// Protocol
	//
	// Any of "HTTP", "HTTPS", "PROXY", "PROXYV2", "TCP", "UDP".
	Protocol LbPoolProtocol `json:"protocol,required"`
	// Pool lifecycle status
	//
	// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
	// "PENDING_UPDATE".
	ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
	// Secret ID for TLS client authentication to the member servers
	SecretID string `json:"secret_id,required" format:"uuid4"`
	// Session persistence parameters
	SessionPersistence SessionPersistence `json:"session_persistence,required"`
	// Frontend client inactivity timeout in milliseconds
	TimeoutClientData int64 `json:"timeout_client_data,required"`
	// Backend member connection timeout in milliseconds
	TimeoutMemberConnect int64 `json:"timeout_member_connect,required"`
	// Backend member inactivity timeout in milliseconds
	TimeoutMemberData int64 `json:"timeout_member_data,required"`
	// Task that created this entity
	CreatorTaskID string `json:"creator_task_id,nullable" format:"uuid4"`
	// Health monitor parameters
	Healthmonitor HealthMonitor `json:"healthmonitor,nullable"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,nullable" format:"uuid4"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		CaSecretID           respjson.Field
		CrlSecretID          respjson.Field
		LbAlgorithm          respjson.Field
		Listeners            respjson.Field
		Loadbalancers        respjson.Field
		Members              respjson.Field
		Name                 respjson.Field
		OperatingStatus      respjson.Field
		Protocol             respjson.Field
		ProvisioningStatus   respjson.Field
		SecretID             respjson.Field
		SessionPersistence   respjson.Field
		TimeoutClientData    respjson.Field
		TimeoutMemberConnect respjson.Field
		TimeoutMemberData    respjson.Field
		CreatorTaskID        respjson.Field
		Healthmonitor        respjson.Field
		TaskID               respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerPool) RawJSON

func (r LoadBalancerPool) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerPool) UnmarshalJSON

func (r *LoadBalancerPool) UnmarshalJSON(data []byte) error

type LoadBalancerPoolDeleteParams

type LoadBalancerPoolDeleteParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type LoadBalancerPoolGetParams

type LoadBalancerPoolGetParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type LoadBalancerPoolHealthMonitorDeleteParams

type LoadBalancerPoolHealthMonitorDeleteParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type LoadBalancerPoolHealthMonitorNewParams

type LoadBalancerPoolHealthMonitorNewParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// The time, in seconds, between sending probes to members
	Delay int64 `json:"delay,required"`
	// Number of successes before the member is switched to ONLINE state
	MaxRetries int64 `json:"max_retries,required"`
	// The maximum time to connect. Must be less than the delay value
	Timeout int64 `json:"timeout,required"`
	// Health monitor type. Once health monitor is created, cannot be changed.
	//
	// Any of "HTTP", "HTTPS", "K8S", "PING", "TCP", "TLS-HELLO", "UDP-CONNECT".
	Type LbHealthMonitorType `json:"type,omitzero,required"`
	// Can only be used together with `HTTP` or `HTTPS` health monitor type.
	ExpectedCodes param.Opt[string] `json:"expected_codes,omitzero"`
	// Number of failures before the member is switched to ERROR state.
	MaxRetriesDown param.Opt[int64] `json:"max_retries_down,omitzero"`
	// URL Path. Defaults to '/'. Can only be used together with `HTTP` or `HTTPS`
	// health monitor type.
	URLPath param.Opt[string] `json:"url_path,omitzero"`
	// HTTP method. Can only be used together with `HTTP` or `HTTPS` health monitor
	// type.
	//
	// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
	// "TRACE".
	HTTPMethod HTTPMethod `json:"http_method,omitzero"`
	// contains filtered or unexported fields
}

func (LoadBalancerPoolHealthMonitorNewParams) MarshalJSON

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

type LoadBalancerPoolHealthMonitorService

type LoadBalancerPoolHealthMonitorService struct {
	Options []option.RequestOption
}

LoadBalancerPoolHealthMonitorService contains methods and other services that help with interacting with the gcore API.

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

func NewLoadBalancerPoolHealthMonitorService

func NewLoadBalancerPoolHealthMonitorService(opts ...option.RequestOption) (r LoadBalancerPoolHealthMonitorService)

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

func (*LoadBalancerPoolHealthMonitorService) Delete

Delete load balancer pool health monitor

func (*LoadBalancerPoolHealthMonitorService) New

Create Load Balancer Pool Health Monitor

type LoadBalancerPoolList

type LoadBalancerPoolList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []LoadBalancerPool `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerPoolList) RawJSON

func (r LoadBalancerPoolList) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerPoolList) UnmarshalJSON

func (r *LoadBalancerPoolList) UnmarshalJSON(data []byte) error

type LoadBalancerPoolListParams

type LoadBalancerPoolListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// If true, show member and healthmonitor details of each pool (increases request
	// time)
	Details param.Opt[bool] `query:"details,omitzero" json:"-"`
	// Load balancer listener ID
	ListenerID param.Opt[string] `query:"listener_id,omitzero" json:"-"`
	// Load balancer ID
	LoadbalancerID param.Opt[string] `query:"loadbalancer_id,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (LoadBalancerPoolListParams) URLQuery

func (r LoadBalancerPoolListParams) URLQuery() (v url.Values, err error)

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

type LoadBalancerPoolListener

type LoadBalancerPoolListener struct {
	// Resource ID
	ID string `json:"id,required" format:"uuid4"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerPoolListener) RawJSON

func (r LoadBalancerPoolListener) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerPoolListener) UnmarshalJSON

func (r *LoadBalancerPoolListener) UnmarshalJSON(data []byte) error

type LoadBalancerPoolLoadbalancer

type LoadBalancerPoolLoadbalancer struct {
	// Resource ID
	ID string `json:"id,required" format:"uuid4"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerPoolLoadbalancer) RawJSON

Returns the unmodified JSON received from the API

func (*LoadBalancerPoolLoadbalancer) UnmarshalJSON

func (r *LoadBalancerPoolLoadbalancer) UnmarshalJSON(data []byte) error

type LoadBalancerPoolMemberAddParams

type LoadBalancerPoolMemberAddParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Member IP address
	Address string `json:"address,required" format:"ipvanyaddress"`
	// Member IP port
	ProtocolPort int64 `json:"protocol_port,required"`
	// true if enabled. Defaults to true
	AdminStateUp param.Opt[bool] `json:"admin_state_up,omitzero"`
	// Either subnet_id or instance_id should be provided
	InstanceID param.Opt[string] `json:"instance_id,omitzero" format:"uuid4"`
	// An alternate IP address used for health monitoring of a backend member. Default
	// is null which monitors the member address.
	MonitorAddress param.Opt[string] `json:"monitor_address,omitzero" format:"ipvanyaddress"`
	// An alternate protocol port used for health monitoring of a backend member.
	// Default is null which monitors the member protocol_port.
	MonitorPort param.Opt[int64] `json:"monitor_port,omitzero"`
	// Either subnet_id or instance_id should be provided
	SubnetID param.Opt[string] `json:"subnet_id,omitzero" format:"uuid4"`
	// Member weight. Valid values: 0 to 256, defaults to 1
	Weight param.Opt[int64] `json:"weight,omitzero"`
	// contains filtered or unexported fields
}

func (LoadBalancerPoolMemberAddParams) MarshalJSON

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

type LoadBalancerPoolMemberRemoveParams

type LoadBalancerPoolMemberRemoveParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	PoolID    string           `path:"pool_id,required" json:"-"`
	// contains filtered or unexported fields
}

type LoadBalancerPoolMemberService

type LoadBalancerPoolMemberService struct {
	Options []option.RequestOption
}

LoadBalancerPoolMemberService contains methods and other services that help with interacting with the gcore API.

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

func NewLoadBalancerPoolMemberService

func NewLoadBalancerPoolMemberService(opts ...option.RequestOption) (r LoadBalancerPoolMemberService)

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

func (*LoadBalancerPoolMemberService) Add

Create load balancer pool member

func (*LoadBalancerPoolMemberService) Remove

Delete load balancer pool member

type LoadBalancerPoolNewParams

type LoadBalancerPoolNewParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Load balancer algorithm
	//
	// Any of "LEAST_CONNECTIONS", "ROUND_ROBIN", "SOURCE_IP".
	LbAlgorithm LbAlgorithm `json:"lb_algorithm,omitzero,required"`
	// Pool name
	Name string `json:"name,required"`
	// Protocol
	//
	// Any of "HTTP", "HTTPS", "PROXY", "PROXYV2", "TCP", "UDP".
	Protocol LbPoolProtocol `json:"protocol,omitzero,required"`
	// Secret ID of CA certificate bundle
	CaSecretID param.Opt[string] `json:"ca_secret_id,omitzero" format:"uuid4"`
	// Secret ID of CA revocation list file
	CrlSecretID param.Opt[string] `json:"crl_secret_id,omitzero" format:"uuid4"`
	// Listener ID
	ListenerID param.Opt[string] `json:"listener_id,omitzero" format:"uuid4"`
	// Loadbalancer ID
	LoadbalancerID param.Opt[string] `json:"loadbalancer_id,omitzero" format:"uuid4"`
	// Secret ID for TLS client authentication to the member servers
	SecretID param.Opt[string] `json:"secret_id,omitzero" format:"uuid4"`
	// Frontend client inactivity timeout in milliseconds
	TimeoutClientData param.Opt[int64] `json:"timeout_client_data,omitzero"`
	// Backend member connection timeout in milliseconds
	TimeoutMemberConnect param.Opt[int64] `json:"timeout_member_connect,omitzero"`
	// Backend member inactivity timeout in milliseconds
	TimeoutMemberData param.Opt[int64] `json:"timeout_member_data,omitzero"`
	// Health monitor details
	Healthmonitor LoadBalancerPoolNewParamsHealthmonitor `json:"healthmonitor,omitzero"`
	// Pool members
	Members []LoadBalancerPoolNewParamsMember `json:"members,omitzero"`
	// Session persistence details
	SessionPersistence LoadBalancerPoolNewParamsSessionPersistence `json:"session_persistence,omitzero"`
	// contains filtered or unexported fields
}

func (LoadBalancerPoolNewParams) MarshalJSON

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

type LoadBalancerPoolNewParamsHealthmonitor

type LoadBalancerPoolNewParamsHealthmonitor struct {
	// The time, in seconds, between sending probes to members
	Delay int64 `json:"delay,required"`
	// Number of successes before the member is switched to ONLINE state
	MaxRetries int64 `json:"max_retries,required"`
	// The maximum time to connect. Must be less than the delay value
	Timeout int64 `json:"timeout,required"`
	// Health monitor type. Once health monitor is created, cannot be changed.
	//
	// Any of "HTTP", "HTTPS", "K8S", "PING", "TCP", "TLS-HELLO", "UDP-CONNECT".
	Type LbHealthMonitorType `json:"type,omitzero,required"`
	// Can only be used together with `HTTP` or `HTTPS` health monitor type.
	ExpectedCodes param.Opt[string] `json:"expected_codes,omitzero"`
	// Number of failures before the member is switched to ERROR state.
	MaxRetriesDown param.Opt[int64] `json:"max_retries_down,omitzero"`
	// URL Path. Defaults to '/'. Can only be used together with `HTTP` or `HTTPS`
	// health monitor type.
	URLPath param.Opt[string] `json:"url_path,omitzero"`
	// HTTP method. Can only be used together with `HTTP` or `HTTPS` health monitor
	// type.
	//
	// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
	// "TRACE".
	HTTPMethod HTTPMethod `json:"http_method,omitzero"`
	// contains filtered or unexported fields
}

Health monitor details

The properties Delay, MaxRetries, Timeout, Type are required.

func (LoadBalancerPoolNewParamsHealthmonitor) MarshalJSON

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

type LoadBalancerPoolNewParamsMember

type LoadBalancerPoolNewParamsMember struct {
	// Member IP address
	Address string `json:"address,required" format:"ipvanyaddress"`
	// Member IP port
	ProtocolPort int64 `json:"protocol_port,required"`
	// true if enabled. Defaults to true
	AdminStateUp param.Opt[bool] `json:"admin_state_up,omitzero"`
	// Either subnet_id or instance_id should be provided
	InstanceID param.Opt[string] `json:"instance_id,omitzero" format:"uuid4"`
	// An alternate IP address used for health monitoring of a backend member. Default
	// is null which monitors the member address.
	MonitorAddress param.Opt[string] `json:"monitor_address,omitzero" format:"ipvanyaddress"`
	// An alternate protocol port used for health monitoring of a backend member.
	// Default is null which monitors the member protocol_port.
	MonitorPort param.Opt[int64] `json:"monitor_port,omitzero"`
	// Either subnet_id or instance_id should be provided
	SubnetID param.Opt[string] `json:"subnet_id,omitzero" format:"uuid4"`
	// Member weight. Valid values: 0 to 256, defaults to 1
	Weight param.Opt[int64] `json:"weight,omitzero"`
	// contains filtered or unexported fields
}

The properties Address, ProtocolPort are required.

func (LoadBalancerPoolNewParamsMember) MarshalJSON

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

type LoadBalancerPoolNewParamsSessionPersistence

type LoadBalancerPoolNewParamsSessionPersistence struct {
	// Session persistence type
	//
	// Any of "APP_COOKIE", "HTTP_COOKIE", "SOURCE_IP".
	Type LbSessionPersistenceType `json:"type,omitzero,required"`
	// Should be set if app cookie or http cookie is used
	CookieName param.Opt[string] `json:"cookie_name,omitzero"`
	// Subnet mask if source_ip is used. For UDP ports only
	PersistenceGranularity param.Opt[string] `json:"persistence_granularity,omitzero"`
	// Session persistence timeout. For UDP ports only
	PersistenceTimeout param.Opt[int64] `json:"persistence_timeout,omitzero"`
	// contains filtered or unexported fields
}

Session persistence details

The property Type is required.

func (LoadBalancerPoolNewParamsSessionPersistence) MarshalJSON

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

type LoadBalancerPoolService

type LoadBalancerPoolService struct {
	Options        []option.RequestOption
	HealthMonitors LoadBalancerPoolHealthMonitorService
	Members        LoadBalancerPoolMemberService
}

LoadBalancerPoolService contains methods and other services that help with interacting with the gcore API.

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

func NewLoadBalancerPoolService

func NewLoadBalancerPoolService(opts ...option.RequestOption) (r LoadBalancerPoolService)

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

func (*LoadBalancerPoolService) Delete

Delete load balancer pool

func (*LoadBalancerPoolService) Get

Get load balancer pool

func (*LoadBalancerPoolService) List

List load balancer pools

func (*LoadBalancerPoolService) New

Create load balancer pool

func (*LoadBalancerPoolService) Update

Changes provided here will overwrite existing load balancer pool settings. Undefined fields will be kept as is. Complex objects need to be specified fully, they will be overwritten.

type LoadBalancerPoolUpdateParams

type LoadBalancerPoolUpdateParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Secret ID of CA certificate bundle
	CaSecretID param.Opt[string] `json:"ca_secret_id,omitzero" format:"uuid4"`
	// Secret ID of CA revocation list file
	CrlSecretID param.Opt[string] `json:"crl_secret_id,omitzero" format:"uuid4"`
	// Secret ID for TLS client authentication to the member servers
	SecretID param.Opt[string] `json:"secret_id,omitzero" format:"uuid4"`
	// Frontend client inactivity timeout in milliseconds
	TimeoutClientData param.Opt[int64] `json:"timeout_client_data,omitzero"`
	// Backend member connection timeout in milliseconds
	TimeoutMemberConnect param.Opt[int64] `json:"timeout_member_connect,omitzero"`
	// Backend member inactivity timeout in milliseconds
	TimeoutMemberData param.Opt[int64] `json:"timeout_member_data,omitzero"`
	// New pool name
	Name param.Opt[string] `json:"name,omitzero"`
	// New pool health monitor settings
	Healthmonitor LoadBalancerPoolUpdateParamsHealthmonitor `json:"healthmonitor,omitzero"`
	// New sequence of load balancer pool members. If members are the same (by
	// address + port), they will be kept as is without recreation and downtime.
	Members []LoadBalancerPoolUpdateParamsMember `json:"members,omitzero"`
	// New session persistence settings
	SessionPersistence LoadBalancerPoolUpdateParamsSessionPersistence `json:"session_persistence,omitzero"`
	// New load balancer pool algorithm of how to distribute requests
	//
	// Any of "LEAST_CONNECTIONS", "ROUND_ROBIN", "SOURCE_IP".
	LbAlgorithm LbAlgorithm `json:"lb_algorithm,omitzero"`
	// New communication protocol
	//
	// Any of "HTTP", "HTTPS", "PROXY", "PROXYV2", "TCP", "UDP".
	Protocol LbPoolProtocol `json:"protocol,omitzero"`
	// contains filtered or unexported fields
}

func (LoadBalancerPoolUpdateParams) MarshalJSON

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

type LoadBalancerPoolUpdateParamsHealthmonitor

type LoadBalancerPoolUpdateParamsHealthmonitor struct {
	// The time, in seconds, between sending probes to members
	Delay int64 `json:"delay,required"`
	// Number of successes before the member is switched to ONLINE state
	MaxRetries int64 `json:"max_retries,required"`
	// The maximum time to connect. Must be less than the delay value
	Timeout int64 `json:"timeout,required"`
	// Can only be used together with `HTTP` or `HTTPS` health monitor type.
	ExpectedCodes param.Opt[string] `json:"expected_codes,omitzero"`
	// Number of failures before the member is switched to ERROR state.
	MaxRetriesDown param.Opt[int64] `json:"max_retries_down,omitzero"`
	// URL Path. Defaults to '/'. Can only be used together with `HTTP` or `HTTPS`
	// health monitor type.
	URLPath param.Opt[string] `json:"url_path,omitzero"`
	// HTTP method. Can only be used together with `HTTP` or `HTTPS` health monitor
	// type.
	//
	// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
	// "TRACE".
	HTTPMethod HTTPMethod `json:"http_method,omitzero"`
	// Health monitor type. Once health monitor is created, cannot be changed.
	//
	// Any of "HTTP", "HTTPS", "K8S", "PING", "TCP", "TLS-HELLO", "UDP-CONNECT".
	Type LbHealthMonitorType `json:"type,omitzero"`
	// contains filtered or unexported fields
}

New pool health monitor settings

The properties Delay, MaxRetries, Timeout are required.

func (LoadBalancerPoolUpdateParamsHealthmonitor) MarshalJSON

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

type LoadBalancerPoolUpdateParamsMember

type LoadBalancerPoolUpdateParamsMember struct {
	// Member IP address
	Address string `json:"address,required" format:"ipvanyaddress"`
	// Member IP port
	ProtocolPort int64 `json:"protocol_port,required"`
	// true if enabled. Defaults to true
	AdminStateUp param.Opt[bool] `json:"admin_state_up,omitzero"`
	// Either subnet_id or instance_id should be provided
	InstanceID param.Opt[string] `json:"instance_id,omitzero" format:"uuid4"`
	// An alternate IP address used for health monitoring of a backend member. Default
	// is null which monitors the member address.
	MonitorAddress param.Opt[string] `json:"monitor_address,omitzero" format:"ipvanyaddress"`
	// An alternate protocol port used for health monitoring of a backend member.
	// Default is null which monitors the member protocol_port.
	MonitorPort param.Opt[int64] `json:"monitor_port,omitzero"`
	// Either subnet_id or instance_id should be provided
	SubnetID param.Opt[string] `json:"subnet_id,omitzero" format:"uuid4"`
	// Member weight. Valid values: 0 to 256, defaults to 1
	Weight param.Opt[int64] `json:"weight,omitzero"`
	// contains filtered or unexported fields
}

The properties Address, ProtocolPort are required.

func (LoadBalancerPoolUpdateParamsMember) MarshalJSON

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

type LoadBalancerPoolUpdateParamsSessionPersistence

type LoadBalancerPoolUpdateParamsSessionPersistence struct {
	// Session persistence type
	//
	// Any of "APP_COOKIE", "HTTP_COOKIE", "SOURCE_IP".
	Type LbSessionPersistenceType `json:"type,omitzero,required"`
	// Should be set if app cookie or http cookie is used
	CookieName param.Opt[string] `json:"cookie_name,omitzero"`
	// Subnet mask if source_ip is used. For UDP ports only
	PersistenceGranularity param.Opt[string] `json:"persistence_granularity,omitzero"`
	// Session persistence timeout. For UDP ports only
	PersistenceTimeout param.Opt[int64] `json:"persistence_timeout,omitzero"`
	// contains filtered or unexported fields
}

New session persistence settings

The property Type is required.

func (LoadBalancerPoolUpdateParamsSessionPersistence) MarshalJSON

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

type LoadBalancerResizeParams

type LoadBalancerResizeParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Name of the desired flavor to resize to.
	Flavor string `json:"flavor,required"`
	// contains filtered or unexported fields
}

func (LoadBalancerResizeParams) MarshalJSON

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

type LoadBalancerService

LoadBalancerService contains methods and other services that help with interacting with the gcore API.

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

func NewLoadBalancerService

func NewLoadBalancerService(opts ...option.RequestOption) (r LoadBalancerService)

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

func (*LoadBalancerService) Delete

func (r *LoadBalancerService) Delete(ctx context.Context, loadbalancerID string, body LoadBalancerDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Delete load balancer

func (*LoadBalancerService) Failover

func (r *LoadBalancerService) Failover(ctx context.Context, loadbalancerID string, params LoadBalancerFailoverParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Failover loadbalancer

func (*LoadBalancerService) Get

func (r *LoadBalancerService) Get(ctx context.Context, loadbalancerID string, params LoadBalancerGetParams, opts ...option.RequestOption) (res *LoadBalancer, err error)

Get load balancer

func (*LoadBalancerService) List

List load balancers

func (*LoadBalancerService) ListAutoPaging

List load balancers

func (*LoadBalancerService) New

Create load balancer

func (*LoadBalancerService) Resize

func (r *LoadBalancerService) Resize(ctx context.Context, loadbalancerID string, params LoadBalancerResizeParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Resize loadbalancer

func (*LoadBalancerService) Update

func (r *LoadBalancerService) Update(ctx context.Context, loadbalancerID string, params LoadBalancerUpdateParams, opts ...option.RequestOption) (res *LoadBalancer, err error)

Rename load balancer, activate/deactivate logs or update preferred connectivity for load balancer

type LoadBalancerStatistics

type LoadBalancerStatistics struct {
	// Currently active connections
	ActiveConnections int64 `json:"active_connections,required"`
	// Total bytes received
	BytesIn int64 `json:"bytes_in,required"`
	// Total bytes sent
	BytesOut int64 `json:"bytes_out,required"`
	// Total requests that were unable to be fulfilled
	RequestErrors int64 `json:"request_errors,required"`
	// Total connections handled
	TotalConnections int64 `json:"total_connections,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ActiveConnections respjson.Field
		BytesIn           respjson.Field
		BytesOut          respjson.Field
		RequestErrors     respjson.Field
		TotalConnections  respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerStatistics) RawJSON

func (r LoadBalancerStatistics) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerStatistics) UnmarshalJSON

func (r *LoadBalancerStatistics) UnmarshalJSON(data []byte) error

type LoadBalancerStatus

type LoadBalancerStatus struct {
	// UUID of the entity
	ID string `json:"id,required" format:"uuid"`
	// Listeners of the Load Balancer
	Listeners []ListenerStatus `json:"listeners,required"`
	// Name of the load balancer
	Name string `json:"name,required"`
	// Operating status of the entity
	//
	// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
	OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
	// Provisioning status of the entity
	//
	// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
	// "PENDING_UPDATE".
	ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
	// List of key-value tags associated with the resource. A tag is a key-value pair
	// that can be associated with a resource, enabling efficient filtering and
	// grouping for better organization and management. Some tags are read-only and
	// cannot be modified by the user. Tags are also integrated with cost reports,
	// allowing cost data to be filtered based on tag keys or values.
	Tags []Tag `json:"tags"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                 respjson.Field
		Listeners          respjson.Field
		Name               respjson.Field
		OperatingStatus    respjson.Field
		ProvisioningStatus respjson.Field
		Tags               respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerStatus) RawJSON

func (r LoadBalancerStatus) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerStatus) UnmarshalJSON

func (r *LoadBalancerStatus) UnmarshalJSON(data []byte) error

type LoadBalancerStatusGetParams

type LoadBalancerStatusGetParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type LoadBalancerStatusList

type LoadBalancerStatusList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []LoadBalancerStatus `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerStatusList) RawJSON

func (r LoadBalancerStatusList) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerStatusList) UnmarshalJSON

func (r *LoadBalancerStatusList) UnmarshalJSON(data []byte) error

type LoadBalancerStatusListParams

type LoadBalancerStatusListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type LoadBalancerStatusService

type LoadBalancerStatusService struct {
	Options []option.RequestOption
}

LoadBalancerStatusService contains methods and other services that help with interacting with the gcore API.

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

func NewLoadBalancerStatusService

func NewLoadBalancerStatusService(opts ...option.RequestOption) (r LoadBalancerStatusService)

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

func (*LoadBalancerStatusService) Get

Get load balancer status

func (*LoadBalancerStatusService) List

List load balancers statuses

type LoadBalancerUpdateParams

type LoadBalancerUpdateParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Name.
	Name param.Opt[string] `json:"name,omitzero"`
	// Logging configuration
	Logging LoadBalancerUpdateParamsLogging `json:"logging,omitzero"`
	// Preferred option to establish connectivity between load balancer and its pools
	// members
	//
	// Any of "L2", "L3".
	PreferredConnectivity LoadBalancerMemberConnectivity `json:"preferred_connectivity,omitzero"`
	// contains filtered or unexported fields
}

func (LoadBalancerUpdateParams) MarshalJSON

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

type LoadBalancerUpdateParamsLogging

type LoadBalancerUpdateParamsLogging struct {
	// Destination region id to which the logs will be written
	DestinationRegionID param.Opt[int64] `json:"destination_region_id,omitzero"`
	// The topic name to which the logs will be written
	TopicName param.Opt[string] `json:"topic_name,omitzero"`
	// Enable/disable forwarding logs to LaaS
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// The logs retention policy
	RetentionPolicy LaasIndexRetentionPolicyParam `json:"retention_policy,omitzero"`
	// contains filtered or unexported fields
}

Logging configuration

func (LoadBalancerUpdateParamsLogging) MarshalJSON

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

type LoadBalancerVrrpIP

type LoadBalancerVrrpIP struct {
	// IP address
	IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
	// LoadBalancer instance role to which VRRP IP belong
	//
	// Any of "BACKUP", "MASTER", "STANDALONE".
	Role LoadBalancerInstanceRole `json:"role,required"`
	// Subnet UUID
	SubnetID string `json:"subnet_id,required" format:"uuid4"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IPAddress   respjson.Field
		Role        respjson.Field
		SubnetID    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (LoadBalancerVrrpIP) RawJSON

func (r LoadBalancerVrrpIP) RawJSON() string

Returns the unmodified JSON received from the API

func (*LoadBalancerVrrpIP) UnmarshalJSON

func (r *LoadBalancerVrrpIP) UnmarshalJSON(data []byte) error

type Logging

type Logging struct {
	// ID of the region in which the logs will be stored
	DestinationRegionID int64 `json:"destination_region_id,required"`
	// Indicates if log streaming is enabled or disabled
	Enabled bool `json:"enabled,required"`
	// The topic name to stream logs to
	TopicName string `json:"topic_name,required"`
	// Logs retention policy
	RetentionPolicy LaasIndexRetentionPolicy `json:"retention_policy,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DestinationRegionID respjson.Field
		Enabled             respjson.Field
		TopicName           respjson.Field
		RetentionPolicy     respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Logging) RawJSON

func (r Logging) RawJSON() string

Returns the unmodified JSON received from the API

func (*Logging) UnmarshalJSON

func (r *Logging) UnmarshalJSON(data []byte) error

type Member

type Member struct {
	// Member ID must be provided if an existing member is being updated
	ID string `json:"id,required" format:"uuid4"`
	// Member IP address
	Address string `json:"address,required" format:"ipvanyaddress"`
	// true if enabled. Defaults to true
	AdminStateUp bool `json:"admin_state_up,required"`
	// Member operating status of the entity
	//
	// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
	OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
	// Member IP port
	ProtocolPort int64 `json:"protocol_port,required"`
	// Pool member lifecycle status
	//
	// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
	// "PENDING_UPDATE".
	ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
	// Member weight. Valid values: 0 to 256, defaults to 1
	Weight int64 `json:"weight,required"`
	// An alternate IP address used for health monitoring of a backend member. Default
	// is null which monitors the member address.
	MonitorAddress string `json:"monitor_address,nullable" format:"ipvanyaddress"`
	// An alternate protocol port used for health monitoring of a backend member.
	// Default is null which monitors the member protocol_port.
	MonitorPort int64 `json:"monitor_port,nullable"`
	// Either subnet_id or instance_id should be provided
	SubnetID string `json:"subnet_id,nullable" format:"uuid4"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                 respjson.Field
		Address            respjson.Field
		AdminStateUp       respjson.Field
		OperatingStatus    respjson.Field
		ProtocolPort       respjson.Field
		ProvisioningStatus respjson.Field
		Weight             respjson.Field
		MonitorAddress     respjson.Field
		MonitorPort        respjson.Field
		SubnetID           respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Member) RawJSON

func (r Member) RawJSON() string

Returns the unmodified JSON received from the API

func (*Member) UnmarshalJSON

func (r *Member) UnmarshalJSON(data []byte) error

type MemberStatus

type MemberStatus struct {
	// UUID of the entity
	ID string `json:"id,required" format:"uuid"`
	// Address of the member (server)
	Address string `json:"address,required" format:"ipvanyaddress"`
	// Operating status of the entity
	//
	// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
	OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
	// Port of the member (server)
	ProtocolPort int64 `json:"protocol_port,required"`
	// Provisioning status of the entity
	//
	// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
	// "PENDING_UPDATE".
	ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                 respjson.Field
		Address            respjson.Field
		OperatingStatus    respjson.Field
		ProtocolPort       respjson.Field
		ProvisioningStatus respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MemberStatus) RawJSON

func (r MemberStatus) RawJSON() string

Returns the unmodified JSON received from the API

func (*MemberStatus) UnmarshalJSON

func (r *MemberStatus) UnmarshalJSON(data []byte) error

type Metrics

type Metrics struct {
	// Timestamp
	Time string `json:"time,required"`
	// CPU utilization, % (max 100% for multi-core)
	CPUUtil float64 `json:"cpu_util,nullable"`
	// Disks metrics for each of the disks attached
	Disks []MetricsDisk `json:"disks,nullable"`
	// RAM utilization, %
	MemoryUtil float64 `json:"memory_util,nullable"`
	// Network out, bytes per second
	NetworkBpsEgress float64 `json:"network_Bps_egress,nullable"`
	// Network in, bytes per second
	NetworkBpsIngress float64 `json:"network_Bps_ingress,nullable"`
	// Network out, packets per second
	NetworkPpsEgress float64 `json:"network_pps_egress,nullable"`
	// Network in, packets per second
	NetworkPpsIngress float64 `json:"network_pps_ingress,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Time              respjson.Field
		CPUUtil           respjson.Field
		Disks             respjson.Field
		MemoryUtil        respjson.Field
		NetworkBpsEgress  respjson.Field
		NetworkBpsIngress respjson.Field
		NetworkPpsEgress  respjson.Field
		NetworkPpsIngress respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Instance metrics item

func (Metrics) RawJSON

func (r Metrics) RawJSON() string

Returns the unmodified JSON received from the API

func (*Metrics) UnmarshalJSON

func (r *Metrics) UnmarshalJSON(data []byte) error

type MetricsDisk

type MetricsDisk struct {
	// Disk read, Bytes per second
	DiskBpsRead float64 `json:"disk_Bps_read,nullable"`
	// Disk write, Bytes per second
	DiskBpsWrite float64 `json:"disk_Bps_write,nullable"`
	// Disk read, iops
	DiskIopsRead float64 `json:"disk_iops_read,nullable"`
	// Disk write, iops
	DiskIopsWrite float64 `json:"disk_iops_write,nullable"`
	// Disk attached slot name
	DiskName string `json:"disk_name,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DiskBpsRead   respjson.Field
		DiskBpsWrite  respjson.Field
		DiskIopsRead  respjson.Field
		DiskIopsWrite respjson.Field
		DiskName      respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Disk metrics item

func (MetricsDisk) RawJSON

func (r MetricsDisk) RawJSON() string

Returns the unmodified JSON received from the API

func (*MetricsDisk) UnmarshalJSON

func (r *MetricsDisk) UnmarshalJSON(data []byte) error

type MetricsList

type MetricsList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []Metrics `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MetricsList) RawJSON

func (r MetricsList) RawJSON() string

Returns the unmodified JSON received from the API

func (*MetricsList) UnmarshalJSON

func (r *MetricsList) UnmarshalJSON(data []byte) error

type MlcatalogModelCard

type MlcatalogModelCard struct {
	// Model ID.
	ID string `json:"id,required" format:"uuid"`
	// Category of the model.
	Category string `json:"category,required"`
	// Default flavor for the model.
	DefaultFlavorName string `json:"default_flavor_name,required"`
	// Description of the model.
	Description string `json:"description,required"`
	// Developer of the model.
	Developer string `json:"developer,required"`
	// Path to the documentation page.
	DocumentationPage string `json:"documentation_page,required"`
	// URL to the EULA text.
	EulaURL string `json:"eula_url,required"`
	// Example curl request to the model.
	ExampleCurlRequest string `json:"example_curl_request,required"`
	// Whether the model has an EULA.
	HasEula bool `json:"has_eula,required"`
	// Image registry of the model.
	ImageRegistryID string `json:"image_registry_id,required"`
	// Image URL of the model.
	ImageURL string `json:"image_url,required"`
	// Describing underlying inference engine.
	InferenceBackend string `json:"inference_backend,required"`
	// Describing model frontend type.
	InferenceFrontend string `json:"inference_frontend,required"`
	// Model name to perform inference call.
	ModelID string `json:"model_id,required"`
	// Name of the model.
	Name string `json:"name,required"`
	// OpenAI compatibility level.
	OpenAICompatibility string `json:"openai_compatibility,required"`
	// Port on which the model runs.
	Port int64 `json:"port,required"`
	// Version of the model.
	Version string `json:"version,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		Category            respjson.Field
		DefaultFlavorName   respjson.Field
		Description         respjson.Field
		Developer           respjson.Field
		DocumentationPage   respjson.Field
		EulaURL             respjson.Field
		ExampleCurlRequest  respjson.Field
		HasEula             respjson.Field
		ImageRegistryID     respjson.Field
		ImageURL            respjson.Field
		InferenceBackend    respjson.Field
		InferenceFrontend   respjson.Field
		ModelID             respjson.Field
		Name                respjson.Field
		OpenAICompatibility respjson.Field
		Port                respjson.Field
		Version             respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (MlcatalogModelCard) RawJSON

func (r MlcatalogModelCard) RawJSON() string

Returns the unmodified JSON received from the API

func (*MlcatalogModelCard) UnmarshalJSON

func (r *MlcatalogModelCard) UnmarshalJSON(data []byte) error

type MlcatalogOrderByChoices

type MlcatalogOrderByChoices string
const (
	MlcatalogOrderByChoicesNameAsc  MlcatalogOrderByChoices = "name.asc"
	MlcatalogOrderByChoicesNameDesc MlcatalogOrderByChoices = "name.desc"
)

type Network

type Network struct {
	// Network ID
	ID string `json:"id,required" format:"uuid4"`
	// Datetime when the network was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// True if the network `router:external` attribute
	External bool `json:"external,required"`
	// Network name
	Name string `json:"name,required"`
	// Indicates port_security_enabled status of all newly created in the network
	// ports.
	PortSecurityEnabled bool `json:"port_security_enabled,required"`
	// Region name
	Region string `json:"region,required"`
	// Region ID
	RegionID int64 `json:"region_id,required"`
	// True when the network is shared with your project by external owner
	Shared bool `json:"shared,required"`
	// List of subnetworks
	Subnets []string `json:"subnets,required" format:"uuid4"`
	// List of key-value tags associated with the resource. A tag is a key-value pair
	// that can be associated with a resource, enabling efficient filtering and
	// grouping for better organization and management. Some tags are read-only and
	// cannot be modified by the user. Tags are also integrated with cost reports,
	// allowing cost data to be filtered based on tag keys or values.
	Tags []Tag `json:"tags,required"`
	// Network type (vlan, vxlan)
	Type string `json:"type,required"`
	// Datetime when the network was last updated
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// Task that created this entity
	CreatorTaskID string `json:"creator_task_id,nullable" format:"uuid4"`
	// True if network has is_default attribute
	Default bool `json:"default,nullable"`
	// MTU (maximum transmission unit). Default value is 1450
	Mtu int64 `json:"mtu"`
	// Project ID
	ProjectID int64 `json:"project_id,nullable"`
	// Id of network segment
	SegmentationID int64 `json:"segmentation_id,nullable"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,nullable" format:"uuid4"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		CreatedAt           respjson.Field
		External            respjson.Field
		Name                respjson.Field
		PortSecurityEnabled respjson.Field
		Region              respjson.Field
		RegionID            respjson.Field
		Shared              respjson.Field
		Subnets             respjson.Field
		Tags                respjson.Field
		Type                respjson.Field
		UpdatedAt           respjson.Field
		CreatorTaskID       respjson.Field
		Default             respjson.Field
		Mtu                 respjson.Field
		ProjectID           respjson.Field
		SegmentationID      respjson.Field
		TaskID              respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Network) RawJSON

func (r Network) RawJSON() string

Returns the unmodified JSON received from the API

func (*Network) UnmarshalJSON

func (r *Network) UnmarshalJSON(data []byte) error

type NetworkDeleteParams

type NetworkDeleteParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type NetworkDetails

type NetworkDetails struct {
	// Network ID
	ID string `json:"id,required" format:"uuid4"`
	// Datetime when the network was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// True if the network `router:external` attribute
	External bool `json:"external,required"`
	// Network name
	Name string `json:"name,required"`
	// Indicates port_security_enabled status of all newly created in the network
	// ports.
	PortSecurityEnabled bool `json:"port_security_enabled,required"`
	// Region name
	Region string `json:"region,required"`
	// Region ID
	RegionID int64 `json:"region_id,required"`
	// True when the network is shared with your project by external owner
	Shared bool `json:"shared,required"`
	// List of key-value tags associated with the resource. A tag is a key-value pair
	// that can be associated with a resource, enabling efficient filtering and
	// grouping for better organization and management. Some tags are read-only and
	// cannot be modified by the user. Tags are also integrated with cost reports,
	// allowing cost data to be filtered based on tag keys or values.
	Tags []Tag `json:"tags,required"`
	// Network type (vlan, vxlan)
	Type string `json:"type,required"`
	// Datetime when the network was last updated
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// Task that created this entity
	CreatorTaskID string `json:"creator_task_id,nullable" format:"uuid4"`
	// True if network has is_default attribute
	Default bool `json:"default,nullable"`
	// MTU (maximum transmission unit). Default value is 1450
	Mtu int64 `json:"mtu"`
	// Project ID
	ProjectID int64 `json:"project_id,nullable"`
	// Id of network segment
	SegmentationID int64    `json:"segmentation_id,nullable"`
	Subnets        []Subnet `json:"subnets,nullable"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,nullable" format:"uuid4"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		CreatedAt           respjson.Field
		External            respjson.Field
		Name                respjson.Field
		PortSecurityEnabled respjson.Field
		Region              respjson.Field
		RegionID            respjson.Field
		Shared              respjson.Field
		Tags                respjson.Field
		Type                respjson.Field
		UpdatedAt           respjson.Field
		CreatorTaskID       respjson.Field
		Default             respjson.Field
		Mtu                 respjson.Field
		ProjectID           respjson.Field
		SegmentationID      respjson.Field
		Subnets             respjson.Field
		TaskID              respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NetworkDetails) RawJSON

func (r NetworkDetails) RawJSON() string

Returns the unmodified JSON received from the API

func (*NetworkDetails) UnmarshalJSON

func (r *NetworkDetails) UnmarshalJSON(data []byte) error

type NetworkGetParams

type NetworkGetParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type NetworkInterface

type NetworkInterface struct {
	// Group of subnet masks and/or IP addresses that share the current IP as VIP
	AllowedAddressPairs []AllowedAddressPairs `json:"allowed_address_pairs,required"`
	// Bodies of floating IPs that are NAT-ing IPs of this port
	FloatingipDetails []FloatingIP `json:"floatingip_details,required"`
	// IP addresses assigned to this port
	IPAssignments []IPAssignment `json:"ip_assignments,required"`
	// Body of the network this port is attached to
	NetworkDetails NetworkDetails `json:"network_details,required"`
	// ID of the network the port is attached to
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// ID of virtual ethernet port object
	PortID string `json:"port_id,required" format:"uuid4"`
	// Port security status
	PortSecurityEnabled bool `json:"port_security_enabled,required"`
	// body of ports that are included into trunk port
	SubPorts []NetworkInterfaceSubPort `json:"sub_ports,required"`
	// Interface name
	InterfaceName string `json:"interface_name,nullable"`
	// MAC address of the virtual port
	MacAddress string `json:"mac_address,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowedAddressPairs respjson.Field
		FloatingipDetails   respjson.Field
		IPAssignments       respjson.Field
		NetworkDetails      respjson.Field
		NetworkID           respjson.Field
		PortID              respjson.Field
		PortSecurityEnabled respjson.Field
		SubPorts            respjson.Field
		InterfaceName       respjson.Field
		MacAddress          respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NetworkInterface) RawJSON

func (r NetworkInterface) RawJSON() string

Returns the unmodified JSON received from the API

func (*NetworkInterface) UnmarshalJSON

func (r *NetworkInterface) UnmarshalJSON(data []byte) error

type NetworkInterfaceList

type NetworkInterfaceList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []NetworkInterface `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NetworkInterfaceList) RawJSON

func (r NetworkInterfaceList) RawJSON() string

Returns the unmodified JSON received from the API

func (*NetworkInterfaceList) UnmarshalJSON

func (r *NetworkInterfaceList) UnmarshalJSON(data []byte) error

type NetworkInterfaceSubPort

type NetworkInterfaceSubPort struct {
	// Group of subnet masks and/or IP addresses that share the current IP as VIP
	AllowedAddressPairs []AllowedAddressPairs `json:"allowed_address_pairs,required"`
	// Bodies of floating IPs that are NAT-ing IPs of this port
	FloatingipDetails []FloatingIP `json:"floatingip_details,required"`
	// IP addresses assigned to this port
	IPAssignments []IPAssignment `json:"ip_assignments,required"`
	// Body of the network this port is attached to
	NetworkDetails NetworkDetails `json:"network_details,required"`
	// ID of the network the port is attached to
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// ID of virtual ethernet port object
	PortID string `json:"port_id,required" format:"uuid4"`
	// Port security status
	PortSecurityEnabled bool `json:"port_security_enabled,required"`
	// id of network segment
	SegmentationID int64 `json:"segmentation_id,required"`
	// type of network segment
	SegmentationType string `json:"segmentation_type,required"`
	// Interface name
	InterfaceName string `json:"interface_name,nullable"`
	// MAC address of the virtual port
	MacAddress string `json:"mac_address,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowedAddressPairs respjson.Field
		FloatingipDetails   respjson.Field
		IPAssignments       respjson.Field
		NetworkDetails      respjson.Field
		NetworkID           respjson.Field
		PortID              respjson.Field
		PortSecurityEnabled respjson.Field
		SegmentationID      respjson.Field
		SegmentationType    respjson.Field
		InterfaceName       respjson.Field
		MacAddress          respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (NetworkInterfaceSubPort) RawJSON

func (r NetworkInterfaceSubPort) RawJSON() string

Returns the unmodified JSON received from the API

func (*NetworkInterfaceSubPort) UnmarshalJSON

func (r *NetworkInterfaceSubPort) UnmarshalJSON(data []byte) error

type NetworkListParams

type NetworkListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Limit the number of returned limit request entities.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Offset value is used to exclude the first set of records from the result.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Order networks by fields and directions (name.asc). Default is `created_at.asc`.
	OrderBy param.Opt[string] `query:"order_by,omitzero" json:"-"`
	// Filter by tag key-value pairs. Must be a valid JSON string. curl -G
	// --data-urlencode "tag_key_value={"key": "value"}" --url
	// "http://localhost:1111/v1/networks/1/1"
	TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
	// Filter by tag keys.
	TagKey []string `query:"tag_key,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (NetworkListParams) URLQuery

func (r NetworkListParams) URLQuery() (v url.Values, err error)

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

type NetworkNewParams

type NetworkNewParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Network name
	Name string `json:"name,required"`
	// Defaults to True
	CreateRouter param.Opt[bool] `json:"create_router,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// vlan or vxlan network type is allowed. Default value is vxlan
	//
	// Any of "vlan", "vxlan".
	Type NetworkNewParamsType `json:"type,omitzero"`
	// contains filtered or unexported fields
}

func (NetworkNewParams) MarshalJSON

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

type NetworkNewParamsType

type NetworkNewParamsType string

vlan or vxlan network type is allowed. Default value is vxlan

const (
	NetworkNewParamsTypeVlan  NetworkNewParamsType = "vlan"
	NetworkNewParamsTypeVxlan NetworkNewParamsType = "vxlan"
)

type NetworkRouterAttachSubnetParams

type NetworkRouterAttachSubnetParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Subnet ID on which router interface will be created
	SubnetID string `json:"subnet_id,required" format:"uuid4"`
	// IP address to assign for router's interface, if not specified, address will be
	// selected automatically
	IPAddress param.Opt[string] `json:"ip_address,omitzero" format:"ipvanyaddress"`
	// contains filtered or unexported fields
}

func (NetworkRouterAttachSubnetParams) MarshalJSON

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

type NetworkRouterDeleteParams

type NetworkRouterDeleteParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type NetworkRouterDetachSubnetParams

type NetworkRouterDetachSubnetParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	SubnetID  SubnetIDParam
	// contains filtered or unexported fields
}

func (NetworkRouterDetachSubnetParams) MarshalJSON

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

type NetworkRouterGetParams

type NetworkRouterGetParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type NetworkRouterListParams

type NetworkRouterListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Limit the number of returned limit request entities.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Offset value is used to exclude the first set of records from the result.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (NetworkRouterListParams) URLQuery

func (r NetworkRouterListParams) URLQuery() (v url.Values, err error)

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

type NetworkRouterNewParams

type NetworkRouterNewParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// name of router
	Name                string                                         `json:"name,required"`
	ExternalGatewayInfo NetworkRouterNewParamsExternalGatewayInfoUnion `json:"external_gateway_info,omitzero"`
	// List of interfaces to attach to router immediately after creation.
	Interfaces []NetworkRouterNewParamsInterface `json:"interfaces,omitzero"`
	// List of custom routes.
	Routes []NetworkRouterNewParamsRoute `json:"routes,omitzero"`
	// contains filtered or unexported fields
}

func (NetworkRouterNewParams) MarshalJSON

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

type NetworkRouterNewParamsExternalGatewayInfoRouterExternalDefaultGwSerializer

type NetworkRouterNewParamsExternalGatewayInfoRouterExternalDefaultGwSerializer struct {
	// Is SNAT enabled. Defaults to true.
	EnableSnat param.Opt[bool] `json:"enable_snat,omitzero"`
	// must be 'default'.
	//
	// Any of "default".
	Type string `json:"type,omitzero"`
	// contains filtered or unexported fields
}

func (NetworkRouterNewParamsExternalGatewayInfoRouterExternalDefaultGwSerializer) MarshalJSON

type NetworkRouterNewParamsExternalGatewayInfoRouterExternalManualGwSerializer

type NetworkRouterNewParamsExternalGatewayInfoRouterExternalManualGwSerializer struct {
	// id of the external network.
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// Is SNAT enabled. Defaults to true.
	EnableSnat param.Opt[bool] `json:"enable_snat,omitzero"`
	// must be 'manual'.
	//
	// Any of "manual".
	Type string `json:"type,omitzero"`
	// contains filtered or unexported fields
}

The property NetworkID is required.

func (NetworkRouterNewParamsExternalGatewayInfoRouterExternalManualGwSerializer) MarshalJSON

type NetworkRouterNewParamsExternalGatewayInfoUnion

type NetworkRouterNewParamsExternalGatewayInfoUnion struct {
	OfRouterExternalManualGwSerializer  *NetworkRouterNewParamsExternalGatewayInfoRouterExternalManualGwSerializer  `json:",omitzero,inline"`
	OfRouterExternalDefaultGwSerializer *NetworkRouterNewParamsExternalGatewayInfoRouterExternalDefaultGwSerializer `json:",omitzero,inline"`
	// contains filtered or unexported fields
}

Only one field can be non-zero.

Use param.IsOmitted to confirm if a field is set.

func (NetworkRouterNewParamsExternalGatewayInfoUnion) GetEnableSnat

Returns a pointer to the underlying variant's property, if present.

func (NetworkRouterNewParamsExternalGatewayInfoUnion) GetNetworkID

Returns a pointer to the underlying variant's property, if present.

func (NetworkRouterNewParamsExternalGatewayInfoUnion) GetType

Returns a pointer to the underlying variant's property, if present.

func (NetworkRouterNewParamsExternalGatewayInfoUnion) MarshalJSON

type NetworkRouterNewParamsInterface

type NetworkRouterNewParamsInterface struct {
	// id of the subnet to attach to.
	SubnetID string `json:"subnet_id,required" format:"uuid4"`
	// must be 'subnet'.
	//
	// Any of "subnet".
	Type string `json:"type,omitzero"`
	// contains filtered or unexported fields
}

The property SubnetID is required.

func (NetworkRouterNewParamsInterface) MarshalJSON

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

type NetworkRouterNewParamsRoute

type NetworkRouterNewParamsRoute struct {
	// CIDR of destination IPv4 subnet.
	Destination string `json:"destination,required" format:"ipvanynetwork"`
	// IPv4 address to forward traffic to if it's destination IP matches 'destination'
	// CIDR.
	Nexthop string `json:"nexthop,required" format:"ipvanyaddress"`
	// contains filtered or unexported fields
}

The properties Destination, Nexthop are required.

func (NetworkRouterNewParamsRoute) MarshalJSON

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

type NetworkRouterService

type NetworkRouterService struct {
	Options []option.RequestOption
}

NetworkRouterService contains methods and other services that help with interacting with the gcore API.

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

func NewNetworkRouterService

func NewNetworkRouterService(opts ...option.RequestOption) (r NetworkRouterService)

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

func (*NetworkRouterService) AttachSubnet

func (r *NetworkRouterService) AttachSubnet(ctx context.Context, routerID string, params NetworkRouterAttachSubnetParams, opts ...option.RequestOption) (res *Router, err error)

Attach subnet to router

func (*NetworkRouterService) Delete

func (r *NetworkRouterService) Delete(ctx context.Context, routerID string, body NetworkRouterDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Delete router

func (*NetworkRouterService) DetachSubnet

func (r *NetworkRouterService) DetachSubnet(ctx context.Context, routerID string, params NetworkRouterDetachSubnetParams, opts ...option.RequestOption) (res *Router, err error)

Detach subnet from router

func (*NetworkRouterService) Get

func (r *NetworkRouterService) Get(ctx context.Context, routerID string, query NetworkRouterGetParams, opts ...option.RequestOption) (res *Router, err error)

Get specific router

func (*NetworkRouterService) List

List routers

func (*NetworkRouterService) ListAutoPaging

List routers

func (*NetworkRouterService) New

Create router

func (*NetworkRouterService) Update

func (r *NetworkRouterService) Update(ctx context.Context, routerID string, params NetworkRouterUpdateParams, opts ...option.RequestOption) (res *Router, err error)

Update router

type NetworkRouterUpdateParams

type NetworkRouterUpdateParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// New name of router
	Name param.Opt[string] `json:"name,omitzero"`
	// New external gateway.
	ExternalGatewayInfo NetworkRouterUpdateParamsExternalGatewayInfo `json:"external_gateway_info,omitzero"`
	// List of custom routes.
	Routes []NetworkRouterUpdateParamsRoute `json:"routes,omitzero"`
	// contains filtered or unexported fields
}

func (NetworkRouterUpdateParams) MarshalJSON

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

type NetworkRouterUpdateParamsExternalGatewayInfo

type NetworkRouterUpdateParamsExternalGatewayInfo struct {
	// id of the external network.
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// Is SNAT enabled. Defaults to true.
	EnableSnat param.Opt[bool] `json:"enable_snat,omitzero"`
	// must be 'manual'.
	//
	// Any of "manual".
	Type string `json:"type,omitzero"`
	// contains filtered or unexported fields
}

New external gateway.

The property NetworkID is required.

func (NetworkRouterUpdateParamsExternalGatewayInfo) MarshalJSON

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

type NetworkRouterUpdateParamsRoute

type NetworkRouterUpdateParamsRoute struct {
	// CIDR of destination IPv4 subnet.
	Destination string `json:"destination,required" format:"ipvanynetwork"`
	// IPv4 address to forward traffic to if it's destination IP matches 'destination'
	// CIDR.
	Nexthop string `json:"nexthop,required" format:"ipvanyaddress"`
	// contains filtered or unexported fields
}

The properties Destination, Nexthop are required.

func (NetworkRouterUpdateParamsRoute) MarshalJSON

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

type NetworkService

type NetworkService struct {
	Options []option.RequestOption
	Subnets NetworkSubnetService
	Routers NetworkRouterService
}

NetworkService contains methods and other services that help with interacting with the gcore API.

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

func NewNetworkService

func NewNetworkService(opts ...option.RequestOption) (r NetworkService)

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

func (*NetworkService) Delete

func (r *NetworkService) Delete(ctx context.Context, networkID string, body NetworkDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Delete network

func (*NetworkService) Get

func (r *NetworkService) Get(ctx context.Context, networkID string, query NetworkGetParams, opts ...option.RequestOption) (res *Network, err error)

Get network

func (*NetworkService) List

List networks

func (*NetworkService) ListAutoPaging

List networks

func (*NetworkService) New

func (r *NetworkService) New(ctx context.Context, params NetworkNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Create network

func (*NetworkService) Update

func (r *NetworkService) Update(ctx context.Context, networkID string, params NetworkUpdateParams, opts ...option.RequestOption) (res *Network, err error)

Change network name

type NetworkSubnetDeleteParams

type NetworkSubnetDeleteParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type NetworkSubnetGetParams

type NetworkSubnetGetParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type NetworkSubnetListParams

type NetworkSubnetListParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Optional. Limit the number of returned items
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Only list subnets of this network
	NetworkID param.Opt[string] `query:"network_id,omitzero" format:"uuid4" json:"-"`
	// Optional. Offset value is used to exclude the first set of records from the
	// result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Optional. Filter by tag key-value pairs. curl -G --data-urlencode
	// "tag_key_value={"key": "value"}" --url
	// "https://example.com/cloud/v1/resource/1/1"
	TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
	// Ordering subnets list result by `name`, `created_at`, `updated_at`,
	// `available_ips`, `total_ips`, and `cidr` (default) fields of the subnet and
	// directions (`name.asc`).
	//
	// Any of "available_ips.asc", "available_ips.desc", "cidr.asc", "cidr.desc",
	// "created_at.asc", "created_at.desc", "name.asc", "name.desc", "total_ips.asc",
	// "total_ips.desc", "updated_at.asc", "updated_at.desc".
	OrderBy NetworkSubnetListParamsOrderBy `query:"order_by,omitzero" json:"-"`
	// Optional. Filter by tag keys. ?tag_key=key1&tag_key=key2
	TagKey []string `query:"tag_key,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (NetworkSubnetListParams) URLQuery

func (r NetworkSubnetListParams) URLQuery() (v url.Values, err error)

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

type NetworkSubnetListParamsOrderBy

type NetworkSubnetListParamsOrderBy string

Ordering subnets list result by `name`, `created_at`, `updated_at`, `available_ips`, `total_ips`, and `cidr` (default) fields of the subnet and directions (`name.asc`).

const (
	NetworkSubnetListParamsOrderByAvailableIPsAsc  NetworkSubnetListParamsOrderBy = "available_ips.asc"
	NetworkSubnetListParamsOrderByAvailableIPsDesc NetworkSubnetListParamsOrderBy = "available_ips.desc"
	NetworkSubnetListParamsOrderByCidrAsc          NetworkSubnetListParamsOrderBy = "cidr.asc"
	NetworkSubnetListParamsOrderByCidrDesc         NetworkSubnetListParamsOrderBy = "cidr.desc"
	NetworkSubnetListParamsOrderByCreatedAtAsc     NetworkSubnetListParamsOrderBy = "created_at.asc"
	NetworkSubnetListParamsOrderByCreatedAtDesc    NetworkSubnetListParamsOrderBy = "created_at.desc"
	NetworkSubnetListParamsOrderByNameAsc          NetworkSubnetListParamsOrderBy = "name.asc"
	NetworkSubnetListParamsOrderByNameDesc         NetworkSubnetListParamsOrderBy = "name.desc"
	NetworkSubnetListParamsOrderByTotalIPsAsc      NetworkSubnetListParamsOrderBy = "total_ips.asc"
	NetworkSubnetListParamsOrderByTotalIPsDesc     NetworkSubnetListParamsOrderBy = "total_ips.desc"
	NetworkSubnetListParamsOrderByUpdatedAtAsc     NetworkSubnetListParamsOrderBy = "updated_at.asc"
	NetworkSubnetListParamsOrderByUpdatedAtDesc    NetworkSubnetListParamsOrderBy = "updated_at.desc"
)

type NetworkSubnetNewParams

type NetworkSubnetNewParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// CIDR
	Cidr string `json:"cidr,required" format:"ipvanynetwork"`
	// Subnet name
	Name string `json:"name,required"`
	// Network ID
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// Default GW IPv4 address to advertise in DHCP routes in this subnet. Omit this
	// field to let the cloud backend allocate it automatically. Set to null if no
	// gateway must be advertised by this subnet's DHCP (useful when attaching
	// instances to multiple subnets in order to prevent default route conflicts).
	GatewayIP param.Opt[string] `json:"gateway_ip,omitzero" format:"ipvanyaddress"`
	// ID of the router to connect to. Requires `connect_to_network_router` set to
	// true. If not specified, attempts to find a router created during network
	// creation.
	RouterIDToConnect param.Opt[string] `json:"router_id_to_connect,omitzero" format:"uuid4"`
	// True if the network's router should get a gateway in this subnet. Must be
	// explicitly 'false' when gateway_ip is null.
	ConnectToNetworkRouter param.Opt[bool] `json:"connect_to_network_router,omitzero"`
	// True if DHCP should be enabled
	EnableDhcp param.Opt[bool] `json:"enable_dhcp,omitzero"`
	// List IP addresses of DNS servers to advertise via DHCP.
	DNSNameservers []string `json:"dns_nameservers,omitzero" format:"ipvanyaddress"`
	// List of custom static routes to advertise via DHCP.
	HostRoutes []NetworkSubnetNewParamsHostRoute `json:"host_routes,omitzero"`
	// IP version
	//
	// Any of 4, 6.
	IPVersion int64 `json:"ip_version,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// contains filtered or unexported fields
}

func (NetworkSubnetNewParams) MarshalJSON

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

type NetworkSubnetNewParamsHostRoute

type NetworkSubnetNewParamsHostRoute struct {
	// CIDR of destination IPv4 subnet.
	Destination string `json:"destination,required" format:"ipvanynetwork"`
	// IPv4 address to forward traffic to if it's destination IP matches 'destination'
	// CIDR.
	Nexthop string `json:"nexthop,required" format:"ipvanyaddress"`
	// contains filtered or unexported fields
}

The properties Destination, Nexthop are required.

func (NetworkSubnetNewParamsHostRoute) MarshalJSON

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

type NetworkSubnetService

type NetworkSubnetService struct {
	Options []option.RequestOption
}

NetworkSubnetService contains methods and other services that help with interacting with the gcore API.

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

func NewNetworkSubnetService

func NewNetworkSubnetService(opts ...option.RequestOption) (r NetworkSubnetService)

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

func (*NetworkSubnetService) Delete

func (r *NetworkSubnetService) Delete(ctx context.Context, subnetID string, body NetworkSubnetDeleteParams, opts ...option.RequestOption) (err error)

Delete subnet

func (*NetworkSubnetService) Get

func (r *NetworkSubnetService) Get(ctx context.Context, subnetID string, query NetworkSubnetGetParams, opts ...option.RequestOption) (res *Subnet, err error)

Get subnet

func (*NetworkSubnetService) List

List subnets

func (*NetworkSubnetService) ListAutoPaging

List subnets

func (*NetworkSubnetService) New

Create subnet

func (*NetworkSubnetService) Update

func (r *NetworkSubnetService) Update(ctx context.Context, subnetID string, params NetworkSubnetUpdateParams, opts ...option.RequestOption) (res *Subnet, err error)

Change subnet properties

type NetworkSubnetUpdateParams

type NetworkSubnetUpdateParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// True if DHCP should be enabled
	EnableDhcp param.Opt[bool] `json:"enable_dhcp,omitzero"`
	// Default GW IPv4 address to advertise in DHCP routes in this subnet. Omit this
	// field to let the cloud backend allocate it automatically. Set to null if no
	// gateway must be advertised by this subnet's DHCP (useful when attaching
	// instances to multiple subnets in order to prevent default route conflicts).
	GatewayIP param.Opt[string] `json:"gateway_ip,omitzero" format:"ipvanyaddress"`
	// Name
	Name param.Opt[string] `json:"name,omitzero"`
	// List IP addresses of DNS servers to advertise via DHCP.
	DNSNameservers []string `json:"dns_nameservers,omitzero" format:"ipvanyaddress"`
	// List of custom static routes to advertise via DHCP.
	HostRoutes []NetworkSubnetUpdateParamsHostRoute `json:"host_routes,omitzero"`
	// contains filtered or unexported fields
}

func (NetworkSubnetUpdateParams) MarshalJSON

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

type NetworkSubnetUpdateParamsHostRoute

type NetworkSubnetUpdateParamsHostRoute struct {
	// CIDR of destination IPv4 subnet.
	Destination string `json:"destination,required" format:"ipvanynetwork"`
	// IPv4 address to forward traffic to if it's destination IP matches 'destination'
	// CIDR.
	Nexthop string `json:"nexthop,required" format:"ipvanyaddress"`
	// contains filtered or unexported fields
}

The properties Destination, Nexthop are required.

func (NetworkSubnetUpdateParamsHostRoute) MarshalJSON

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

type NetworkUpdateParams

type NetworkUpdateParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Name.
	Name string `json:"name,required"`
	// contains filtered or unexported fields
}

func (NetworkUpdateParams) MarshalJSON

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

type PlacementGroup

type PlacementGroup struct {
	// The list of instances in this server group.
	Instances []PlacementGroupInstance `json:"instances,required"`
	// The name of the server group.
	Name string `json:"name,required"`
	// The server group policy. Options are: anti-affinity, affinity, or
	// soft-anti-affinity.
	Policy string `json:"policy,required"`
	// Project ID
	ProjectID int64 `json:"project_id,required"`
	// Region name
	Region string `json:"region,required"`
	// Region ID
	RegionID int64 `json:"region_id,required"`
	// The ID of the server group.
	ServergroupID string `json:"servergroup_id,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Instances     respjson.Field
		Name          respjson.Field
		Policy        respjson.Field
		ProjectID     respjson.Field
		Region        respjson.Field
		RegionID      respjson.Field
		ServergroupID respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlacementGroup) RawJSON

func (r PlacementGroup) RawJSON() string

Returns the unmodified JSON received from the API

func (*PlacementGroup) UnmarshalJSON

func (r *PlacementGroup) UnmarshalJSON(data []byte) error

type PlacementGroupDeleteParams

type PlacementGroupDeleteParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type PlacementGroupGetParams

type PlacementGroupGetParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type PlacementGroupInstance

type PlacementGroupInstance struct {
	// The ID of the instance, corresponding to the attribute 'id'.
	InstanceID string `json:"instance_id,required"`
	// The name of the instance, corresponding to the attribute 'name'.
	InstanceName string `json:"instance_name,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		InstanceID   respjson.Field
		InstanceName respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlacementGroupInstance) RawJSON

func (r PlacementGroupInstance) RawJSON() string

Returns the unmodified JSON received from the API

func (*PlacementGroupInstance) UnmarshalJSON

func (r *PlacementGroupInstance) UnmarshalJSON(data []byte) error

type PlacementGroupList

type PlacementGroupList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []PlacementGroup `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PlacementGroupList) RawJSON

func (r PlacementGroupList) RawJSON() string

Returns the unmodified JSON received from the API

func (*PlacementGroupList) UnmarshalJSON

func (r *PlacementGroupList) UnmarshalJSON(data []byte) error

type PlacementGroupListParams

type PlacementGroupListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type PlacementGroupNewParams

type PlacementGroupNewParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// The name of the server group.
	Name string `json:"name,required"`
	// The server group policy.
	//
	// Any of "affinity", "anti-affinity", "soft-anti-affinity".
	Policy PlacementGroupNewParamsPolicy `json:"policy,omitzero,required"`
	// contains filtered or unexported fields
}

func (PlacementGroupNewParams) MarshalJSON

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

type PlacementGroupNewParamsPolicy

type PlacementGroupNewParamsPolicy string

The server group policy.

const (
	PlacementGroupNewParamsPolicyAffinity         PlacementGroupNewParamsPolicy = "affinity"
	PlacementGroupNewParamsPolicyAntiAffinity     PlacementGroupNewParamsPolicy = "anti-affinity"
	PlacementGroupNewParamsPolicySoftAntiAffinity PlacementGroupNewParamsPolicy = "soft-anti-affinity"
)

type PlacementGroupService

type PlacementGroupService struct {
	Options []option.RequestOption
}

PlacementGroupService contains methods and other services that help with interacting with the gcore API.

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

func NewPlacementGroupService

func NewPlacementGroupService(opts ...option.RequestOption) (r PlacementGroupService)

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

func (*PlacementGroupService) Delete

func (r *PlacementGroupService) Delete(ctx context.Context, groupID string, body PlacementGroupDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Delete placement group

func (*PlacementGroupService) Get

Get placement group

func (*PlacementGroupService) List

List placement groups

func (*PlacementGroupService) New

Create an affinity or anti-affinity or soft-anti-affinity placement group

type PoolStatus

type PoolStatus struct {
	// UUID of the entity
	ID string `json:"id,required" format:"uuid"`
	// Members (servers) of the pool
	Members []MemberStatus `json:"members,required"`
	// Name of the load balancer pool
	Name string `json:"name,required"`
	// Operating status of the entity
	//
	// Any of "DEGRADED", "DRAINING", "ERROR", "NO_MONITOR", "OFFLINE", "ONLINE".
	OperatingStatus LoadBalancerOperatingStatus `json:"operating_status,required"`
	// Provisioning status of the entity
	//
	// Any of "ACTIVE", "DELETED", "ERROR", "PENDING_CREATE", "PENDING_DELETE",
	// "PENDING_UPDATE".
	ProvisioningStatus ProvisioningStatus `json:"provisioning_status,required"`
	// Health Monitor of the Pool
	HealthMonitor HealthMonitorStatus `json:"health_monitor"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                 respjson.Field
		Members            respjson.Field
		Name               respjson.Field
		OperatingStatus    respjson.Field
		ProvisioningStatus respjson.Field
		HealthMonitor      respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (PoolStatus) RawJSON

func (r PoolStatus) RawJSON() string

Returns the unmodified JSON received from the API

func (*PoolStatus) UnmarshalJSON

func (r *PoolStatus) UnmarshalJSON(data []byte) error

type Project

type Project struct {
	// Project ID, which is automatically generated upon creation.
	ID int64 `json:"id,required"`
	// ID associated with the client.
	ClientID int64 `json:"client_id,required"`
	// Datetime of creation, which is automatically generated.
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Indicates if the project is the default one. Each client always has one default
	// project.
	IsDefault bool `json:"is_default,required"`
	// Unique project name for a client.
	Name string `json:"name,required"`
	// The state of the project.
	State string `json:"state,required"`
	// Datetime of deletion, which is automatically generated if the project is
	// deleted.
	DeletedAt time.Time `json:"deleted_at,nullable" format:"date-time"`
	// Description of the project.
	Description string `json:"description,nullable"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		ClientID    respjson.Field
		CreatedAt   respjson.Field
		IsDefault   respjson.Field
		Name        respjson.Field
		State       respjson.Field
		DeletedAt   respjson.Field
		Description respjson.Field
		TaskID      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Project) RawJSON

func (r Project) RawJSON() string

Returns the unmodified JSON received from the API

func (*Project) UnmarshalJSON

func (r *Project) UnmarshalJSON(data []byte) error

type ProjectDeleteParams

type ProjectDeleteParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type ProjectGetParams

type ProjectGetParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type ProjectListParams

type ProjectListParams struct {
	// Client ID filter for administrators.
	ClientID param.Opt[int64] `query:"client_id,omitzero" json:"-"`
	// Whether to include deleted projects in the response.
	IncludeDeleted param.Opt[bool] `query:"include_deleted,omitzero" json:"-"`
	// Limit value is used to limit the number of records in the result
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Name to filter the results by.
	Name param.Opt[string] `query:"name,omitzero" json:"-"`
	// Offset value is used to exclude the first set of records from the result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Order by field and direction.
	//
	// Any of "created_at.asc", "created_at.desc", "name.asc", "name.desc".
	OrderBy ProjectListParamsOrderBy `query:"order_by,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ProjectListParams) URLQuery

func (r ProjectListParams) URLQuery() (v url.Values, err error)

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

type ProjectListParamsOrderBy

type ProjectListParamsOrderBy string

Order by field and direction.

const (
	ProjectListParamsOrderByCreatedAtAsc  ProjectListParamsOrderBy = "created_at.asc"
	ProjectListParamsOrderByCreatedAtDesc ProjectListParamsOrderBy = "created_at.desc"
	ProjectListParamsOrderByNameAsc       ProjectListParamsOrderBy = "name.asc"
	ProjectListParamsOrderByNameDesc      ProjectListParamsOrderBy = "name.desc"
)

type ProjectNewParams

type ProjectNewParams struct {
	// Unique project name for a client. Each client always has one "default" project.
	Name string `json:"name,required"`
	// ID associated with the client.
	ClientID param.Opt[int64] `json:"client_id,omitzero"`
	// Description of the project.
	Description param.Opt[string] `json:"description,omitzero"`
	// State of the project.
	State param.Opt[string] `json:"state,omitzero"`
	// contains filtered or unexported fields
}

func (ProjectNewParams) MarshalJSON

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

type ProjectReplaceParams

type ProjectReplaceParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Name of the entity, following a specific format.
	Name string `json:"name,required"`
	// Description of the project.
	Description param.Opt[string] `json:"description,omitzero"`
	// contains filtered or unexported fields
}

func (ProjectReplaceParams) MarshalJSON

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

type ProjectService

type ProjectService struct {
	Options []option.RequestOption
}

ProjectService contains methods and other services that help with interacting with the gcore API.

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

func NewProjectService

func NewProjectService(opts ...option.RequestOption) (r ProjectService)

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

func (*ProjectService) Delete

func (r *ProjectService) Delete(ctx context.Context, body ProjectDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)

All cloud resources in all regions that belong to the project will be deleted and will not be recoverable

func (*ProjectService) Get

func (r *ProjectService) Get(ctx context.Context, query ProjectGetParams, opts ...option.RequestOption) (res *Project, err error)

Get Project

func (*ProjectService) List

List projects

func (*ProjectService) ListAutoPaging

List projects

func (*ProjectService) New

func (r *ProjectService) New(ctx context.Context, body ProjectNewParams, opts ...option.RequestOption) (res *Project, err error)

Create project

func (*ProjectService) Replace

func (r *ProjectService) Replace(ctx context.Context, params ProjectReplaceParams, opts ...option.RequestOption) (res *Project, err error)

Update Project

type ProvisioningStatus

type ProvisioningStatus string
const (
	ProvisioningStatusActive        ProvisioningStatus = "ACTIVE"
	ProvisioningStatusDeleted       ProvisioningStatus = "DELETED"
	ProvisioningStatusError         ProvisioningStatus = "ERROR"
	ProvisioningStatusPendingCreate ProvisioningStatus = "PENDING_CREATE"
	ProvisioningStatusPendingDelete ProvisioningStatus = "PENDING_DELETE"
	ProvisioningStatusPendingUpdate ProvisioningStatus = "PENDING_UPDATE"
)

type QuotaGetAllResponse

type QuotaGetAllResponse struct {
	// Global entity quotas
	GlobalQuotas QuotaGetAllResponseGlobalQuotas `json:"global_quotas"`
	// Regional entity quotas. Only contains initialized quotas.
	RegionalQuotas []QuotaGetAllResponseRegionalQuota `json:"regional_quotas"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		GlobalQuotas   respjson.Field
		RegionalQuotas respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (QuotaGetAllResponse) RawJSON

func (r QuotaGetAllResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*QuotaGetAllResponse) UnmarshalJSON

func (r *QuotaGetAllResponse) UnmarshalJSON(data []byte) error

type QuotaGetAllResponseGlobalQuotas

type QuotaGetAllResponseGlobalQuotas struct {
	// Inference CPU millicore count limit
	InferenceCPUMillicoreCountLimit int64 `json:"inference_cpu_millicore_count_limit"`
	// Inference CPU millicore count usage
	InferenceCPUMillicoreCountUsage int64 `json:"inference_cpu_millicore_count_usage"`
	// Inference GPU A100 Count limit
	InferenceGPUA100CountLimit int64 `json:"inference_gpu_a100_count_limit"`
	// Inference GPU A100 Count usage
	InferenceGPUA100CountUsage int64 `json:"inference_gpu_a100_count_usage"`
	// Inference GPU H100 Count limit
	InferenceGPUH100CountLimit int64 `json:"inference_gpu_h100_count_limit"`
	// Inference GPU H100 Count usage
	InferenceGPUH100CountUsage int64 `json:"inference_gpu_h100_count_usage"`
	// Inference GPU L40s Count limit
	InferenceGPUL40sCountLimit int64 `json:"inference_gpu_l40s_count_limit"`
	// Inference GPU L40s Count usage
	InferenceGPUL40sCountUsage int64 `json:"inference_gpu_l40s_count_usage"`
	// Inference instance count limit
	InferenceInstanceCountLimit int64 `json:"inference_instance_count_limit"`
	// Inference instance count usage
	InferenceInstanceCountUsage int64 `json:"inference_instance_count_usage"`
	// SSH Keys Count limit
	KeypairCountLimit int64 `json:"keypair_count_limit"`
	// SSH Keys Count usage
	KeypairCountUsage int64 `json:"keypair_count_usage"`
	// Projects Count limit
	ProjectCountLimit int64 `json:"project_count_limit"`
	// Projects Count usage
	ProjectCountUsage int64 `json:"project_count_usage"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		InferenceCPUMillicoreCountLimit respjson.Field
		InferenceCPUMillicoreCountUsage respjson.Field
		InferenceGPUA100CountLimit      respjson.Field
		InferenceGPUA100CountUsage      respjson.Field
		InferenceGPUH100CountLimit      respjson.Field
		InferenceGPUH100CountUsage      respjson.Field
		InferenceGPUL40sCountLimit      respjson.Field
		InferenceGPUL40sCountUsage      respjson.Field
		InferenceInstanceCountLimit     respjson.Field
		InferenceInstanceCountUsage     respjson.Field
		KeypairCountLimit               respjson.Field
		KeypairCountUsage               respjson.Field
		ProjectCountLimit               respjson.Field
		ProjectCountUsage               respjson.Field
		ExtraFields                     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Global entity quotas

func (QuotaGetAllResponseGlobalQuotas) RawJSON

Returns the unmodified JSON received from the API

func (*QuotaGetAllResponseGlobalQuotas) UnmarshalJSON

func (r *QuotaGetAllResponseGlobalQuotas) UnmarshalJSON(data []byte) error

type QuotaGetAllResponseRegionalQuota

type QuotaGetAllResponseRegionalQuota struct {
	// Basic bare metal servers count limit
	BaremetalBasicCountLimit int64 `json:"baremetal_basic_count_limit"`
	// Basic bare metal servers count usage
	BaremetalBasicCountUsage int64 `json:"baremetal_basic_count_usage"`
	// AI GPU bare metal servers count limit
	BaremetalGPUCountLimit int64 `json:"baremetal_gpu_count_limit"`
	// AI GPU bare metal servers count usage
	BaremetalGPUCountUsage int64 `json:"baremetal_gpu_count_usage"`
	// High-frequency bare metal servers count limit
	BaremetalHfCountLimit int64 `json:"baremetal_hf_count_limit"`
	// High-frequency bare metal servers count usage
	BaremetalHfCountUsage int64 `json:"baremetal_hf_count_usage"`
	// Infrastructure bare metal servers count limit
	BaremetalInfrastructureCountLimit int64 `json:"baremetal_infrastructure_count_limit"`
	// Infrastructure bare metal servers count usage
	BaremetalInfrastructureCountUsage int64 `json:"baremetal_infrastructure_count_usage"`
	// Bare metal Network Count limit
	BaremetalNetworkCountLimit int64 `json:"baremetal_network_count_limit"`
	// Bare metal Network Count usage
	BaremetalNetworkCountUsage int64 `json:"baremetal_network_count_usage"`
	// Storage bare metal servers count limit
	BaremetalStorageCountLimit int64 `json:"baremetal_storage_count_limit"`
	// Storage bare metal servers count usage
	BaremetalStorageCountUsage int64 `json:"baremetal_storage_count_usage"`
	// Containers count limit
	CaasContainerCountLimit int64 `json:"caas_container_count_limit"`
	// Containers count usage
	CaasContainerCountUsage int64 `json:"caas_container_count_usage"`
	// mCPU count for containers limit
	CaasCPUCountLimit int64 `json:"caas_cpu_count_limit"`
	// mCPU count for containers usage
	CaasCPUCountUsage int64 `json:"caas_cpu_count_usage"`
	// Containers gpu count limit
	CaasGPUCountLimit int64 `json:"caas_gpu_count_limit"`
	// Containers gpu count usage
	CaasGPUCountUsage int64 `json:"caas_gpu_count_usage"`
	// MB memory count for containers limit
	CaasRamSizeLimit int64 `json:"caas_ram_size_limit"`
	// MB memory count for containers usage
	CaasRamSizeUsage int64 `json:"caas_ram_size_usage"`
	// K8s clusters count limit
	ClusterCountLimit int64 `json:"cluster_count_limit"`
	// K8s clusters count usage
	ClusterCountUsage int64 `json:"cluster_count_usage"`
	// vCPU Count limit
	CPUCountLimit int64 `json:"cpu_count_limit"`
	// vCPU Count usage
	CPUCountUsage int64 `json:"cpu_count_usage"`
	// DBaaS cluster count limit
	DbaasPostgresClusterCountLimit int64 `json:"dbaas_postgres_cluster_count_limit"`
	// DBaaS cluster count usage
	DbaasPostgresClusterCountUsage int64 `json:"dbaas_postgres_cluster_count_usage"`
	// External IP Count limit
	ExternalIPCountLimit int64 `json:"external_ip_count_limit"`
	// External IP Count usage
	ExternalIPCountUsage int64 `json:"external_ip_count_usage"`
	// mCPU count for functions limit
	FaasCPUCountLimit int64 `json:"faas_cpu_count_limit"`
	// mCPU count for functions usage
	FaasCPUCountUsage int64 `json:"faas_cpu_count_usage"`
	// Functions count limit
	FaasFunctionCountLimit int64 `json:"faas_function_count_limit"`
	// Functions count usage
	FaasFunctionCountUsage int64 `json:"faas_function_count_usage"`
	// Functions namespace count limit
	FaasNamespaceCountLimit int64 `json:"faas_namespace_count_limit"`
	// Functions namespace count usage
	FaasNamespaceCountUsage int64 `json:"faas_namespace_count_usage"`
	// MB memory count for functions limit
	FaasRamSizeLimit int64 `json:"faas_ram_size_limit"`
	// MB memory count for functions usage
	FaasRamSizeUsage int64 `json:"faas_ram_size_usage"`
	// Firewalls Count limit
	FirewallCountLimit int64 `json:"firewall_count_limit"`
	// Firewalls Count usage
	FirewallCountUsage int64 `json:"firewall_count_usage"`
	// Floating IP Count limit
	FloatingCountLimit int64 `json:"floating_count_limit"`
	// Floating IP Count usage
	FloatingCountUsage int64 `json:"floating_count_usage"`
	// GPU Count limit
	GPUCountLimit int64 `json:"gpu_count_limit"`
	// GPU Count usage
	GPUCountUsage int64 `json:"gpu_count_usage"`
	// Virtual A100 GPU card count limit
	GPUVirtualA100CountLimit int64 `json:"gpu_virtual_a100_count_limit"`
	// Virtual A100 GPU card count usage
	GPUVirtualA100CountUsage int64 `json:"gpu_virtual_a100_count_usage"`
	// Virtual H100 GPU card count limit
	GPUVirtualH100CountLimit int64 `json:"gpu_virtual_h100_count_limit"`
	// Virtual H100 GPU card count usage
	GPUVirtualH100CountUsage int64 `json:"gpu_virtual_h100_count_usage"`
	// Virtual L40S GPU card count limit
	GPUVirtualL40sCountLimit int64 `json:"gpu_virtual_l40s_count_limit"`
	// Virtual L40S GPU card count usage
	GPUVirtualL40sCountUsage int64 `json:"gpu_virtual_l40s_count_usage"`
	// Images Count limit
	ImageCountLimit int64 `json:"image_count_limit"`
	// Images Count usage
	ImageCountUsage int64 `json:"image_count_usage"`
	// Images Size, GiB limit
	ImageSizeLimit int64 `json:"image_size_limit"`
	// Images Size, GiB usage
	ImageSizeUsage int64 `json:"image_size_usage"`
	// IPU Count limit
	IpuCountLimit int64 `json:"ipu_count_limit"`
	// IPU Count usage
	IpuCountUsage int64 `json:"ipu_count_usage"`
	// LaaS Topics Count limit
	LaasTopicCountLimit int64 `json:"laas_topic_count_limit"`
	// LaaS Topics Count usage
	LaasTopicCountUsage int64 `json:"laas_topic_count_usage"`
	// Load Balancers Count limit
	LoadbalancerCountLimit int64 `json:"loadbalancer_count_limit"`
	// Load Balancers Count usage
	LoadbalancerCountUsage int64 `json:"loadbalancer_count_usage"`
	// Networks Count limit
	NetworkCountLimit int64 `json:"network_count_limit"`
	// Networks Count usage
	NetworkCountUsage int64 `json:"network_count_usage"`
	// RAM Size, GiB limit
	RamLimit int64 `json:"ram_limit"`
	// RAM Size, GiB usage
	RamUsage int64 `json:"ram_usage"`
	// Region ID
	RegionID int64 `json:"region_id"`
	// Registries count limit
	RegistryCountLimit int64 `json:"registry_count_limit"`
	// Registries count usage
	RegistryCountUsage int64 `json:"registry_count_usage"`
	// Registries volume usage, GiB limit
	RegistryStorageLimit int64 `json:"registry_storage_limit"`
	// Registries volume usage, GiB usage
	RegistryStorageUsage int64 `json:"registry_storage_usage"`
	// Routers Count limit
	RouterCountLimit int64 `json:"router_count_limit"`
	// Routers Count usage
	RouterCountUsage int64 `json:"router_count_usage"`
	// Secret Count limit
	SecretCountLimit int64 `json:"secret_count_limit"`
	// Secret Count usage
	SecretCountUsage int64 `json:"secret_count_usage"`
	// Placement Group Count limit
	ServergroupCountLimit int64 `json:"servergroup_count_limit"`
	// Placement Group Count usage
	ServergroupCountUsage int64 `json:"servergroup_count_usage"`
	// Shared file system Count limit
	SfsCountLimit int64 `json:"sfs_count_limit"`
	// Shared file system Count usage
	SfsCountUsage int64 `json:"sfs_count_usage"`
	// Shared file system Size, GiB limit
	SfsSizeLimit int64 `json:"sfs_size_limit"`
	// Shared file system Size, GiB usage
	SfsSizeUsage int64 `json:"sfs_size_usage"`
	// Basic VMs Count limit
	SharedVmCountLimit int64 `json:"shared_vm_count_limit"`
	// Basic VMs Count usage
	SharedVmCountUsage int64 `json:"shared_vm_count_usage"`
	// Snapshot Schedules Count limit
	SnapshotScheduleCountLimit int64 `json:"snapshot_schedule_count_limit"`
	// Snapshot Schedules Count usage
	SnapshotScheduleCountUsage int64 `json:"snapshot_schedule_count_usage"`
	// Subnets Count limit
	SubnetCountLimit int64 `json:"subnet_count_limit"`
	// Subnets Count usage
	SubnetCountUsage int64 `json:"subnet_count_usage"`
	// Instances Dedicated Count limit
	VmCountLimit int64 `json:"vm_count_limit"`
	// Instances Dedicated Count usage
	VmCountUsage int64 `json:"vm_count_usage"`
	// Volumes Count limit
	VolumeCountLimit int64 `json:"volume_count_limit"`
	// Volumes Count usage
	VolumeCountUsage int64 `json:"volume_count_usage"`
	// Volumes Size, GiB limit
	VolumeSizeLimit int64 `json:"volume_size_limit"`
	// Volumes Size, GiB usage
	VolumeSizeUsage int64 `json:"volume_size_usage"`
	// Snapshots Count limit
	VolumeSnapshotsCountLimit int64 `json:"volume_snapshots_count_limit"`
	// Snapshots Count usage
	VolumeSnapshotsCountUsage int64 `json:"volume_snapshots_count_usage"`
	// Snapshots Size, GiB limit
	VolumeSnapshotsSizeLimit int64 `json:"volume_snapshots_size_limit"`
	// Snapshots Size, GiB usage
	VolumeSnapshotsSizeUsage int64 `json:"volume_snapshots_size_usage"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		BaremetalBasicCountLimit          respjson.Field
		BaremetalBasicCountUsage          respjson.Field
		BaremetalGPUCountLimit            respjson.Field
		BaremetalGPUCountUsage            respjson.Field
		BaremetalHfCountLimit             respjson.Field
		BaremetalHfCountUsage             respjson.Field
		BaremetalInfrastructureCountLimit respjson.Field
		BaremetalInfrastructureCountUsage respjson.Field
		BaremetalNetworkCountLimit        respjson.Field
		BaremetalNetworkCountUsage        respjson.Field
		BaremetalStorageCountLimit        respjson.Field
		BaremetalStorageCountUsage        respjson.Field
		CaasContainerCountLimit           respjson.Field
		CaasContainerCountUsage           respjson.Field
		CaasCPUCountLimit                 respjson.Field
		CaasCPUCountUsage                 respjson.Field
		CaasGPUCountLimit                 respjson.Field
		CaasGPUCountUsage                 respjson.Field
		CaasRamSizeLimit                  respjson.Field
		CaasRamSizeUsage                  respjson.Field
		ClusterCountLimit                 respjson.Field
		ClusterCountUsage                 respjson.Field
		CPUCountLimit                     respjson.Field
		CPUCountUsage                     respjson.Field
		DbaasPostgresClusterCountLimit    respjson.Field
		DbaasPostgresClusterCountUsage    respjson.Field
		ExternalIPCountLimit              respjson.Field
		ExternalIPCountUsage              respjson.Field
		FaasCPUCountLimit                 respjson.Field
		FaasCPUCountUsage                 respjson.Field
		FaasFunctionCountLimit            respjson.Field
		FaasFunctionCountUsage            respjson.Field
		FaasNamespaceCountLimit           respjson.Field
		FaasNamespaceCountUsage           respjson.Field
		FaasRamSizeLimit                  respjson.Field
		FaasRamSizeUsage                  respjson.Field
		FirewallCountLimit                respjson.Field
		FirewallCountUsage                respjson.Field
		FloatingCountLimit                respjson.Field
		FloatingCountUsage                respjson.Field
		GPUCountLimit                     respjson.Field
		GPUCountUsage                     respjson.Field
		GPUVirtualA100CountLimit          respjson.Field
		GPUVirtualA100CountUsage          respjson.Field
		GPUVirtualH100CountLimit          respjson.Field
		GPUVirtualH100CountUsage          respjson.Field
		GPUVirtualL40sCountLimit          respjson.Field
		GPUVirtualL40sCountUsage          respjson.Field
		ImageCountLimit                   respjson.Field
		ImageCountUsage                   respjson.Field
		ImageSizeLimit                    respjson.Field
		ImageSizeUsage                    respjson.Field
		IpuCountLimit                     respjson.Field
		IpuCountUsage                     respjson.Field
		LaasTopicCountLimit               respjson.Field
		LaasTopicCountUsage               respjson.Field
		LoadbalancerCountLimit            respjson.Field
		LoadbalancerCountUsage            respjson.Field
		NetworkCountLimit                 respjson.Field
		NetworkCountUsage                 respjson.Field
		RamLimit                          respjson.Field
		RamUsage                          respjson.Field
		RegionID                          respjson.Field
		RegistryCountLimit                respjson.Field
		RegistryCountUsage                respjson.Field
		RegistryStorageLimit              respjson.Field
		RegistryStorageUsage              respjson.Field
		RouterCountLimit                  respjson.Field
		RouterCountUsage                  respjson.Field
		SecretCountLimit                  respjson.Field
		SecretCountUsage                  respjson.Field
		ServergroupCountLimit             respjson.Field
		ServergroupCountUsage             respjson.Field
		SfsCountLimit                     respjson.Field
		SfsCountUsage                     respjson.Field
		SfsSizeLimit                      respjson.Field
		SfsSizeUsage                      respjson.Field
		SharedVmCountLimit                respjson.Field
		SharedVmCountUsage                respjson.Field
		SnapshotScheduleCountLimit        respjson.Field
		SnapshotScheduleCountUsage        respjson.Field
		SubnetCountLimit                  respjson.Field
		SubnetCountUsage                  respjson.Field
		VmCountLimit                      respjson.Field
		VmCountUsage                      respjson.Field
		VolumeCountLimit                  respjson.Field
		VolumeCountUsage                  respjson.Field
		VolumeSizeLimit                   respjson.Field
		VolumeSizeUsage                   respjson.Field
		VolumeSnapshotsCountLimit         respjson.Field
		VolumeSnapshotsCountUsage         respjson.Field
		VolumeSnapshotsSizeLimit          respjson.Field
		VolumeSnapshotsSizeUsage          respjson.Field
		ExtraFields                       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (QuotaGetAllResponseRegionalQuota) RawJSON

Returns the unmodified JSON received from the API

func (*QuotaGetAllResponseRegionalQuota) UnmarshalJSON

func (r *QuotaGetAllResponseRegionalQuota) UnmarshalJSON(data []byte) error

type QuotaGetByRegionParams

type QuotaGetByRegionParams struct {
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Client ID
	ClientID int64 `path:"client_id,required" json:"-"`
	// contains filtered or unexported fields
}

type QuotaGetByRegionResponse

type QuotaGetByRegionResponse struct {
	// Basic bare metal servers count limit
	BaremetalBasicCountLimit int64 `json:"baremetal_basic_count_limit"`
	// Basic bare metal servers count usage
	BaremetalBasicCountUsage int64 `json:"baremetal_basic_count_usage"`
	// AI GPU bare metal servers count limit
	BaremetalGPUCountLimit int64 `json:"baremetal_gpu_count_limit"`
	// AI GPU bare metal servers count usage
	BaremetalGPUCountUsage int64 `json:"baremetal_gpu_count_usage"`
	// High-frequency bare metal servers count limit
	BaremetalHfCountLimit int64 `json:"baremetal_hf_count_limit"`
	// High-frequency bare metal servers count usage
	BaremetalHfCountUsage int64 `json:"baremetal_hf_count_usage"`
	// Infrastructure bare metal servers count limit
	BaremetalInfrastructureCountLimit int64 `json:"baremetal_infrastructure_count_limit"`
	// Infrastructure bare metal servers count usage
	BaremetalInfrastructureCountUsage int64 `json:"baremetal_infrastructure_count_usage"`
	// Bare metal Network Count limit
	BaremetalNetworkCountLimit int64 `json:"baremetal_network_count_limit"`
	// Bare metal Network Count usage
	BaremetalNetworkCountUsage int64 `json:"baremetal_network_count_usage"`
	// Storage bare metal servers count limit
	BaremetalStorageCountLimit int64 `json:"baremetal_storage_count_limit"`
	// Storage bare metal servers count usage
	BaremetalStorageCountUsage int64 `json:"baremetal_storage_count_usage"`
	// Containers count limit
	CaasContainerCountLimit int64 `json:"caas_container_count_limit"`
	// Containers count usage
	CaasContainerCountUsage int64 `json:"caas_container_count_usage"`
	// mCPU count for containers limit
	CaasCPUCountLimit int64 `json:"caas_cpu_count_limit"`
	// mCPU count for containers usage
	CaasCPUCountUsage int64 `json:"caas_cpu_count_usage"`
	// Containers gpu count limit
	CaasGPUCountLimit int64 `json:"caas_gpu_count_limit"`
	// Containers gpu count usage
	CaasGPUCountUsage int64 `json:"caas_gpu_count_usage"`
	// MB memory count for containers limit
	CaasRamSizeLimit int64 `json:"caas_ram_size_limit"`
	// MB memory count for containers usage
	CaasRamSizeUsage int64 `json:"caas_ram_size_usage"`
	// K8s clusters count limit
	ClusterCountLimit int64 `json:"cluster_count_limit"`
	// K8s clusters count usage
	ClusterCountUsage int64 `json:"cluster_count_usage"`
	// vCPU Count limit
	CPUCountLimit int64 `json:"cpu_count_limit"`
	// vCPU Count usage
	CPUCountUsage int64 `json:"cpu_count_usage"`
	// DBaaS cluster count limit
	DbaasPostgresClusterCountLimit int64 `json:"dbaas_postgres_cluster_count_limit"`
	// DBaaS cluster count usage
	DbaasPostgresClusterCountUsage int64 `json:"dbaas_postgres_cluster_count_usage"`
	// External IP Count limit
	ExternalIPCountLimit int64 `json:"external_ip_count_limit"`
	// External IP Count usage
	ExternalIPCountUsage int64 `json:"external_ip_count_usage"`
	// mCPU count for functions limit
	FaasCPUCountLimit int64 `json:"faas_cpu_count_limit"`
	// mCPU count for functions usage
	FaasCPUCountUsage int64 `json:"faas_cpu_count_usage"`
	// Functions count limit
	FaasFunctionCountLimit int64 `json:"faas_function_count_limit"`
	// Functions count usage
	FaasFunctionCountUsage int64 `json:"faas_function_count_usage"`
	// Functions namespace count limit
	FaasNamespaceCountLimit int64 `json:"faas_namespace_count_limit"`
	// Functions namespace count usage
	FaasNamespaceCountUsage int64 `json:"faas_namespace_count_usage"`
	// MB memory count for functions limit
	FaasRamSizeLimit int64 `json:"faas_ram_size_limit"`
	// MB memory count for functions usage
	FaasRamSizeUsage int64 `json:"faas_ram_size_usage"`
	// Firewalls Count limit
	FirewallCountLimit int64 `json:"firewall_count_limit"`
	// Firewalls Count usage
	FirewallCountUsage int64 `json:"firewall_count_usage"`
	// Floating IP Count limit
	FloatingCountLimit int64 `json:"floating_count_limit"`
	// Floating IP Count usage
	FloatingCountUsage int64 `json:"floating_count_usage"`
	// GPU Count limit
	GPUCountLimit int64 `json:"gpu_count_limit"`
	// GPU Count usage
	GPUCountUsage int64 `json:"gpu_count_usage"`
	// Virtual A100 GPU card count limit
	GPUVirtualA100CountLimit int64 `json:"gpu_virtual_a100_count_limit"`
	// Virtual A100 GPU card count usage
	GPUVirtualA100CountUsage int64 `json:"gpu_virtual_a100_count_usage"`
	// Virtual H100 GPU card count limit
	GPUVirtualH100CountLimit int64 `json:"gpu_virtual_h100_count_limit"`
	// Virtual H100 GPU card count usage
	GPUVirtualH100CountUsage int64 `json:"gpu_virtual_h100_count_usage"`
	// Virtual L40S GPU card count limit
	GPUVirtualL40sCountLimit int64 `json:"gpu_virtual_l40s_count_limit"`
	// Virtual L40S GPU card count usage
	GPUVirtualL40sCountUsage int64 `json:"gpu_virtual_l40s_count_usage"`
	// Images Count limit
	ImageCountLimit int64 `json:"image_count_limit"`
	// Images Count usage
	ImageCountUsage int64 `json:"image_count_usage"`
	// Images Size, GiB limit
	ImageSizeLimit int64 `json:"image_size_limit"`
	// Images Size, GiB usage
	ImageSizeUsage int64 `json:"image_size_usage"`
	// IPU Count limit
	IpuCountLimit int64 `json:"ipu_count_limit"`
	// IPU Count usage
	IpuCountUsage int64 `json:"ipu_count_usage"`
	// LaaS Topics Count limit
	LaasTopicCountLimit int64 `json:"laas_topic_count_limit"`
	// LaaS Topics Count usage
	LaasTopicCountUsage int64 `json:"laas_topic_count_usage"`
	// Load Balancers Count limit
	LoadbalancerCountLimit int64 `json:"loadbalancer_count_limit"`
	// Load Balancers Count usage
	LoadbalancerCountUsage int64 `json:"loadbalancer_count_usage"`
	// Networks Count limit
	NetworkCountLimit int64 `json:"network_count_limit"`
	// Networks Count usage
	NetworkCountUsage int64 `json:"network_count_usage"`
	// RAM Size, GiB limit
	RamLimit int64 `json:"ram_limit"`
	// RAM Size, GiB usage
	RamUsage int64 `json:"ram_usage"`
	// Region ID
	RegionID int64 `json:"region_id"`
	// Registries count limit
	RegistryCountLimit int64 `json:"registry_count_limit"`
	// Registries count usage
	RegistryCountUsage int64 `json:"registry_count_usage"`
	// Registries volume usage, GiB limit
	RegistryStorageLimit int64 `json:"registry_storage_limit"`
	// Registries volume usage, GiB usage
	RegistryStorageUsage int64 `json:"registry_storage_usage"`
	// Routers Count limit
	RouterCountLimit int64 `json:"router_count_limit"`
	// Routers Count usage
	RouterCountUsage int64 `json:"router_count_usage"`
	// Secret Count limit
	SecretCountLimit int64 `json:"secret_count_limit"`
	// Secret Count usage
	SecretCountUsage int64 `json:"secret_count_usage"`
	// Placement Group Count limit
	ServergroupCountLimit int64 `json:"servergroup_count_limit"`
	// Placement Group Count usage
	ServergroupCountUsage int64 `json:"servergroup_count_usage"`
	// Shared file system Count limit
	SfsCountLimit int64 `json:"sfs_count_limit"`
	// Shared file system Count usage
	SfsCountUsage int64 `json:"sfs_count_usage"`
	// Shared file system Size, GiB limit
	SfsSizeLimit int64 `json:"sfs_size_limit"`
	// Shared file system Size, GiB usage
	SfsSizeUsage int64 `json:"sfs_size_usage"`
	// Basic VMs Count limit
	SharedVmCountLimit int64 `json:"shared_vm_count_limit"`
	// Basic VMs Count usage
	SharedVmCountUsage int64 `json:"shared_vm_count_usage"`
	// Snapshot Schedules Count limit
	SnapshotScheduleCountLimit int64 `json:"snapshot_schedule_count_limit"`
	// Snapshot Schedules Count usage
	SnapshotScheduleCountUsage int64 `json:"snapshot_schedule_count_usage"`
	// Subnets Count limit
	SubnetCountLimit int64 `json:"subnet_count_limit"`
	// Subnets Count usage
	SubnetCountUsage int64 `json:"subnet_count_usage"`
	// Instances Dedicated Count limit
	VmCountLimit int64 `json:"vm_count_limit"`
	// Instances Dedicated Count usage
	VmCountUsage int64 `json:"vm_count_usage"`
	// Volumes Count limit
	VolumeCountLimit int64 `json:"volume_count_limit"`
	// Volumes Count usage
	VolumeCountUsage int64 `json:"volume_count_usage"`
	// Volumes Size, GiB limit
	VolumeSizeLimit int64 `json:"volume_size_limit"`
	// Volumes Size, GiB usage
	VolumeSizeUsage int64 `json:"volume_size_usage"`
	// Snapshots Count limit
	VolumeSnapshotsCountLimit int64 `json:"volume_snapshots_count_limit"`
	// Snapshots Count usage
	VolumeSnapshotsCountUsage int64 `json:"volume_snapshots_count_usage"`
	// Snapshots Size, GiB limit
	VolumeSnapshotsSizeLimit int64 `json:"volume_snapshots_size_limit"`
	// Snapshots Size, GiB usage
	VolumeSnapshotsSizeUsage int64 `json:"volume_snapshots_size_usage"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		BaremetalBasicCountLimit          respjson.Field
		BaremetalBasicCountUsage          respjson.Field
		BaremetalGPUCountLimit            respjson.Field
		BaremetalGPUCountUsage            respjson.Field
		BaremetalHfCountLimit             respjson.Field
		BaremetalHfCountUsage             respjson.Field
		BaremetalInfrastructureCountLimit respjson.Field
		BaremetalInfrastructureCountUsage respjson.Field
		BaremetalNetworkCountLimit        respjson.Field
		BaremetalNetworkCountUsage        respjson.Field
		BaremetalStorageCountLimit        respjson.Field
		BaremetalStorageCountUsage        respjson.Field
		CaasContainerCountLimit           respjson.Field
		CaasContainerCountUsage           respjson.Field
		CaasCPUCountLimit                 respjson.Field
		CaasCPUCountUsage                 respjson.Field
		CaasGPUCountLimit                 respjson.Field
		CaasGPUCountUsage                 respjson.Field
		CaasRamSizeLimit                  respjson.Field
		CaasRamSizeUsage                  respjson.Field
		ClusterCountLimit                 respjson.Field
		ClusterCountUsage                 respjson.Field
		CPUCountLimit                     respjson.Field
		CPUCountUsage                     respjson.Field
		DbaasPostgresClusterCountLimit    respjson.Field
		DbaasPostgresClusterCountUsage    respjson.Field
		ExternalIPCountLimit              respjson.Field
		ExternalIPCountUsage              respjson.Field
		FaasCPUCountLimit                 respjson.Field
		FaasCPUCountUsage                 respjson.Field
		FaasFunctionCountLimit            respjson.Field
		FaasFunctionCountUsage            respjson.Field
		FaasNamespaceCountLimit           respjson.Field
		FaasNamespaceCountUsage           respjson.Field
		FaasRamSizeLimit                  respjson.Field
		FaasRamSizeUsage                  respjson.Field
		FirewallCountLimit                respjson.Field
		FirewallCountUsage                respjson.Field
		FloatingCountLimit                respjson.Field
		FloatingCountUsage                respjson.Field
		GPUCountLimit                     respjson.Field
		GPUCountUsage                     respjson.Field
		GPUVirtualA100CountLimit          respjson.Field
		GPUVirtualA100CountUsage          respjson.Field
		GPUVirtualH100CountLimit          respjson.Field
		GPUVirtualH100CountUsage          respjson.Field
		GPUVirtualL40sCountLimit          respjson.Field
		GPUVirtualL40sCountUsage          respjson.Field
		ImageCountLimit                   respjson.Field
		ImageCountUsage                   respjson.Field
		ImageSizeLimit                    respjson.Field
		ImageSizeUsage                    respjson.Field
		IpuCountLimit                     respjson.Field
		IpuCountUsage                     respjson.Field
		LaasTopicCountLimit               respjson.Field
		LaasTopicCountUsage               respjson.Field
		LoadbalancerCountLimit            respjson.Field
		LoadbalancerCountUsage            respjson.Field
		NetworkCountLimit                 respjson.Field
		NetworkCountUsage                 respjson.Field
		RamLimit                          respjson.Field
		RamUsage                          respjson.Field
		RegionID                          respjson.Field
		RegistryCountLimit                respjson.Field
		RegistryCountUsage                respjson.Field
		RegistryStorageLimit              respjson.Field
		RegistryStorageUsage              respjson.Field
		RouterCountLimit                  respjson.Field
		RouterCountUsage                  respjson.Field
		SecretCountLimit                  respjson.Field
		SecretCountUsage                  respjson.Field
		ServergroupCountLimit             respjson.Field
		ServergroupCountUsage             respjson.Field
		SfsCountLimit                     respjson.Field
		SfsCountUsage                     respjson.Field
		SfsSizeLimit                      respjson.Field
		SfsSizeUsage                      respjson.Field
		SharedVmCountLimit                respjson.Field
		SharedVmCountUsage                respjson.Field
		SnapshotScheduleCountLimit        respjson.Field
		SnapshotScheduleCountUsage        respjson.Field
		SubnetCountLimit                  respjson.Field
		SubnetCountUsage                  respjson.Field
		VmCountLimit                      respjson.Field
		VmCountUsage                      respjson.Field
		VolumeCountLimit                  respjson.Field
		VolumeCountUsage                  respjson.Field
		VolumeSizeLimit                   respjson.Field
		VolumeSizeUsage                   respjson.Field
		VolumeSnapshotsCountLimit         respjson.Field
		VolumeSnapshotsCountUsage         respjson.Field
		VolumeSnapshotsSizeLimit          respjson.Field
		VolumeSnapshotsSizeUsage          respjson.Field
		ExtraFields                       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (QuotaGetByRegionResponse) RawJSON

func (r QuotaGetByRegionResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*QuotaGetByRegionResponse) UnmarshalJSON

func (r *QuotaGetByRegionResponse) UnmarshalJSON(data []byte) error

type QuotaGetGlobalResponse

type QuotaGetGlobalResponse struct {
	// Inference CPU millicore count limit
	InferenceCPUMillicoreCountLimit int64 `json:"inference_cpu_millicore_count_limit"`
	// Inference CPU millicore count usage
	InferenceCPUMillicoreCountUsage int64 `json:"inference_cpu_millicore_count_usage"`
	// Inference GPU A100 Count limit
	InferenceGPUA100CountLimit int64 `json:"inference_gpu_a100_count_limit"`
	// Inference GPU A100 Count usage
	InferenceGPUA100CountUsage int64 `json:"inference_gpu_a100_count_usage"`
	// Inference GPU H100 Count limit
	InferenceGPUH100CountLimit int64 `json:"inference_gpu_h100_count_limit"`
	// Inference GPU H100 Count usage
	InferenceGPUH100CountUsage int64 `json:"inference_gpu_h100_count_usage"`
	// Inference GPU L40s Count limit
	InferenceGPUL40sCountLimit int64 `json:"inference_gpu_l40s_count_limit"`
	// Inference GPU L40s Count usage
	InferenceGPUL40sCountUsage int64 `json:"inference_gpu_l40s_count_usage"`
	// Inference instance count limit
	InferenceInstanceCountLimit int64 `json:"inference_instance_count_limit"`
	// Inference instance count usage
	InferenceInstanceCountUsage int64 `json:"inference_instance_count_usage"`
	// SSH Keys Count limit
	KeypairCountLimit int64 `json:"keypair_count_limit"`
	// SSH Keys Count usage
	KeypairCountUsage int64 `json:"keypair_count_usage"`
	// Projects Count limit
	ProjectCountLimit int64 `json:"project_count_limit"`
	// Projects Count usage
	ProjectCountUsage int64 `json:"project_count_usage"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		InferenceCPUMillicoreCountLimit respjson.Field
		InferenceCPUMillicoreCountUsage respjson.Field
		InferenceGPUA100CountLimit      respjson.Field
		InferenceGPUA100CountUsage      respjson.Field
		InferenceGPUH100CountLimit      respjson.Field
		InferenceGPUH100CountUsage      respjson.Field
		InferenceGPUL40sCountLimit      respjson.Field
		InferenceGPUL40sCountUsage      respjson.Field
		InferenceInstanceCountLimit     respjson.Field
		InferenceInstanceCountUsage     respjson.Field
		KeypairCountLimit               respjson.Field
		KeypairCountUsage               respjson.Field
		ProjectCountLimit               respjson.Field
		ProjectCountUsage               respjson.Field
		ExtraFields                     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (QuotaGetGlobalResponse) RawJSON

func (r QuotaGetGlobalResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*QuotaGetGlobalResponse) UnmarshalJSON

func (r *QuotaGetGlobalResponse) UnmarshalJSON(data []byte) error

type QuotaRequestGetResponse

type QuotaRequestGetResponse struct {
	// Request ID
	ID int64 `json:"id,required"`
	// Client ID
	ClientID int64 `json:"client_id,required"`
	// Requested limits.
	RequestedLimits QuotaRequestGetResponseRequestedLimits `json:"requested_limits,required"`
	// Request status
	Status string `json:"status,required"`
	// Datetime when the request was created.
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Describe the reason, in general terms.
	Description string `json:"description,nullable"`
	// Datetime when the request was updated.
	UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		ClientID        respjson.Field
		RequestedLimits respjson.Field
		Status          respjson.Field
		CreatedAt       respjson.Field
		Description     respjson.Field
		UpdatedAt       respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (QuotaRequestGetResponse) RawJSON

func (r QuotaRequestGetResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*QuotaRequestGetResponse) UnmarshalJSON

func (r *QuotaRequestGetResponse) UnmarshalJSON(data []byte) error

type QuotaRequestGetResponseRequestedLimits

type QuotaRequestGetResponseRequestedLimits struct {
	// Global entity quota limits
	GlobalLimits QuotaRequestGetResponseRequestedLimitsGlobalLimits `json:"global_limits"`
	// Regions and their quota limits
	RegionalLimits []QuotaRequestGetResponseRequestedLimitsRegionalLimit `json:"regional_limits"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		GlobalLimits   respjson.Field
		RegionalLimits respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Requested limits.

func (QuotaRequestGetResponseRequestedLimits) RawJSON

Returns the unmodified JSON received from the API

func (*QuotaRequestGetResponseRequestedLimits) UnmarshalJSON

func (r *QuotaRequestGetResponseRequestedLimits) UnmarshalJSON(data []byte) error

type QuotaRequestGetResponseRequestedLimitsGlobalLimits

type QuotaRequestGetResponseRequestedLimitsGlobalLimits struct {
	// Inference CPU millicore count limit
	InferenceCPUMillicoreCountLimit int64 `json:"inference_cpu_millicore_count_limit"`
	// Inference GPU A100 Count limit
	InferenceGPUA100CountLimit int64 `json:"inference_gpu_a100_count_limit"`
	// Inference GPU H100 Count limit
	InferenceGPUH100CountLimit int64 `json:"inference_gpu_h100_count_limit"`
	// Inference GPU L40s Count limit
	InferenceGPUL40sCountLimit int64 `json:"inference_gpu_l40s_count_limit"`
	// Inference instance count limit
	InferenceInstanceCountLimit int64 `json:"inference_instance_count_limit"`
	// SSH Keys Count limit
	KeypairCountLimit int64 `json:"keypair_count_limit"`
	// Projects Count limit
	ProjectCountLimit int64 `json:"project_count_limit"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		InferenceCPUMillicoreCountLimit respjson.Field
		InferenceGPUA100CountLimit      respjson.Field
		InferenceGPUH100CountLimit      respjson.Field
		InferenceGPUL40sCountLimit      respjson.Field
		InferenceInstanceCountLimit     respjson.Field
		KeypairCountLimit               respjson.Field
		ProjectCountLimit               respjson.Field
		ExtraFields                     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Global entity quota limits

func (QuotaRequestGetResponseRequestedLimitsGlobalLimits) RawJSON

Returns the unmodified JSON received from the API

func (*QuotaRequestGetResponseRequestedLimitsGlobalLimits) UnmarshalJSON

type QuotaRequestGetResponseRequestedLimitsRegionalLimit

type QuotaRequestGetResponseRequestedLimitsRegionalLimit struct {
	// Basic bare metal servers count limit
	BaremetalBasicCountLimit int64 `json:"baremetal_basic_count_limit"`
	// AI GPU bare metal servers count limit
	BaremetalGPUCountLimit int64 `json:"baremetal_gpu_count_limit"`
	// High-frequency bare metal servers count limit
	BaremetalHfCountLimit int64 `json:"baremetal_hf_count_limit"`
	// Infrastructure bare metal servers count limit
	BaremetalInfrastructureCountLimit int64 `json:"baremetal_infrastructure_count_limit"`
	// Bare metal Network Count limit
	BaremetalNetworkCountLimit int64 `json:"baremetal_network_count_limit"`
	// Storage bare metal servers count limit
	BaremetalStorageCountLimit int64 `json:"baremetal_storage_count_limit"`
	// Containers count limit
	CaasContainerCountLimit int64 `json:"caas_container_count_limit"`
	// mCPU count for containers limit
	CaasCPUCountLimit int64 `json:"caas_cpu_count_limit"`
	// Containers gpu count limit
	CaasGPUCountLimit int64 `json:"caas_gpu_count_limit"`
	// MB memory count for containers limit
	CaasRamSizeLimit int64 `json:"caas_ram_size_limit"`
	// K8s clusters count limit
	ClusterCountLimit int64 `json:"cluster_count_limit"`
	// vCPU Count limit
	CPUCountLimit int64 `json:"cpu_count_limit"`
	// DBaaS cluster count limit
	DbaasPostgresClusterCountLimit int64 `json:"dbaas_postgres_cluster_count_limit"`
	// External IP Count limit
	ExternalIPCountLimit int64 `json:"external_ip_count_limit"`
	// mCPU count for functions limit
	FaasCPUCountLimit int64 `json:"faas_cpu_count_limit"`
	// Functions count limit
	FaasFunctionCountLimit int64 `json:"faas_function_count_limit"`
	// Functions namespace count limit
	FaasNamespaceCountLimit int64 `json:"faas_namespace_count_limit"`
	// MB memory count for functions limit
	FaasRamSizeLimit int64 `json:"faas_ram_size_limit"`
	// Firewalls Count limit
	FirewallCountLimit int64 `json:"firewall_count_limit"`
	// Floating IP Count limit
	FloatingCountLimit int64 `json:"floating_count_limit"`
	// GPU Count limit
	GPUCountLimit int64 `json:"gpu_count_limit"`
	// Virtual A100 GPU card count limit
	GPUVirtualA100CountLimit int64 `json:"gpu_virtual_a100_count_limit"`
	// Virtual H100 GPU card count limit
	GPUVirtualH100CountLimit int64 `json:"gpu_virtual_h100_count_limit"`
	// Virtual L40S GPU card count limit
	GPUVirtualL40sCountLimit int64 `json:"gpu_virtual_l40s_count_limit"`
	// Images Count limit
	ImageCountLimit int64 `json:"image_count_limit"`
	// Images Size, GiB limit
	ImageSizeLimit int64 `json:"image_size_limit"`
	// IPU Count limit
	IpuCountLimit int64 `json:"ipu_count_limit"`
	// LaaS Topics Count limit
	LaasTopicCountLimit int64 `json:"laas_topic_count_limit"`
	// Load Balancers Count limit
	LoadbalancerCountLimit int64 `json:"loadbalancer_count_limit"`
	// Networks Count limit
	NetworkCountLimit int64 `json:"network_count_limit"`
	// RAM Size, GiB limit
	RamLimit int64 `json:"ram_limit"`
	// Region ID
	RegionID int64 `json:"region_id"`
	// Registries count limit
	RegistryCountLimit int64 `json:"registry_count_limit"`
	// Registries volume usage, GiB limit
	RegistryStorageLimit int64 `json:"registry_storage_limit"`
	// Routers Count limit
	RouterCountLimit int64 `json:"router_count_limit"`
	// Secret Count limit
	SecretCountLimit int64 `json:"secret_count_limit"`
	// Placement Group Count limit
	ServergroupCountLimit int64 `json:"servergroup_count_limit"`
	// Shared file system Count limit
	SfsCountLimit int64 `json:"sfs_count_limit"`
	// Shared file system Size, GiB limit
	SfsSizeLimit int64 `json:"sfs_size_limit"`
	// Basic VMs Count limit
	SharedVmCountLimit int64 `json:"shared_vm_count_limit"`
	// Snapshot Schedules Count limit
	SnapshotScheduleCountLimit int64 `json:"snapshot_schedule_count_limit"`
	// Subnets Count limit
	SubnetCountLimit int64 `json:"subnet_count_limit"`
	// Instances Dedicated Count limit
	VmCountLimit int64 `json:"vm_count_limit"`
	// Volumes Count limit
	VolumeCountLimit int64 `json:"volume_count_limit"`
	// Volumes Size, GiB limit
	VolumeSizeLimit int64 `json:"volume_size_limit"`
	// Snapshots Count limit
	VolumeSnapshotsCountLimit int64 `json:"volume_snapshots_count_limit"`
	// Snapshots Size, GiB limit
	VolumeSnapshotsSizeLimit int64 `json:"volume_snapshots_size_limit"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		BaremetalBasicCountLimit          respjson.Field
		BaremetalGPUCountLimit            respjson.Field
		BaremetalHfCountLimit             respjson.Field
		BaremetalInfrastructureCountLimit respjson.Field
		BaremetalNetworkCountLimit        respjson.Field
		BaremetalStorageCountLimit        respjson.Field
		CaasContainerCountLimit           respjson.Field
		CaasCPUCountLimit                 respjson.Field
		CaasGPUCountLimit                 respjson.Field
		CaasRamSizeLimit                  respjson.Field
		ClusterCountLimit                 respjson.Field
		CPUCountLimit                     respjson.Field
		DbaasPostgresClusterCountLimit    respjson.Field
		ExternalIPCountLimit              respjson.Field
		FaasCPUCountLimit                 respjson.Field
		FaasFunctionCountLimit            respjson.Field
		FaasNamespaceCountLimit           respjson.Field
		FaasRamSizeLimit                  respjson.Field
		FirewallCountLimit                respjson.Field
		FloatingCountLimit                respjson.Field
		GPUCountLimit                     respjson.Field
		GPUVirtualA100CountLimit          respjson.Field
		GPUVirtualH100CountLimit          respjson.Field
		GPUVirtualL40sCountLimit          respjson.Field
		ImageCountLimit                   respjson.Field
		ImageSizeLimit                    respjson.Field
		IpuCountLimit                     respjson.Field
		LaasTopicCountLimit               respjson.Field
		LoadbalancerCountLimit            respjson.Field
		NetworkCountLimit                 respjson.Field
		RamLimit                          respjson.Field
		RegionID                          respjson.Field
		RegistryCountLimit                respjson.Field
		RegistryStorageLimit              respjson.Field
		RouterCountLimit                  respjson.Field
		SecretCountLimit                  respjson.Field
		ServergroupCountLimit             respjson.Field
		SfsCountLimit                     respjson.Field
		SfsSizeLimit                      respjson.Field
		SharedVmCountLimit                respjson.Field
		SnapshotScheduleCountLimit        respjson.Field
		SubnetCountLimit                  respjson.Field
		VmCountLimit                      respjson.Field
		VolumeCountLimit                  respjson.Field
		VolumeSizeLimit                   respjson.Field
		VolumeSnapshotsCountLimit         respjson.Field
		VolumeSnapshotsSizeLimit          respjson.Field
		ExtraFields                       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (QuotaRequestGetResponseRequestedLimitsRegionalLimit) RawJSON

Returns the unmodified JSON received from the API

func (*QuotaRequestGetResponseRequestedLimitsRegionalLimit) UnmarshalJSON

type QuotaRequestListParams

type QuotaRequestListParams struct {
	// Optional. Limit the number of returned items
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Optional. Offset value is used to exclude the first set of records from the
	// result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// List of limit requests statuses for filtering
	//
	// Any of "done", "in progress", "rejected".
	Status []string `query:"status,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (QuotaRequestListParams) URLQuery

func (r QuotaRequestListParams) URLQuery() (v url.Values, err error)

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

type QuotaRequestListResponse

type QuotaRequestListResponse struct {
	// Request ID
	ID int64 `json:"id,required"`
	// Client ID
	ClientID int64 `json:"client_id,required"`
	// Requested limits.
	RequestedLimits QuotaRequestListResponseRequestedLimits `json:"requested_limits,required"`
	// Request status
	Status string `json:"status,required"`
	// Datetime when the request was created.
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// Describe the reason, in general terms.
	Description string `json:"description,nullable"`
	// Datetime when the request was updated.
	UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		ClientID        respjson.Field
		RequestedLimits respjson.Field
		Status          respjson.Field
		CreatedAt       respjson.Field
		Description     respjson.Field
		UpdatedAt       respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (QuotaRequestListResponse) RawJSON

func (r QuotaRequestListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*QuotaRequestListResponse) UnmarshalJSON

func (r *QuotaRequestListResponse) UnmarshalJSON(data []byte) error

type QuotaRequestListResponseRequestedLimits

type QuotaRequestListResponseRequestedLimits struct {
	// Global entity quota limits
	GlobalLimits QuotaRequestListResponseRequestedLimitsGlobalLimits `json:"global_limits"`
	// Regions and their quota limits
	RegionalLimits []QuotaRequestListResponseRequestedLimitsRegionalLimit `json:"regional_limits"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		GlobalLimits   respjson.Field
		RegionalLimits respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Requested limits.

func (QuotaRequestListResponseRequestedLimits) RawJSON

Returns the unmodified JSON received from the API

func (*QuotaRequestListResponseRequestedLimits) UnmarshalJSON

func (r *QuotaRequestListResponseRequestedLimits) UnmarshalJSON(data []byte) error

type QuotaRequestListResponseRequestedLimitsGlobalLimits

type QuotaRequestListResponseRequestedLimitsGlobalLimits struct {
	// Inference CPU millicore count limit
	InferenceCPUMillicoreCountLimit int64 `json:"inference_cpu_millicore_count_limit"`
	// Inference GPU A100 Count limit
	InferenceGPUA100CountLimit int64 `json:"inference_gpu_a100_count_limit"`
	// Inference GPU H100 Count limit
	InferenceGPUH100CountLimit int64 `json:"inference_gpu_h100_count_limit"`
	// Inference GPU L40s Count limit
	InferenceGPUL40sCountLimit int64 `json:"inference_gpu_l40s_count_limit"`
	// Inference instance count limit
	InferenceInstanceCountLimit int64 `json:"inference_instance_count_limit"`
	// SSH Keys Count limit
	KeypairCountLimit int64 `json:"keypair_count_limit"`
	// Projects Count limit
	ProjectCountLimit int64 `json:"project_count_limit"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		InferenceCPUMillicoreCountLimit respjson.Field
		InferenceGPUA100CountLimit      respjson.Field
		InferenceGPUH100CountLimit      respjson.Field
		InferenceGPUL40sCountLimit      respjson.Field
		InferenceInstanceCountLimit     respjson.Field
		KeypairCountLimit               respjson.Field
		ProjectCountLimit               respjson.Field
		ExtraFields                     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Global entity quota limits

func (QuotaRequestListResponseRequestedLimitsGlobalLimits) RawJSON

Returns the unmodified JSON received from the API

func (*QuotaRequestListResponseRequestedLimitsGlobalLimits) UnmarshalJSON

type QuotaRequestListResponseRequestedLimitsRegionalLimit

type QuotaRequestListResponseRequestedLimitsRegionalLimit struct {
	// Basic bare metal servers count limit
	BaremetalBasicCountLimit int64 `json:"baremetal_basic_count_limit"`
	// AI GPU bare metal servers count limit
	BaremetalGPUCountLimit int64 `json:"baremetal_gpu_count_limit"`
	// High-frequency bare metal servers count limit
	BaremetalHfCountLimit int64 `json:"baremetal_hf_count_limit"`
	// Infrastructure bare metal servers count limit
	BaremetalInfrastructureCountLimit int64 `json:"baremetal_infrastructure_count_limit"`
	// Bare metal Network Count limit
	BaremetalNetworkCountLimit int64 `json:"baremetal_network_count_limit"`
	// Storage bare metal servers count limit
	BaremetalStorageCountLimit int64 `json:"baremetal_storage_count_limit"`
	// Containers count limit
	CaasContainerCountLimit int64 `json:"caas_container_count_limit"`
	// mCPU count for containers limit
	CaasCPUCountLimit int64 `json:"caas_cpu_count_limit"`
	// Containers gpu count limit
	CaasGPUCountLimit int64 `json:"caas_gpu_count_limit"`
	// MB memory count for containers limit
	CaasRamSizeLimit int64 `json:"caas_ram_size_limit"`
	// K8s clusters count limit
	ClusterCountLimit int64 `json:"cluster_count_limit"`
	// vCPU Count limit
	CPUCountLimit int64 `json:"cpu_count_limit"`
	// DBaaS cluster count limit
	DbaasPostgresClusterCountLimit int64 `json:"dbaas_postgres_cluster_count_limit"`
	// External IP Count limit
	ExternalIPCountLimit int64 `json:"external_ip_count_limit"`
	// mCPU count for functions limit
	FaasCPUCountLimit int64 `json:"faas_cpu_count_limit"`
	// Functions count limit
	FaasFunctionCountLimit int64 `json:"faas_function_count_limit"`
	// Functions namespace count limit
	FaasNamespaceCountLimit int64 `json:"faas_namespace_count_limit"`
	// MB memory count for functions limit
	FaasRamSizeLimit int64 `json:"faas_ram_size_limit"`
	// Firewalls Count limit
	FirewallCountLimit int64 `json:"firewall_count_limit"`
	// Floating IP Count limit
	FloatingCountLimit int64 `json:"floating_count_limit"`
	// GPU Count limit
	GPUCountLimit int64 `json:"gpu_count_limit"`
	// Virtual A100 GPU card count limit
	GPUVirtualA100CountLimit int64 `json:"gpu_virtual_a100_count_limit"`
	// Virtual H100 GPU card count limit
	GPUVirtualH100CountLimit int64 `json:"gpu_virtual_h100_count_limit"`
	// Virtual L40S GPU card count limit
	GPUVirtualL40sCountLimit int64 `json:"gpu_virtual_l40s_count_limit"`
	// Images Count limit
	ImageCountLimit int64 `json:"image_count_limit"`
	// Images Size, GiB limit
	ImageSizeLimit int64 `json:"image_size_limit"`
	// IPU Count limit
	IpuCountLimit int64 `json:"ipu_count_limit"`
	// LaaS Topics Count limit
	LaasTopicCountLimit int64 `json:"laas_topic_count_limit"`
	// Load Balancers Count limit
	LoadbalancerCountLimit int64 `json:"loadbalancer_count_limit"`
	// Networks Count limit
	NetworkCountLimit int64 `json:"network_count_limit"`
	// RAM Size, GiB limit
	RamLimit int64 `json:"ram_limit"`
	// Region ID
	RegionID int64 `json:"region_id"`
	// Registries count limit
	RegistryCountLimit int64 `json:"registry_count_limit"`
	// Registries volume usage, GiB limit
	RegistryStorageLimit int64 `json:"registry_storage_limit"`
	// Routers Count limit
	RouterCountLimit int64 `json:"router_count_limit"`
	// Secret Count limit
	SecretCountLimit int64 `json:"secret_count_limit"`
	// Placement Group Count limit
	ServergroupCountLimit int64 `json:"servergroup_count_limit"`
	// Shared file system Count limit
	SfsCountLimit int64 `json:"sfs_count_limit"`
	// Shared file system Size, GiB limit
	SfsSizeLimit int64 `json:"sfs_size_limit"`
	// Basic VMs Count limit
	SharedVmCountLimit int64 `json:"shared_vm_count_limit"`
	// Snapshot Schedules Count limit
	SnapshotScheduleCountLimit int64 `json:"snapshot_schedule_count_limit"`
	// Subnets Count limit
	SubnetCountLimit int64 `json:"subnet_count_limit"`
	// Instances Dedicated Count limit
	VmCountLimit int64 `json:"vm_count_limit"`
	// Volumes Count limit
	VolumeCountLimit int64 `json:"volume_count_limit"`
	// Volumes Size, GiB limit
	VolumeSizeLimit int64 `json:"volume_size_limit"`
	// Snapshots Count limit
	VolumeSnapshotsCountLimit int64 `json:"volume_snapshots_count_limit"`
	// Snapshots Size, GiB limit
	VolumeSnapshotsSizeLimit int64 `json:"volume_snapshots_size_limit"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		BaremetalBasicCountLimit          respjson.Field
		BaremetalGPUCountLimit            respjson.Field
		BaremetalHfCountLimit             respjson.Field
		BaremetalInfrastructureCountLimit respjson.Field
		BaremetalNetworkCountLimit        respjson.Field
		BaremetalStorageCountLimit        respjson.Field
		CaasContainerCountLimit           respjson.Field
		CaasCPUCountLimit                 respjson.Field
		CaasGPUCountLimit                 respjson.Field
		CaasRamSizeLimit                  respjson.Field
		ClusterCountLimit                 respjson.Field
		CPUCountLimit                     respjson.Field
		DbaasPostgresClusterCountLimit    respjson.Field
		ExternalIPCountLimit              respjson.Field
		FaasCPUCountLimit                 respjson.Field
		FaasFunctionCountLimit            respjson.Field
		FaasNamespaceCountLimit           respjson.Field
		FaasRamSizeLimit                  respjson.Field
		FirewallCountLimit                respjson.Field
		FloatingCountLimit                respjson.Field
		GPUCountLimit                     respjson.Field
		GPUVirtualA100CountLimit          respjson.Field
		GPUVirtualH100CountLimit          respjson.Field
		GPUVirtualL40sCountLimit          respjson.Field
		ImageCountLimit                   respjson.Field
		ImageSizeLimit                    respjson.Field
		IpuCountLimit                     respjson.Field
		LaasTopicCountLimit               respjson.Field
		LoadbalancerCountLimit            respjson.Field
		NetworkCountLimit                 respjson.Field
		RamLimit                          respjson.Field
		RegionID                          respjson.Field
		RegistryCountLimit                respjson.Field
		RegistryStorageLimit              respjson.Field
		RouterCountLimit                  respjson.Field
		SecretCountLimit                  respjson.Field
		ServergroupCountLimit             respjson.Field
		SfsCountLimit                     respjson.Field
		SfsSizeLimit                      respjson.Field
		SharedVmCountLimit                respjson.Field
		SnapshotScheduleCountLimit        respjson.Field
		SubnetCountLimit                  respjson.Field
		VmCountLimit                      respjson.Field
		VolumeCountLimit                  respjson.Field
		VolumeSizeLimit                   respjson.Field
		VolumeSnapshotsCountLimit         respjson.Field
		VolumeSnapshotsSizeLimit          respjson.Field
		ExtraFields                       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (QuotaRequestListResponseRequestedLimitsRegionalLimit) RawJSON

Returns the unmodified JSON received from the API

func (*QuotaRequestListResponseRequestedLimitsRegionalLimit) UnmarshalJSON

type QuotaRequestNewParams

type QuotaRequestNewParams struct {
	// Describe the reason, in general terms.
	Description string `json:"description,required"`
	// Limits you want to increase.
	RequestedLimits QuotaRequestNewParamsRequestedLimits `json:"requested_limits,omitzero,required"`
	// Client ID that requests the limit increase.
	ClientID param.Opt[int64] `json:"client_id,omitzero"`
	// contains filtered or unexported fields
}

func (QuotaRequestNewParams) MarshalJSON

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

type QuotaRequestNewParamsRequestedLimits

type QuotaRequestNewParamsRequestedLimits struct {
	// Global entity quota limits
	GlobalLimits QuotaRequestNewParamsRequestedLimitsGlobalLimits `json:"global_limits,omitzero"`
	// Regions and their quota limits
	RegionalLimits []QuotaRequestNewParamsRequestedLimitsRegionalLimit `json:"regional_limits,omitzero"`
	// contains filtered or unexported fields
}

Limits you want to increase.

func (QuotaRequestNewParamsRequestedLimits) MarshalJSON

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

type QuotaRequestNewParamsRequestedLimitsGlobalLimits

type QuotaRequestNewParamsRequestedLimitsGlobalLimits struct {
	// Inference CPU millicore count limit
	InferenceCPUMillicoreCountLimit param.Opt[int64] `json:"inference_cpu_millicore_count_limit,omitzero"`
	// Inference GPU A100 Count limit
	InferenceGPUA100CountLimit param.Opt[int64] `json:"inference_gpu_a100_count_limit,omitzero"`
	// Inference GPU H100 Count limit
	InferenceGPUH100CountLimit param.Opt[int64] `json:"inference_gpu_h100_count_limit,omitzero"`
	// Inference GPU L40s Count limit
	InferenceGPUL40sCountLimit param.Opt[int64] `json:"inference_gpu_l40s_count_limit,omitzero"`
	// Inference instance count limit
	InferenceInstanceCountLimit param.Opt[int64] `json:"inference_instance_count_limit,omitzero"`
	// SSH Keys Count limit
	KeypairCountLimit param.Opt[int64] `json:"keypair_count_limit,omitzero"`
	// Projects Count limit
	ProjectCountLimit param.Opt[int64] `json:"project_count_limit,omitzero"`
	// contains filtered or unexported fields
}

Global entity quota limits

func (QuotaRequestNewParamsRequestedLimitsGlobalLimits) MarshalJSON

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

type QuotaRequestNewParamsRequestedLimitsRegionalLimit

type QuotaRequestNewParamsRequestedLimitsRegionalLimit struct {
	// Basic bare metal servers count limit
	BaremetalBasicCountLimit param.Opt[int64] `json:"baremetal_basic_count_limit,omitzero"`
	// AI GPU bare metal servers count limit
	BaremetalGPUCountLimit param.Opt[int64] `json:"baremetal_gpu_count_limit,omitzero"`
	// High-frequency bare metal servers count limit
	BaremetalHfCountLimit param.Opt[int64] `json:"baremetal_hf_count_limit,omitzero"`
	// Infrastructure bare metal servers count limit
	BaremetalInfrastructureCountLimit param.Opt[int64] `json:"baremetal_infrastructure_count_limit,omitzero"`
	// Bare metal Network Count limit
	BaremetalNetworkCountLimit param.Opt[int64] `json:"baremetal_network_count_limit,omitzero"`
	// Storage bare metal servers count limit
	BaremetalStorageCountLimit param.Opt[int64] `json:"baremetal_storage_count_limit,omitzero"`
	// Containers count limit
	CaasContainerCountLimit param.Opt[int64] `json:"caas_container_count_limit,omitzero"`
	// mCPU count for containers limit
	CaasCPUCountLimit param.Opt[int64] `json:"caas_cpu_count_limit,omitzero"`
	// Containers gpu count limit
	CaasGPUCountLimit param.Opt[int64] `json:"caas_gpu_count_limit,omitzero"`
	// MB memory count for containers limit
	CaasRamSizeLimit param.Opt[int64] `json:"caas_ram_size_limit,omitzero"`
	// K8s clusters count limit
	ClusterCountLimit param.Opt[int64] `json:"cluster_count_limit,omitzero"`
	// vCPU Count limit
	CPUCountLimit param.Opt[int64] `json:"cpu_count_limit,omitzero"`
	// DBaaS cluster count limit
	DbaasPostgresClusterCountLimit param.Opt[int64] `json:"dbaas_postgres_cluster_count_limit,omitzero"`
	// External IP Count limit
	ExternalIPCountLimit param.Opt[int64] `json:"external_ip_count_limit,omitzero"`
	// mCPU count for functions limit
	FaasCPUCountLimit param.Opt[int64] `json:"faas_cpu_count_limit,omitzero"`
	// Functions count limit
	FaasFunctionCountLimit param.Opt[int64] `json:"faas_function_count_limit,omitzero"`
	// Functions namespace count limit
	FaasNamespaceCountLimit param.Opt[int64] `json:"faas_namespace_count_limit,omitzero"`
	// MB memory count for functions limit
	FaasRamSizeLimit param.Opt[int64] `json:"faas_ram_size_limit,omitzero"`
	// Firewalls Count limit
	FirewallCountLimit param.Opt[int64] `json:"firewall_count_limit,omitzero"`
	// Floating IP Count limit
	FloatingCountLimit param.Opt[int64] `json:"floating_count_limit,omitzero"`
	// GPU Count limit
	GPUCountLimit param.Opt[int64] `json:"gpu_count_limit,omitzero"`
	// Virtual A100 GPU card count limit
	GPUVirtualA100CountLimit param.Opt[int64] `json:"gpu_virtual_a100_count_limit,omitzero"`
	// Virtual H100 GPU card count limit
	GPUVirtualH100CountLimit param.Opt[int64] `json:"gpu_virtual_h100_count_limit,omitzero"`
	// Virtual L40S GPU card count limit
	GPUVirtualL40sCountLimit param.Opt[int64] `json:"gpu_virtual_l40s_count_limit,omitzero"`
	// Images Count limit
	ImageCountLimit param.Opt[int64] `json:"image_count_limit,omitzero"`
	// Images Size, GiB limit
	ImageSizeLimit param.Opt[int64] `json:"image_size_limit,omitzero"`
	// IPU Count limit
	IpuCountLimit param.Opt[int64] `json:"ipu_count_limit,omitzero"`
	// LaaS Topics Count limit
	LaasTopicCountLimit param.Opt[int64] `json:"laas_topic_count_limit,omitzero"`
	// Load Balancers Count limit
	LoadbalancerCountLimit param.Opt[int64] `json:"loadbalancer_count_limit,omitzero"`
	// Networks Count limit
	NetworkCountLimit param.Opt[int64] `json:"network_count_limit,omitzero"`
	// RAM Size, GiB limit
	RamLimit param.Opt[int64] `json:"ram_limit,omitzero"`
	// Region ID
	RegionID param.Opt[int64] `json:"region_id,omitzero"`
	// Registries count limit
	RegistryCountLimit param.Opt[int64] `json:"registry_count_limit,omitzero"`
	// Registries volume usage, GiB limit
	RegistryStorageLimit param.Opt[int64] `json:"registry_storage_limit,omitzero"`
	// Routers Count limit
	RouterCountLimit param.Opt[int64] `json:"router_count_limit,omitzero"`
	// Secret Count limit
	SecretCountLimit param.Opt[int64] `json:"secret_count_limit,omitzero"`
	// Placement Group Count limit
	ServergroupCountLimit param.Opt[int64] `json:"servergroup_count_limit,omitzero"`
	// Shared file system Count limit
	SfsCountLimit param.Opt[int64] `json:"sfs_count_limit,omitzero"`
	// Shared file system Size, GiB limit
	SfsSizeLimit param.Opt[int64] `json:"sfs_size_limit,omitzero"`
	// Basic VMs Count limit
	SharedVmCountLimit param.Opt[int64] `json:"shared_vm_count_limit,omitzero"`
	// Snapshot Schedules Count limit
	SnapshotScheduleCountLimit param.Opt[int64] `json:"snapshot_schedule_count_limit,omitzero"`
	// Subnets Count limit
	SubnetCountLimit param.Opt[int64] `json:"subnet_count_limit,omitzero"`
	// Instances Dedicated Count limit
	VmCountLimit param.Opt[int64] `json:"vm_count_limit,omitzero"`
	// Volumes Count limit
	VolumeCountLimit param.Opt[int64] `json:"volume_count_limit,omitzero"`
	// Volumes Size, GiB limit
	VolumeSizeLimit param.Opt[int64] `json:"volume_size_limit,omitzero"`
	// Snapshots Count limit
	VolumeSnapshotsCountLimit param.Opt[int64] `json:"volume_snapshots_count_limit,omitzero"`
	// Snapshots Size, GiB limit
	VolumeSnapshotsSizeLimit param.Opt[int64] `json:"volume_snapshots_size_limit,omitzero"`
	// contains filtered or unexported fields
}

func (QuotaRequestNewParamsRequestedLimitsRegionalLimit) MarshalJSON

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

type QuotaRequestService

type QuotaRequestService struct {
	Options []option.RequestOption
}

QuotaRequestService contains methods and other services that help with interacting with the gcore API.

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

func NewQuotaRequestService

func NewQuotaRequestService(opts ...option.RequestOption) (r QuotaRequestService)

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

func (*QuotaRequestService) Delete

func (r *QuotaRequestService) Delete(ctx context.Context, requestID string, opts ...option.RequestOption) (err error)

Delete request to change quotas

func (*QuotaRequestService) Get

func (r *QuotaRequestService) Get(ctx context.Context, requestID string, opts ...option.RequestOption) (res *QuotaRequestGetResponse, err error)

Get request to change quota limits.

func (*QuotaRequestService) List

Returns a list of sent requests to change current quotas and their statuses

func (*QuotaRequestService) ListAutoPaging

Returns a list of sent requests to change current quotas and their statuses

func (*QuotaRequestService) New

Create request to change quotas

type QuotaService

type QuotaService struct {
	Options  []option.RequestOption
	Requests QuotaRequestService
}

QuotaService contains methods and other services that help with interacting with the gcore API.

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

func NewQuotaService

func NewQuotaService(opts ...option.RequestOption) (r QuotaService)

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

func (*QuotaService) GetAll

func (r *QuotaService) GetAll(ctx context.Context, opts ...option.RequestOption) (res *QuotaGetAllResponse, err error)

Get combined client quotas, regional and global.

func (*QuotaService) GetByRegion

func (r *QuotaService) GetByRegion(ctx context.Context, query QuotaGetByRegionParams, opts ...option.RequestOption) (res *QuotaGetByRegionResponse, err error)

Get a quota by region

func (*QuotaService) GetGlobal

func (r *QuotaService) GetGlobal(ctx context.Context, clientID int64, opts ...option.RequestOption) (res *QuotaGetGlobalResponse, err error)

Get global quota

type Region

type Region struct {
	// Region ID
	ID int64 `json:"id,required"`
	// The access level of the region.
	//
	// Any of "core", "edge".
	AccessLevel RegionAccessLevel `json:"access_level,required"`
	// AI service API endpoint ID
	AIServiceEndpointID int64 `json:"ai_service_endpoint_id,required"`
	// List of available volume types, 'standard', 'ssd_hiiops', 'cold'].
	AvailableVolumeTypes []string `json:"available_volume_types,required"`
	// Coordinates of the region
	Coordinates RegionCoordinates `json:"coordinates,required"`
	// Country
	Country string `json:"country,required"`
	// Region creation date and time
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// This field is deprecated. Use `created_at` instead.
	//
	// Deprecated: deprecated
	CreatedOn time.Time `json:"created_on,required" format:"date-time"`
	// DDoS endpoint ID
	DDOSEndpointID int64 `json:"ddos_endpoint_id,required"`
	// Human-readable region name
	DisplayName string `json:"display_name,required"`
	// Endpoint type
	//
	// Any of "admin", "internal", "public".
	EndpointType RegionEndpointType `json:"endpoint_type,required"`
	// External network ID for Neutron
	ExternalNetworkID string `json:"external_network_id,required"`
	// List of available file share types
	//
	// Any of "standard", "vast".
	FileShareTypes []string `json:"file_share_types,required"`
	// Region has AI capability
	HasAI bool `json:"has_ai,required"`
	// Region has AI GPU capability
	HasAIGPU bool `json:"has_ai_gpu,required"`
	// Region has bare metal capability
	HasBaremetal bool `json:"has_baremetal,required"`
	// Region has basic vm capability
	HasBasicVm bool `json:"has_basic_vm,required"`
	// Region has managed kubernetes capability
	HasK8s bool `json:"has_k8s,required"`
	// Region has KVM virtualization capability
	HasKvm bool `json:"has_kvm,required"`
	// Region has SFS capability
	HasSfs bool `json:"has_sfs,required"`
	// Foreign key to Keystone entity
	KeystoneID int64 `json:"keystone_id,required"`
	// Technical region name
	KeystoneName string `json:"keystone_name,required"`
	// Foreign key to Metrics database entity
	MetricsDatabaseID int64 `json:"metrics_database_id,required"`
	// Region state
	//
	// Any of "ACTIVE", "DELETED", "DELETING", "DELETION_FAILED", "INACTIVE",
	// "MAINTENANCE", "NEW".
	State RegionState `json:"state,required"`
	// This field is deprecated and can be ignored
	//
	// Deprecated: deprecated
	TaskID string `json:"task_id,required"`
	// Physical network name to create vlan networks
	VlanPhysicalNetwork string `json:"vlan_physical_network,required"`
	// Geographical zone
	//
	// Any of "AMERICAS", "APAC", "EMEA", "RUSSIA_AND_CIS".
	Zone RegionZone `json:"zone,required"`
	// Region has DBAAS service
	HasDbaas bool `json:"has_dbaas"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                   respjson.Field
		AccessLevel          respjson.Field
		AIServiceEndpointID  respjson.Field
		AvailableVolumeTypes respjson.Field
		Coordinates          respjson.Field
		Country              respjson.Field
		CreatedAt            respjson.Field
		CreatedOn            respjson.Field
		DDOSEndpointID       respjson.Field
		DisplayName          respjson.Field
		EndpointType         respjson.Field
		ExternalNetworkID    respjson.Field
		FileShareTypes       respjson.Field
		HasAI                respjson.Field
		HasAIGPU             respjson.Field
		HasBaremetal         respjson.Field
		HasBasicVm           respjson.Field
		HasK8s               respjson.Field
		HasKvm               respjson.Field
		HasSfs               respjson.Field
		KeystoneID           respjson.Field
		KeystoneName         respjson.Field
		MetricsDatabaseID    respjson.Field
		State                respjson.Field
		TaskID               respjson.Field
		VlanPhysicalNetwork  respjson.Field
		Zone                 respjson.Field
		HasDbaas             respjson.Field
		ExtraFields          map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Region) RawJSON

func (r Region) RawJSON() string

Returns the unmodified JSON received from the API

func (*Region) UnmarshalJSON

func (r *Region) UnmarshalJSON(data []byte) error

type RegionAccessLevel

type RegionAccessLevel string

The access level of the region.

const (
	RegionAccessLevelCore RegionAccessLevel = "core"
	RegionAccessLevelEdge RegionAccessLevel = "edge"
)

type RegionCapacity

type RegionCapacity struct {
	// List of capacities by flavor.
	Capacity []Capacity `json:"capacity,required"`
	// Region ID.
	RegionID int64 `json:"region_id,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Capacity    respjson.Field
		RegionID    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegionCapacity) RawJSON

func (r RegionCapacity) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegionCapacity) UnmarshalJSON

func (r *RegionCapacity) UnmarshalJSON(data []byte) error

type RegionCapacityList

type RegionCapacityList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []RegionCapacity `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegionCapacityList) RawJSON

func (r RegionCapacityList) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegionCapacityList) UnmarshalJSON

func (r *RegionCapacityList) UnmarshalJSON(data []byte) error

type RegionCoordinates

type RegionCoordinates struct {
	Latitude  float64 `json:"latitude,required"`
	Longitude float64 `json:"longitude,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Latitude    respjson.Field
		Longitude   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Coordinates of the region

func (RegionCoordinates) RawJSON

func (r RegionCoordinates) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegionCoordinates) UnmarshalJSON

func (r *RegionCoordinates) UnmarshalJSON(data []byte) error

type RegionEndpointType

type RegionEndpointType string

Endpoint type

const (
	RegionEndpointTypeAdmin    RegionEndpointType = "admin"
	RegionEndpointTypeInternal RegionEndpointType = "internal"
	RegionEndpointTypePublic   RegionEndpointType = "public"
)

type RegionGetParams

type RegionGetParams struct {
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// If true, null `available_volume_type` is replaced with a list of available
	// volume types.
	ShowVolumeTypes param.Opt[bool] `query:"show_volume_types,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (RegionGetParams) URLQuery

func (r RegionGetParams) URLQuery() (v url.Values, err error)

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

type RegionListParams

type RegionListParams struct {
	// Limit the number of returned regions. Falls back to default of 100 if not
	// specified. Limited by max limit value of 1000
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Offset value is used to exclude the first set of records from the result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// If true, null `available_volume_type` is replaced with a list of available
	// volume types.
	ShowVolumeTypes param.Opt[bool] `query:"show_volume_types,omitzero" json:"-"`
	// Order by field and direction.
	//
	// Any of "created_at.asc", "created_at.desc", "display_name.asc",
	// "display_name.desc".
	OrderBy RegionListParamsOrderBy `query:"order_by,omitzero" json:"-"`
	// If defined then return only regions that support given product.
	//
	// Any of "containers", "inference".
	Product RegionListParamsProduct `query:"product,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (RegionListParams) URLQuery

func (r RegionListParams) URLQuery() (v url.Values, err error)

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

type RegionListParamsOrderBy

type RegionListParamsOrderBy string

Order by field and direction.

const (
	RegionListParamsOrderByCreatedAtAsc    RegionListParamsOrderBy = "created_at.asc"
	RegionListParamsOrderByCreatedAtDesc   RegionListParamsOrderBy = "created_at.desc"
	RegionListParamsOrderByDisplayNameAsc  RegionListParamsOrderBy = "display_name.asc"
	RegionListParamsOrderByDisplayNameDesc RegionListParamsOrderBy = "display_name.desc"
)

type RegionListParamsProduct

type RegionListParamsProduct string

If defined then return only regions that support given product.

const (
	RegionListParamsProductContainers RegionListParamsProduct = "containers"
	RegionListParamsProductInference  RegionListParamsProduct = "inference"
)

type RegionService

type RegionService struct {
	Options []option.RequestOption
}

RegionService contains methods and other services that help with interacting with the gcore API.

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

func NewRegionService

func NewRegionService(opts ...option.RequestOption) (r RegionService)

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

func (*RegionService) Get

func (r *RegionService) Get(ctx context.Context, params RegionGetParams, opts ...option.RequestOption) (res *Region, err error)

Get region

func (*RegionService) List

List regions

func (*RegionService) ListAutoPaging

List regions

type RegionState

type RegionState string

Region state

const (
	RegionStateActive         RegionState = "ACTIVE"
	RegionStateDeleted        RegionState = "DELETED"
	RegionStateDeleting       RegionState = "DELETING"
	RegionStateDeletionFailed RegionState = "DELETION_FAILED"
	RegionStateInactive       RegionState = "INACTIVE"
	RegionStateMaintenance    RegionState = "MAINTENANCE"
	RegionStateNew            RegionState = "NEW"
)

type RegionZone

type RegionZone string

Geographical zone

const (
	RegionZoneAmericas     RegionZone = "AMERICAS"
	RegionZoneApac         RegionZone = "APAC"
	RegionZoneEmea         RegionZone = "EMEA"
	RegionZoneRussiaAndCis RegionZone = "RUSSIA_AND_CIS"
)

type Registry

type Registry struct {
	// Registry ID
	ID int64 `json:"id,required"`
	// Registry creation date-time
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Registry name
	Name string `json:"name,required"`
	// Number of repositories in the registry
	RepoCount int64 `json:"repo_count,required"`
	// Registry storage limit, GiB
	StorageLimit int64 `json:"storage_limit,required"`
	// Registry storage used, bytes
	StorageUsed int64 `json:"storage_used,required"`
	// Registry modification date-time
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// Registry url
	URL string `json:"url,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		CreatedAt    respjson.Field
		Name         respjson.Field
		RepoCount    respjson.Field
		StorageLimit respjson.Field
		StorageUsed  respjson.Field
		UpdatedAt    respjson.Field
		URL          respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Registry) RawJSON

func (r Registry) RawJSON() string

Returns the unmodified JSON received from the API

func (*Registry) UnmarshalJSON

func (r *Registry) UnmarshalJSON(data []byte) error

type RegistryArtifact

type RegistryArtifact struct {
	// Repository ID
	ID int64 `json:"id,required"`
	// Artifact digest
	Digest string `json:"digest,required"`
	// Artifact last pull date-time
	PulledAt time.Time `json:"pulled_at,required" format:"date-time"`
	// Artifact push date-time
	PushedAt time.Time `json:"pushed_at,required" format:"date-time"`
	// Artifact registry ID
	RegistryID int64 `json:"registry_id,required"`
	// Artifact repository ID
	RepositoryID int64 `json:"repository_id,required"`
	// Artifact size, bytes
	Size int64 `json:"size,required"`
	// Artifact tags
	Tags []RegistryTag `json:"tags,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		Digest       respjson.Field
		PulledAt     respjson.Field
		PushedAt     respjson.Field
		RegistryID   respjson.Field
		RepositoryID respjson.Field
		Size         respjson.Field
		Tags         respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegistryArtifact) RawJSON

func (r RegistryArtifact) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegistryArtifact) UnmarshalJSON

func (r *RegistryArtifact) UnmarshalJSON(data []byte) error

type RegistryArtifactDeleteParams

type RegistryArtifactDeleteParams struct {
	ProjectID      param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID       param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	RegistryID     int64            `path:"registry_id,required" json:"-"`
	RepositoryName string           `path:"repository_name,required" json:"-"`
	// contains filtered or unexported fields
}

type RegistryArtifactList

type RegistryArtifactList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []RegistryArtifact `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegistryArtifactList) RawJSON

func (r RegistryArtifactList) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegistryArtifactList) UnmarshalJSON

func (r *RegistryArtifactList) UnmarshalJSON(data []byte) error

type RegistryArtifactListParams

type RegistryArtifactListParams struct {
	ProjectID  param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID   param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	RegistryID int64            `path:"registry_id,required" json:"-"`
	// contains filtered or unexported fields
}

type RegistryArtifactService

type RegistryArtifactService struct {
	Options []option.RequestOption
}

RegistryArtifactService contains methods and other services that help with interacting with the gcore API.

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

func NewRegistryArtifactService

func NewRegistryArtifactService(opts ...option.RequestOption) (r RegistryArtifactService)

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

func (*RegistryArtifactService) Delete

Delete an artifact

func (*RegistryArtifactService) List

List artifacts

type RegistryDeleteParams

type RegistryDeleteParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type RegistryGetParams

type RegistryGetParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type RegistryList

type RegistryList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []Registry `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegistryList) RawJSON

func (r RegistryList) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegistryList) UnmarshalJSON

func (r *RegistryList) UnmarshalJSON(data []byte) error

type RegistryListParams

type RegistryListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type RegistryNewParams

type RegistryNewParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// A name for the container registry.
	//
	// Should be in lowercase, consisting only of numbers, letters and -,
	//
	// with maximum length of 24 characters
	Name string `json:"name,required"`
	// Registry storage limit, GiB
	StorageLimit param.Opt[int64] `json:"storage_limit,omitzero"`
	// contains filtered or unexported fields
}

func (RegistryNewParams) MarshalJSON

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

type RegistryRepository

type RegistryRepository struct {
	// Repository ID
	ID int64 `json:"id,required"`
	// Number of artifacts in the repository
	ArtifactCount int64 `json:"artifact_count,required"`
	// Repository creation date-time
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Repository name
	Name string `json:"name,required"`
	// Number of pools from the repository
	PullCount int64 `json:"pull_count,required"`
	// Repository registry ID
	RegistryID int64 `json:"registry_id,required"`
	// Repository modification date-time
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID            respjson.Field
		ArtifactCount respjson.Field
		CreatedAt     respjson.Field
		Name          respjson.Field
		PullCount     respjson.Field
		RegistryID    respjson.Field
		UpdatedAt     respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegistryRepository) RawJSON

func (r RegistryRepository) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegistryRepository) UnmarshalJSON

func (r *RegistryRepository) UnmarshalJSON(data []byte) error

type RegistryRepositoryDeleteParams

type RegistryRepositoryDeleteParams struct {
	ProjectID  param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID   param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	RegistryID int64            `path:"registry_id,required" json:"-"`
	// contains filtered or unexported fields
}

type RegistryRepositoryList

type RegistryRepositoryList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []RegistryRepository `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegistryRepositoryList) RawJSON

func (r RegistryRepositoryList) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegistryRepositoryList) UnmarshalJSON

func (r *RegistryRepositoryList) UnmarshalJSON(data []byte) error

type RegistryRepositoryListParams

type RegistryRepositoryListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type RegistryRepositoryService

type RegistryRepositoryService struct {
	Options []option.RequestOption
}

RegistryRepositoryService contains methods and other services that help with interacting with the gcore API.

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

func NewRegistryRepositoryService

func NewRegistryRepositoryService(opts ...option.RequestOption) (r RegistryRepositoryService)

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

func (*RegistryRepositoryService) Delete

func (r *RegistryRepositoryService) Delete(ctx context.Context, repositoryName string, body RegistryRepositoryDeleteParams, opts ...option.RequestOption) (err error)

Delete a repository

func (*RegistryRepositoryService) List

List repositories

type RegistryResizeParams

type RegistryResizeParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Registry storage limit, GiB
	StorageLimit param.Opt[int64] `json:"storage_limit,omitzero"`
	// contains filtered or unexported fields
}

func (RegistryResizeParams) MarshalJSON

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

type RegistryService

type RegistryService struct {
	Options      []option.RequestOption
	Repositories RegistryRepositoryService
	Artifacts    RegistryArtifactService
	Tags         RegistryTagService
	Users        RegistryUserService
}

RegistryService contains methods and other services that help with interacting with the gcore API.

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

func NewRegistryService

func NewRegistryService(opts ...option.RequestOption) (r RegistryService)

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

func (*RegistryService) Delete

func (r *RegistryService) Delete(ctx context.Context, registryID int64, body RegistryDeleteParams, opts ...option.RequestOption) (err error)

Delete a registry

func (*RegistryService) Get

func (r *RegistryService) Get(ctx context.Context, registryID int64, query RegistryGetParams, opts ...option.RequestOption) (res *Registry, err error)

Get a registry

func (*RegistryService) List

func (r *RegistryService) List(ctx context.Context, query RegistryListParams, opts ...option.RequestOption) (res *RegistryList, err error)

Get registry list

func (*RegistryService) New

func (r *RegistryService) New(ctx context.Context, params RegistryNewParams, opts ...option.RequestOption) (res *Registry, err error)

Create a registry

func (*RegistryService) Resize

func (r *RegistryService) Resize(ctx context.Context, registryID int64, params RegistryResizeParams, opts ...option.RequestOption) (res *Registry, err error)

Resize a registry

type RegistryTag

type RegistryTag struct {
	// Tag ID
	ID int64 `json:"id,required"`
	// Artifact ID
	ArtifactID int64 `json:"artifact_id,required"`
	// Tag name
	Name string `json:"name,required"`
	// Tag last pull date-time
	PulledAt time.Time `json:"pulled_at,required" format:"date-time"`
	// Tag push date-time
	PushedAt time.Time `json:"pushed_at,required" format:"date-time"`
	// Repository ID
	RepositoryID int64 `json:"repository_id,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		ArtifactID   respjson.Field
		Name         respjson.Field
		PulledAt     respjson.Field
		PushedAt     respjson.Field
		RepositoryID respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegistryTag) RawJSON

func (r RegistryTag) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegistryTag) UnmarshalJSON

func (r *RegistryTag) UnmarshalJSON(data []byte) error

type RegistryTagDeleteParams

type RegistryTagDeleteParams struct {
	ProjectID      param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID       param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	RegistryID     int64            `path:"registry_id,required" json:"-"`
	RepositoryName string           `path:"repository_name,required" json:"-"`
	Digest         string           `path:"digest,required" json:"-"`
	// contains filtered or unexported fields
}

type RegistryTagService

type RegistryTagService struct {
	Options []option.RequestOption
}

RegistryTagService contains methods and other services that help with interacting with the gcore API.

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

func NewRegistryTagService

func NewRegistryTagService(opts ...option.RequestOption) (r RegistryTagService)

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

func (*RegistryTagService) Delete

func (r *RegistryTagService) Delete(ctx context.Context, tagName string, body RegistryTagDeleteParams, opts ...option.RequestOption) (err error)

Delete a tag

type RegistryUser

type RegistryUser struct {
	// User ID
	ID int64 `json:"id,required"`
	// User creation date-time
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// User account operating time, days
	Duration int64 `json:"duration,required"`
	// User operation end date-time
	ExpiresAt time.Time `json:"expires_at,required" format:"date-time"`
	// User name
	Name string `json:"name,required"`
	// Read-only user
	ReadOnly bool `json:"read_only"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Duration    respjson.Field
		ExpiresAt   respjson.Field
		Name        respjson.Field
		ReadOnly    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegistryUser) RawJSON

func (r RegistryUser) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegistryUser) UnmarshalJSON

func (r *RegistryUser) UnmarshalJSON(data []byte) error

type RegistryUserCreated

type RegistryUserCreated struct {
	// User ID
	ID int64 `json:"id,required"`
	// User creation date-time
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// User account operating time, days
	Duration int64 `json:"duration,required"`
	// User operation end date-time
	ExpiresAt time.Time `json:"expires_at,required" format:"date-time"`
	// User name
	Name string `json:"name,required"`
	// Read-only user
	ReadOnly bool `json:"read_only"`
	// User secret
	Secret string `json:"secret"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		CreatedAt   respjson.Field
		Duration    respjson.Field
		ExpiresAt   respjson.Field
		Name        respjson.Field
		ReadOnly    respjson.Field
		Secret      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegistryUserCreated) RawJSON

func (r RegistryUserCreated) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegistryUserCreated) UnmarshalJSON

func (r *RegistryUserCreated) UnmarshalJSON(data []byte) error

type RegistryUserDeleteParams

type RegistryUserDeleteParams struct {
	ProjectID  param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID   param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	RegistryID int64            `path:"registry_id,required" json:"-"`
	// contains filtered or unexported fields
}

type RegistryUserList

type RegistryUserList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []RegistryUser `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RegistryUserList) RawJSON

func (r RegistryUserList) RawJSON() string

Returns the unmodified JSON received from the API

func (*RegistryUserList) UnmarshalJSON

func (r *RegistryUserList) UnmarshalJSON(data []byte) error

type RegistryUserListParams

type RegistryUserListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type RegistryUserNewMultipleParams

type RegistryUserNewMultipleParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Set of users
	Users []RegistryUserNewMultipleParamsUser `json:"users,omitzero,required"`
	// contains filtered or unexported fields
}

func (RegistryUserNewMultipleParams) MarshalJSON

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

type RegistryUserNewMultipleParamsUser

type RegistryUserNewMultipleParamsUser struct {
	// User account operating time, days
	Duration int64 `json:"duration,required"`
	// A name for the registry user.
	//
	// Should be in lowercase, consisting only of numbers and letters,
	//
	// with maximum length of 16 characters
	Name string `json:"name,required"`
	// Read-only user
	ReadOnly param.Opt[bool] `json:"read_only,omitzero"`
	// User secret
	Secret param.Opt[string] `json:"secret,omitzero"`
	// contains filtered or unexported fields
}

The properties Duration, Name are required.

func (RegistryUserNewMultipleParamsUser) MarshalJSON

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

type RegistryUserNewParams

type RegistryUserNewParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// User account operating time, days
	Duration int64 `json:"duration,required"`
	// A name for the registry user.
	//
	// Should be in lowercase, consisting only of numbers and letters,
	//
	// with maximum length of 16 characters
	Name string `json:"name,required"`
	// Read-only user
	ReadOnly param.Opt[bool] `json:"read_only,omitzero"`
	// User secret
	Secret param.Opt[string] `json:"secret,omitzero"`
	// contains filtered or unexported fields
}

func (RegistryUserNewParams) MarshalJSON

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

type RegistryUserRefreshSecretParams

type RegistryUserRefreshSecretParams struct {
	ProjectID  param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID   param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	RegistryID int64            `path:"registry_id,required" json:"-"`
	// contains filtered or unexported fields
}

type RegistryUserService

type RegistryUserService struct {
	Options []option.RequestOption
}

RegistryUserService contains methods and other services that help with interacting with the gcore API.

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

func NewRegistryUserService

func NewRegistryUserService(opts ...option.RequestOption) (r RegistryUserService)

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

func (*RegistryUserService) Delete

func (r *RegistryUserService) Delete(ctx context.Context, userID int64, body RegistryUserDeleteParams, opts ...option.RequestOption) (err error)

Delete a user

func (*RegistryUserService) List

func (r *RegistryUserService) List(ctx context.Context, registryID int64, query RegistryUserListParams, opts ...option.RequestOption) (res *RegistryUserList, err error)

Get user list

func (*RegistryUserService) New

func (r *RegistryUserService) New(ctx context.Context, registryID int64, params RegistryUserNewParams, opts ...option.RequestOption) (res *RegistryUser, err error)

Create a user

func (*RegistryUserService) NewMultiple

func (r *RegistryUserService) NewMultiple(ctx context.Context, registryID int64, params RegistryUserNewMultipleParams, opts ...option.RequestOption) (res *RegistryUserCreated, err error)

Batch create users

func (*RegistryUserService) RefreshSecret

func (r *RegistryUserService) RefreshSecret(ctx context.Context, userID int64, body RegistryUserRefreshSecretParams, opts ...option.RequestOption) (err error)

Refresh a secret

func (*RegistryUserService) Update

func (r *RegistryUserService) Update(ctx context.Context, userID int64, params RegistryUserUpdateParams, opts ...option.RequestOption) (res *RegistryUser, err error)

Update a user

type RegistryUserUpdateParams

type RegistryUserUpdateParams struct {
	ProjectID  param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID   param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	RegistryID int64            `path:"registry_id,required" json:"-"`
	// User account operating time, days
	Duration int64 `json:"duration,required"`
	// Read-only user
	ReadOnly param.Opt[bool] `json:"read_only,omitzero"`
	// contains filtered or unexported fields
}

func (RegistryUserUpdateParams) MarshalJSON

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

type ReservedFixedIP

type ReservedFixedIP struct {
	// Group of subnet masks and/or IP addresses that share the current IP as VIP
	AllowedAddressPairs []AllowedAddressPairs `json:"allowed_address_pairs,required"`
	// Reserved fixed IP attachment entities
	Attachments []ReservedFixedIPAttachment `json:"attachments,required"`
	// Datetime when the reserved fixed IP was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// If reserved fixed IP belongs to a public network
	IsExternal bool `json:"is_external,required"`
	// If reserved fixed IP is a VIP
	IsVip bool `json:"is_vip,required"`
	// Reserved fixed IP name
	Name string `json:"name,required"`
	// Network details
	Network Network `json:"network,required"`
	// ID of the network the port is attached to
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// ID of the port underlying the reserved fixed IP
	PortID string `json:"port_id,required" format:"uuid4"`
	// Region name
	Region string `json:"region,required"`
	// Region ID
	RegionID int64 `json:"region_id,required"`
	// Reserved fixed IP status with resource type and ID it is attached to
	Reservation ReservedFixedIPReservation `json:"reservation,required"`
	// Underlying port status
	Status string `json:"status,required"`
	// Datetime when the reserved fixed IP was last updated
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// Task that created this entity
	CreatorTaskID string `json:"creator_task_id,nullable" format:"uuid4"`
	// IPv4 address of the reserved fixed IP
	FixedIPAddress string `json:"fixed_ip_address,nullable" format:"ipv4"`
	// IPv6 address of the reserved fixed IP
	FixedIpv6Address string `json:"fixed_ipv6_address,nullable" format:"ipv6"`
	// Project ID
	ProjectID int64 `json:"project_id,nullable"`
	// ID of the subnet that owns the IP address
	SubnetID string `json:"subnet_id,nullable" format:"uuid4"`
	// ID of the subnet that owns the IPv6 address
	SubnetV6ID string `json:"subnet_v6_id,nullable" format:"uuid4"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,nullable" format:"uuid4"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AllowedAddressPairs respjson.Field
		Attachments         respjson.Field
		CreatedAt           respjson.Field
		IsExternal          respjson.Field
		IsVip               respjson.Field
		Name                respjson.Field
		Network             respjson.Field
		NetworkID           respjson.Field
		PortID              respjson.Field
		Region              respjson.Field
		RegionID            respjson.Field
		Reservation         respjson.Field
		Status              respjson.Field
		UpdatedAt           respjson.Field
		CreatorTaskID       respjson.Field
		FixedIPAddress      respjson.Field
		FixedIpv6Address    respjson.Field
		ProjectID           respjson.Field
		SubnetID            respjson.Field
		SubnetV6ID          respjson.Field
		TaskID              respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ReservedFixedIP) RawJSON

func (r ReservedFixedIP) RawJSON() string

Returns the unmodified JSON received from the API

func (*ReservedFixedIP) UnmarshalJSON

func (r *ReservedFixedIP) UnmarshalJSON(data []byte) error

type ReservedFixedIPAttachment

type ReservedFixedIPAttachment struct {
	// Resource ID
	ResourceID string `json:"resource_id,nullable"`
	// Resource type
	ResourceType string `json:"resource_type,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ResourceID   respjson.Field
		ResourceType respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (ReservedFixedIPAttachment) RawJSON

func (r ReservedFixedIPAttachment) RawJSON() string

Returns the unmodified JSON received from the API

func (*ReservedFixedIPAttachment) UnmarshalJSON

func (r *ReservedFixedIPAttachment) UnmarshalJSON(data []byte) error

type ReservedFixedIPDeleteParams

type ReservedFixedIPDeleteParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type ReservedFixedIPGetParams

type ReservedFixedIPGetParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type ReservedFixedIPListParams

type ReservedFixedIPListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Set to true if the response should only list IP addresses that are not attached
	// to any instance
	AvailableOnly param.Opt[bool] `query:"available_only,omitzero" json:"-"`
	// Filter IPs by device ID it is attached to
	DeviceID param.Opt[string] `query:"device_id,omitzero" json:"-"`
	// Set to true if the response should only list public IP addresses
	ExternalOnly param.Opt[bool] `query:"external_only,omitzero" json:"-"`
	// Set to true if the response should only list private IP addresses
	InternalOnly param.Opt[bool] `query:"internal_only,omitzero" json:"-"`
	// An IPv4 address to filter results by. Regular expression allowed
	IPAddress param.Opt[string] `query:"ip_address,omitzero" json:"-"`
	// Limit the number of returned IPs
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Offset value is used to exclude the first set of records from the result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Ordering reserved fixed IP list result by name, status, updated_at, created_at
	// or fixed_ip_address fields of the reserved fixed IP and directions (status.asc),
	// default is "fixed_ip_address.asc"
	OrderBy param.Opt[string] `query:"order_by,omitzero" json:"-"`
	// Set to true if the response should only list VIPs
	VipOnly param.Opt[bool] `query:"vip_only,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (ReservedFixedIPListParams) URLQuery

func (r ReservedFixedIPListParams) URLQuery() (v url.Values, err error)

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

type ReservedFixedIPNewParams

type ReservedFixedIPNewParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`

	// This field is a request body variant, only one variant field can be set.
	OfExternal *ReservedFixedIPNewParamsBodyExternal `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	OfSubnet *ReservedFixedIPNewParamsBodySubnet `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	OfAnySubnet *ReservedFixedIPNewParamsBodyAnySubnet `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	OfIPAddress *ReservedFixedIPNewParamsBodyIPAddress `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	OfPort *ReservedFixedIPNewParamsBodyPort `json:",inline"`
	// contains filtered or unexported fields
}

func (ReservedFixedIPNewParams) MarshalJSON

func (u ReservedFixedIPNewParams) MarshalJSON() ([]byte, error)

type ReservedFixedIPNewParamsBodyAnySubnet

type ReservedFixedIPNewParamsBodyAnySubnet struct {
	// Reserved fixed IP will be allocated in a subnet of this network
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// If reserved fixed IP is a VIP
	IsVip param.Opt[bool] `json:"is_vip,omitzero"`
	// Which subnets should be selected: IPv4, IPv6 or use dual stack.
	//
	// Any of "dual", "ipv4", "ipv6".
	IPFamily InterfaceIPFamily `json:"ip_family,omitzero"`
	// Must be 'any_subnet'.
	//
	// This field can be elided, and will marshal its zero value as "any_subnet".
	Type constant.AnySubnet `json:"type,required"`
	// contains filtered or unexported fields
}

The properties NetworkID, Type are required.

func (ReservedFixedIPNewParamsBodyAnySubnet) MarshalJSON

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

type ReservedFixedIPNewParamsBodyExternal

type ReservedFixedIPNewParamsBodyExternal struct {
	// If reserved fixed IP is a VIP
	IsVip param.Opt[bool] `json:"is_vip,omitzero"`
	// Which subnets should be selected: IPv4, IPv6 or use dual stack.
	//
	// Any of "dual", "ipv4", "ipv6".
	IPFamily InterfaceIPFamily `json:"ip_family,omitzero"`
	// Must be 'external'
	//
	// This field can be elided, and will marshal its zero value as "external".
	Type constant.External `json:"type,required"`
	// contains filtered or unexported fields
}

The property Type is required.

func (ReservedFixedIPNewParamsBodyExternal) MarshalJSON

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

type ReservedFixedIPNewParamsBodyIPAddress

type ReservedFixedIPNewParamsBodyIPAddress struct {
	// Reserved fixed IP will be allocated the given IP address
	IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
	// Reserved fixed IP will be allocated in a subnet of this network
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// If reserved fixed IP is a VIP
	IsVip param.Opt[bool] `json:"is_vip,omitzero"`
	// Must be 'ip_address'.
	//
	// This field can be elided, and will marshal its zero value as "ip_address".
	Type constant.IPAddress `json:"type,required"`
	// contains filtered or unexported fields
}

The properties IPAddress, NetworkID, Type are required.

func (ReservedFixedIPNewParamsBodyIPAddress) MarshalJSON

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

type ReservedFixedIPNewParamsBodyPort

type ReservedFixedIPNewParamsBodyPort struct {
	// Port ID to make a reserved fixed IP (for example, `vip_port_id` of the Load
	// Balancer entity).
	PortID string `json:"port_id,required" format:"uuid4"`
	// Must be 'port'.
	//
	// This field can be elided, and will marshal its zero value as "port".
	Type constant.Port `json:"type,required"`
	// contains filtered or unexported fields
}

The properties PortID, Type are required.

func (ReservedFixedIPNewParamsBodyPort) MarshalJSON

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

type ReservedFixedIPNewParamsBodySubnet

type ReservedFixedIPNewParamsBodySubnet struct {
	// Reserved fixed IP will be allocated in this subnet
	SubnetID string `json:"subnet_id,required" format:"uuid4"`
	// If reserved fixed IP is a VIP
	IsVip param.Opt[bool] `json:"is_vip,omitzero"`
	// Must be 'subnet'.
	//
	// This field can be elided, and will marshal its zero value as "subnet".
	Type constant.Subnet `json:"type,required"`
	// contains filtered or unexported fields
}

The properties SubnetID, Type are required.

func (ReservedFixedIPNewParamsBodySubnet) MarshalJSON

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

type ReservedFixedIPReservation

type ReservedFixedIPReservation struct {
	// ID of the instance or load balancer the IP is attached to
	ResourceID string `json:"resource_id,nullable" format:"uuid4"`
	// Resource type of the resource the IP is attached to
	ResourceType string `json:"resource_type,nullable"`
	// IP reservation status
	Status string `json:"status,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ResourceID   respjson.Field
		ResourceType respjson.Field
		Status       respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Reserved fixed IP status with resource type and ID it is attached to

func (ReservedFixedIPReservation) RawJSON

func (r ReservedFixedIPReservation) RawJSON() string

Returns the unmodified JSON received from the API

func (*ReservedFixedIPReservation) UnmarshalJSON

func (r *ReservedFixedIPReservation) UnmarshalJSON(data []byte) error

type ReservedFixedIPService

type ReservedFixedIPService struct {
	Options []option.RequestOption
	Vip     ReservedFixedIPVipService
	// contains filtered or unexported fields
}

ReservedFixedIPService contains methods and other services that help with interacting with the gcore API.

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

func NewReservedFixedIPService

func NewReservedFixedIPService(opts ...option.RequestOption) (r ReservedFixedIPService)

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

func (*ReservedFixedIPService) Delete

Delete reserved fixed ip

func (*ReservedFixedIPService) Get

Get reserved fixed IP

func (*ReservedFixedIPService) List

List reserved fixed IPs

func (*ReservedFixedIPService) ListAutoPaging

List reserved fixed IPs

func (*ReservedFixedIPService) New

Create reserved fixed IP

func (*ReservedFixedIPService) NewAndPoll

Create reserved fixed IP and poll for the result

type ReservedFixedIPVipListCandidatePortsParams

type ReservedFixedIPVipListCandidatePortsParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type ReservedFixedIPVipListConnectedPortsParams

type ReservedFixedIPVipListConnectedPortsParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type ReservedFixedIPVipReplaceConnectedPortsParams

type ReservedFixedIPVipReplaceConnectedPortsParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// List of port IDs that will share one VIP
	PortIDs []string `json:"port_ids,omitzero" format:"uuid4"`
	// contains filtered or unexported fields
}

func (ReservedFixedIPVipReplaceConnectedPortsParams) MarshalJSON

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

type ReservedFixedIPVipService

type ReservedFixedIPVipService struct {
	Options []option.RequestOption
}

ReservedFixedIPVipService contains methods and other services that help with interacting with the gcore API.

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

func NewReservedFixedIPVipService

func NewReservedFixedIPVipService(opts ...option.RequestOption) (r ReservedFixedIPVipService)

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

func (*ReservedFixedIPVipService) ListCandidatePorts

List instance ports that are available for connecting to VIP

func (*ReservedFixedIPVipService) ListConnectedPorts

List instance ports that share VIP

func (*ReservedFixedIPVipService) ReplaceConnectedPorts

Replace ports that share VIP

func (*ReservedFixedIPVipService) Toggle

Switch VIP status of reserved fixed IP

func (*ReservedFixedIPVipService) UpdateConnectedPorts

Add ports that share VIP

type ReservedFixedIPVipToggleParams

type ReservedFixedIPVipToggleParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// If reserved fixed IP should be a VIP
	IsVip bool `json:"is_vip,required"`
	// contains filtered or unexported fields
}

func (ReservedFixedIPVipToggleParams) MarshalJSON

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

type ReservedFixedIPVipUpdateConnectedPortsParams

type ReservedFixedIPVipUpdateConnectedPortsParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// List of port IDs that will share one VIP
	PortIDs []string `json:"port_ids,omitzero" format:"uuid4"`
	// contains filtered or unexported fields
}

func (ReservedFixedIPVipUpdateConnectedPortsParams) MarshalJSON

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

type RoleAssignment

type RoleAssignment struct {
	// Assignment ID
	ID         int64 `json:"id,required"`
	AssignedBy int64 `json:"assigned_by,required"`
	// Client ID
	ClientID int64 `json:"client_id,required"`
	// Created timestamp
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Project ID
	ProjectID int64 `json:"project_id,required"`
	// User role
	Role string `json:"role,required"`
	// Updated timestamp
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// User ID
	UserID int64 `json:"user_id,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		AssignedBy  respjson.Field
		ClientID    respjson.Field
		CreatedAt   respjson.Field
		ProjectID   respjson.Field
		Role        respjson.Field
		UpdatedAt   respjson.Field
		UserID      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RoleAssignment) RawJSON

func (r RoleAssignment) RawJSON() string

Returns the unmodified JSON received from the API

func (*RoleAssignment) UnmarshalJSON

func (r *RoleAssignment) UnmarshalJSON(data []byte) error

type RoleAssignmentUpdateDelete

type RoleAssignmentUpdateDelete struct {
	// Assignment ID
	AssignmentID int64 `json:"assignment_id,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AssignmentID respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RoleAssignmentUpdateDelete) RawJSON

func (r RoleAssignmentUpdateDelete) RawJSON() string

Returns the unmodified JSON received from the API

func (*RoleAssignmentUpdateDelete) UnmarshalJSON

func (r *RoleAssignmentUpdateDelete) UnmarshalJSON(data []byte) error

type Route

type Route struct {
	// CIDR of destination IPv4 subnet.
	Destination string `json:"destination,required" format:"ipvanynetwork"`
	// IPv4 address to forward traffic to if it's destination IP matches 'destination'
	// CIDR.
	Nexthop string `json:"nexthop,required" format:"ipvanyaddress"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Destination respjson.Field
		Nexthop     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Route) RawJSON

func (r Route) RawJSON() string

Returns the unmodified JSON received from the API

func (*Route) UnmarshalJSON

func (r *Route) UnmarshalJSON(data []byte) error

type Router

type Router struct {
	// Router ID
	ID string `json:"id,required" format:"uuid4"`
	// Datetime when the router was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Whether the router is distributed or centralized.
	Distributed bool `json:"distributed,required"`
	// List of router interfaces.
	Interfaces []RouterInterface `json:"interfaces,required"`
	// Router name
	Name string `json:"name,required"`
	// Project ID
	ProjectID int64 `json:"project_id,required"`
	// Region name
	Region string `json:"region,required"`
	// Region ID
	RegionID int64 `json:"region_id,required"`
	// List of custom routes.
	Routes []Route `json:"routes,required"`
	// Status of the router.
	Status string `json:"status,required"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,required" format:"uuid4"`
	// Datetime when the router was last updated
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// Task that created this entity
	CreatorTaskID string `json:"creator_task_id,nullable" format:"uuid4"`
	// State of this router's external gateway.
	ExternalGatewayInfo RouterExternalGatewayInfo `json:"external_gateway_info,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		CreatedAt           respjson.Field
		Distributed         respjson.Field
		Interfaces          respjson.Field
		Name                respjson.Field
		ProjectID           respjson.Field
		Region              respjson.Field
		RegionID            respjson.Field
		Routes              respjson.Field
		Status              respjson.Field
		TaskID              respjson.Field
		UpdatedAt           respjson.Field
		CreatorTaskID       respjson.Field
		ExternalGatewayInfo respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Router) RawJSON

func (r Router) RawJSON() string

Returns the unmodified JSON received from the API

func (*Router) UnmarshalJSON

func (r *Router) UnmarshalJSON(data []byte) error

type RouterExternalGatewayInfo

type RouterExternalGatewayInfo struct {
	// Is SNAT enabled.
	EnableSnat bool `json:"enable_snat,required"`
	// List of external IPs that emit SNAT-ed traffic.
	ExternalFixedIPs []IPAssignment `json:"external_fixed_ips,required"`
	// Id of the external network.
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		EnableSnat       respjson.Field
		ExternalFixedIPs respjson.Field
		NetworkID        respjson.Field
		ExtraFields      map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

State of this router's external gateway.

func (RouterExternalGatewayInfo) RawJSON

func (r RouterExternalGatewayInfo) RawJSON() string

Returns the unmodified JSON received from the API

func (*RouterExternalGatewayInfo) UnmarshalJSON

func (r *RouterExternalGatewayInfo) UnmarshalJSON(data []byte) error

type RouterInterface

type RouterInterface struct {
	// IP addresses assigned to this port
	IPAssignments []IPAssignment `json:"ip_assignments,required"`
	// ID of the network the port is attached to
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// ID of virtual ethernet port object
	PortID string `json:"port_id,required" format:"uuid4"`
	// MAC address of the virtual port
	MacAddress string `json:"mac_address,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IPAssignments respjson.Field
		NetworkID     respjson.Field
		PortID        respjson.Field
		MacAddress    respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RouterInterface) RawJSON

func (r RouterInterface) RawJSON() string

Returns the unmodified JSON received from the API

func (*RouterInterface) UnmarshalJSON

func (r *RouterInterface) UnmarshalJSON(data []byte) error

type RouterList

type RouterList struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []Router `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (RouterList) RawJSON

func (r RouterList) RawJSON() string

Returns the unmodified JSON received from the API

func (*RouterList) UnmarshalJSON

func (r *RouterList) UnmarshalJSON(data []byte) error

type SSHKey

type SSHKey struct {
	// SSH key ID
	ID string `json:"id,required" format:"uuid4"`
	// SSH key creation time
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Fingerprint
	Fingerprint string `json:"fingerprint,required"`
	// SSH key name
	Name string `json:"name,required"`
	// Project ID
	ProjectID int64 `json:"project_id,required"`
	// The public part of an SSH key is the shareable portion of an SSH key pair. It
	// can be safely sent to servers or services to grant access. It does not contain
	// sensitive information.
	PublicKey string `json:"public_key,required"`
	// SSH key will be visible to all users in the project
	SharedInProject bool `json:"shared_in_project,required"`
	// SSH key state
	//
	// Any of "ACTIVE", "DELETING".
	State SSHKeyState `json:"state,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		CreatedAt       respjson.Field
		Fingerprint     respjson.Field
		Name            respjson.Field
		ProjectID       respjson.Field
		PublicKey       respjson.Field
		SharedInProject respjson.Field
		State           respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SSHKey) RawJSON

func (r SSHKey) RawJSON() string

Returns the unmodified JSON received from the API

func (*SSHKey) UnmarshalJSON

func (r *SSHKey) UnmarshalJSON(data []byte) error

type SSHKeyCreated

type SSHKeyCreated struct {
	// SSH key ID
	ID string `json:"id,required" format:"uuid4"`
	// SSH key creation time
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Fingerprint
	Fingerprint string `json:"fingerprint,required"`
	// SSH key name
	Name string `json:"name,required"`
	// The private part of an SSH key is the confidential portion of the key pair. It
	// should never be shared or exposed. This key is used to prove your identity when
	// connecting to a server.
	//
	// If you omit the `public_key`, the platform will generate a key for you. The
	// private_key will be returned **once** in the API response. Be sure to save it
	// securely, as it cannot be retrieved again later.
	//
	// Best practice: Save the private key to a secure location on your machine (e.g.,
	// `~/.ssh/id_ed25519`) and set the file permissions to be readable only by you.
	PrivateKey string `json:"private_key,required"`
	// Project ID
	ProjectID int64 `json:"project_id,required"`
	// The public part of an SSH key is the shareable portion of an SSH key pair. It
	// can be safely sent to servers or services to grant access. It does not contain
	// sensitive information.
	PublicKey string `json:"public_key,required"`
	// SSH key will be visible to all users in the project
	SharedInProject bool `json:"shared_in_project,required"`
	// SSH key state
	//
	// Any of "ACTIVE", "DELETING".
	State SSHKeyCreatedState `json:"state,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		CreatedAt       respjson.Field
		Fingerprint     respjson.Field
		Name            respjson.Field
		PrivateKey      respjson.Field
		ProjectID       respjson.Field
		PublicKey       respjson.Field
		SharedInProject respjson.Field
		State           respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SSHKeyCreated) RawJSON

func (r SSHKeyCreated) RawJSON() string

Returns the unmodified JSON received from the API

func (*SSHKeyCreated) UnmarshalJSON

func (r *SSHKeyCreated) UnmarshalJSON(data []byte) error

type SSHKeyCreatedState

type SSHKeyCreatedState string

SSH key state

const (
	SSHKeyCreatedStateActive   SSHKeyCreatedState = "ACTIVE"
	SSHKeyCreatedStateDeleting SSHKeyCreatedState = "DELETING"
)

type SSHKeyDeleteParams

type SSHKeyDeleteParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type SSHKeyGetParams

type SSHKeyGetParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type SSHKeyListParams

type SSHKeyListParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Maximum number of SSH keys to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Offset for pagination
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Sort order for the SSH keys
	//
	// Any of "created_at.asc", "created_at.desc", "name.asc", "name.desc".
	OrderBy SSHKeyListParamsOrderBy `query:"order_by,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SSHKeyListParams) URLQuery

func (r SSHKeyListParams) URLQuery() (v url.Values, err error)

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

type SSHKeyListParamsOrderBy

type SSHKeyListParamsOrderBy string

Sort order for the SSH keys

const (
	SSHKeyListParamsOrderByCreatedAtAsc  SSHKeyListParamsOrderBy = "created_at.asc"
	SSHKeyListParamsOrderByCreatedAtDesc SSHKeyListParamsOrderBy = "created_at.desc"
	SSHKeyListParamsOrderByNameAsc       SSHKeyListParamsOrderBy = "name.asc"
	SSHKeyListParamsOrderByNameDesc      SSHKeyListParamsOrderBy = "name.desc"
)

type SSHKeyNewParams

type SSHKeyNewParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// SSH key name
	Name string `json:"name,required"`
	// The public part of an SSH key is the shareable portion of an SSH key pair. It
	// can be safely sent to servers or services to grant access. It does not contain
	// sensitive information.
	//
	//   - If you’re uploading your own key, provide the public part here (usually found
	//     in a file like `id_ed25519.pub`).
	//   - If you want the platform to generate an Ed25519 key pair for you, leave this
	//     field empty — the system will return the private key in the response **once
	//     only**.
	PublicKey param.Opt[string] `json:"public_key,omitzero"`
	// SSH key is shared with all users in the project
	SharedInProject param.Opt[bool] `json:"shared_in_project,omitzero"`
	// contains filtered or unexported fields
}

func (SSHKeyNewParams) MarshalJSON

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

type SSHKeyService

type SSHKeyService struct {
	Options []option.RequestOption
}

SSHKeyService contains methods and other services that help with interacting with the gcore API.

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

func NewSSHKeyService

func NewSSHKeyService(opts ...option.RequestOption) (r SSHKeyService)

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

func (*SSHKeyService) Delete

func (r *SSHKeyService) Delete(ctx context.Context, sshKeyID string, body SSHKeyDeleteParams, opts ...option.RequestOption) (err error)

Delete SSH key

func (*SSHKeyService) Get

func (r *SSHKeyService) Get(ctx context.Context, sshKeyID string, query SSHKeyGetParams, opts ...option.RequestOption) (res *SSHKey, err error)

Get SSH key

func (*SSHKeyService) List

List SSH keys

func (*SSHKeyService) ListAutoPaging

List SSH keys

func (*SSHKeyService) New

func (r *SSHKeyService) New(ctx context.Context, params SSHKeyNewParams, opts ...option.RequestOption) (res *SSHKeyCreated, err error)

To generate a key, omit the public_key parameter from the request body

func (*SSHKeyService) Update

func (r *SSHKeyService) Update(ctx context.Context, sshKeyID string, params SSHKeyUpdateParams, opts ...option.RequestOption) (res *SSHKey, err error)

Share or unshare SSH key with users

type SSHKeyState

type SSHKeyState string

SSH key state

const (
	SSHKeyStateActive   SSHKeyState = "ACTIVE"
	SSHKeyStateDeleting SSHKeyState = "DELETING"
)

type SSHKeyUpdateParams

type SSHKeyUpdateParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Share your ssh key with all users in the project
	SharedInProject bool `json:"shared_in_project,required"`
	// contains filtered or unexported fields
}

func (SSHKeyUpdateParams) MarshalJSON

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

type Secret

type Secret struct {
	// Secret uuid
	ID string `json:"id,required"`
	// Secret name
	Name string `json:"name,required"`
	// Secret type, base64 encoded. symmetric - Used for storing byte arrays such as
	// keys suitable for symmetric encryption; public - Used for storing the public key
	// of an asymmetric keypair; private - Used for storing the private key of an
	// asymmetric keypair; passphrase - Used for storing plain text passphrases;
	// certificate - Used for storing cryptographic certificates such as X.509
	// certificates; opaque - Used for backwards compatibility with previous versions
	// of the API
	//
	// Any of "certificate", "opaque", "passphrase", "private", "public", "symmetric".
	SecretType SecretSecretType `json:"secret_type,required"`
	// Status
	Status string `json:"status,required"`
	// Metadata provided by a user or system for informational purposes. Defaults to
	// None
	Algorithm string `json:"algorithm,nullable"`
	// Metadata provided by a user or system for informational purposes. Value must be
	// greater than zero. Defaults to None
	BitLength int64 `json:"bit_length,nullable"`
	// Describes the content-types that can be used to retrieve the payload. The
	// content-type used with symmetric secrets is application/octet-stream
	ContentTypes map[string]string `json:"content_types,nullable"`
	// Datetime when the secret was created. The format is 2020-01-01T12:00:00+00:00
	Created time.Time `json:"created,nullable" format:"date-time"`
	// Datetime when the secret will expire. The format is 2020-01-01T12:00:00+00:00.
	// Defaults to None
	Expiration time.Time `json:"expiration,nullable" format:"date-time"`
	// Metadata provided by a user or system for informational purposes. Defaults to
	// None
	Mode string `json:"mode,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		Name         respjson.Field
		SecretType   respjson.Field
		Status       respjson.Field
		Algorithm    respjson.Field
		BitLength    respjson.Field
		ContentTypes respjson.Field
		Created      respjson.Field
		Expiration   respjson.Field
		Mode         respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Secret) RawJSON

func (r Secret) RawJSON() string

Returns the unmodified JSON received from the API

func (*Secret) UnmarshalJSON

func (r *Secret) UnmarshalJSON(data []byte) error

type SecretDeleteParams

type SecretDeleteParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type SecretGetParams

type SecretGetParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type SecretListParams

type SecretListParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type SecretListResponse

type SecretListResponse struct {
	// Number of objects
	Count int64 `json:"count,required"`
	// Objects
	Results []Secret `json:"results,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Results     respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SecretListResponse) RawJSON

func (r SecretListResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*SecretListResponse) UnmarshalJSON

func (r *SecretListResponse) UnmarshalJSON(data []byte) error

type SecretNewParams

type SecretNewParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Secret name
	Name string `json:"name,required"`
	// Secret payload. For HTTPS-terminated load balancing, provide base64 encoded
	// conents of a PKCS12 file. The PKCS12 file is the combined TLS certificate, key,
	// and intermediate certificate chain obtained from an external certificate
	// authority. The file can be created via openssl, e.g.'openssl pkcs12 -export
	// -inkey server.key -in server.crt -certfile ca-chain.crt -passout pass: -out
	// server.p12'The key and certificate should be PEM-encoded, and the intermediate
	// certificate chain should be multiple PEM-encoded certs concatenated together
	Payload string `json:"payload,required" format:"password"`
	// The encoding used for the payload to be able to include it in the JSON request.
	// Currently only base64 is supported
	//
	// Any of "base64".
	PayloadContentEncoding SecretNewParamsPayloadContentEncoding `json:"payload_content_encoding,omitzero,required"`
	// The media type for the content of the payload
	PayloadContentType string `json:"payload_content_type,required"`
	// Secret type. symmetric - Used for storing byte arrays such as keys suitable for
	// symmetric encryption; public - Used for storing the public key of an asymmetric
	// keypair; private - Used for storing the private key of an asymmetric keypair;
	// passphrase - Used for storing plain text passphrases; certificate - Used for
	// storing cryptographic certificates such as X.509 certificates; opaque - Used for
	// backwards compatibility with previous versions of the API
	//
	// Any of "certificate", "opaque", "passphrase", "private", "public", "symmetric".
	SecretType SecretNewParamsSecretType `json:"secret_type,omitzero,required"`
	// Metadata provided by a user or system for informational purposes.
	Algorithm param.Opt[string] `json:"algorithm,omitzero"`
	// Metadata provided by a user or system for informational purposes. Value must be
	// greater than zero.
	BitLength param.Opt[int64] `json:"bit_length,omitzero"`
	// Datetime when the secret will expire.
	Expiration param.Opt[string] `json:"expiration,omitzero"`
	// Metadata provided by a user or system for informational purposes.
	Mode param.Opt[string] `json:"mode,omitzero"`
	// contains filtered or unexported fields
}

func (SecretNewParams) MarshalJSON

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

type SecretNewParamsPayloadContentEncoding

type SecretNewParamsPayloadContentEncoding string

The encoding used for the payload to be able to include it in the JSON request. Currently only base64 is supported

const (
	SecretNewParamsPayloadContentEncodingBase64 SecretNewParamsPayloadContentEncoding = "base64"
)

type SecretNewParamsSecretType

type SecretNewParamsSecretType string

Secret type. symmetric - Used for storing byte arrays such as keys suitable for symmetric encryption; public - Used for storing the public key of an asymmetric keypair; private - Used for storing the private key of an asymmetric keypair; passphrase - Used for storing plain text passphrases; certificate - Used for storing cryptographic certificates such as X.509 certificates; opaque - Used for backwards compatibility with previous versions of the API

const (
	SecretNewParamsSecretTypeCertificate SecretNewParamsSecretType = "certificate"
	SecretNewParamsSecretTypeOpaque      SecretNewParamsSecretType = "opaque"
	SecretNewParamsSecretTypePassphrase  SecretNewParamsSecretType = "passphrase"
	SecretNewParamsSecretTypePrivate     SecretNewParamsSecretType = "private"
	SecretNewParamsSecretTypePublic      SecretNewParamsSecretType = "public"
	SecretNewParamsSecretTypeSymmetric   SecretNewParamsSecretType = "symmetric"
)

type SecretSecretType

type SecretSecretType string

Secret type, base64 encoded. symmetric - Used for storing byte arrays such as keys suitable for symmetric encryption; public - Used for storing the public key of an asymmetric keypair; private - Used for storing the private key of an asymmetric keypair; passphrase - Used for storing plain text passphrases; certificate - Used for storing cryptographic certificates such as X.509 certificates; opaque - Used for backwards compatibility with previous versions of the API

const (
	SecretSecretTypeCertificate SecretSecretType = "certificate"
	SecretSecretTypeOpaque      SecretSecretType = "opaque"
	SecretSecretTypePassphrase  SecretSecretType = "passphrase"
	SecretSecretTypePrivate     SecretSecretType = "private"
	SecretSecretTypePublic      SecretSecretType = "public"
	SecretSecretTypeSymmetric   SecretSecretType = "symmetric"
)

type SecretService

type SecretService struct {
	Options []option.RequestOption
	// contains filtered or unexported fields
}

SecretService contains methods and other services that help with interacting with the gcore API.

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

func NewSecretService

func NewSecretService(opts ...option.RequestOption) (r SecretService)

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

func (*SecretService) Delete

func (r *SecretService) Delete(ctx context.Context, secretID string, body SecretDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Delete secret

func (*SecretService) Get

func (r *SecretService) Get(ctx context.Context, secretID string, query SecretGetParams, opts ...option.RequestOption) (res *Secret, err error)

Get secret

func (*SecretService) List

func (r *SecretService) List(ctx context.Context, query SecretListParams, opts ...option.RequestOption) (res *SecretListResponse, err error)

List secrets

func (*SecretService) New

func (r *SecretService) New(ctx context.Context, params SecretNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Create secret

func (*SecretService) NewAndPoll

func (r *SecretService) NewAndPoll(ctx context.Context, params SecretNewParams, opts ...option.RequestOption) (v *Secret, err error)

Create secret and poll for the result

func (*SecretService) UploadTlsCertificate

func (r *SecretService) UploadTlsCertificate(ctx context.Context, params SecretUploadTlsCertificateParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Create secret

type SecretUploadTlsCertificateParams

type SecretUploadTlsCertificateParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Secret name
	Name string `json:"name,required"`
	// Secret payload.
	Payload SecretUploadTlsCertificateParamsPayload `json:"payload,omitzero,required"`
	// Datetime when the secret will expire. Defaults to None
	Expiration param.Opt[time.Time] `json:"expiration,omitzero" format:"date-time"`
	// contains filtered or unexported fields
}

func (SecretUploadTlsCertificateParams) MarshalJSON

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

type SecretUploadTlsCertificateParamsPayload

type SecretUploadTlsCertificateParamsPayload struct {
	// SSL certificate in PEM format.
	Certificate string `json:"certificate,required" format:"password"`
	// SSL certificate chain of intermediates and root certificates in PEM format.
	CertificateChain string `json:"certificate_chain,required" format:"password"`
	// SSL private key in PEM format.
	PrivateKey string `json:"private_key,required" format:"password"`
	// contains filtered or unexported fields
}

Secret payload.

The properties Certificate, CertificateChain, PrivateKey are required.

func (SecretUploadTlsCertificateParamsPayload) MarshalJSON

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

type SecurityGroup

type SecurityGroup struct {
	// Security group ID
	ID string `json:"id,required" format:"uuid4"`
	// Datetime when the security group was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Security group name
	Name string `json:"name,required"`
	// Project ID
	ProjectID int64 `json:"project_id,required"`
	// Region name
	Region string `json:"region,required"`
	// Region ID
	RegionID int64 `json:"region_id,required"`
	// The number of revisions
	RevisionNumber int64 `json:"revision_number,required"`
	// Tags for a security group
	TagsV2 []Tag `json:"tags_v2,required"`
	// Datetime when the security group was last updated
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// Security group description
	Description string `json:"description,nullable"`
	// Security group rules
	SecurityGroupRules []SecurityGroupRule `json:"security_group_rules"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                 respjson.Field
		CreatedAt          respjson.Field
		Name               respjson.Field
		ProjectID          respjson.Field
		Region             respjson.Field
		RegionID           respjson.Field
		RevisionNumber     respjson.Field
		TagsV2             respjson.Field
		UpdatedAt          respjson.Field
		Description        respjson.Field
		SecurityGroupRules respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SecurityGroup) RawJSON

func (r SecurityGroup) RawJSON() string

Returns the unmodified JSON received from the API

func (*SecurityGroup) UnmarshalJSON

func (r *SecurityGroup) UnmarshalJSON(data []byte) error

type SecurityGroupCopyParams

type SecurityGroupCopyParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Name.
	Name string `json:"name,required"`
	// contains filtered or unexported fields
}

func (SecurityGroupCopyParams) MarshalJSON

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

type SecurityGroupDeleteParams

type SecurityGroupDeleteParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type SecurityGroupGetParams

type SecurityGroupGetParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type SecurityGroupListParams

type SecurityGroupListParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Limit the number of returned limit request entities.
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Offset value is used to exclude the first set of records from the result.
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Filter by tag key-value pairs. Must be a valid JSON string. curl -G
	// --data-urlencode "tag_key_value={"key": "value"}" --url
	// "http://localhost:1111/v1/securitygroups/1/1"
	TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
	// Filter by tag keys.
	TagKey []string `query:"tag_key,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (SecurityGroupListParams) URLQuery

func (r SecurityGroupListParams) URLQuery() (v url.Values, err error)

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

type SecurityGroupNewParams

type SecurityGroupNewParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Security group
	SecurityGroup SecurityGroupNewParamsSecurityGroup `json:"security_group,omitzero,required"`
	// List of instances
	Instances []string `json:"instances,omitzero"`
	// contains filtered or unexported fields
}

func (SecurityGroupNewParams) MarshalJSON

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

type SecurityGroupNewParamsSecurityGroup

type SecurityGroupNewParamsSecurityGroup struct {
	// Security group name
	Name string `json:"name,required"`
	// Security group description
	Description param.Opt[string] `json:"description,omitzero"`
	// Security group rules
	SecurityGroupRules []SecurityGroupNewParamsSecurityGroupSecurityGroupRule `json:"security_group_rules,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags map[string]any `json:"tags,omitzero"`
	// contains filtered or unexported fields
}

Security group

The property Name is required.

func (SecurityGroupNewParamsSecurityGroup) MarshalJSON

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

type SecurityGroupNewParamsSecurityGroupSecurityGroupRule

type SecurityGroupNewParamsSecurityGroupSecurityGroupRule struct {
	// The maximum port number in the range that is matched by the security group rule
	PortRangeMax param.Opt[int64] `json:"port_range_max,omitzero"`
	// The minimum port number in the range that is matched by the security group rule
	PortRangeMin param.Opt[int64] `json:"port_range_min,omitzero"`
	// The remote IP prefix that is matched by this security group rule
	RemoteIPPrefix param.Opt[string] `json:"remote_ip_prefix,omitzero" format:"ipvanynetwork"`
	// Rule description
	Description param.Opt[string] `json:"description,omitzero"`
	// The remote group UUID to associate with this security group
	RemoteGroupID param.Opt[string] `json:"remote_group_id,omitzero" format:"uuid4"`
	// Ingress or egress, which is the direction in which the security group is applied
	//
	// Any of "egress", "ingress".
	Direction string `json:"direction,omitzero"`
	// Ether type
	//
	// Any of "IPv4", "IPv6".
	Ethertype string `json:"ethertype,omitzero"`
	// Protocol
	//
	// Any of "ah", "any", "dccp", "egp", "esp", "gre", "icmp", "igmp", "ipencap",
	// "ipip", "ipv6-encap", "ipv6-frag", "ipv6-icmp", "ipv6-nonxt", "ipv6-opts",
	// "ipv6-route", "ospf", "pgm", "rsvp", "sctp", "tcp", "udp", "udplite", "vrrp".
	Protocol string `json:"protocol,omitzero"`
	// contains filtered or unexported fields
}

func (SecurityGroupNewParamsSecurityGroupSecurityGroupRule) MarshalJSON

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

type SecurityGroupRevertToDefaultParams

type SecurityGroupRevertToDefaultParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type SecurityGroupRule

type SecurityGroupRule struct {
	// The ID of the security group rule
	ID string `json:"id,required" format:"uuid4"`
	// Datetime when the rule was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Ingress or egress, which is the direction in which the security group rule is
	// applied
	//
	// Any of "egress", "ingress".
	Direction SecurityGroupRuleDirection `json:"direction,required"`
	// The revision number of the resource
	RevisionNumber int64 `json:"revision_number,required"`
	// The security group ID to associate with this security group rule
	SecurityGroupID string `json:"security_group_id,required" format:"uuid4"`
	// Datetime when the rule was last updated
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// Rule description
	Description string `json:"description,nullable"`
	// Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress
	// or egress rules.
	//
	// Any of "IPv4", "IPv6".
	Ethertype SecurityGroupRuleEthertype `json:"ethertype,nullable"`
	// The maximum port number in the range that is matched by the security group rule
	PortRangeMax int64 `json:"port_range_max,nullable"`
	// The minimum port number in the range that is matched by the security group rule
	PortRangeMin int64 `json:"port_range_min,nullable"`
	// Protocol
	//
	// Any of "ah", "any", "dccp", "egp", "esp", "gre", "icmp", "igmp", "ipencap",
	// "ipip", "ipv6-encap", "ipv6-frag", "ipv6-icmp", "ipv6-nonxt", "ipv6-opts",
	// "ipv6-route", "ospf", "pgm", "rsvp", "sctp", "tcp", "udp", "udplite", "vrrp".
	Protocol SecurityGroupRuleProtocol `json:"protocol,nullable"`
	// The remote group UUID to associate with this security group rule
	RemoteGroupID string `json:"remote_group_id,nullable" format:"uuid4"`
	// The remote IP prefix that is matched by this security group rule
	RemoteIPPrefix string `json:"remote_ip_prefix,nullable" format:"ipvanynetwork"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID              respjson.Field
		CreatedAt       respjson.Field
		Direction       respjson.Field
		RevisionNumber  respjson.Field
		SecurityGroupID respjson.Field
		UpdatedAt       respjson.Field
		Description     respjson.Field
		Ethertype       respjson.Field
		PortRangeMax    respjson.Field
		PortRangeMin    respjson.Field
		Protocol        respjson.Field
		RemoteGroupID   respjson.Field
		RemoteIPPrefix  respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SecurityGroupRule) RawJSON

func (r SecurityGroupRule) RawJSON() string

Returns the unmodified JSON received from the API

func (*SecurityGroupRule) UnmarshalJSON

func (r *SecurityGroupRule) UnmarshalJSON(data []byte) error

type SecurityGroupRuleDeleteParams

type SecurityGroupRuleDeleteParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type SecurityGroupRuleDirection

type SecurityGroupRuleDirection string

Ingress or egress, which is the direction in which the security group rule is applied

const (
	SecurityGroupRuleDirectionEgress  SecurityGroupRuleDirection = "egress"
	SecurityGroupRuleDirectionIngress SecurityGroupRuleDirection = "ingress"
)

type SecurityGroupRuleEthertype

type SecurityGroupRuleEthertype string

Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules.

const (
	SecurityGroupRuleEthertypeIPv4 SecurityGroupRuleEthertype = "IPv4"
	SecurityGroupRuleEthertypeIPv6 SecurityGroupRuleEthertype = "IPv6"
)

type SecurityGroupRuleNewParams

type SecurityGroupRuleNewParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// The maximum port number in the range that is matched by the security group rule
	PortRangeMax param.Opt[int64] `json:"port_range_max,omitzero"`
	// The minimum port number in the range that is matched by the security group rule
	PortRangeMin param.Opt[int64] `json:"port_range_min,omitzero"`
	// The remote IP prefix that is matched by this security group rule
	RemoteIPPrefix param.Opt[string] `json:"remote_ip_prefix,omitzero" format:"ipvanynetwork"`
	// Rule description
	Description param.Opt[string] `json:"description,omitzero"`
	// The remote group UUID to associate with this security group
	RemoteGroupID param.Opt[string] `json:"remote_group_id,omitzero" format:"uuid4"`
	// Ingress or egress, which is the direction in which the security group is applied
	//
	// Any of "egress", "ingress".
	Direction SecurityGroupRuleNewParamsDirection `json:"direction,omitzero"`
	// Ether type
	//
	// Any of "IPv4", "IPv6".
	Ethertype SecurityGroupRuleNewParamsEthertype `json:"ethertype,omitzero"`
	// Protocol
	//
	// Any of "ah", "any", "dccp", "egp", "esp", "gre", "icmp", "igmp", "ipencap",
	// "ipip", "ipv6-encap", "ipv6-frag", "ipv6-icmp", "ipv6-nonxt", "ipv6-opts",
	// "ipv6-route", "ospf", "pgm", "rsvp", "sctp", "tcp", "udp", "udplite", "vrrp".
	Protocol SecurityGroupRuleNewParamsProtocol `json:"protocol,omitzero"`
	// contains filtered or unexported fields
}

func (SecurityGroupRuleNewParams) MarshalJSON

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

type SecurityGroupRuleNewParamsDirection

type SecurityGroupRuleNewParamsDirection string

Ingress or egress, which is the direction in which the security group is applied

const (
	SecurityGroupRuleNewParamsDirectionEgress  SecurityGroupRuleNewParamsDirection = "egress"
	SecurityGroupRuleNewParamsDirectionIngress SecurityGroupRuleNewParamsDirection = "ingress"
)

type SecurityGroupRuleNewParamsEthertype

type SecurityGroupRuleNewParamsEthertype string

Ether type

const (
	SecurityGroupRuleNewParamsEthertypeIPv4 SecurityGroupRuleNewParamsEthertype = "IPv4"
	SecurityGroupRuleNewParamsEthertypeIPv6 SecurityGroupRuleNewParamsEthertype = "IPv6"
)

type SecurityGroupRuleNewParamsProtocol

type SecurityGroupRuleNewParamsProtocol string

Protocol

const (
	SecurityGroupRuleNewParamsProtocolAh        SecurityGroupRuleNewParamsProtocol = "ah"
	SecurityGroupRuleNewParamsProtocolAny       SecurityGroupRuleNewParamsProtocol = "any"
	SecurityGroupRuleNewParamsProtocolDccp      SecurityGroupRuleNewParamsProtocol = "dccp"
	SecurityGroupRuleNewParamsProtocolEgp       SecurityGroupRuleNewParamsProtocol = "egp"
	SecurityGroupRuleNewParamsProtocolEsp       SecurityGroupRuleNewParamsProtocol = "esp"
	SecurityGroupRuleNewParamsProtocolGre       SecurityGroupRuleNewParamsProtocol = "gre"
	SecurityGroupRuleNewParamsProtocolIcmp      SecurityGroupRuleNewParamsProtocol = "icmp"
	SecurityGroupRuleNewParamsProtocolIgmp      SecurityGroupRuleNewParamsProtocol = "igmp"
	SecurityGroupRuleNewParamsProtocolIpencap   SecurityGroupRuleNewParamsProtocol = "ipencap"
	SecurityGroupRuleNewParamsProtocolIpip      SecurityGroupRuleNewParamsProtocol = "ipip"
	SecurityGroupRuleNewParamsProtocolIpv6Encap SecurityGroupRuleNewParamsProtocol = "ipv6-encap"
	SecurityGroupRuleNewParamsProtocolIpv6Frag  SecurityGroupRuleNewParamsProtocol = "ipv6-frag"
	SecurityGroupRuleNewParamsProtocolIpv6Icmp  SecurityGroupRuleNewParamsProtocol = "ipv6-icmp"
	SecurityGroupRuleNewParamsProtocolIpv6Nonxt SecurityGroupRuleNewParamsProtocol = "ipv6-nonxt"
	SecurityGroupRuleNewParamsProtocolIpv6Opts  SecurityGroupRuleNewParamsProtocol = "ipv6-opts"
	SecurityGroupRuleNewParamsProtocolIpv6Route SecurityGroupRuleNewParamsProtocol = "ipv6-route"
	SecurityGroupRuleNewParamsProtocolOspf      SecurityGroupRuleNewParamsProtocol = "ospf"
	SecurityGroupRuleNewParamsProtocolPgm       SecurityGroupRuleNewParamsProtocol = "pgm"
	SecurityGroupRuleNewParamsProtocolRsvp      SecurityGroupRuleNewParamsProtocol = "rsvp"
	SecurityGroupRuleNewParamsProtocolSctp      SecurityGroupRuleNewParamsProtocol = "sctp"
	SecurityGroupRuleNewParamsProtocolTcp       SecurityGroupRuleNewParamsProtocol = "tcp"
	SecurityGroupRuleNewParamsProtocolUdp       SecurityGroupRuleNewParamsProtocol = "udp"
	SecurityGroupRuleNewParamsProtocolUdplite   SecurityGroupRuleNewParamsProtocol = "udplite"
	SecurityGroupRuleNewParamsProtocolVrrp      SecurityGroupRuleNewParamsProtocol = "vrrp"
)

type SecurityGroupRuleProtocol

type SecurityGroupRuleProtocol string

Protocol

const (
	SecurityGroupRuleProtocolAh        SecurityGroupRuleProtocol = "ah"
	SecurityGroupRuleProtocolAny       SecurityGroupRuleProtocol = "any"
	SecurityGroupRuleProtocolDccp      SecurityGroupRuleProtocol = "dccp"
	SecurityGroupRuleProtocolEgp       SecurityGroupRuleProtocol = "egp"
	SecurityGroupRuleProtocolEsp       SecurityGroupRuleProtocol = "esp"
	SecurityGroupRuleProtocolGre       SecurityGroupRuleProtocol = "gre"
	SecurityGroupRuleProtocolIcmp      SecurityGroupRuleProtocol = "icmp"
	SecurityGroupRuleProtocolIgmp      SecurityGroupRuleProtocol = "igmp"
	SecurityGroupRuleProtocolIpencap   SecurityGroupRuleProtocol = "ipencap"
	SecurityGroupRuleProtocolIpip      SecurityGroupRuleProtocol = "ipip"
	SecurityGroupRuleProtocolIpv6Encap SecurityGroupRuleProtocol = "ipv6-encap"
	SecurityGroupRuleProtocolIpv6Frag  SecurityGroupRuleProtocol = "ipv6-frag"
	SecurityGroupRuleProtocolIpv6Icmp  SecurityGroupRuleProtocol = "ipv6-icmp"
	SecurityGroupRuleProtocolIpv6Nonxt SecurityGroupRuleProtocol = "ipv6-nonxt"
	SecurityGroupRuleProtocolIpv6Opts  SecurityGroupRuleProtocol = "ipv6-opts"
	SecurityGroupRuleProtocolIpv6Route SecurityGroupRuleProtocol = "ipv6-route"
	SecurityGroupRuleProtocolOspf      SecurityGroupRuleProtocol = "ospf"
	SecurityGroupRuleProtocolPgm       SecurityGroupRuleProtocol = "pgm"
	SecurityGroupRuleProtocolRsvp      SecurityGroupRuleProtocol = "rsvp"
	SecurityGroupRuleProtocolSctp      SecurityGroupRuleProtocol = "sctp"
	SecurityGroupRuleProtocolTcp       SecurityGroupRuleProtocol = "tcp"
	SecurityGroupRuleProtocolUdp       SecurityGroupRuleProtocol = "udp"
	SecurityGroupRuleProtocolUdplite   SecurityGroupRuleProtocol = "udplite"
	SecurityGroupRuleProtocolVrrp      SecurityGroupRuleProtocol = "vrrp"
)

type SecurityGroupRuleReplaceParams

type SecurityGroupRuleReplaceParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Ingress or egress, which is the direction in which the security group rule is
	// applied
	//
	// Any of "egress", "ingress".
	Direction SecurityGroupRuleReplaceParamsDirection `json:"direction,omitzero,required"`
	// Parent security group of this rule
	SecurityGroupID string `json:"security_group_id,required" format:"uuid4"`
	// The maximum port number in the range that is matched by the security group rule
	PortRangeMax param.Opt[int64] `json:"port_range_max,omitzero"`
	// The minimum port number in the range that is matched by the security group rule
	PortRangeMin param.Opt[int64] `json:"port_range_min,omitzero"`
	// The remote group UUID to associate with this security group rule
	RemoteGroupID param.Opt[string] `json:"remote_group_id,omitzero" format:"uuid4"`
	// The remote IP prefix that is matched by this security group rule
	RemoteIPPrefix param.Opt[string] `json:"remote_ip_prefix,omitzero" format:"ipvanynetwork"`
	// Rule description
	Description param.Opt[string] `json:"description,omitzero"`
	// Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress
	// or egress rules.
	//
	// Any of "IPv4", "IPv6".
	Ethertype SecurityGroupRuleReplaceParamsEthertype `json:"ethertype,omitzero"`
	// Protocol
	//
	// Any of "ah", "any", "dccp", "egp", "esp", "gre", "icmp", "igmp", "ipencap",
	// "ipip", "ipv6-encap", "ipv6-frag", "ipv6-icmp", "ipv6-nonxt", "ipv6-opts",
	// "ipv6-route", "ospf", "pgm", "rsvp", "sctp", "tcp", "udp", "udplite", "vrrp".
	Protocol SecurityGroupRuleReplaceParamsProtocol `json:"protocol,omitzero"`
	// contains filtered or unexported fields
}

func (SecurityGroupRuleReplaceParams) MarshalJSON

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

type SecurityGroupRuleReplaceParamsDirection

type SecurityGroupRuleReplaceParamsDirection string

Ingress or egress, which is the direction in which the security group rule is applied

const (
	SecurityGroupRuleReplaceParamsDirectionEgress  SecurityGroupRuleReplaceParamsDirection = "egress"
	SecurityGroupRuleReplaceParamsDirectionIngress SecurityGroupRuleReplaceParamsDirection = "ingress"
)

type SecurityGroupRuleReplaceParamsEthertype

type SecurityGroupRuleReplaceParamsEthertype string

Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress or egress rules.

const (
	SecurityGroupRuleReplaceParamsEthertypeIPv4 SecurityGroupRuleReplaceParamsEthertype = "IPv4"
	SecurityGroupRuleReplaceParamsEthertypeIPv6 SecurityGroupRuleReplaceParamsEthertype = "IPv6"
)

type SecurityGroupRuleReplaceParamsProtocol

type SecurityGroupRuleReplaceParamsProtocol string

Protocol

const (
	SecurityGroupRuleReplaceParamsProtocolAh        SecurityGroupRuleReplaceParamsProtocol = "ah"
	SecurityGroupRuleReplaceParamsProtocolAny       SecurityGroupRuleReplaceParamsProtocol = "any"
	SecurityGroupRuleReplaceParamsProtocolDccp      SecurityGroupRuleReplaceParamsProtocol = "dccp"
	SecurityGroupRuleReplaceParamsProtocolEgp       SecurityGroupRuleReplaceParamsProtocol = "egp"
	SecurityGroupRuleReplaceParamsProtocolEsp       SecurityGroupRuleReplaceParamsProtocol = "esp"
	SecurityGroupRuleReplaceParamsProtocolGre       SecurityGroupRuleReplaceParamsProtocol = "gre"
	SecurityGroupRuleReplaceParamsProtocolIcmp      SecurityGroupRuleReplaceParamsProtocol = "icmp"
	SecurityGroupRuleReplaceParamsProtocolIgmp      SecurityGroupRuleReplaceParamsProtocol = "igmp"
	SecurityGroupRuleReplaceParamsProtocolIpencap   SecurityGroupRuleReplaceParamsProtocol = "ipencap"
	SecurityGroupRuleReplaceParamsProtocolIpip      SecurityGroupRuleReplaceParamsProtocol = "ipip"
	SecurityGroupRuleReplaceParamsProtocolIpv6Encap SecurityGroupRuleReplaceParamsProtocol = "ipv6-encap"
	SecurityGroupRuleReplaceParamsProtocolIpv6Frag  SecurityGroupRuleReplaceParamsProtocol = "ipv6-frag"
	SecurityGroupRuleReplaceParamsProtocolIpv6Icmp  SecurityGroupRuleReplaceParamsProtocol = "ipv6-icmp"
	SecurityGroupRuleReplaceParamsProtocolIpv6Nonxt SecurityGroupRuleReplaceParamsProtocol = "ipv6-nonxt"
	SecurityGroupRuleReplaceParamsProtocolIpv6Opts  SecurityGroupRuleReplaceParamsProtocol = "ipv6-opts"
	SecurityGroupRuleReplaceParamsProtocolIpv6Route SecurityGroupRuleReplaceParamsProtocol = "ipv6-route"
	SecurityGroupRuleReplaceParamsProtocolOspf      SecurityGroupRuleReplaceParamsProtocol = "ospf"
	SecurityGroupRuleReplaceParamsProtocolPgm       SecurityGroupRuleReplaceParamsProtocol = "pgm"
	SecurityGroupRuleReplaceParamsProtocolRsvp      SecurityGroupRuleReplaceParamsProtocol = "rsvp"
	SecurityGroupRuleReplaceParamsProtocolSctp      SecurityGroupRuleReplaceParamsProtocol = "sctp"
	SecurityGroupRuleReplaceParamsProtocolTcp       SecurityGroupRuleReplaceParamsProtocol = "tcp"
	SecurityGroupRuleReplaceParamsProtocolUdp       SecurityGroupRuleReplaceParamsProtocol = "udp"
	SecurityGroupRuleReplaceParamsProtocolUdplite   SecurityGroupRuleReplaceParamsProtocol = "udplite"
	SecurityGroupRuleReplaceParamsProtocolVrrp      SecurityGroupRuleReplaceParamsProtocol = "vrrp"
)

type SecurityGroupRuleService

type SecurityGroupRuleService struct {
	Options []option.RequestOption
}

SecurityGroupRuleService contains methods and other services that help with interacting with the gcore API.

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

func NewSecurityGroupRuleService

func NewSecurityGroupRuleService(opts ...option.RequestOption) (r SecurityGroupRuleService)

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

func (*SecurityGroupRuleService) Delete

Delete security group rule

func (*SecurityGroupRuleService) New

Add new rule to security group

func (*SecurityGroupRuleService) Replace

Edit the security group rule: delete old and create new rule

type SecurityGroupService

type SecurityGroupService struct {
	Options []option.RequestOption
	Rules   SecurityGroupRuleService
}

SecurityGroupService contains methods and other services that help with interacting with the gcore API.

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

func NewSecurityGroupService

func NewSecurityGroupService(opts ...option.RequestOption) (r SecurityGroupService)

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

func (*SecurityGroupService) Copy

func (r *SecurityGroupService) Copy(ctx context.Context, groupID string, params SecurityGroupCopyParams, opts ...option.RequestOption) (err error)

Create a deep copy of security group

func (*SecurityGroupService) Delete

func (r *SecurityGroupService) Delete(ctx context.Context, groupID string, body SecurityGroupDeleteParams, opts ...option.RequestOption) (err error)

Delete security group

func (*SecurityGroupService) Get

func (r *SecurityGroupService) Get(ctx context.Context, groupID string, query SecurityGroupGetParams, opts ...option.RequestOption) (res *SecurityGroup, err error)

Get security group

func (*SecurityGroupService) List

Get security groups

func (*SecurityGroupService) ListAutoPaging

Get security groups

func (*SecurityGroupService) New

Create security group

func (*SecurityGroupService) RevertToDefault

func (r *SecurityGroupService) RevertToDefault(ctx context.Context, groupID string, body SecurityGroupRevertToDefaultParams, opts ...option.RequestOption) (res *SecurityGroup, err error)

Revert security group

func (*SecurityGroupService) Update

func (r *SecurityGroupService) Update(ctx context.Context, groupID string, params SecurityGroupUpdateParams, opts ...option.RequestOption) (res *SecurityGroup, err error)

Change security group

type SecurityGroupUpdateParams

type SecurityGroupUpdateParams struct {
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	RegionID  param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Name
	Name param.Opt[string] `json:"name,omitzero"`
	// List of rules to create or delete
	ChangedRules []SecurityGroupUpdateParamsChangedRule `json:"changed_rules,omitzero"`
	// contains filtered or unexported fields
}

func (SecurityGroupUpdateParams) MarshalJSON

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

type SecurityGroupUpdateParamsChangedRule

type SecurityGroupUpdateParamsChangedRule struct {
	// Action for a rule
	//
	// Any of "create", "delete".
	Action string `json:"action,omitzero,required"`
	// The remote group UUID to associate with this security group rule
	RemoteGroupID param.Opt[string] `json:"remote_group_id,omitzero" format:"uuid4"`
	// The remote IP prefix that is matched by this security group rule
	RemoteIPPrefix param.Opt[string] `json:"remote_ip_prefix,omitzero" format:"ipvanynetwork"`
	// UUID of rule to be deleted. Required for action 'delete' only
	SecurityGroupRuleID param.Opt[string] `json:"security_group_rule_id,omitzero" format:"uuid4"`
	// Security grpup rule description
	Description param.Opt[string] `json:"description,omitzero"`
	// The maximum port number in the range that is matched by the security group rule
	PortRangeMax param.Opt[int64] `json:"port_range_max,omitzero"`
	// The minimum port number in the range that is matched by the security group rule
	PortRangeMin param.Opt[int64] `json:"port_range_min,omitzero"`
	// Must be IPv4 or IPv6, and addresses represented in CIDR must match the ingress
	// or egress rules.
	//
	// Any of "IPv4", "IPv6".
	Ethertype string `json:"ethertype,omitzero"`
	// Ingress or egress, which is the direction in which the security group rule is
	// applied
	//
	// Any of "egress", "ingress".
	Direction string `json:"direction,omitzero"`
	// Protocol
	//
	// Any of "ah", "any", "dccp", "egp", "esp", "gre", "icmp", "igmp", "ipencap",
	// "ipip", "ipv6-encap", "ipv6-frag", "ipv6-icmp", "ipv6-nonxt", "ipv6-opts",
	// "ipv6-route", "ospf", "pgm", "rsvp", "sctp", "tcp", "udp", "udplite", "vrrp".
	Protocol string `json:"protocol,omitzero"`
	// contains filtered or unexported fields
}

The property Action is required.

func (SecurityGroupUpdateParamsChangedRule) MarshalJSON

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

type SessionPersistence

type SessionPersistence struct {
	// Session persistence type
	//
	// Any of "APP_COOKIE", "HTTP_COOKIE", "SOURCE_IP".
	Type LbSessionPersistenceType `json:"type,required"`
	// Should be set if app cookie or http cookie is used
	CookieName string `json:"cookie_name,nullable"`
	// Subnet mask if source_ip is used. For UDP ports only
	PersistenceGranularity string `json:"persistence_granularity,nullable"`
	// Session persistence timeout. For UDP ports only
	PersistenceTimeout int64 `json:"persistence_timeout,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Type                   respjson.Field
		CookieName             respjson.Field
		PersistenceGranularity respjson.Field
		PersistenceTimeout     respjson.Field
		ExtraFields            map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (SessionPersistence) RawJSON

func (r SessionPersistence) RawJSON() string

Returns the unmodified JSON received from the API

func (*SessionPersistence) UnmarshalJSON

func (r *SessionPersistence) UnmarshalJSON(data []byte) error

type Subnet

type Subnet struct {
	// CIDR
	Cidr string `json:"cidr,required" format:"ipvanynetwork"`
	// Datetime when the subnet was created
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// True if DHCP should be enabled
	EnableDhcp bool `json:"enable_dhcp,required"`
	// IP version
	//
	// Any of 4, 6.
	IPVersion int64 `json:"ip_version,required"`
	// Subnet name
	Name string `json:"name,required"`
	// Network ID
	NetworkID string `json:"network_id,required" format:"uuid4"`
	// Project ID
	ProjectID int64 `json:"project_id,required"`
	// Region name
	Region string `json:"region,required"`
	// Region ID
	RegionID int64 `json:"region_id,required"`
	// List of key-value tags associated with the resource. A tag is a key-value pair
	// that can be associated with a resource, enabling efficient filtering and
	// grouping for better organization and management. Some tags are read-only and
	// cannot be modified by the user. Tags are also integrated with cost reports,
	// allowing cost data to be filtered based on tag keys or values.
	Tags []Tag `json:"tags,required"`
	// Datetime when the subnet was last updated
	UpdatedAt time.Time `json:"updated_at,required" format:"date-time"`
	// Subnet id.
	ID string `json:"id,nullable" format:"uuid4"`
	// Number of available ips in subnet
	AvailableIPs int64 `json:"available_ips,nullable"`
	// Task that created this entity
	CreatorTaskID string `json:"creator_task_id,nullable" format:"uuid4"`
	// List IP addresses of a DNS resolver reachable from the network
	DNSNameservers []string `json:"dns_nameservers,nullable" format:"ipvanyaddress"`
	// Default GW IPv4 address, advertised in DHCP routes of this subnet. If null, no
	// gateway is advertised by this subnet.
	GatewayIP string `json:"gateway_ip,nullable" format:"ipvanyaddress"`
	// Subnet has router attached to it
	HasRouter bool `json:"has_router"`
	// List of custom static routes to advertise via DHCP.
	HostRoutes []Route `json:"host_routes,nullable"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,nullable" format:"uuid4"`
	// Total number of ips in subnet
	TotalIPs int64 `json:"total_ips,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Cidr           respjson.Field
		CreatedAt      respjson.Field
		EnableDhcp     respjson.Field
		IPVersion      respjson.Field
		Name           respjson.Field
		NetworkID      respjson.Field
		ProjectID      respjson.Field
		Region         respjson.Field
		RegionID       respjson.Field
		Tags           respjson.Field
		UpdatedAt      respjson.Field
		ID             respjson.Field
		AvailableIPs   respjson.Field
		CreatorTaskID  respjson.Field
		DNSNameservers respjson.Field
		GatewayIP      respjson.Field
		HasRouter      respjson.Field
		HostRoutes     respjson.Field
		TaskID         respjson.Field
		TotalIPs       respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Subnet) RawJSON

func (r Subnet) RawJSON() string

Returns the unmodified JSON received from the API

func (*Subnet) UnmarshalJSON

func (r *Subnet) UnmarshalJSON(data []byte) error

type SubnetIDParam

type SubnetIDParam struct {
	// Target IP is identified by it's subnet
	SubnetID string `json:"subnet_id,required" format:"uuid4"`
	// contains filtered or unexported fields
}

The property SubnetID is required.

func (SubnetIDParam) MarshalJSON

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

type Tag

type Tag struct {
	// Tag key. The maximum size for a key is 255 bytes.
	Key string `json:"key,required"`
	// If true, the tag is read-only and cannot be modified by the user
	ReadOnly bool `json:"read_only,required"`
	// Tag value. The maximum size for a value is 1024 bytes.
	Value string `json:"value,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Key         respjson.Field
		ReadOnly    respjson.Field
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A tag is a key-value pair that can be associated with a resource, enabling efficient filtering and grouping for better organization and management. Some tags are read-only and cannot be modified by the user. Tags are also integrated with cost reports, allowing cost data to be filtered based on tag keys or values.

func (Tag) RawJSON

func (r Tag) RawJSON() string

Returns the unmodified JSON received from the API

func (*Tag) UnmarshalJSON

func (r *Tag) UnmarshalJSON(data []byte) error

type TagUpdateMap

type TagUpdateMap map[string]string

type Task

type Task struct {
	// The task ID
	ID string `json:"id,required"`
	// Created timestamp
	CreatedOn string `json:"created_on,required"`
	// The task state
	//
	// Any of "ERROR", "FINISHED", "NEW", "RUNNING".
	State TaskState `json:"state,required"`
	// The task type
	TaskType string `json:"task_type,required"`
	// The user ID that initiated the task
	UserID int64 `json:"user_id,required"`
	// If task was acknowledged, this field stores acknowledge timestamp
	AcknowledgedAt string `json:"acknowledged_at,nullable"`
	// If task was acknowledged, this field stores user_id of the person
	AcknowledgedBy int64 `json:"acknowledged_by,nullable"`
	// The client ID
	ClientID int64 `json:"client_id,nullable"`
	// If the task creates resources, this field will contain their IDs
	CreatedResources TaskCreatedResources `json:"created_resources,nullable"`
	// Task parameters
	Data any `json:"data"`
	// Task detailed state that is more specific to task type
	//
	// Any of "CLUSTER_CLEAN_UP", "CLUSTER_RESIZE", "CLUSTER_RESUME",
	// "CLUSTER_SUSPEND", "ERROR", "FINISHED", "IPU_SERVERS", "NETWORK",
	// "POPLAR_SERVERS", "POST_DEPLOY_SETUP", "VIPU_CONTROLLER".
	DetailedState TaskDetailedState `json:"detailed_state,nullable"`
	// The error value
	Error string `json:"error,nullable"`
	// Finished timestamp
	FinishedOn string `json:"finished_on,nullable"`
	// Job ID
	JobID string `json:"job_id,nullable"`
	// Lifecycle policy ID
	LifecyclePolicyID int64 `json:"lifecycle_policy_id,nullable"`
	// The project ID
	ProjectID int64 `json:"project_id,nullable"`
	// The region ID
	RegionID int64 `json:"region_id,nullable"`
	// The request ID
	RequestID string `json:"request_id,nullable"`
	// Schedule ID
	ScheduleID string `json:"schedule_id,nullable"`
	// Last updated timestamp
	UpdatedOn string `json:"updated_on,nullable"`
	// Client, specified in user's JWT
	UserClientID int64 `json:"user_client_id,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                respjson.Field
		CreatedOn         respjson.Field
		State             respjson.Field
		TaskType          respjson.Field
		UserID            respjson.Field
		AcknowledgedAt    respjson.Field
		AcknowledgedBy    respjson.Field
		ClientID          respjson.Field
		CreatedResources  respjson.Field
		Data              respjson.Field
		DetailedState     respjson.Field
		Error             respjson.Field
		FinishedOn        respjson.Field
		JobID             respjson.Field
		LifecyclePolicyID respjson.Field
		ProjectID         respjson.Field
		RegionID          respjson.Field
		RequestID         respjson.Field
		ScheduleID        respjson.Field
		UpdatedOn         respjson.Field
		UserClientID      respjson.Field
		ExtraFields       map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Task) RawJSON

func (r Task) RawJSON() string

Returns the unmodified JSON received from the API

func (*Task) UnmarshalJSON

func (r *Task) UnmarshalJSON(data []byte) error

type TaskAcknowledgeAllParams

type TaskAcknowledgeAllParams struct {
	// Project ID
	ProjectID param.Opt[int64] `query:"project_id,omitzero" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `query:"region_id,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (TaskAcknowledgeAllParams) URLQuery

func (r TaskAcknowledgeAllParams) URLQuery() (v url.Values, err error)

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

type TaskCreatedResources

type TaskCreatedResources struct {
	// IDs of created AI clusters
	AIClusters []string `json:"ai_clusters"`
	// IDs of created API keys
	APIKeys []string `json:"api_keys"`
	// IDs of created CaaS containers
	CaasContainers []string `json:"caas_containers"`
	// IDs of created ddos protection profiles
	DDOSProfiles []int64 `json:"ddos_profiles"`
	// IDs of created FaaS functions
	FaasFunctions []string `json:"faas_functions"`
	// IDs of created FaaS namespaces
	FaasNamespaces []string `json:"faas_namespaces"`
	// IDs of created file shares
	FileShares []string `json:"file_shares"`
	// IDs of created floating IPs
	Floatingips []string `json:"floatingips"`
	// IDs of created health monitors
	Healthmonitors []string `json:"healthmonitors"`
	// IDs of created heat resources
	Heat []string `json:"heat"`
	// IDs of created images
	Images []string `json:"images"`
	// IDs of created inference instances
	InferenceInstances []string `json:"inference_instances"`
	// IDs of created instances
	Instances []string `json:"instances"`
	// IDs of created Kubernetes clusters
	K8sClusters []string `json:"k8s_clusters"`
	// IDs of created Kubernetes pools
	K8sPools []string `json:"k8s_pools"`
	// IDs of created L7 policies
	L7polices []string `json:"l7polices"`
	// IDs of created L7 rules
	L7rules []string `json:"l7rules"`
	// IDs of created LaaS topics
	LaasTopic []string `json:"laas_topic"`
	// IDs of created load balancer listeners
	Listeners []string `json:"listeners"`
	// IDs of created load balancers
	Loadbalancers []string `json:"loadbalancers"`
	// IDs of created pool members
	Members []string `json:"members"`
	// IDs of created networks
	Networks []string `json:"networks"`
	// IDs of created load balancer pools
	Pools []string `json:"pools"`
	// IDs of created ports
	Ports []string `json:"ports"`
	// IDs of created postgres clusters
	PostgreSQLClusters []string `json:"postgresql_clusters"`
	// IDs of created projects
	Projects []int64 `json:"projects"`
	// IDs of created registry registries
	RegistryRegistries []string `json:"registry_registries"`
	// IDs of created registry users
	RegistryUsers []string `json:"registry_users"`
	// IDs of created routers
	Routers []string `json:"routers"`
	// IDs of created secrets
	Secrets []string `json:"secrets"`
	// IDs of created server groups
	Servergroups []string `json:"servergroups"`
	// IDs of created volume snapshots
	Snapshots []string `json:"snapshots"`
	// IDs of created subnets
	Subnets []string `json:"subnets"`
	// IDs of created volumes
	Volumes []string `json:"volumes"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AIClusters         respjson.Field
		APIKeys            respjson.Field
		CaasContainers     respjson.Field
		DDOSProfiles       respjson.Field
		FaasFunctions      respjson.Field
		FaasNamespaces     respjson.Field
		FileShares         respjson.Field
		Floatingips        respjson.Field
		Healthmonitors     respjson.Field
		Heat               respjson.Field
		Images             respjson.Field
		InferenceInstances respjson.Field
		Instances          respjson.Field
		K8sClusters        respjson.Field
		K8sPools           respjson.Field
		L7polices          respjson.Field
		L7rules            respjson.Field
		LaasTopic          respjson.Field
		Listeners          respjson.Field
		Loadbalancers      respjson.Field
		Members            respjson.Field
		Networks           respjson.Field
		Pools              respjson.Field
		Ports              respjson.Field
		PostgreSQLClusters respjson.Field
		Projects           respjson.Field
		RegistryRegistries respjson.Field
		RegistryUsers      respjson.Field
		Routers            respjson.Field
		Secrets            respjson.Field
		Servergroups       respjson.Field
		Snapshots          respjson.Field
		Subnets            respjson.Field
		Volumes            respjson.Field
		ExtraFields        map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

If the task creates resources, this field will contain their IDs

func (TaskCreatedResources) RawJSON

func (r TaskCreatedResources) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaskCreatedResources) UnmarshalJSON

func (r *TaskCreatedResources) UnmarshalJSON(data []byte) error

type TaskDetailedState

type TaskDetailedState string

Task detailed state that is more specific to task type

const (
	TaskDetailedStateClusterCleanUp  TaskDetailedState = "CLUSTER_CLEAN_UP"
	TaskDetailedStateClusterResize   TaskDetailedState = "CLUSTER_RESIZE"
	TaskDetailedStateClusterResume   TaskDetailedState = "CLUSTER_RESUME"
	TaskDetailedStateClusterSuspend  TaskDetailedState = "CLUSTER_SUSPEND"
	TaskDetailedStateError           TaskDetailedState = "ERROR"
	TaskDetailedStateFinished        TaskDetailedState = "FINISHED"
	TaskDetailedStateIpuServers      TaskDetailedState = "IPU_SERVERS"
	TaskDetailedStateNetwork         TaskDetailedState = "NETWORK"
	TaskDetailedStatePoplarServers   TaskDetailedState = "POPLAR_SERVERS"
	TaskDetailedStatePostDeploySetup TaskDetailedState = "POST_DEPLOY_SETUP"
	TaskDetailedStateVipuController  TaskDetailedState = "VIPU_CONTROLLER"
)

type TaskIDList

type TaskIDList struct {
	// List of task IDs
	Tasks []string `json:"tasks,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Tasks       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (TaskIDList) RawJSON

func (r TaskIDList) RawJSON() string

Returns the unmodified JSON received from the API

func (*TaskIDList) UnmarshalJSON

func (r *TaskIDList) UnmarshalJSON(data []byte) error

type TaskListParams

type TaskListParams struct {
	// ISO formatted datetime string. Filter the tasks by creation date greater than or
	// equal to from_timestamp
	FromTimestamp param.Opt[time.Time] `query:"from_timestamp,omitzero" format:"date-time" json:"-"`
	// Filter the tasks by their acknowledgement status
	IsAcknowledged param.Opt[bool] `query:"is_acknowledged,omitzero" json:"-"`
	// Filter the tasks by their type one of ['activate_ddos_profile',
	// 'attach_bm_to_reserved_fixed_ip', 'attach_vm_interface',
	// 'attach_vm_to_reserved_fixed_ip', 'attach_volume', 'create_ai_cluster_gpu',
	// 'create_bm', 'create_caas_container', 'create_dbaas_postgres_cluster',
	// 'create_ddos_profile', 'create_faas_function', 'create_faas_namespace',
	// 'create_fip', 'create_gpu_virtual_cluster', 'create_image',
	// 'create_inference_instance', 'create_inference_instance_key',
	// 'create_k8s_cluster_pool_v2', 'create_k8s_cluster_v2', 'create_l7policy',
	// 'create_l7rule', 'create_lblistener', 'create_lbmember', 'create_lbpool',
	// 'create_lbpool_health_monitor', 'create_loadbalancer', 'create_network',
	// 'create_reserved_fixed_ip', 'create_router', 'create_secret',
	// 'create_servergroup', 'create_sfs', 'create_snapshot', 'create_subnet',
	// 'create_vm', 'create_volume', 'deactivate_ddos_profile',
	// 'delete_ai_cluster_gpu', 'delete_caas_container',
	// 'delete_dbaas_postgres_cluster', 'delete_ddos_profile', 'delete_faas_function',
	// 'delete_faas_namespace', 'delete_fip', 'delete_gpu_virtual_cluster',
	// 'delete_gpu_virtual_server', 'delete_image', 'delete_inference_instance',
	// 'delete_k8s_cluster_pool_v2', 'delete_k8s_cluster_v2', 'delete_l7policy',
	// 'delete_l7rule', 'delete_lblistener', 'delete_lbmember', 'delete_lbmetadata',
	// 'delete_lbpool', 'delete_loadbalancer', 'delete_network',
	// 'delete_reserved_fixed_ip', 'delete_router', 'delete_secret',
	// 'delete_servergroup', 'delete_sfs', 'delete_snapshot', 'delete_subnet',
	// 'delete_vm', 'delete_volume', 'detach_vm_interface', 'detach_volume',
	// 'download_image', 'downscale_ai_cluster_gpu', 'downscale_gpu_virtual_cluster',
	// 'extend_sfs', 'extend_volume', 'failover_loadbalancer',
	// 'hard_reboot_gpu_baremetal_server', 'hard_reboot_gpu_virtual_cluster',
	// 'hard_reboot_gpu_virtual_server', 'hard_reboot_vm', 'patch_caas_container',
	// 'patch_dbaas_postgres_cluster', 'patch_faas_function', 'patch_faas_namespace',
	// 'patch_lblistener', 'patch_lbpool', 'put_into_server_group', 'put_l7policy',
	// 'put_l7rule', 'rebuild_bm', 'rebuild_gpu_baremetal_node',
	// 'remove_from_server_group', 'replace_lbmetadata', 'resize_k8s_cluster_v2',
	// 'resize_loadbalancer', 'resize_vm', 'resume_vm', 'revert_volume',
	// 'soft_reboot_gpu_baremetal_server', 'soft_reboot_gpu_virtual_cluster',
	// 'soft_reboot_gpu_virtual_server', 'soft_reboot_vm',
	// 'start_gpu_baremetal_server', 'start_gpu_virtual_cluster',
	// 'start_gpu_virtual_server', 'start_vm', 'stop_gpu_baremetal_server',
	// 'stop_gpu_virtual_cluster', 'stop_gpu_virtual_server', 'stop_vm', 'suspend_vm',
	// 'sync_private_flavors', 'update_ddos_profile', 'update_inference_instance',
	// 'update_inference_instance_key', 'update_k8s_cluster_v2', 'update_lbmetadata',
	// 'update_port_allowed_address_pairs', 'update_tags_gpu_virtual_cluster',
	// 'upgrade_k8s_cluster_v2', 'upscale_ai_cluster_gpu',
	// 'upscale_gpu_virtual_cluster']
	TaskType param.Opt[string] `query:"task_type,omitzero" json:"-"`
	// ISO formatted datetime string. Filter the tasks by creation date less than or
	// equal to to_timestamp
	ToTimestamp param.Opt[time.Time] `query:"to_timestamp,omitzero" format:"date-time" json:"-"`
	// Limit the number of returned tasks. Falls back to default of 10 if not
	// specified. Limited by max limit value of 1000
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Offset value is used to exclude the first set of records from the result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// The project ID to filter the tasks by project. Supports multiple values of kind
	// key=value1&key=value2
	ProjectID []int64 `query:"project_id,omitzero" json:"-"`
	// The region ID to filter the tasks by region. Supports multiple values of kind
	// key=value1&key=value2
	RegionID []int64 `query:"region_id,omitzero" json:"-"`
	// Sorting by creation date. Oldest first, or most recent first
	//
	// Any of "asc", "desc".
	Sorting TaskListParamsSorting `query:"sorting,omitzero" json:"-"`
	// Filter the tasks by state. Supports multiple values of kind
	// key=value1&key=value2
	//
	// Any of "ERROR", "FINISHED", "NEW", "RUNNING".
	State []string `query:"state,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (TaskListParams) URLQuery

func (r TaskListParams) URLQuery() (v url.Values, err error)

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

type TaskListParamsSorting

type TaskListParamsSorting string

Sorting by creation date. Oldest first, or most recent first

const (
	TaskListParamsSortingAsc  TaskListParamsSorting = "asc"
	TaskListParamsSortingDesc TaskListParamsSorting = "desc"
)

type TaskService

type TaskService struct {
	Options []option.RequestOption
}

TaskService contains methods and other services that help with interacting with the gcore API.

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

func NewTaskService

func NewTaskService(opts ...option.RequestOption) (r TaskService)

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

func (*TaskService) AcknowledgeAll

func (r *TaskService) AcknowledgeAll(ctx context.Context, body TaskAcknowledgeAllParams, opts ...option.RequestOption) (err error)

Acknowledge all client tasks in project or region

func (*TaskService) AcknowledgeOne

func (r *TaskService) AcknowledgeOne(ctx context.Context, taskID string, opts ...option.RequestOption) (res *Task, err error)

Acknowledge one task on project scope

func (*TaskService) Get

func (r *TaskService) Get(ctx context.Context, taskID string, opts ...option.RequestOption) (res *Task, err error)

Get task

func (*TaskService) List

func (r *TaskService) List(ctx context.Context, query TaskListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[Task], err error)

List tasks

func (*TaskService) ListAutoPaging

List tasks

func (*TaskService) Poll

func (r *TaskService) Poll(ctx context.Context, taskID string, opts ...requestconfig.RequestOption) (*Task, error)

Poll for task status until it is finished, an error occurs, or the context is done. It uses a default polling interval of 1 second which can be overridden to values greater than 0 (otherwise the default value is used).

type TaskState

type TaskState string

The task state

const (
	TaskStateError    TaskState = "ERROR"
	TaskStateFinished TaskState = "FINISHED"
	TaskStateNew      TaskState = "NEW"
	TaskStateRunning  TaskState = "RUNNING"
)

type UserRoleAssignmentListParams

type UserRoleAssignmentListParams struct {
	// Limit the number of returned items. Falls back to default of 1000 if not
	// specified. Limited by max limit value of 1000
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Offset value is used to exclude the first set of records from the result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Project ID
	ProjectID param.Opt[int64] `query:"project_id,omitzero" json:"-"`
	// User ID for filtering
	UserID param.Opt[int64] `query:"user_id,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (UserRoleAssignmentListParams) URLQuery

func (r UserRoleAssignmentListParams) URLQuery() (v url.Values, err error)

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

type UserRoleAssignmentNewParams

type UserRoleAssignmentNewParams struct {
	// User role
	Role string `json:"role,required"`
	// User ID
	UserID int64 `json:"user_id,required"`
	// Client ID. Required if project_id is specified
	ClientID param.Opt[int64] `json:"client_id,omitzero"`
	// Project ID
	ProjectID param.Opt[int64] `json:"project_id,omitzero"`
	// contains filtered or unexported fields
}

func (UserRoleAssignmentNewParams) MarshalJSON

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

type UserRoleAssignmentService

type UserRoleAssignmentService struct {
	Options []option.RequestOption
}

UserRoleAssignmentService contains methods and other services that help with interacting with the gcore API.

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

func NewUserRoleAssignmentService

func NewUserRoleAssignmentService(opts ...option.RequestOption) (r UserRoleAssignmentService)

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

func (*UserRoleAssignmentService) Delete

func (r *UserRoleAssignmentService) Delete(ctx context.Context, assignmentID int64, opts ...option.RequestOption) (res *RoleAssignmentUpdateDelete, err error)

Delete role assignment

func (*UserRoleAssignmentService) List

List assignments

func (*UserRoleAssignmentService) ListAutoPaging

List assignments

func (*UserRoleAssignmentService) New

Assign role to existing user

func (*UserRoleAssignmentService) Update

Modify role assignment to existing user

type UserRoleAssignmentUpdateParams

type UserRoleAssignmentUpdateParams struct {
	// User role
	Role string `json:"role,required"`
	// User ID
	UserID int64 `json:"user_id,required"`
	// Client ID. Required if project_id is specified
	ClientID param.Opt[int64] `json:"client_id,omitzero"`
	// Project ID
	ProjectID param.Opt[int64] `json:"project_id,omitzero"`
	// contains filtered or unexported fields
}

func (UserRoleAssignmentUpdateParams) MarshalJSON

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

type UserService

type UserService struct {
	Options         []option.RequestOption
	RoleAssignments UserRoleAssignmentService
}

UserService contains methods and other services that help with interacting with the gcore API.

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

func NewUserService

func NewUserService(opts ...option.RequestOption) (r UserService)

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

type Volume

type Volume struct {
	// The unique identifier of the volume.
	ID string `json:"id,required"`
	// Indicates whether the volume is bootable.
	Bootable bool `json:"bootable,required"`
	// The date and time when the volume was created.
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Indicates whether this is a root volume.
	IsRootVolume bool `json:"is_root_volume,required"`
	// The name of the volume.
	Name string `json:"name,required"`
	// Project ID.
	ProjectID int64 `json:"project_id,required"`
	// The region where the volume is located.
	Region string `json:"region,required"`
	// The identifier of the region.
	RegionID int64 `json:"region_id,required"`
	// The size of the volume in gibibytes (GiB).
	Size int64 `json:"size,required"`
	// The current status of the volume.
	//
	// Any of "attaching", "available", "awaiting-transfer", "backing-up", "creating",
	// "deleting", "detaching", "downloading", "error", "error_backing-up",
	// "error_deleting", "error_extending", "error_restoring", "extending", "in-use",
	// "maintenance", "reserved", "restoring-backup", "retyping", "reverting",
	// "uploading".
	Status VolumeStatus `json:"status,required"`
	// List of key-value tags associated with the resource. A tag is a key-value pair
	// that can be associated with a resource, enabling efficient filtering and
	// grouping for better organization and management. Some tags are read-only and
	// cannot be modified by the user. Tags are also integrated with cost reports,
	// allowing cost data to be filtered based on tag keys or values.
	Tags []Tag `json:"tags,required"`
	// The type of volume storage.
	VolumeType string `json:"volume_type,required"`
	// List of attachments associated with the volume.
	Attachments []VolumeAttachment `json:"attachments,nullable"`
	// The ID of the task that created this volume.
	CreatorTaskID string `json:"creator_task_id,nullable"`
	// Schema representing the Quality of Service (QoS) parameters for a volume.
	LimiterStats VolumeLimiterStats `json:"limiter_stats,nullable"`
	// List of snapshot IDs associated with this volume.
	SnapshotIDs []string `json:"snapshot_ids,nullable"`
	// The UUID of the active task that currently holds a lock on the resource. This
	// lock prevents concurrent modifications to ensure consistency. If `null`, the
	// resource is not locked.
	TaskID string `json:"task_id,nullable"`
	// The date and time when the volume was last updated.
	UpdatedAt time.Time `json:"updated_at,nullable" format:"date-time"`
	// Image metadata for volumes created from an image.
	VolumeImageMetadata map[string]string `json:"volume_image_metadata,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID                  respjson.Field
		Bootable            respjson.Field
		CreatedAt           respjson.Field
		IsRootVolume        respjson.Field
		Name                respjson.Field
		ProjectID           respjson.Field
		Region              respjson.Field
		RegionID            respjson.Field
		Size                respjson.Field
		Status              respjson.Field
		Tags                respjson.Field
		VolumeType          respjson.Field
		Attachments         respjson.Field
		CreatorTaskID       respjson.Field
		LimiterStats        respjson.Field
		SnapshotIDs         respjson.Field
		TaskID              respjson.Field
		UpdatedAt           respjson.Field
		VolumeImageMetadata respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (Volume) RawJSON

func (r Volume) RawJSON() string

Returns the unmodified JSON received from the API

func (*Volume) UnmarshalJSON

func (r *Volume) UnmarshalJSON(data []byte) error

type VolumeAttachToInstanceParams

type VolumeAttachToInstanceParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Instance ID.
	InstanceID string `json:"instance_id,required" format:"uuid4"`
	// Block device attachment tag (not exposed in the normal tags).
	AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
	// contains filtered or unexported fields
}

func (VolumeAttachToInstanceParams) MarshalJSON

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

type VolumeAttachment

type VolumeAttachment struct {
	// The unique identifier of the attachment object.
	AttachmentID string `json:"attachment_id,required"`
	// The unique identifier of the attached volume.
	VolumeID string `json:"volume_id,required"`
	// The date and time when the attachment was created.
	AttachedAt time.Time `json:"attached_at,nullable" format:"date-time"`
	// The block device name inside the guest instance.
	Device string `json:"device,nullable"`
	// The flavor ID of the instance.
	FlavorID string `json:"flavor_id,nullable"`
	// The name of the instance if attached and the server name is known.
	InstanceName string `json:"instance_name,nullable"`
	// The unique identifier of the instance.
	ServerID string `json:"server_id,nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AttachmentID respjson.Field
		VolumeID     respjson.Field
		AttachedAt   respjson.Field
		Device       respjson.Field
		FlavorID     respjson.Field
		InstanceName respjson.Field
		ServerID     respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (VolumeAttachment) RawJSON

func (r VolumeAttachment) RawJSON() string

Returns the unmodified JSON received from the API

func (*VolumeAttachment) UnmarshalJSON

func (r *VolumeAttachment) UnmarshalJSON(data []byte) error

type VolumeChangeTypeParams

type VolumeChangeTypeParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// New volume type name
	//
	// Any of "ssd_hiiops", "standard".
	VolumeType VolumeChangeTypeParamsVolumeType `json:"volume_type,omitzero,required"`
	// contains filtered or unexported fields
}

func (VolumeChangeTypeParams) MarshalJSON

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

type VolumeChangeTypeParamsVolumeType

type VolumeChangeTypeParamsVolumeType string

New volume type name

const (
	VolumeChangeTypeParamsVolumeTypeSsdHiiops VolumeChangeTypeParamsVolumeType = "ssd_hiiops"
	VolumeChangeTypeParamsVolumeTypeStandard  VolumeChangeTypeParamsVolumeType = "standard"
)

type VolumeDeleteParams

type VolumeDeleteParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Comma separated list of snapshot IDs to be deleted with the volume.
	Snapshots param.Opt[string] `query:"snapshots,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (VolumeDeleteParams) URLQuery

func (r VolumeDeleteParams) URLQuery() (v url.Values, err error)

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

type VolumeDetachFromInstanceParams

type VolumeDetachFromInstanceParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Instance ID
	InstanceID string `json:"instance_id,required" format:"uuid4"`
	// contains filtered or unexported fields
}

func (VolumeDetachFromInstanceParams) MarshalJSON

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

type VolumeGetParams

type VolumeGetParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type VolumeLimiterStats

type VolumeLimiterStats struct {
	// The sustained IOPS (Input/Output Operations Per Second) limit.
	IopsBaseLimit int64 `json:"iops_base_limit,required"`
	// The burst IOPS limit.
	IopsBurstLimit int64 `json:"iops_burst_limit,required"`
	// The sustained bandwidth limit in megabytes per second (MBps).
	MBpsBaseLimit int64 `json:"MBps_base_limit,required"`
	// The burst bandwidth limit in megabytes per second (MBps).
	MBpsBurstLimit int64 `json:"MBps_burst_limit,required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		IopsBaseLimit  respjson.Field
		IopsBurstLimit respjson.Field
		MBpsBaseLimit  respjson.Field
		MBpsBurstLimit respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Schema representing the Quality of Service (QoS) parameters for a volume.

func (VolumeLimiterStats) RawJSON

func (r VolumeLimiterStats) RawJSON() string

Returns the unmodified JSON received from the API

func (*VolumeLimiterStats) UnmarshalJSON

func (r *VolumeLimiterStats) UnmarshalJSON(data []byte) error

type VolumeListParams

type VolumeListParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Filter by bootable field
	Bootable param.Opt[bool] `query:"bootable,omitzero" json:"-"`
	// Filter volumes by k8s cluster ID
	ClusterID param.Opt[string] `query:"cluster_id,omitzero" json:"-"`
	// Filter by the presence of attachments
	HasAttachments param.Opt[bool] `query:"has_attachments,omitzero" json:"-"`
	// Filter the volume list result by the ID part of the volume
	IDPart param.Opt[string] `query:"id_part,omitzero" json:"-"`
	// Filter volumes by instance ID
	InstanceID param.Opt[string] `query:"instance_id,omitzero" format:"uuid4" json:"-"`
	// Optional. Limit the number of returned items
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter volumes by name_part inclusion in volume name.Any substring can be used
	// and volumes will be returned with names containing the substring.
	NamePart param.Opt[string] `query:"name_part,omitzero" json:"-"`
	// Optional. Offset value is used to exclude the first set of records from the
	// result
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Optional. Filter by tag key-value pairs. curl -G --data-urlencode
	// "tag_key_value={"key": "value"}" --url
	// "https://example.com/cloud/v1/resource/1/1"
	TagKeyValue param.Opt[string] `query:"tag_key_value,omitzero" json:"-"`
	// Optional. Filter by tag keys. ?tag_key=key1&tag_key=key2
	TagKey []string `query:"tag_key,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (VolumeListParams) URLQuery

func (r VolumeListParams) URLQuery() (v url.Values, err error)

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

type VolumeNewParams

type VolumeNewParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`

	// This field is a request body variant, only one variant field can be set.
	OfImage *VolumeNewParamsBodyImage `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	OfSnapshot *VolumeNewParamsBodySnapshot `json:",inline"`
	// This field is a request body variant, only one variant field can be set.
	OfNewVolume *VolumeNewParamsBodyNewVolume `json:",inline"`
	// contains filtered or unexported fields
}

func (VolumeNewParams) MarshalJSON

func (u VolumeNewParams) MarshalJSON() ([]byte, error)

type VolumeNewParamsBodyImage

type VolumeNewParamsBodyImage struct {
	// Image ID
	ImageID string `json:"image_id,required" format:"uuid4"`
	// Volume name
	Name string `json:"name,required"`
	// Volume size in GiB
	Size int64 `json:"size,required"`
	// Block device attachment tag (not exposed in the user tags). Only used in
	// conjunction with instance_id_to_attach_to
	AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
	// instance_id to attach newly-created volume to
	InstanceIDToAttachTo param.Opt[string] `json:"instance_id_to_attach_to,omitzero"`
	// List of lifecycle policy IDs (snapshot creation schedules) to associate with the
	// volume
	LifecyclePolicyIDs []int64 `json:"lifecycle_policy_ids,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// Volume type. Defaults to `standard`. If not specified for source `snapshot`,
	// volume type will be derived from the snapshot volume.
	//
	// Any of "cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra".
	TypeName string `json:"type_name,omitzero"`
	// Volume source type
	//
	// This field can be elided, and will marshal its zero value as "image".
	Source constant.Image `json:"source,required"`
	// contains filtered or unexported fields
}

The properties ImageID, Name, Size, Source are required.

func (VolumeNewParamsBodyImage) MarshalJSON

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

type VolumeNewParamsBodyNewVolume

type VolumeNewParamsBodyNewVolume struct {
	// Volume name
	Name string `json:"name,required"`
	// Volume size in GiB
	Size int64 `json:"size,required"`
	// Block device attachment tag (not exposed in the user tags). Only used in
	// conjunction with instance_id_to_attach_to
	AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
	// instance_id to attach newly-created volume to
	InstanceIDToAttachTo param.Opt[string] `json:"instance_id_to_attach_to,omitzero"`
	// List of lifecycle policy IDs (snapshot creation schedules) to associate with the
	// volume
	LifecyclePolicyIDs []int64 `json:"lifecycle_policy_ids,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// Volume type. Defaults to `standard`. If not specified for source `snapshot`,
	// volume type will be derived from the snapshot volume.
	//
	// Any of "cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra".
	TypeName string `json:"type_name,omitzero"`
	// Volume source type
	//
	// This field can be elided, and will marshal its zero value as "new-volume".
	Source constant.NewVolume `json:"source,required"`
	// contains filtered or unexported fields
}

The properties Name, Size, Source are required.

func (VolumeNewParamsBodyNewVolume) MarshalJSON

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

type VolumeNewParamsBodySnapshot

type VolumeNewParamsBodySnapshot struct {
	// Volume name
	Name string `json:"name,required"`
	// Snapshot ID
	SnapshotID string `json:"snapshot_id,required" format:"uuid4"`
	// Block device attachment tag (not exposed in the user tags). Only used in
	// conjunction with instance_id_to_attach_to
	AttachmentTag param.Opt[string] `json:"attachment_tag,omitzero"`
	// instance_id to attach newly-created volume to
	InstanceIDToAttachTo param.Opt[string] `json:"instance_id_to_attach_to,omitzero"`
	// Volume size in GiB. If specified, value must be equal to respective snapshot
	// size
	Size param.Opt[int64] `json:"size,omitzero"`
	// List of lifecycle policy IDs (snapshot creation schedules) to associate with the
	// volume
	LifecyclePolicyIDs []int64 `json:"lifecycle_policy_ids,omitzero"`
	// Key-value tags to associate with the resource. A tag is a key-value pair that
	// can be associated with a resource, enabling efficient filtering and grouping for
	// better organization and management. Some tags are read-only and cannot be
	// modified by the user. Tags are also integrated with cost reports, allowing cost
	// data to be filtered based on tag keys or values.
	Tags TagUpdateMap `json:"tags,omitzero"`
	// Volume type. Defaults to `standard`. If not specified for source `snapshot`,
	// volume type will be derived from the snapshot volume.
	//
	// Any of "cold", "ssd_hiiops", "ssd_local", "ssd_lowlatency", "standard", "ultra".
	TypeName string `json:"type_name,omitzero"`
	// Volume source type
	//
	// This field can be elided, and will marshal its zero value as "snapshot".
	Source constant.Snapshot `json:"source,required"`
	// contains filtered or unexported fields
}

The properties Name, SnapshotID, Source are required.

func (VolumeNewParamsBodySnapshot) MarshalJSON

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

type VolumeResizeParams

type VolumeResizeParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// New volume size in GiB
	Size int64 `json:"size,required"`
	// contains filtered or unexported fields
}

func (VolumeResizeParams) MarshalJSON

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

type VolumeRevertToLastSnapshotParams

type VolumeRevertToLastSnapshotParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// contains filtered or unexported fields
}

type VolumeService

type VolumeService struct {
	Options []option.RequestOption
}

VolumeService contains methods and other services that help with interacting with the gcore API.

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

func NewVolumeService

func NewVolumeService(opts ...option.RequestOption) (r VolumeService)

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

func (*VolumeService) AttachToInstance

func (r *VolumeService) AttachToInstance(ctx context.Context, volumeID string, params VolumeAttachToInstanceParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Attach the volume to instance. Note: ultra volume can only be attached to an instance with shared flavor

func (*VolumeService) ChangeType

func (r *VolumeService) ChangeType(ctx context.Context, volumeID string, params VolumeChangeTypeParams, opts ...option.RequestOption) (res *Volume, err error)

Change volume type

func (*VolumeService) Delete

func (r *VolumeService) Delete(ctx context.Context, volumeID string, params VolumeDeleteParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Delete volume

func (*VolumeService) DetachFromInstance

func (r *VolumeService) DetachFromInstance(ctx context.Context, volumeID string, params VolumeDetachFromInstanceParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Detach the volume from instance

func (*VolumeService) Get

func (r *VolumeService) Get(ctx context.Context, volumeID string, query VolumeGetParams, opts ...option.RequestOption) (res *Volume, err error)

Get volume

func (*VolumeService) List

List volumes

func (*VolumeService) ListAutoPaging

List volumes

func (*VolumeService) New

func (r *VolumeService) New(ctx context.Context, params VolumeNewParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Create volume

func (*VolumeService) Resize

func (r *VolumeService) Resize(ctx context.Context, volumeID string, params VolumeResizeParams, opts ...option.RequestOption) (res *TaskIDList, err error)

Extend volume

func (*VolumeService) RevertToLastSnapshot

func (r *VolumeService) RevertToLastSnapshot(ctx context.Context, volumeID string, body VolumeRevertToLastSnapshotParams, opts ...option.RequestOption) (err error)

Revert volume to it's last snapshot

func (*VolumeService) Update

func (r *VolumeService) Update(ctx context.Context, volumeID string, params VolumeUpdateParams, opts ...option.RequestOption) (res *Volume, err error)

Rename volume

type VolumeStatus

type VolumeStatus string

The current status of the volume.

const (
	VolumeStatusAttaching        VolumeStatus = "attaching"
	VolumeStatusAvailable        VolumeStatus = "available"
	VolumeStatusAwaitingTransfer VolumeStatus = "awaiting-transfer"
	VolumeStatusBackingUp        VolumeStatus = "backing-up"
	VolumeStatusCreating         VolumeStatus = "creating"
	VolumeStatusDeleting         VolumeStatus = "deleting"
	VolumeStatusDetaching        VolumeStatus = "detaching"
	VolumeStatusDownloading      VolumeStatus = "downloading"
	VolumeStatusError            VolumeStatus = "error"
	VolumeStatusErrorBackingUp   VolumeStatus = "error_backing-up"
	VolumeStatusErrorDeleting    VolumeStatus = "error_deleting"
	VolumeStatusErrorExtending   VolumeStatus = "error_extending"
	VolumeStatusErrorRestoring   VolumeStatus = "error_restoring"
	VolumeStatusExtending        VolumeStatus = "extending"
	VolumeStatusInUse            VolumeStatus = "in-use"
	VolumeStatusMaintenance      VolumeStatus = "maintenance"
	VolumeStatusReserved         VolumeStatus = "reserved"
	VolumeStatusRestoringBackup  VolumeStatus = "restoring-backup"
	VolumeStatusRetyping         VolumeStatus = "retyping"
	VolumeStatusReverting        VolumeStatus = "reverting"
	VolumeStatusUploading        VolumeStatus = "uploading"
)

type VolumeUpdateParams

type VolumeUpdateParams struct {
	// Project ID
	ProjectID param.Opt[int64] `path:"project_id,omitzero,required" json:"-"`
	// Region ID
	RegionID param.Opt[int64] `path:"region_id,omitzero,required" json:"-"`
	// Name.
	Name string `json:"name,required"`
	// contains filtered or unexported fields
}

func (VolumeUpdateParams) MarshalJSON

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

Jump to

Keyboard shortcuts

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