tools

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const CallerIDMetaKey = "ionos/callerID"

CallerIDMetaKey carries the originating client's session id when a call is forwarded through a shared session (see tools/dynamic).

View Source
const ConfirmationTTL = 5 * time.Minute

ConfirmationTTL is how long a minted confirmation token stays valid.

Variables

View Source
var (
	ErrTokenUnknown  = errors.New("confirmation token not recognized (already used, expired, or never issued)")
	ErrTokenExpired  = errors.New("confirmation token expired")
	ErrTokenMismatch = errors.New("confirmation token was issued for a different operation or target")
)

Sentinel errors returned by ConfirmationStore.Consume.

Functions

func CallerID added in v1.1.0

func CallerID(req *mcp.CallToolRequest) string

CallerID identifies the client session a call arrived on, so a confirmation token cannot cross from one client to another. Empty on stdio, where the process serves exactly one client and there is nothing to isolate.

func ConfirmErrorText added in v1.1.0

func ConfirmErrorText(tool, replayArgs string, err error) string

ConfirmErrorText turns a ConfirmationStore failure into remediation, naming the arguments to re-send so a caller does not retry a dead token.

func DeletedAsync added in v1.1.0

func DeletedAsync(what, id string) string

DeletedAsync is the success message for a DELETE, which returns no body.

func ErrorText added in v1.1.0

func ErrorText(msg string) *mcp.CallToolResult

ErrorText wraps a message as an MCP result flagged as an error.

func HasToken added in v1.1.0

func HasToken(token *string) bool

HasToken reports whether a two-phase input carried a non-empty token, i.e. whether this is the execute call rather than the preview call.

func IsNotFound added in v1.1.0

func IsNotFound(err error) bool

IsNotFound reports whether err is an SDK error carrying HTTP 404.

func OptBool added in v1.1.0

func OptBool(v *bool) string

OptBool renders an optional bool.

func OptFloat32 added in v1.1.0

func OptFloat32(v *float32) string

OptFloat32 renders an optional float32 without trailing zeros, so 50 prints as "50" rather than "50.00".

func OptInt32 added in v1.1.0

func OptInt32(v *int32) string

OptInt32 renders an optional int32.

func OptStr added in v1.1.0

func OptStr(v *string) string

OptStr dereferences an optional string.

func RegisterActionTool added in v1.1.0

func RegisterActionTool[In, Out any](s *mcp.Server, sc Scope, a Action, t *mcp.Tool, h mcp.ToolHandlerFor[In, Out])

RegisterActionTool is RegisterTool for domain-verb operations, classifying by verb instead of by method. Panics if the verb is absent from actionVerbs.

func RegisterTool added in v1.1.0

func RegisterTool[In, Out any](s *mcp.Server, sc Scope, m Method, t *mcp.Tool, h mcp.ToolHandlerFor[In, Out])

RegisterTool is the single choke point for scope gating. Skips registration entirely when the scope disallows the class, so a gated tool never appears in tools/list. Panics if the name prefix and HTTP method disagree.

func Target added in v1.1.0

func Target(req *mcp.CallToolRequest, parts ...string) string

Target joins the parts of a confirmation target. Include every identifier that makes the operation unique, so a token cannot be replayed elsewhere. The calling session is part of the target, so one client cannot spend a token another client minted.

func TextResult

func TextResult(text string) *mcp.CallToolResult

TextResult wraps a plain string as an MCP text result.

func ToRawResult

func ToRawResult(resp *shared.APIResponse, apiErr error) (*mcp.CallToolResult, any, error)

ToRawResult returns the raw response payload as an MCP text result. Use this for API endpoints that return non-JSON content (e.g. zone files).

func ToResult

func ToResult(data any, apiErr error) (*mcp.CallToolResult, any, error)

ToResult marshals an API response into an MCP text result.

func ValidateDate

func ValidateDate(date string) error

ValidateDate checks that date is a valid YYYY-MM-DD string (e.g. "2026-04-15"). Leading/trailing whitespace is trimmed before parsing.

func ValidatePeriod

func ValidatePeriod(period string) error

ValidatePeriod checks that period is a valid YYYY-MM string (e.g. "2026-04"). Leading/trailing whitespace is trimmed before parsing.

Types

type AccessKeyIDInput

type AccessKeyIDInput struct {
	AccessKeyID string `json:"access_key_id" jsonschema:"the ID of the object storage access key"`
}

type Action added in v1.1.0

type Action struct {
	Verb       string // name prefix; must be a key of actionVerbs
	Method     Method // HTTP method used for the request
	Idempotent bool   // safe to repeat with the same effect (start/stop yes, reboot/upgrade no)
}

Action describes a non-CRUD operation named with a domain verb. Method is used only to issue the request; the mutation class comes from the verb, because the two disagree in both directions.

func (Action) Class added in v1.1.0

func (a Action) Class() Class

Class returns the mutation class the verb implies.

type ActivityLogQueryInput

type ActivityLogQueryInput struct {
	Contract             int32    `` /* 186-byte string literal not displayed */
	DateStart            *string  `json:"date_start,omitempty" jsonschema:"inclusive start date YYYY-MM-DD; defaults to 7 days ago when omitted"`
	DateEnd              *string  `` /* 126-byte string literal not displayed */
	Offset               *int32   `json:"offset,omitempty" jsonschema:"0-based pagination offset"`
	Limit                *int32   `` /* 131-byte string literal not displayed */
	User                 *string  `` /* 169-byte string literal not displayed */
	EventTypes           []string `` /* 199-byte string literal not displayed */
	IncludeStatusUpdates *bool    `` /* 198-byte string literal not displayed */
}

type AlbHttpRuleConditionInput added in v1.1.0

type AlbHttpRuleConditionInput struct {
	Type      string  `json:"type" jsonschema:"what to match on: HEADER, PATH, QUERY, METHOD, HOST, COOKIE or SOURCE_IP"`
	Condition string  `json:"condition" jsonschema:"how to match: EQUALS, LESS_THAN, GREATER_THAN, STARTS_WITH, ENDS_WITH, CONTAINS or MATCHES"`
	Negate    *bool   `json:"negate,omitempty" jsonschema:"invert the match, so the rule applies when the condition does NOT hold"`
	Key       *string `` /* 138-byte string literal not displayed */
	Value     *string `json:"value,omitempty" jsonschema:"the value to match against"`
}

AlbHttpRuleConditionInput is one condition that decides whether an ALB HTTP rule applies to a request.

type AlbHttpRuleInput added in v1.1.0

type AlbHttpRuleInput struct {
	Name            string                      `json:"name" jsonschema:"the name of this HTTP rule"`
	Type            string                      `` /* 150-byte string literal not displayed */
	TargetGroup     *string                     `` /* 137-byte string literal not displayed */
	DropQuery       *bool                       `json:"drop_query,omitempty" jsonschema:"for REDIRECT: drop the original query string instead of carrying it over"`
	Location        *string                     `json:"location,omitempty" jsonschema:"for REDIRECT: the URL to redirect to"`
	StatusCode      *int32                      `` /* 135-byte string literal not displayed */
	ResponseMessage *string                     `json:"response_message,omitempty" jsonschema:"for STATIC: the body to return"`
	ContentType     *string                     `json:"content_type,omitempty" jsonschema:"for STATIC: the Content-Type of the response body"`
	Conditions      []AlbHttpRuleConditionInput `` /* 143-byte string literal not displayed */
}

AlbHttpRuleInput is one HTTP routing rule on an application load balancer forwarding rule. Its type decides which of the other fields apply.

type ApplicationLoadBalancerIDInput

type ApplicationLoadBalancerIDInput struct {
	DatacenterID              string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ApplicationLoadBalancerID string `json:"application_loadbalancer_id" jsonschema:"the ID of the application load balancer"`
	Depth                     *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type AssignNicSecurityGroupsInput added in v1.1.0

type AssignNicSecurityGroupsInput struct {
	DatacenterID     string   `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID         string   `json:"server_id" jsonschema:"the ID of the server the NIC belongs to"`
	NicID            string   `json:"nic_id" jsonschema:"the ID of the NIC"`
	SecurityGroupIDs []string `` /* 280-byte string literal not displayed */
}

AssignNicSecurityGroupsInput is the input for assign_nic_security_groups. Also a full-set replacing PUT.

type AssignServerSecurityGroupsInput added in v1.1.0

type AssignServerSecurityGroupsInput struct {
	DatacenterID     string   `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID         string   `json:"server_id" jsonschema:"the ID of the server"`
	SecurityGroupIDs []string `` /* 286-byte string literal not displayed */
}

AssignServerSecurityGroupsInput is the input for assign_server_security_groups. The API call is a PUT that REPLACES the whole assignment set, so the field is named and documented as a full list rather than an addition.

type AttachServerVolumeInput added in v1.1.0

type AttachServerVolumeInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID     string `json:"server_id" jsonschema:"the ID of the server to attach the volume to"`
	VolumeID     string `` /* 164-byte string literal not displayed */
}

AttachServerVolumeInput is the input for attach_server_volume. Single call: attaching is additive and reversible with detach_server_volume.

type AutoCertificateIDInput

type AutoCertificateIDInput struct {
	AutoCertificateID string `json:"auto_certificate_id" jsonschema:"the ID of the auto-certificate"`
}

type BillingContractInput

type BillingContractInput struct {
	Contract int32 `json:"contract" jsonschema:"contract number from get_billing_profile"`
}

type BillingContractPeriodInput

type BillingContractPeriodInput struct {
	Contract int32  `json:"contract" jsonschema:"contract number from get_billing_profile"`
	Period   string `` /* 146-byte string literal not displayed */
}

type BillingDatacenterInput

type BillingDatacenterInput struct {
	Contract     int32  `json:"contract" jsonschema:"contract number from get_billing_profile"`
	DatacenterID string `json:"datacenter_id" jsonschema:"the VDC UUID"`
}

type BillingDateInput

type BillingDateInput struct {
	Contract int32  `json:"contract" jsonschema:"contract number from get_billing_profile"`
	Date     string `json:"date" jsonschema:"date in YYYY-MM-DD format (e.g. 2026-04-15)"`
}

type BillingInvoiceIDInput

type BillingInvoiceIDInput struct {
	Contract  int32  `json:"contract" jsonschema:"contract number from get_billing_profile"`
	InvoiceID string `json:"invoice_id" jsonschema:"the invoice ID (e.g. GY00111111)"`
}

type BillingPeriodOnlyInput

type BillingPeriodOnlyInput struct {
	Period string `json:"period" jsonschema:"billing period in YYYY-MM format (e.g. 2026-04)"`
}

type BillingProductsInput

type BillingProductsInput struct {
	Contract int32  `json:"contract" jsonschema:"contract number from get_billing_profile"`
	Filter   string `` /* 160-byte string literal not displayed */
}

type BillingUsageDatacenterInput

type BillingUsageDatacenterInput struct {
	Contract     int32  `json:"contract" jsonschema:"contract number from get_billing_profile"`
	DatacenterID string `json:"datacenter_id" jsonschema:"the VDC UUID"`
	IncludeZero  *bool  `json:"include_zero,omitempty" jsonschema:"include meters with quantity 0 (default false)"`
}

type BillingUsageInput

type BillingUsageInput struct {
	Contract     int32   `json:"contract" jsonschema:"contract number from get_billing_profile"`
	IncludeZero  *bool   `` /* 157-byte string literal not displayed */
	DatacenterID *string `json:"datacenter_id,omitempty" jsonschema:"scope to a single datacenter (VDC UUID)"`
}

BillingUsageInput is the input for list_billing_usage. UsageMeter has fewer fields than UtilizationMeter — type/region/resource filters do not apply.

type BillingUtilizationDateInput

type BillingUtilizationDateInput struct {
	Contract     int32    `json:"contract" jsonschema:"contract number from get_billing_profile"`
	Date         string   `json:"date" jsonschema:"date in YYYY-MM-DD format (e.g. 2026-04-15)"`
	IncludeZero  *bool    `json:"include_zero,omitempty" jsonschema:"include meters with quantity 0 (default false)"`
	GroupBy      *string  `` /* 178-byte string literal not displayed */
	DatacenterID *string  `json:"datacenter_id,omitempty" jsonschema:"scope to a single datacenter (VDC UUID)"`
	MeterTypes   []string `json:"meter_types,omitempty" jsonschema:"filter to these meter type categories only (client-side); e.g. ['DBAAS']"`
	Regions      []string `json:"regions,omitempty" jsonschema:"filter to these regions only (client-side); e.g. ['de/fra']"`
	TopN         *int32   `` /* 215-byte string literal not displayed */
}

type BillingUtilizationInput

type BillingUtilizationInput struct {
	Contract     int32    `json:"contract" jsonschema:"contract number from get_billing_profile"`
	IncludeZero  *bool    `` /* 160-byte string literal not displayed */
	GroupBy      *string  `` /* 230-byte string literal not displayed */
	DatacenterID *string  `json:"datacenter_id,omitempty" jsonschema:"scope to a single datacenter (VDC UUID)"`
	MeterTypes   []string `` /* 129-byte string literal not displayed */
	Regions      []string `json:"regions,omitempty" jsonschema:"filter to these regions only (client-side); e.g. ['de/fra','es/vit']"`
	TopN         *int32   `` /* 373-byte string literal not displayed */
}

BillingUtilizationInput is the input for list_billing_utilization. Compaction flags reduce response size — zero-quantity meters are dropped by default.

type BillingUtilizationPeriodInput

type BillingUtilizationPeriodInput struct {
	Contract     int32    `json:"contract" jsonschema:"contract number from get_billing_profile"`
	Period       string   `` /* 146-byte string literal not displayed */
	IncludeZero  *bool    `json:"include_zero,omitempty" jsonschema:"include meters with quantity 0 (default false)"`
	GroupBy      *string  `` /* 178-byte string literal not displayed */
	DatacenterID *string  `json:"datacenter_id,omitempty" jsonschema:"scope to a single datacenter (VDC UUID)"`
	MeterTypes   []string `` /* 129-byte string literal not displayed */
	Regions      []string `json:"regions,omitempty" jsonschema:"filter to these regions only (client-side); e.g. ['de/fra']"`
	TopN         *int32   `` /* 215-byte string literal not displayed */
}

type BlastRadius added in v1.1.0

type BlastRadius struct {
	// Destroys marks entries that cease to exist with their parent. The zero value is
	// the safe one: an unset radius reads as merely affected.
	Destroys bool
	Counts   []LabeledCount
	Total    int
}

BlastRadius accumulates the resources an operation touches. Callers Add each collection they fetched; zero counts are dropped.

Whether entries are destroyed or merely affected is a flag rather than free text, because labelling a survivor "will be destroyed" is a false claim in the one place a caller looks before authorizing a change.

func AffectedRadius added in v1.1.0

func AffectedRadius() *BlastRadius

AffectedRadius is for entries that survive. Say what each one loses in its label.

func DestroyedRadius added in v1.1.0

func DestroyedRadius() *BlastRadius

DestroyedRadius is for entries that cease to exist with their parent.

func (*BlastRadius) Add added in v1.1.0

func (b *BlastRadius) Add(label string, n int)

Add records a non-zero count under label. Zero counts are ignored.

type BootVolumeInput added in v1.1.0

type BootVolumeInput struct {
	Type          *string  `` /* 334-byte string literal not displayed */
	Name          *string  `json:"name,omitempty" jsonschema:"the name of the boot volume"`
	Size          *float32 `` /* 176-byte string literal not displayed */
	Image         *string  `` /* 215-byte string literal not displayed */
	ImageAlias    *string  `json:"image_alias,omitempty" jsonschema:"alias of an image to install, e.g. ubuntu:latest. An alternative to image."`
	ImagePassword *string  `` /* 218-byte string literal not displayed */
	SshKeys       []string `json:"ssh_keys,omitempty" jsonschema:"public SSH keys to authorize for login. Public Linux images only."`
	LicenceType   *string  `` /* 178-byte string literal not displayed */
	Bus           *string  `json:"bus,omitempty" jsonschema:"bus type: VIRTIO (default, faster) or IDE"`
	UserData      *string  `` /* 128-byte string literal not displayed */
	HotPlugFlags
}

BootVolumeInput describes a volume to create together with a server, in the same API request. This is not merely a convenience: CUBE and GPU servers are template-sized and the API accepts their storage ONLY as part of a composite server-creation call, so neither can be created without it and attaching a volume afterwards is not equivalent. A Confidential Computing server likewise must be created with its boot volume inline, because the API derives the core count and CPU family from the confidential image on that volume.

type CallToolInput added in v1.0.1

type CallToolInput struct {
	Name      string         `json:"name" jsonschema:"the exact name of the tool to invoke (from ionos_search_tools)"`
	Arguments map[string]any `json:"arguments,omitempty" jsonschema:"the tool's arguments as a JSON object; see ionos_describe_tools for the schema"`
}

type CertificateIDInput

type CertificateIDInput struct {
	CertificateID string `json:"certificate_id" jsonschema:"the ID of the certificate"`
}

type Class added in v1.1.0

type Class int

Class is a tool's mutation class, which decides the scope it needs.

const (
	// ClassRead is a non-mutating tool (HTTP GET/HEAD; list_/get_/head_). Always allowed.
	ClassRead Class = iota
	// ClassWrite creates or updates a resource (HTTP POST/PUT/PATCH; create_/update_).
	ClassWrite
	// ClassDestructive deletes a resource (HTTP DELETE; delete_).
	ClassDestructive
)

func ClassFromName added in v1.1.0

func ClassFromName(name string) Class

ClassFromName derives a class from a tool name alone, for the dynamic dispatcher which sees names rather than registrations.

func (Class) String added in v1.1.0

func (c Class) String() string

type ConfirmationStore added in v1.1.0

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

ConfirmationStore backs the two-phase confirmation flow. Tokens are single-use, bound to one operation and target, and expire.

func NewConfirmationStore added in v1.1.0

func NewConfirmationStore() *ConfirmationStore

NewConfirmationStore returns an empty store using the default TTL and clock.

func (*ConfirmationStore) Consume added in v1.1.0

func (s *ConfirmationStore) Consume(token, operation, target string) error

Consume validates the token was minted for exactly this operation and target, and spends it. A mismatch or replay is an error, never a silent pass.

func (*ConfirmationStore) Mint added in v1.1.0

func (s *ConfirmationStore) Mint(operation, target string) (string, error)

Mint issues a single-use token authorizing operation on target.

type CreateAlbForwardingRuleInput added in v1.1.0

type CreateAlbForwardingRuleInput struct {
	DatacenterID       string             `json:"datacenter_id" jsonschema:"the ID of the data center"`
	LoadBalancerID     string             `json:"loadbalancer_id" jsonschema:"the ID of the application load balancer to add the rule to"`
	Name               string             `json:"name" jsonschema:"the name of the new forwarding rule"`
	Protocol           string             `json:"protocol" jsonschema:"the protocol to serve: HTTP or HTTPS"`
	ListenerIp         string             `json:"listener_ip" jsonschema:"the address clients connect to. Must be one of the load balancer's own listener IPs."`
	ListenerPort       int32              `json:"listener_port" jsonschema:"the port clients connect to (1-65535)"`
	ClientTimeout      *int32             `json:"client_timeout,omitempty" jsonschema:"how long an inactive client connection is kept open, in milliseconds"`
	ServerCertificates []string           `` /* 190-byte string literal not displayed */
	HttpRules          []AlbHttpRuleInput `` /* 159-byte string literal not displayed */
	ConfirmationToken  *string            `` /* 261-byte string literal not displayed */
}

CreateAlbForwardingRuleInput is the input for create_alb_forwarding_rule. Two-phase confirmed.

type CreateDatacenterInput added in v1.1.0

type CreateDatacenterInput struct {
	Name              string  `json:"name" jsonschema:"the name of the new data center"`
	Location          string  `` /* 184-byte string literal not displayed */
	Description       *string `json:"description,omitempty" jsonschema:"an optional description, such as staging or production"`
	SecAuthProtection *bool   `` /* 130-byte string literal not displayed */
	ConfirmationToken *string `` /* 290-byte string literal not displayed */
}

CreateDatacenterInput is the input for create_datacenter. Two-phase confirmed; creates exactly one data center per call (no batch/count field).

type CreateFirewallRuleInput added in v1.1.0

type CreateFirewallRuleInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID     string `json:"server_id" jsonschema:"the ID of the server the NIC belongs to"`
	NicID        string `json:"nic_id" jsonschema:"the ID of the NIC to add the rule to"`
	RuleFields
	ConfirmationToken *string `` /* 265-byte string literal not displayed */
}

CreateFirewallRuleInput is the input for create_firewall_rule, which adds a rule to a single NIC. Two-phase confirmed.

type CreateIpBlockInput added in v1.1.0

type CreateIpBlockInput struct {
	Location          string  `` /* 248-byte string literal not displayed */
	Size              int32   `` /* 138-byte string literal not displayed */
	Name              *string `json:"name,omitempty" jsonschema:"a name for the block, which is the only property you can change later"`
	ConfirmationToken *string `` /* 261-byte string literal not displayed */
}

CreateIpBlockInput is the input for create_ip_block. Two-phase confirmed. An IP block is account-level rather than inside a data center, and it is billed from creation whether or not its addresses are in use.

type CreateK8sClusterInput added in v1.1.0

type CreateK8sClusterInput struct {
	Name               string                     `` /* 187-byte string literal not displayed */
	K8sVersion         *string                    `` /* 261-byte string literal not displayed */
	MaintenanceWindow  *K8sMaintenanceWindowInput `` /* 148-byte string literal not displayed */
	Public             *bool                      `` /* 322-byte string literal not displayed */
	Location           *string                    `` /* 263-byte string literal not displayed */
	NatGatewayIp       *string                    `` /* 241-byte string literal not displayed */
	NodeSubnet         *string                    `` /* 171-byte string literal not displayed */
	ApiSubnetAllowList []string                   `` /* 258-byte string literal not displayed */
	S3Buckets          []string                   `` /* 273-byte string literal not displayed */
	ConfirmationToken  *string                    `` /* 262-byte string literal not displayed */
}

CreateK8sClusterInput is the input for create_k8s_cluster. Two-phase confirmed.

type CreateK8sNodepoolInput added in v1.1.0

type CreateK8sNodepoolInput struct {
	K8sClusterID      string                     `json:"k8s_cluster_id" jsonschema:"the ID of the cluster the node pool belongs to"`
	Name              string                     `` /* 189-byte string literal not displayed */
	DatacenterID      string                     `` /* 277-byte string literal not displayed */
	NodeCount         int32                      `` /* 173-byte string literal not displayed */
	CoresCount        int32                      `json:"cores_count" jsonschema:"CPU cores per worker node. Immutable after creation."`
	RamSize           int32                      `` /* 127-byte string literal not displayed */
	AvailabilityZone  string                     `` /* 131-byte string literal not displayed */
	StorageType       string                     `json:"storage_type" jsonschema:"the storage type for the worker nodes: HDD or SSD. Immutable after creation."`
	StorageSize       int32                      `` /* 138-byte string literal not displayed */
	CpuFamily         *string                    `` /* 259-byte string literal not displayed */
	ServerType        *string                    `` /* 188-byte string literal not displayed */
	K8sVersion        *string                    `` /* 210-byte string literal not displayed */
	MaintenanceWindow *K8sMaintenanceWindowInput `` /* 175-byte string literal not displayed */
	AutoScaling       *K8sAutoScalingInput       `` /* 147-byte string literal not displayed */
	Lans              []K8sNodePoolLanInput      `json:"lans,omitempty" jsonschema:"existing private LANs to attach to the worker nodes"`
	Labels            map[string]string          `json:"labels,omitempty" jsonschema:"Kubernetes labels to set on every node in the pool, as key-value pairs"`
	Annotations       map[string]string          `json:"annotations,omitempty" jsonschema:"Kubernetes annotations to set on every node in the pool, as key-value pairs"`
	PublicIps         []string                   `` /* 311-byte string literal not displayed */
	ConfirmationToken *string                    `` /* 285-byte string literal not displayed */
}

CreateK8sNodepoolInput is the input for create_k8s_nodepool. Two-phase confirmed. The node hardware fields are fixed at creation, so none appear on the update input.

type CreateLanInput added in v1.1.0

type CreateLanInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center to create the LAN in"`
	Name              *string `json:"name,omitempty" jsonschema:"the name of the new LAN"`
	Public            *bool   `` /* 178-byte string literal not displayed */
	Pcc               *string `` /* 175-byte string literal not displayed */
	Ipv6CidrBlock     *string `` /* 225-byte string literal not displayed */
	ConfirmationToken *string `` /* 287-byte string literal not displayed */
}

CreateLanInput is the input for create_lan. Two-phase confirmed; creates exactly one LAN per call.

type CreateLoadBalancerInput added in v1.1.0

type CreateLoadBalancerInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center to create the load balancer in"`
	Name              string  `json:"name" jsonschema:"the name of the new load balancer"`
	Ip                *string `` /* 130-byte string literal not displayed */
	Dhcp              *bool   `json:"dhcp,omitempty" jsonschema:"whether the load balancer reserves its IP using DHCP (default true)"`
	ConfirmationToken *string `` /* 258-byte string literal not displayed */
}

CreateLoadBalancerInput is the input for create_loadbalancer, the classic load balancer. Two-phase confirmed. It balances traffic across NICs attached to it rather than across IP targets, so attach NICs with attach_loadbalancer_nic.

type CreateManagedLoadBalancerInput added in v1.1.0

type CreateManagedLoadBalancerInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center to create the load balancer in"`
	Name         string `json:"name" jsonschema:"the name of the new load balancer"`
	ListenerLan  int32  `` /* 202-byte string literal not displayed */
	TargetLan    int32  `` /* 148-byte string literal not displayed */
	ManagedLoadBalancerFields
	ConfirmationToken *string `` /* 258-byte string literal not displayed */
}

CreateManagedLoadBalancerInput is the input for create_network_loadbalancer and create_application_loadbalancer. Two-phase confirmed.

type CreateNatGatewayInput added in v1.1.0

type CreateNatGatewayInput struct {
	DatacenterID      string               `json:"datacenter_id" jsonschema:"the ID of the data center to create the NAT gateway in"`
	Name              string               `json:"name" jsonschema:"the name of the new NAT gateway"`
	PublicIps         []string             `` /* 192-byte string literal not displayed */
	Lans              []NatGatewayLanInput `json:"lans,omitempty" jsonschema:"the private LANs the gateway serves. Without any, nothing routes through it."`
	ConfirmationToken *string              `` /* 258-byte string literal not displayed */
}

CreateNatGatewayInput is the input for create_nat_gateway. Two-phase confirmed.

type CreateNatGatewayRuleInput added in v1.1.0

type CreateNatGatewayRuleInput struct {
	DatacenterID         string  `json:"datacenter_id" jsonschema:"the ID of the data center"`
	NatGatewayID         string  `json:"natgateway_id" jsonschema:"the ID of the NAT gateway to add the rule to"`
	Name                 string  `json:"name" jsonschema:"the name of the new rule"`
	SourceSubnet         string  `` /* 192-byte string literal not displayed */
	PublicIp             string  `json:"public_ip" jsonschema:"the public address to translate to. It must be one of the gateway's own public_ips."`
	Type                 *string `json:"type,omitempty" jsonschema:"the translation type. Only SNAT (source NAT, for outbound traffic) is supported."`
	Protocol             *string `` /* 171-byte string literal not displayed */
	TargetSubnet         *string `` /* 151-byte string literal not displayed */
	TargetPortRangeStart *int32  `` /* 199-byte string literal not displayed */
	TargetPortRangeEnd   *int32  `` /* 198-byte string literal not displayed */
	ConfirmationToken    *string `` /* 261-byte string literal not displayed */
}

CreateNatGatewayRuleInput is the input for create_nat_gateway_rule. Two-phase confirmed. A NAT gateway does not translate anything until it has a rule.

type CreateNicInput added in v1.1.0

type CreateNicInput struct {
	DatacenterID      string   `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID          string   `json:"server_id" jsonschema:"the ID of the server to attach the new NIC to"`
	Lan               int32    `` /* 244-byte string literal not displayed */
	Name              *string  `json:"name,omitempty" jsonschema:"the name of the new NIC"`
	Ips               []string `` /* 197-byte string literal not displayed */
	Dhcp              *bool    `json:"dhcp,omitempty" jsonschema:"whether the NIC reserves an IP using DHCP (default true)"`
	FirewallActive    *bool    `` /* 249-byte string literal not displayed */
	FirewallType      *string  `` /* 133-byte string literal not displayed */
	ConfirmationToken *string  `` /* 297-byte string literal not displayed */
}

CreateNicInput is the input for create_nic. Two-phase confirmed; creates exactly one NIC per call.

type CreateNlbForwardingRuleInput added in v1.1.0

type CreateNlbForwardingRuleInput struct {
	DatacenterID      string               `json:"datacenter_id" jsonschema:"the ID of the data center"`
	LoadBalancerID    string               `json:"loadbalancer_id" jsonschema:"the ID of the network load balancer to add the rule to"`
	Name              string               `json:"name" jsonschema:"the name of the new forwarding rule"`
	Algorithm         string               `` /* 132-byte string literal not displayed */
	Protocol          string               `json:"protocol" jsonschema:"the transport protocol to forward: TCP or UDP"`
	ListenerIp        string               `json:"listener_ip" jsonschema:"the address clients connect to. Must be one of the load balancer's own listener IPs."`
	ListenerPort      int32                `json:"listener_port" jsonschema:"the port clients connect to (1-65535)"`
	Targets           []NlbTargetInput     `` /* 157-byte string literal not displayed */
	HealthCheck       *NlbHealthCheckInput `json:"health_check,omitempty" jsonschema:"rule-level timeouts and retry behaviour"`
	ConfirmationToken *string              `` /* 261-byte string literal not displayed */
}

CreateNlbForwardingRuleInput is the input for create_nlb_forwarding_rule. Two-phase confirmed. A network load balancer carries no traffic until it has at least one forwarding rule.

type CreatePccInput added in v1.1.0

type CreatePccInput struct {
	Name              string  `json:"name" jsonschema:"the name of the new private cross connect"`
	Description       *string `json:"description,omitempty" jsonschema:"an optional description of what it connects"`
	ConfirmationToken *string `` /* 240-byte string literal not displayed */
}

CreatePccInput is the input for create_pcc. Two-phase confirmed. A private cross connect is account-level: it links private LANs across data centers.

type CreateSecurityGroupInput added in v1.1.0

type CreateSecurityGroupInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center to create the security group in"`
	Name              string  `json:"name" jsonschema:"the name of the new security group"`
	Description       *string `json:"description,omitempty" jsonschema:"an optional description of what the group is for"`
	ConfirmationToken *string `` /* 265-byte string literal not displayed */
}

CreateSecurityGroupInput is the input for create_security_group. Two-phase confirmed. A new group has no rules, so it permits nothing until rules are added.

type CreateSecurityGroupRuleInput added in v1.1.0

type CreateSecurityGroupRuleInput struct {
	DatacenterID    string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	SecurityGroupID string `json:"security_group_id" jsonschema:"the ID of the security group to add the rule to"`
	RuleFields
	ConfirmationToken *string `` /* 279-byte string literal not displayed */
}

CreateSecurityGroupRuleInput is the input for create_security_group_rule, which adds a rule to a security group so every server and NIC assigned to that group inherits it. Two-phase confirmed.

type CreateServerInput added in v1.1.0

type CreateServerInput struct {
	DatacenterID      string           `json:"datacenter_id" jsonschema:"the ID of the data center to create the server in"`
	Name              string           `json:"name" jsonschema:"the name of the new server"`
	Cores             *int32           `` /* 195-byte string literal not displayed */
	Ram               *int32           `` /* 275-byte string literal not displayed */
	Type              *string          `` /* 177-byte string literal not displayed */
	TemplateUuid      *string          `` /* 214-byte string literal not displayed */
	CpuFamily         *string          `` /* 291-byte string literal not displayed */
	AvailabilityZone  *string          `` /* 155-byte string literal not displayed */
	Hostname          *string          `` /* 175-byte string literal not displayed */
	NicMultiQueue     *bool            `` /* 202-byte string literal not displayed */
	BootVolume        *BootVolumeInput `` /* 651-byte string literal not displayed */
	ConfirmationToken *string          `` /* 303-byte string literal not displayed */
}

CreateServerInput is the input for create_server. Two-phase confirmed; creates exactly one server per call.

boot_volume creates a volume in the same request. It is REQUIRED for the template-sized types, CUBE and GPU, whose storage the API accepts only in a composite call. Without a boot_volume an ENTERPRISE or VCPU server comes up with no storage and no NIC, so it has nothing to boot from and no network — follow up with attach_server_volume and create_nic, or supply boot_volume here and save the round trips.

type CreateTargetGroupInput added in v1.1.0

type CreateTargetGroupInput struct {
	Name              string                   `json:"name" jsonschema:"the name of the new target group"`
	Algorithm         string                   `` /* 127-byte string literal not displayed */
	Protocol          string                   `json:"protocol" jsonschema:"the protocol the targets speak: HTTP or TCP"`
	ProtocolVersion   *string                  `json:"protocol_version,omitempty" jsonschema:"for HTTP: HTTP1 or HTTP2"`
	Targets           []TargetGroupTargetInput `json:"targets,omitempty" jsonschema:"the backends behind this group. A group with no targets accepts no traffic."`
	ConfirmationToken *string                  `` /* 240-byte string literal not displayed */
}

CreateTargetGroupInput is the input for create_target_group. Two-phase confirmed. A target group is account-level and is referenced by application load balancer HTTP rules, so it takes no datacenter_id.

type CreateVolumeInput added in v1.1.0

type CreateVolumeInput struct {
	DatacenterID     string   `json:"datacenter_id" jsonschema:"the ID of the data center to create the volume in"`
	Name             string   `json:"name" jsonschema:"the name of the new volume"`
	Size             float32  `json:"size" jsonschema:"the size of the volume in GB"`
	Type             string   `` /* 168-byte string literal not displayed */
	Image            *string  `` /* 292-byte string literal not displayed */
	ImageAlias       *string  `` /* 128-byte string literal not displayed */
	ImagePassword    *string  `` /* 255-byte string literal not displayed */
	SshKeys          []string `` /* 189-byte string literal not displayed */
	LicenceType      *string  `` /* 241-byte string literal not displayed */
	AvailabilityZone *string  `` /* 147-byte string literal not displayed */
	Bus              *string  `json:"bus,omitempty" jsonschema:"bus type: VIRTIO (default, faster) or IDE. Use IDE only for images without VirtIO drivers."`
	UserData         *string  `` /* 173-byte string literal not displayed */
	BackupunitId     *string  `` /* 137-byte string literal not displayed */
	ExposeSerial     *bool    `` /* 140-byte string literal not displayed */
	HotPlugFlags
	ConfirmationToken *string `` /* 290-byte string literal not displayed */
}

CreateVolumeInput is the input for create_volume. Two-phase confirmed; creates exactly one volume per call. A standalone volume is not attached to any server — use attach_server_volume afterwards.

type CreateVolumeSnapshotInput added in v1.1.0

type CreateVolumeSnapshotInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center the volume is in"`
	VolumeID          string  `json:"volume_id" jsonschema:"the ID of the volume to snapshot"`
	Name              string  `json:"name" jsonschema:"the name of the new snapshot"`
	Description       *string `json:"description,omitempty" jsonschema:"an optional description, e.g. what state the volume was in"`
	SecAuthProtection *bool   `` /* 152-byte string literal not displayed */
	LicenceType       *string `` /* 186-byte string literal not displayed */
	ConfirmationToken *string `` /* 279-byte string literal not displayed */
}

CreateVolumeSnapshotInput is the input for create_volume_snapshot. Two-phase confirmed. A snapshot is the only way to recover a volume's data after delete_volume, so this is the tool to reach for before a destructive change.

type DatacenterIDInput

type DatacenterIDInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type DeleteAlbForwardingRuleInput added in v1.1.0

type DeleteAlbForwardingRuleInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center"`
	LoadBalancerID    string  `json:"loadbalancer_id" jsonschema:"the ID of the application load balancer"`
	RuleID            string  `json:"rule_id" jsonschema:"the ID of the forwarding rule to delete"`
	ConfirmationToken *string `` /* 323-byte string literal not displayed */
}

DeleteAlbForwardingRuleInput is the input for delete_alb_forwarding_rule.

type DeleteDatacenterInput added in v1.1.0

type DeleteDatacenterInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center to delete"`
	ConfirmationToken *string `` /* 317-byte string literal not displayed */
}

DeleteDatacenterInput is the input for delete_datacenter. Two-phase confirmed: deleting removes the data center and every resource inside it.

type DeleteFirewallRuleInput added in v1.1.0

type DeleteFirewallRuleInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID          string  `json:"server_id" jsonschema:"the ID of the server the NIC belongs to"`
	NicID             string  `json:"nic_id" jsonschema:"the ID of the NIC the rule is on"`
	FirewallRuleID    string  `json:"firewallrule_id" jsonschema:"the ID of the firewall rule to delete"`
	ConfirmationToken *string `` /* 376-byte string literal not displayed */
}

DeleteFirewallRuleInput is the input for delete_firewall_rule. Two-phase confirmed: removing a rule closes the traffic it was allowing.

type DeleteImageInput added in v1.1.0

type DeleteImageInput struct {
	ImageID           string  `` /* 137-byte string literal not displayed */
	ConfirmationToken *string `` /* 380-byte string literal not displayed */
}

DeleteImageInput is the input for delete_image. Two-phase confirmed.

type DeleteIpBlockInput added in v1.1.0

type DeleteIpBlockInput struct {
	IpBlockID         string  `json:"ipblock_id" jsonschema:"the ID of the IP block to release"`
	ConfirmationToken *string `` /* 479-byte string literal not displayed */
}

DeleteIpBlockInput is the input for delete_ip_block. Two-phase confirmed; the preview lists which resources are still using the addresses.

type DeleteK8sClusterInput added in v1.1.0

type DeleteK8sClusterInput struct {
	K8sClusterID      string  `json:"k8s_cluster_id" jsonschema:"the ID of the cluster to delete"`
	ConfirmationToken *string `` /* 253-byte string literal not displayed */
}

DeleteK8sClusterInput is the input for delete_k8s_cluster. Two-phase confirmed.

type DeleteK8sNodepoolInput added in v1.1.0

type DeleteK8sNodepoolInput struct {
	K8sClusterID      string  `json:"k8s_cluster_id" jsonschema:"the ID of the cluster the node pool belongs to"`
	NodepoolID        string  `json:"nodepool_id" jsonschema:"the ID of the node pool to delete"`
	ConfirmationToken *string `` /* 274-byte string literal not displayed */
}

DeleteK8sNodepoolInput is the input for delete_k8s_nodepool. Two-phase confirmed.

type DeleteLanInput added in v1.1.0

type DeleteLanInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center the LAN is in"`
	LanID             string  `json:"lan_id" jsonschema:"the ID of the LAN to delete"`
	ConfirmationToken *string `` /* 313-byte string literal not displayed */
}

DeleteLanInput is the input for delete_lan. Two-phase confirmed; the preview reports how many NICs are still attached, since deleting the LAN disconnects every one of them.

type DeleteLoadBalancerInput added in v1.1.0

type DeleteLoadBalancerInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center the load balancer is in"`
	LoadBalancerID    string  `json:"loadbalancer_id" jsonschema:"the ID of the load balancer to delete"`
	ConfirmationToken *string `` /* 338-byte string literal not displayed */
}

DeleteLoadBalancerInput is the input for delete_loadbalancer. Two-phase confirmed; the preview counts the NICs it is balancing across.

type DeleteManagedLoadBalancerInput added in v1.1.0

type DeleteManagedLoadBalancerInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center the load balancer is in"`
	LoadBalancerID    string  `json:"loadbalancer_id" jsonschema:"the ID of the load balancer to delete"`
	ConfirmationToken *string `` /* 371-byte string literal not displayed */
}

DeleteManagedLoadBalancerInput is the input for delete_network_loadbalancer and delete_application_loadbalancer. Two-phase confirmed.

type DeleteNatGatewayInput added in v1.1.0

type DeleteNatGatewayInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center the NAT gateway is in"`
	NatGatewayID      string  `json:"natgateway_id" jsonschema:"the ID of the NAT gateway to delete"`
	ConfirmationToken *string `` /* 323-byte string literal not displayed */
}

DeleteNatGatewayInput is the input for delete_nat_gateway. Two-phase confirmed.

type DeleteNatGatewayRuleInput added in v1.1.0

type DeleteNatGatewayRuleInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center"`
	NatGatewayID      string  `json:"natgateway_id" jsonschema:"the ID of the NAT gateway"`
	RuleID            string  `json:"rule_id" jsonschema:"the ID of the rule to delete"`
	ConfirmationToken *string `` /* 366-byte string literal not displayed */
}

DeleteNatGatewayRuleInput is the input for delete_nat_gateway_rule.

type DeleteNicInput added in v1.1.0

type DeleteNicInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID          string  `json:"server_id" jsonschema:"the ID of the server the NIC belongs to"`
	NicID             string  `json:"nic_id" jsonschema:"the ID of the NIC to delete"`
	ConfirmationToken *string `` /* 331-byte string literal not displayed */
}

DeleteNicInput is the input for delete_nic. Two-phase confirmed; deleting a NIC also removes its firewall rules and flow logs, and drops the server's connectivity on that LAN.

type DeleteNlbForwardingRuleInput added in v1.1.0

type DeleteNlbForwardingRuleInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center"`
	LoadBalancerID    string  `json:"loadbalancer_id" jsonschema:"the ID of the network load balancer"`
	RuleID            string  `json:"rule_id" jsonschema:"the ID of the forwarding rule to delete"`
	ConfirmationToken *string `` /* 321-byte string literal not displayed */
}

DeleteNlbForwardingRuleInput is the input for delete_nlb_forwarding_rule.

type DeletePccInput added in v1.1.0

type DeletePccInput struct {
	PccID             string  `json:"pcc_id" jsonschema:"the ID of the private cross connect to delete"`
	ConfirmationToken *string `` /* 318-byte string literal not displayed */
}

DeletePccInput is the input for delete_pcc. Two-phase confirmed; the preview counts the LANs still peered through it, all of which lose that connection.

type DeleteSecurityGroupInput added in v1.1.0

type DeleteSecurityGroupInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center the security group is in"`
	SecurityGroupID   string  `json:"security_group_id" jsonschema:"the ID of the security group to delete"`
	ConfirmationToken *string `` /* 363-byte string literal not displayed */
}

DeleteSecurityGroupInput is the input for delete_security_group. Two-phase confirmed; the preview counts the rules deleted with it and the servers and NICs that lose the protection it provided.

type DeleteSecurityGroupRuleInput added in v1.1.0

type DeleteSecurityGroupRuleInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center"`
	SecurityGroupID   string  `json:"security_group_id" jsonschema:"the ID of the security group the rule belongs to"`
	RuleID            string  `json:"rule_id" jsonschema:"the ID of the rule to delete"`
	ConfirmationToken *string `` /* 345-byte string literal not displayed */
}

DeleteSecurityGroupRuleInput is the input for delete_security_group_rule. Two-phase confirmed: the rule is removed for every member of the group.

type DeleteServerInput added in v1.1.0

type DeleteServerInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center the server is in"`
	ServerID          string  `json:"server_id" jsonschema:"the ID of the server to delete"`
	DeleteVolumes     *bool   `` /* 305-byte string literal not displayed */
	ConfirmationToken *string `` /* 415-byte string literal not displayed */
}

DeleteServerInput is the input for delete_server. Two-phase confirmed. Whether attached volumes are destroyed with the server depends on delete_volumes, so that flag is part of the confirmation target: a token minted for one choice cannot be replayed with the other.

type DeleteSnapshotInput added in v1.1.0

type DeleteSnapshotInput struct {
	SnapshotID        string  `json:"snapshot_id" jsonschema:"the ID of the snapshot to delete"`
	ConfirmationToken *string `` /* 349-byte string literal not displayed */
}

DeleteSnapshotInput is the input for delete_snapshot. Two-phase confirmed: a snapshot is often the only copy of a volume's earlier state.

type DeleteTargetGroupInput added in v1.1.0

type DeleteTargetGroupInput struct {
	TargetGroupID     string  `json:"target_group_id" jsonschema:"the ID of the target group to delete"`
	ConfirmationToken *string `` /* 326-byte string literal not displayed */
}

DeleteTargetGroupInput is the input for delete_target_group. Two-phase confirmed.

type DeleteVolumeInput added in v1.1.0

type DeleteVolumeInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center the volume is in"`
	VolumeID          string  `json:"volume_id" jsonschema:"the ID of the volume to delete"`
	ConfirmationToken *string `` /* 361-byte string literal not displayed */
}

DeleteVolumeInput is the input for delete_volume. Two-phase confirmed; the data on the volume is destroyed and cannot be recovered without a snapshot.

type DescribeToolsInput added in v1.0.1

type DescribeToolsInput struct {
	Names []string `` /* 126-byte string literal not displayed */
}

type DetachServerVolumeInput added in v1.1.0

type DetachServerVolumeInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID          string  `json:"server_id" jsonschema:"the ID of the server to detach the volume from"`
	VolumeID          string  `json:"volume_id" jsonschema:"the ID of the volume to detach"`
	ConfirmationToken *string `` /* 319-byte string literal not displayed */
}

DetachServerVolumeInput is the input for detach_server_volume. Two-phase confirmed: detaching a boot volume leaves the server unable to boot.

type ExtraHotPlugFlags added in v1.1.0

type ExtraHotPlugFlags struct {
	CpuHotUnplug      *bool `json:"cpu_hot_unplug,omitempty" jsonschema:"whether CPU cores can be removed from a server without rebooting it"`
	RamHotUnplug      *bool `json:"ram_hot_unplug,omitempty" jsonschema:"whether memory can be removed from a server without rebooting it"`
	DiscScsiHotPlug   *bool `json:"disc_scsi_hot_plug,omitempty" jsonschema:"whether a SCSI disk can be attached without rebooting the server"`
	DiscScsiHotUnplug *bool `json:"disc_scsi_hot_unplug,omitempty" jsonschema:"whether a SCSI disk can be detached without rebooting the server"`
}

ExtraHotPlugFlags are the capability flags that snapshots and images carry but volumes do not. They are kept separate from HotPlugFlags rather than merged so each input exposes exactly the set its resource supports — VolumeProperties has no cpuHotUnplug, ramHotUnplug or SCSI flags at all.

type FirewallRuleIDInput

type FirewallRuleIDInput struct {
	DatacenterID   string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID       string `json:"server_id" jsonschema:"the ID of the server"`
	NicID          string `json:"nic_id" jsonschema:"the ID of the network interface"`
	FirewallRuleID string `json:"firewallrule_id" jsonschema:"the ID of the firewall rule"`
	Depth          *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type GetContractInput added in v1.0.1

type GetContractInput struct {
	Depth *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

GetContractInput is the input for get_contract (no required ID fields).

type GpuIDInput

type GpuIDInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID     string `json:"server_id" jsonschema:"the ID of the server"`
	GpuID        string `json:"gpu_id" jsonschema:"the ID of the GPU"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type HotPlugFlags added in v1.1.0

type HotPlugFlags struct {
	CpuHotPlug          *bool `` /* 227-byte string literal not displayed */
	RamHotPlug          *bool `` /* 194-byte string literal not displayed */
	NicHotPlug          *bool `json:"nic_hot_plug,omitempty" jsonschema:"whether a NIC can be attached to the server without rebooting it"`
	NicHotUnplug        *bool `json:"nic_hot_unplug,omitempty" jsonschema:"whether a NIC can be detached from the server without rebooting it"`
	DiscVirtioHotPlug   *bool `json:"disc_virtio_hot_plug,omitempty" jsonschema:"whether a VirtIO disk can be attached to the server without rebooting it"`
	DiscVirtioHotUnplug *bool `` /* 161-byte string literal not displayed */
}

HotPlugFlags are the volume capability flags that decide whether the server it is attached to can change hardware without a reboot. They are embedded in every input that carries volume properties — create_volume, update_volume and the inline boot volume of create_server — because all three IONOS tooling paths expose them on all three (ionosctl's volume create and update, and the volume block of the Terraform server, cube_server and gpu_server resources).

Embedded rather than repeated so the wording cannot drift between the three tools; Go flattens the fields into the parent object's JSON schema.

type IpBlockIDInput

type IpBlockIDInput struct {
	IpBlockID string `json:"ipblock_id" jsonschema:"the ID of the IP block"`
	Depth     *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type K8sAutoScalingInput added in v1.1.0

type K8sAutoScalingInput struct {
	MinNodeCount int32 `json:"min_node_count" jsonschema:"the fewest worker nodes the autoscaler may scale down to. Must be at least 1."`
	MaxNodeCount int32 `` /* 137-byte string literal not displayed */
}

K8sAutoScalingInput turns the cluster autoscaler on. Once set it owns the node count.

type K8sClusterIDInput added in v1.0.1

type K8sClusterIDInput struct {
	K8sClusterID string `json:"k8s_cluster_id" jsonschema:"the ID of the Kubernetes cluster"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type K8sMaintenanceWindowInput added in v1.1.0

type K8sMaintenanceWindowInput struct {
	DayOfTheWeek string `` /* 130-byte string literal not displayed */
	Time         string `` /* 155-byte string literal not displayed */
}

K8sMaintenanceWindowInput is the weekly maintenance window.

type K8sNodeActionInput added in v1.1.0

type K8sNodeActionInput struct {
	K8sClusterID      string  `json:"k8s_cluster_id" jsonschema:"the ID of the cluster the node belongs to"`
	NodepoolID        string  `json:"nodepool_id" jsonschema:"the ID of the node pool the node belongs to"`
	NodeID            string  `json:"node_id" jsonschema:"the ID of the node to act on"`
	ConfirmationToken *string `` /* 243-byte string literal not displayed */
}

K8sNodeActionInput is the input for recreate_k8s_node and delete_k8s_node.

type K8sNodeIDInput added in v1.0.1

type K8sNodeIDInput struct {
	K8sClusterID string `json:"k8s_cluster_id" jsonschema:"the ID of the Kubernetes cluster"`
	NodepoolID   string `json:"nodepool_id" jsonschema:"the ID of the Kubernetes node pool"`
	NodeID       string `json:"node_id" jsonschema:"the ID of the Kubernetes node"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type K8sNodePoolLanInput added in v1.1.0

type K8sNodePoolLanInput struct {
	ID     int32                      `json:"id" jsonschema:"the numeric LAN ID of an existing LAN in the node pool's data center"`
	Dhcp   *bool                      `json:"dhcp,omitempty" jsonschema:"whether the worker nodes reserve an IP on this LAN via DHCP"`
	Routes []K8sNodePoolLanRouteInput `json:"routes,omitempty" jsonschema:"static routes to add on this LAN interface"`
}

K8sNodePoolLanInput attaches an existing private LAN to the worker nodes.

type K8sNodePoolLanRouteInput added in v1.1.0

type K8sNodePoolLanRouteInput struct {
	Network   *string `json:"network,omitempty" jsonschema:"the IPv4 or IPv6 CIDR to route via this interface (e.g. 10.0.0.0/24)"`
	GatewayIp *string `json:"gateway_ip,omitempty" jsonschema:"the IPv4 or IPv6 gateway IP for the route"`
}

K8sNodePoolLanRouteInput is one static route. Both fields are optional per the spec.

type K8sNodepoolIDInput added in v1.0.1

type K8sNodepoolIDInput struct {
	K8sClusterID string `json:"k8s_cluster_id" jsonschema:"the ID of the Kubernetes cluster"`
	NodepoolID   string `json:"nodepool_id" jsonschema:"the ID of the Kubernetes node pool"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type KV added in v1.1.0

type KV struct {
	K string
	V string
}

KV is one "key: value" line in a preview block.

func Fields added in v1.1.0

func Fields(pairs ...string) []KV

Fields builds a preview field list from alternating key, value arguments:

tools.Fields("name", name, "cores", tools.OptInt32(in.Cores))

Empty values are dropped at render time, so callers can list every optional field unconditionally. Panics on an odd number of arguments.

type LabeledCount added in v1.1.0

type LabeledCount struct {
	Label string
	Count int
}

LabeledCount is one line of a blast-radius preview ("3 volumes").

type LanIDInput

type LanIDInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	LanID        string `json:"lan_id" jsonschema:"the ID of the LAN"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type ListAlbForwardingRulesInput added in v1.1.0

type ListAlbForwardingRulesInput struct {
	DatacenterID              string            `json:"datacenter_id"               jsonschema:"the ID of the data center"`
	ApplicationLoadBalancerID string            `json:"application_loadbalancer_id" jsonschema:"the ID of the application load balancer"`
	Depth                     *int32            `json:"depth,omitempty"   jsonschema:"nesting depth of returned objects (0-5, default 1)"`
	Filters                   map[string]string `` /* 228-byte string literal not displayed */
}

type ListDatacentersInput added in v1.0.1

type ListDatacentersInput struct {
	Depth   *int32            `` /* 133-byte string literal not displayed */
	Filters map[string]string `` /* 328-byte string literal not displayed */
}

ListDatacentersInput is the input for list_datacenters (no required ID fields).

type ListFirewallRulesInput added in v1.1.0

type ListFirewallRulesInput struct {
	DatacenterID string            `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID     string            `json:"server_id"     jsonschema:"the ID of the server"`
	NicID        string            `json:"nic_id"        jsonschema:"the ID of the network interface"`
	Depth        *int32            `json:"depth,omitempty"   jsonschema:"nesting depth of returned objects (0-5, default 1)"`
	Filters      map[string]string `` /* 275-byte string literal not displayed */
}

type ListIPBlocksInput added in v1.0.1

type ListIPBlocksInput struct {
	Depth   *int32            `json:"depth,omitempty"   jsonschema:"nesting depth of returned objects (0-5, default 1)"`
	Filters map[string]string `` /* 252-byte string literal not displayed */
}

type ListImagesInput added in v1.0.1

type ListImagesInput struct {
	Depth   *int32            `json:"depth,omitempty"   jsonschema:"nesting depth of returned objects (0-5, default 1)"`
	Filters map[string]string `` /* 302-byte string literal not displayed */
}

type ListInDatacenterInput added in v1.1.0

type ListInDatacenterInput struct {
	DatacenterID string            `json:"datacenter_id" jsonschema:"the ID of the data center"`
	Depth        *int32            `json:"depth,omitempty"   jsonschema:"nesting depth of returned objects (0-5, default 1)"`
	Filters      map[string]string `` /* 228-byte string literal not displayed */
}

type ListInServerInput added in v1.1.0

type ListInServerInput struct {
	DatacenterID string            `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID     string            `json:"server_id"     jsonschema:"the ID of the server"`
	Depth        *int32            `json:"depth,omitempty"   jsonschema:"nesting depth of returned objects (0-5, default 1)"`
	Filters      map[string]string `` /* 228-byte string literal not displayed */
}

type ListK8sClustersInput added in v1.0.1

type ListK8sClustersInput struct {
	Depth *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1)"`
}

type ListLanNicsInput added in v1.1.0

type ListLanNicsInput struct {
	DatacenterID string            `json:"datacenter_id" jsonschema:"the ID of the data center"`
	LanID        string            `json:"lan_id"        jsonschema:"the ID of the LAN"`
	Depth        *int32            `json:"depth,omitempty"   jsonschema:"nesting depth of returned objects (0-5, default 1)"`
	Filters      map[string]string `` /* 228-byte string literal not displayed */
}

type ListLoadBalancerNicsInput added in v1.1.0

type ListLoadBalancerNicsInput struct {
	DatacenterID   string            `json:"datacenter_id"   jsonschema:"the ID of the data center"`
	LoadBalancerID string            `json:"loadbalancer_id" jsonschema:"the ID of the load balancer"`
	Depth          *int32            `json:"depth,omitempty"   jsonschema:"nesting depth of returned objects (0-5, default 1)"`
	Filters        map[string]string `` /* 228-byte string literal not displayed */
}

type ListLocationsInput added in v1.0.1

type ListLocationsInput struct {
	Depth   *int32            `json:"depth,omitempty"   jsonschema:"nesting depth of returned objects (0-5, default 1)"`
	Filters map[string]string `` /* 233-byte string literal not displayed */
}

type ListNatGatewayRulesInput added in v1.1.0

type ListNatGatewayRulesInput struct {
	DatacenterID string            `json:"datacenter_id"  jsonschema:"the ID of the data center"`
	NatGatewayID string            `json:"nat_gateway_id" jsonschema:"the ID of the NAT gateway"`
	Depth        *int32            `json:"depth,omitempty"   jsonschema:"nesting depth of returned objects (0-5, default 1)"`
	Filters      map[string]string `` /* 246-byte string literal not displayed */
}

type ListNlbForwardingRulesInput added in v1.1.0

type ListNlbForwardingRulesInput struct {
	DatacenterID          string            `json:"datacenter_id"           jsonschema:"the ID of the data center"`
	NetworkLoadBalancerID string            `json:"network_loadbalancer_id" jsonschema:"the ID of the network load balancer"`
	Depth                 *int32            `json:"depth,omitempty"   jsonschema:"nesting depth of returned objects (0-5, default 1)"`
	Filters               map[string]string `` /* 228-byte string literal not displayed */
}

type ListPrivateCrossConnectsInput added in v1.0.1

type ListPrivateCrossConnectsInput struct {
	Depth   *int32            `json:"depth,omitempty"   jsonschema:"nesting depth of returned objects (0-5, default 1)"`
	Filters map[string]string `` /* 228-byte string literal not displayed */
}

type ListRequestsInput added in v1.0.1

type ListRequestsInput struct {
	Depth   *int32            `json:"depth,omitempty"   jsonschema:"nesting depth of returned objects (0-5, default 1)"`
	Filters map[string]string `` /* 292-byte string literal not displayed */
}

type ListSecurityGroupRulesInput added in v1.1.0

type ListSecurityGroupRulesInput struct {
	DatacenterID    string            `json:"datacenter_id"     jsonschema:"the ID of the data center"`
	SecurityGroupID string            `json:"security_group_id" jsonschema:"the ID of the security group"`
	Depth           *int32            `json:"depth,omitempty"   jsonschema:"nesting depth of returned objects (0-5, default 1)"`
	Filters         map[string]string `` /* 275-byte string literal not displayed */
}

type ListSnapshotsInput added in v1.0.1

type ListSnapshotsInput struct {
	Depth   *int32            `json:"depth,omitempty"   jsonschema:"nesting depth of returned objects (0-5, default 1)"`
	Filters map[string]string `` /* 252-byte string literal not displayed */
}

type ListTargetGroupsInput added in v1.0.1

type ListTargetGroupsInput struct {
	Depth   *int32            `json:"depth,omitempty"   jsonschema:"nesting depth of returned objects (0-5, default 1)"`
	Filters map[string]string `` /* 228-byte string literal not displayed */
}

type ListTemplatesInput added in v1.0.1

type ListTemplatesInput struct {
	Depth   *int32            `json:"depth,omitempty"   jsonschema:"nesting depth of returned objects (0-5, default 1)"`
	Filters map[string]string `` /* 260-byte string literal not displayed */
}

type LoadBalancerIDInput

type LoadBalancerIDInput struct {
	DatacenterID   string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	LoadBalancerID string `json:"loadbalancer_id" jsonschema:"the ID of the load balancer"`
	Depth          *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type ManagedLoadBalancerFields added in v1.1.0

type ManagedLoadBalancerFields struct {
	Ips            []string `` /* 235-byte string literal not displayed */
	LbPrivateIps   []string `` /* 175-byte string literal not displayed */
	CentralLogging *bool    `json:"central_logging,omitempty" jsonschema:"send the load balancer's logs to the central logging service"`
	LoggingFormat  *string  `json:"logging_format,omitempty" jsonschema:"the log line format to use when central_logging is on"`
}

ManagedLoadBalancerFields are the properties shared by network and application load balancers, whose API models are field-for-field identical.

type Method added in v1.1.0

type Method string

Method is the HTTP method a tool maps to. Tools are classified by method at registration so the scope gate knows which to hide.

const (
	MethodGet    Method = http.MethodGet
	MethodHead   Method = http.MethodHead
	MethodPost   Method = http.MethodPost
	MethodPut    Method = http.MethodPut
	MethodPatch  Method = http.MethodPatch
	MethodDelete Method = http.MethodDelete
)

func (Method) Class added in v1.1.0

func (m Method) Class() Class

Class maps an HTTP method to its mutation class.

type NatGatewayIDInput

type NatGatewayIDInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	NatGatewayID string `json:"nat_gateway_id" jsonschema:"the ID of the NAT gateway"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type NatGatewayLanInput added in v1.1.0

type NatGatewayLanInput struct {
	ID         int32    `json:"id" jsonschema:"the numeric LAN ID the gateway serves (the lan value from list_lans)"`
	GatewayIps []string `` /* 134-byte string literal not displayed */
}

NatGatewayLanInput is one LAN a NAT gateway serves.

type NetworkLoadBalancerIDInput

type NetworkLoadBalancerIDInput struct {
	DatacenterID          string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	NetworkLoadBalancerID string `json:"network_loadbalancer_id" jsonschema:"the ID of the network load balancer"`
	Depth                 *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type NicIDInput

type NicIDInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID     string `json:"server_id" jsonschema:"the ID of the server"`
	NicID        string `json:"nic_id" jsonschema:"the ID of the network interface"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type NlbHealthCheckInput added in v1.1.0

type NlbHealthCheckInput struct {
	ClientTimeout  *int32 `json:"client_timeout,omitempty" jsonschema:"how long an inactive client connection is kept open, in milliseconds"`
	ConnectTimeout *int32 `json:"connect_timeout,omitempty" jsonschema:"how long to wait when connecting to a backend, in milliseconds"`
	TargetTimeout  *int32 `` /* 136-byte string literal not displayed */
	Retries        *int32 `json:"retries,omitempty" jsonschema:"how many times to retry a failed connection attempt (0-65535)"`
}

NlbHealthCheckInput is the rule-level health check for a network load balancer forwarding rule. All values are milliseconds except retries.

type NlbTargetInput added in v1.1.0

type NlbTargetInput struct {
	Ip                  string  `` /* 127-byte string literal not displayed */
	Port                int32   `json:"port" jsonschema:"the port the backend listens on (1-65535)"`
	Weight              int32   `` /* 143-byte string literal not displayed */
	ProxyProtocol       *string `` /* 137-byte string literal not displayed */
	HealthCheck         *bool   `json:"health_check,omitempty" jsonschema:"whether the load balancer health-checks this backend"`
	HealthCheckInterval *int32  `json:"health_check_interval,omitempty" jsonschema:"how often to health-check this backend, in milliseconds"`
	Maintenance         *bool   `` /* 126-byte string literal not displayed */
}

NlbTargetInput is one backend behind a network load balancer forwarding rule.

type ObjectStorageBucketInput

type ObjectStorageBucketInput struct {
	Bucket string `json:"bucket" jsonschema:"the name of the object storage bucket"`
}

type ObjectStorageListObjectVersionsInput

type ObjectStorageListObjectVersionsInput struct {
	Bucket string  `json:"bucket" jsonschema:"the name of the object storage bucket"`
	Prefix *string `json:"prefix,omitempty" jsonschema:"optional key prefix to filter versions"`
}

type ObjectStorageListObjectsInput

type ObjectStorageListObjectsInput struct {
	Bucket            string  `json:"bucket" jsonschema:"the name of the object storage bucket"`
	Prefix            *string `` /* 128-byte string literal not displayed */
	ContinuationToken *string `` /* 140-byte string literal not displayed */
	MaxKeys           *int32  `json:"max_keys,omitempty" jsonschema:"optional maximum number of objects to return in a single page"`
}

type ObjectStorageObjectInput

type ObjectStorageObjectInput struct {
	Bucket string `json:"bucket" jsonschema:"the name of the object storage bucket"`
	Key    string `json:"key" jsonschema:"the object key (path within the bucket)"`
}

type ObjectStorageRegionInput

type ObjectStorageRegionInput struct {
	Region string `json:"region" jsonschema:"the region name (e.g. eu-central-3)"`
}

type PccIDInput

type PccIDInput struct {
	PccID string `json:"pcc_id" jsonschema:"the ID of the private cross-connect"`
	Depth *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type Preview added in v1.1.0

type Preview struct {
	// Headline is the first line, e.g. "About to CREATE one server:".
	Headline string
	// Fields echoes what the operation will act on.
	Fields []KV
	// Radius is what the operation touches. Nil for creates and leaf resources.
	Radius *BlastRadius
	// EmptyNote replaces the count list when Radius is present but empty.
	EmptyNote string
	// Tool is the tool to call again; Replay the arguments it must repeat.
	Tool   string
	Replay []KV
	// TokenNote says what the token authorizes. Keep it narrow — it is the only
	// signal that a token is not blanket permission.
	TokenNote string
}

Preview describes a two-phase confirmation preview: what is about to happen, the inputs it will act on, what it would destroy, and how to proceed.

func (Preview) Render added in v1.1.0

func (p Preview) Render(token string) string

Render produces the preview text with the token footer. Returned as a NON-error result: the first call of a two-phase flow succeeded, it just changed nothing.

type ProviderIDInput

type ProviderIDInput struct {
	ProviderID string `json:"provider_id" jsonschema:"the ID of the certificate provider"`
}

type RecordIDInput

type RecordIDInput struct {
	ZoneID   string `json:"zone_id" jsonschema:"the ID of the DNS zone"`
	RecordID string `json:"record_id" jsonschema:"the ID of the DNS record"`
}

type RequestIDInput

type RequestIDInput struct {
	RequestID string `json:"request_id" jsonschema:"the ID of the request"`
	Depth     *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type RestoreVolumeSnapshotInput added in v1.1.0

type RestoreVolumeSnapshotInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center the volume is in"`
	VolumeID          string  `json:"volume_id" jsonschema:"the ID of the volume to restore INTO. Its current contents are overwritten."`
	SnapshotID        string  `json:"snapshot_id" jsonschema:"the ID of the snapshot to restore from; find it with list_snapshots"`
	ConfirmationToken *string `` /* 302-byte string literal not displayed */
}

RestoreVolumeSnapshotInput is the input for restore_volume_snapshot. Two-phase confirmed and destructive: restoring OVERWRITES the volume's current contents.

type ReverseRecordIDInput

type ReverseRecordIDInput struct {
	ReverseRecordID string `json:"reverse_record_id" jsonschema:"the ID of the reverse DNS record"`
}

type RuleFields added in v1.1.0

type RuleFields struct {
	Protocol       *string `` /* 213-byte string literal not displayed */
	Name           *string `json:"name,omitempty" jsonschema:"a name for the rule"`
	Type           *string `json:"type,omitempty" jsonschema:"direction the rule applies to: INGRESS (inbound, the default) or EGRESS (outbound)"`
	SourceMac      *string `` /* 294-byte string literal not displayed */
	SourceIp       *string `` /* 403-byte string literal not displayed */
	TargetIp       *string `` /* 367-byte string literal not displayed */
	IpVersion      *string `` /* 205-byte string literal not displayed */
	PortRangeStart *int32  `` /* 204-byte string literal not displayed */
	PortRangeEnd   *int32  `` /* 173-byte string literal not displayed */
	IcmpType       *int32  `` /* 271-byte string literal not displayed */
	IcmpCode       *int32  `` /* 271-byte string literal not displayed */
}

RuleFields are the properties of a firewall rule. Embedded by both the NIC-scoped firewall rule tools and the security-group rule tools, because the API uses one FirewallruleProperties model for both and the semantics are identical — only the parent chain differs.

type Scope added in v1.1.0

type Scope struct {
	Write       bool
	Destructive bool
}

Scope is the set of mutation classes enabled via IONOS_MCP_TOOL_SCOPE.

func ParseScope added in v1.1.0

func ParseScope(raw string) Scope

ParseScope reads IONOS_MCP_TOOL_SCOPE into a Scope. Hierarchical: destructive implies write. Unrecognised values leave the server read-only.

func (Scope) Allows added in v1.1.0

func (s Scope) Allows(c Class) bool

Allows reports whether tools of the given class may be registered/invoked. Reads are unconditionally allowed — read access can never be turned off.

func (Scope) String added in v1.1.0

func (s Scope) String() string

type SearchToolsInput added in v1.0.1

type SearchToolsInput struct {
	Query string  `json:"query" jsonschema:"keywords to match against tool names and descriptions; leave empty to browse, optionally with group"`
	Group *string `` /* 146-byte string literal not displayed */
	Limit *int    `` /* 146-byte string literal not displayed */
}

type SecondaryZoneIDInput

type SecondaryZoneIDInput struct {
	SecondaryZoneID string `json:"secondary_zone_id" jsonschema:"the ID of the secondary DNS zone"`
}

type SecurityGroupIDInput

type SecurityGroupIDInput struct {
	DatacenterID    string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	SecurityGroupID string `json:"security_group_id" jsonschema:"the ID of the security group"`
	Depth           *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type SecurityGroupRuleIDInput

type SecurityGroupRuleIDInput struct {
	DatacenterID    string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	SecurityGroupID string `json:"security_group_id" jsonschema:"the ID of the security group"`
	RuleID          string `json:"rule_id" jsonschema:"the ID of the security group rule"`
	Depth           *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type ServerDisruptiveActionInput added in v1.1.0

type ServerDisruptiveActionInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center the server is in"`
	ServerID          string  `json:"server_id" jsonschema:"the ID of the server"`
	ConfirmationToken *string `` /* 314-byte string literal not displayed */
}

ServerDisruptiveActionInput is the input for the power actions that interrupt a running server (stop_server, reboot_server, suspend_server, upgrade_server). Two-phase confirmed: the preview shows the server's current name and state so the caller can confirm it is about to hit the right machine.

type ServerIDInput

type ServerIDInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID     string `json:"server_id" jsonschema:"the ID of the server"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5, default 1 for list operations)"`
}

type ServerPowerInput added in v1.1.0

type ServerPowerInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center the server is in"`
	ServerID     string `json:"server_id" jsonschema:"the ID of the server"`
}

ServerPowerInput is the input for the non-disruptive power actions (start_server, resume_server). Single call — they bring a server up rather than interrupting it, so there is nothing to preview.

type SnapshotIDInput

type SnapshotIDInput struct {
	SnapshotID string `json:"snapshot_id" jsonschema:"the ID of the snapshot"`
	Depth      *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type TargetGroupIDInput

type TargetGroupIDInput struct {
	TargetGroupID string `json:"target_group_id" jsonschema:"the ID of the target group"`
	Depth         *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type TargetGroupTargetInput added in v1.1.0

type TargetGroupTargetInput struct {
	Ip                 string  `json:"ip" jsonschema:"the IPv4 or IPv6 address of the backend"`
	Port               int32   `json:"port" jsonschema:"the port the backend listens on (1-65535)"`
	Weight             int32   `` /* 143-byte string literal not displayed */
	ProxyProtocol      *string `` /* 126-byte string literal not displayed */
	HealthCheckEnabled *bool   `json:"health_check_enabled,omitempty" jsonschema:"whether the target group health-checks this backend"`
	MaintenanceEnabled *bool   `` /* 134-byte string literal not displayed */
}

TargetGroupTargetInput is one backend behind a target group.

type TemplateIDInput

type TemplateIDInput struct {
	TemplateID string `json:"template_id" jsonschema:"the ID of the template"`
	Depth      *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type UpdateAlbForwardingRuleInput added in v1.1.0

type UpdateAlbForwardingRuleInput struct {
	DatacenterID       string             `json:"datacenter_id" jsonschema:"the ID of the data center"`
	LoadBalancerID     string             `json:"loadbalancer_id" jsonschema:"the ID of the application load balancer"`
	RuleID             string             `json:"rule_id" jsonschema:"the ID of the forwarding rule to update"`
	Name               *string            `json:"name,omitempty" jsonschema:"a new name. Omit to keep the current one."`
	Protocol           *string            `json:"protocol,omitempty" jsonschema:"a new protocol: HTTP or HTTPS. Omit to keep the current one."`
	ListenerIp         *string            `json:"listener_ip,omitempty" jsonschema:"a new listener address. Omit to keep the current one."`
	ListenerPort       *int32             `json:"listener_port,omitempty" jsonschema:"a new listener port. Omit to keep the current one."`
	ClientTimeout      *int32             `json:"client_timeout,omitempty" jsonschema:"a new client timeout in milliseconds"`
	ServerCertificates []string           `` /* 146-byte string literal not displayed */
	HttpRules          []AlbHttpRuleInput `` /* 181-byte string literal not displayed */
}

UpdateAlbForwardingRuleInput is the input for update_alb_forwarding_rule. The API always receives name, protocol, listener_ip and listener_port, so those are read and carried forward when omitted.

type UpdateDatacenterInput added in v1.1.0

type UpdateDatacenterInput struct {
	DatacenterID      string  `json:"datacenter_id" jsonschema:"the ID of the data center to update"`
	Name              *string `json:"name,omitempty" jsonschema:"a new name for the data center"`
	Description       *string `json:"description,omitempty" jsonschema:"a new description for the data center"`
	SecAuthProtection *bool   `json:"sec_auth_protection,omitempty" jsonschema:"set the extra-protection (two-step verification) flag"`
}

UpdateDatacenterInput is the input for update_datacenter. Partial update; location is immutable and cannot be set here.

type UpdateFirewallRuleInput added in v1.1.0

type UpdateFirewallRuleInput struct {
	DatacenterID   string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID       string `json:"server_id" jsonschema:"the ID of the server the NIC belongs to"`
	NicID          string `json:"nic_id" jsonschema:"the ID of the NIC the rule is on"`
	FirewallRuleID string `json:"firewallrule_id" jsonschema:"the ID of the firewall rule to update"`
	RuleFields
	Clear []string `` /* 545-byte string literal not displayed */
}

UpdateFirewallRuleInput is the input for update_firewall_rule. Partial update.

type UpdateImageInput added in v1.1.0

type UpdateImageInput struct {
	ImageID           string  `` /* 144-byte string literal not displayed */
	Name              *string `json:"name,omitempty" jsonschema:"a new name for the image"`
	Description       *string `json:"description,omitempty" jsonschema:"a new description"`
	LicenceType       *string `` /* 195-byte string literal not displayed */
	CloudInit         *string `json:"cloud_init,omitempty" jsonschema:"cloud-init compatibility: NONE or V1"`
	ExposeSerial      *bool   `json:"expose_serial,omitempty" jsonschema:"expose the disk serial ID on volumes created from this image"`
	RequireLegacyBios *bool   `json:"require_legacy_bios,omitempty" jsonschema:"whether volumes created from this image need the legacy BIOS"`
	HotPlugFlags
	ExtraHotPlugFlags
}

UpdateImageInput is the input for update_image. There is no create_image — the API exposes no way to create one, and only private images you uploaded can be changed or deleted; public IONOS images are read-only.

licence_type is read and carried forward when omitted, because the API always receives it and an empty value would be rejected or would clear the image's OS type.

type UpdateK8sClusterInput added in v1.1.0

type UpdateK8sClusterInput struct {
	K8sClusterID       string                     `json:"k8s_cluster_id" jsonschema:"the ID of the cluster to update"`
	Name               *string                    `json:"name,omitempty" jsonschema:"a new cluster name. Omit to keep the current one."`
	K8sVersion         *string                    `` /* 254-byte string literal not displayed */
	MaintenanceWindow  *K8sMaintenanceWindowInput `json:"maintenance_window,omitempty" jsonschema:"a new maintenance window. Omit to keep the current one."`
	ApiSubnetAllowList []string                   `` /* 333-byte string literal not displayed */
	S3Buckets          []string                   `` /* 245-byte string literal not displayed */
}

UpdateK8sClusterInput is the input for update_k8s_cluster. Single call. Omitted fields are carried forward; dropping api_subnet_allow_list would expose the API server. location, nat_gateway_ip, node_subnet and public are immutable and absent.

type UpdateK8sNodepoolInput added in v1.1.0

type UpdateK8sNodepoolInput struct {
	K8sClusterID      string                     `json:"k8s_cluster_id" jsonschema:"the ID of the cluster the node pool belongs to"`
	NodepoolID        string                     `json:"nodepool_id" jsonschema:"the ID of the node pool to update"`
	NodeCount         *int32                     `` /* 231-byte string literal not displayed */
	ServerType        *string                    `json:"server_type,omitempty" jsonschema:"a new server type: DedicatedCore or VCPU. Omit to keep the current one."`
	K8sVersion        *string                    `` /* 271-byte string literal not displayed */
	MaintenanceWindow *K8sMaintenanceWindowInput `json:"maintenance_window,omitempty" jsonschema:"a new maintenance window. Omit to keep the current one."`
	AutoScaling       *K8sAutoScalingInput       `` /* 315-byte string literal not displayed */
	Lans              []K8sNodePoolLanInput      `` /* 261-byte string literal not displayed */
	Labels            map[string]string          `` /* 172-byte string literal not displayed */
	Annotations       map[string]string          `` /* 187-byte string literal not displayed */
	PublicIps         []string                   `` /* 225-byte string literal not displayed */
}

UpdateK8sNodepoolInput is the input for update_k8s_nodepool. Single call. Omitted fields are carried forward, which is what stops node_count going to 0 and draining the pool. name and the node hardware are immutable and absent.

type UpdateLanInput added in v1.1.0

type UpdateLanInput struct {
	DatacenterID  string  `json:"datacenter_id" jsonschema:"the ID of the data center the LAN is in"`
	LanID         string  `json:"lan_id" jsonschema:"the ID of the LAN to update"`
	Name          *string `json:"name,omitempty" jsonschema:"a new name for the LAN"`
	Public        *bool   `` /* 165-byte string literal not displayed */
	Pcc           *string `` /* 343-byte string literal not displayed */
	Ipv6CidrBlock *string `` /* 180-byte string literal not displayed */
}

UpdateLanInput is the input for update_lan. Partial update. ipv4_cidr_block is read-only and cannot be set.

type UpdateLoadBalancerInput added in v1.1.0

type UpdateLoadBalancerInput struct {
	DatacenterID   string  `json:"datacenter_id" jsonschema:"the ID of the data center the load balancer is in"`
	LoadBalancerID string  `json:"loadbalancer_id" jsonschema:"the ID of the load balancer to update"`
	Name           *string `json:"name,omitempty" jsonschema:"a new name"`
	Ip             *string `json:"ip,omitempty" jsonschema:"a new IPv4 address to listen on, from a reserved IP block"`
	Dhcp           *bool   `json:"dhcp,omitempty" jsonschema:"whether the load balancer reserves its IP using DHCP"`
}

UpdateLoadBalancerInput is the input for update_loadbalancer. All of the classic load balancer's properties are optional in the API model, so this is a genuine partial update with no carry-forward read.

type UpdateManagedLoadBalancerInput added in v1.1.0

type UpdateManagedLoadBalancerInput struct {
	DatacenterID   string  `json:"datacenter_id" jsonschema:"the ID of the data center the load balancer is in"`
	LoadBalancerID string  `json:"loadbalancer_id" jsonschema:"the ID of the load balancer to update"`
	Name           *string `json:"name,omitempty" jsonschema:"a new name. Omit to keep the current one — it is read and sent back unchanged."`
	ListenerLan    *int32  `` /* 147-byte string literal not displayed */
	TargetLan      *int32  `` /* 178-byte string literal not displayed */
	ManagedLoadBalancerFields
}

UpdateManagedLoadBalancerInput is the input for update_network_loadbalancer and update_application_loadbalancer. Partial update: omitted fields are read from the current resource and sent back unchanged, because the API always receives name, listener_lan and target_lan.

type UpdateNatGatewayInput added in v1.1.0

type UpdateNatGatewayInput struct {
	DatacenterID string               `json:"datacenter_id" jsonschema:"the ID of the data center the NAT gateway is in"`
	NatGatewayID string               `json:"natgateway_id" jsonschema:"the ID of the NAT gateway to update"`
	Name         *string              `json:"name,omitempty" jsonschema:"a new name. Omit to keep the current one."`
	PublicIps    []string             `` /* 182-byte string literal not displayed */
	Lans         []NatGatewayLanInput `` /* 135-byte string literal not displayed */
}

UpdateNatGatewayInput is the input for update_nat_gateway. Partial update: name and public_ips are read and carried forward when omitted, because the API always receives them.

type UpdateNatGatewayRuleInput added in v1.1.0

type UpdateNatGatewayRuleInput struct {
	DatacenterID         string  `json:"datacenter_id" jsonschema:"the ID of the data center"`
	NatGatewayID         string  `json:"natgateway_id" jsonschema:"the ID of the NAT gateway"`
	RuleID               string  `json:"rule_id" jsonschema:"the ID of the rule to update"`
	Name                 *string `json:"name,omitempty" jsonschema:"a new name. Omit to keep the current one."`
	SourceSubnet         *string `` /* 163-byte string literal not displayed */
	PublicIp             *string `` /* 148-byte string literal not displayed */
	Type                 *string `json:"type,omitempty" jsonschema:"the translation type. Only SNAT is supported."`
	Protocol             *string `json:"protocol,omitempty" jsonschema:"restrict the rule to TCP, UDP, ICMP or ALL"`
	TargetSubnet         *string `json:"target_subnet,omitempty" jsonschema:"restrict the rule to this destination range, in CIDR form"`
	TargetPortRangeStart *int32  `` /* 133-byte string literal not displayed */
	TargetPortRangeEnd   *int32  `` /* 132-byte string literal not displayed */
}

UpdateNatGatewayRuleInput is the input for update_nat_gateway_rule. The API always receives name, source_subnet and public_ip, so those are read and carried forward when omitted.

type UpdateNicInput added in v1.1.0

type UpdateNicInput struct {
	DatacenterID   string   `json:"datacenter_id" jsonschema:"the ID of the data center"`
	ServerID       string   `json:"server_id" jsonschema:"the ID of the server the NIC belongs to"`
	NicID          string   `json:"nic_id" jsonschema:"the ID of the NIC to update"`
	Name           *string  `json:"name,omitempty" jsonschema:"a new name for the NIC"`
	Lan            *int32   `` /* 200-byte string literal not displayed */
	Ips            []string `` /* 190-byte string literal not displayed */
	Dhcp           *bool    `json:"dhcp,omitempty" jsonschema:"whether the NIC reserves an IP using DHCP"`
	FirewallActive *bool    `` /* 159-byte string literal not displayed */
	FirewallType   *string  `json:"firewall_type,omitempty" jsonschema:"which rule directions are allowed on this NIC: INGRESS, EGRESS or BIDIRECTIONAL"`
}

UpdateNicInput is the input for update_nic. Partial update, with one important exception: the IONOS SDK always serializes the NIC's lan field, so an update that omitted it would move the NIC to LAN 0. update_nic therefore reads the NIC's current lan and sends it back unchanged unless lan is given explicitly.

type UpdateNlbForwardingRuleInput added in v1.1.0

type UpdateNlbForwardingRuleInput struct {
	DatacenterID   string               `json:"datacenter_id" jsonschema:"the ID of the data center"`
	LoadBalancerID string               `json:"loadbalancer_id" jsonschema:"the ID of the network load balancer"`
	RuleID         string               `json:"rule_id" jsonschema:"the ID of the forwarding rule to update"`
	Name           *string              `json:"name,omitempty" jsonschema:"a new name. Omit to keep the current one."`
	Algorithm      *string              `json:"algorithm,omitempty" jsonschema:"a new distribution algorithm. Omit to keep the current one."`
	Protocol       *string              `json:"protocol,omitempty" jsonschema:"a new transport protocol: TCP or UDP. Omit to keep the current one."`
	ListenerIp     *string              `` /* 136-byte string literal not displayed */
	ListenerPort   *int32               `json:"listener_port,omitempty" jsonschema:"a new listener port. Omit to keep the current one."`
	Targets        []NlbTargetInput     `` /* 231-byte string literal not displayed */
	HealthCheck    *NlbHealthCheckInput `json:"health_check,omitempty" jsonschema:"replace the rule-level timeouts and retry behaviour"`
}

UpdateNlbForwardingRuleInput is the input for update_nlb_forwarding_rule.

Partial update, but with an important caveat: the API always receives name, algorithm, protocol, listener_ip, listener_port AND targets, so all of them are read from the current rule and carried forward when omitted. Without that, a rename would send an empty targets list and remove every backend from the load balancer.

type UpdatePccInput added in v1.1.0

type UpdatePccInput struct {
	PccID       string  `json:"pcc_id" jsonschema:"the ID of the private cross connect to update"`
	Name        *string `json:"name,omitempty" jsonschema:"a new name"`
	Description *string `json:"description,omitempty" jsonschema:"a new description"`
}

UpdatePccInput is the input for update_pcc. Partial update; the connected LANs are managed from the LAN side with update_lan's pcc field, not here.

type UpdateSecurityGroupInput added in v1.1.0

type UpdateSecurityGroupInput struct {
	DatacenterID    string  `json:"datacenter_id" jsonschema:"the ID of the data center the security group is in"`
	SecurityGroupID string  `json:"security_group_id" jsonschema:"the ID of the security group to update"`
	Name            *string `` /* 208-byte string literal not displayed */
	Description     *string `json:"description,omitempty" jsonschema:"a new description for the group"`
}

UpdateSecurityGroupInput is the input for update_security_group. name is required because the IONOS SDK always serializes it: an update that omitted it would send an empty name and wipe the group's name as a side effect.

type UpdateSecurityGroupRuleInput added in v1.1.0

type UpdateSecurityGroupRuleInput struct {
	DatacenterID    string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	SecurityGroupID string `json:"security_group_id" jsonschema:"the ID of the security group the rule belongs to"`
	RuleID          string `json:"rule_id" jsonschema:"the ID of the rule to update"`
	RuleFields
	Clear []string `` /* 545-byte string literal not displayed */
}

UpdateSecurityGroupRuleInput is the input for update_security_group_rule. Partial update; the change applies to every member of the group at once.

type UpdateServerInput added in v1.1.0

type UpdateServerInput struct {
	DatacenterID  string  `json:"datacenter_id" jsonschema:"the ID of the data center the server is in"`
	ServerID      string  `json:"server_id" jsonschema:"the ID of the server to update"`
	Name          *string `json:"name,omitempty" jsonschema:"a new name for the server"`
	Cores         *int32  `` /* 142-byte string literal not displayed */
	Ram           *int32  `` /* 164-byte string literal not displayed */
	CpuFamily     *string `` /* 150-byte string literal not displayed */
	Hostname      *string `json:"hostname,omitempty" jsonschema:"a new hostname; allowed characters are a-z, 0-9 and - (minus)"`
	NicMultiQueue *bool   `` /* 135-byte string literal not displayed */
	BootVolumeID  *string `` /* 491-byte string literal not displayed */
}

UpdateServerInput is the input for update_server. Partial update: only the fields you provide are sent. Resizing cores or ram on a running server may require a reboot, and on a Confidential Computing server cores, ram, cpu_family and availability_zone are immutable and will be rejected.

type UpdateSnapshotInput added in v1.1.0

type UpdateSnapshotInput struct {
	SnapshotID        string  `json:"snapshot_id" jsonschema:"the ID of the snapshot to update"`
	Name              *string `json:"name,omitempty" jsonschema:"a new name for the snapshot"`
	Description       *string `json:"description,omitempty" jsonschema:"a new description"`
	LicenceType       *string `` /* 148-byte string literal not displayed */
	SecAuthProtection *bool   `` /* 139-byte string literal not displayed */
	ExposeSerial      *bool   `json:"expose_serial,omitempty" jsonschema:"expose the disk serial ID on volumes restored from this snapshot"`
	RequireLegacyBios *bool   `json:"require_legacy_bios,omitempty" jsonschema:"whether volumes restored from this snapshot need the legacy BIOS"`
	HotPlugFlags
	ExtraHotPlugFlags
}

UpdateSnapshotInput is the input for update_snapshot. There is no create_snapshot: snapshots are taken from a volume with create_volume_snapshot.

The hot-plug flags describe what a volume restored from this snapshot will support, so changing them affects future restores rather than the snapshot's data.

type UpdateTargetGroupInput added in v1.1.0

type UpdateTargetGroupInput struct {
	TargetGroupID   string                   `json:"target_group_id" jsonschema:"the ID of the target group to update"`
	Name            *string                  `json:"name,omitempty" jsonschema:"a new name. Omit to keep the current one."`
	Algorithm       *string                  `` /* 151-byte string literal not displayed */
	Protocol        *string                  `json:"protocol,omitempty" jsonschema:"a new protocol: HTTP or TCP. Omit to keep the current one."`
	ProtocolVersion *string                  `json:"protocol_version,omitempty" jsonschema:"for HTTP: HTTP1 or HTTP2"`
	Targets         []TargetGroupTargetInput `` /* 220-byte string literal not displayed */
}

UpdateTargetGroupInput is the input for update_target_group. Partial update: name, algorithm and protocol are read and carried forward when omitted, because the API always receives them.

targets REPLACES the whole backend list rather than adding to it, so omit it unless you intend to redefine the set — that is why it is not carried forward silently the way the scalar fields are.

type UpdateVolumeInput added in v1.1.0

type UpdateVolumeInput struct {
	DatacenterID string   `json:"datacenter_id" jsonschema:"the ID of the data center the volume is in"`
	VolumeID     string   `json:"volume_id" jsonschema:"the ID of the volume to update"`
	Name         *string  `json:"name,omitempty" jsonschema:"a new name for the volume"`
	Size         *float32 `` /* 190-byte string literal not displayed */
	Bus          *string  `json:"bus,omitempty" jsonschema:"a new bus type: VIRTIO or IDE. Changing this requires a server restart to take effect."`
	ExposeSerial *bool    `json:"expose_serial,omitempty" jsonschema:"expose the disk serial ID to the server, or stop exposing it"`
	BootOrder    *string  `` /* 630-byte string literal not displayed */
	HotPlugFlags
}

UpdateVolumeInput is the input for update_volume. Partial update. Note that size can only ever be increased — shrinking a volume is rejected by the API — and image_password, user_data and backupunit_id are immutable after creation.

type VolumeIDInput

type VolumeIDInput struct {
	DatacenterID string `json:"datacenter_id" jsonschema:"the ID of the data center"`
	VolumeID     string `json:"volume_id" jsonschema:"the ID of the volume"`
	Depth        *int32 `json:"depth,omitempty" jsonschema:"nesting depth of returned objects (0-5)"`
}

type ZoneIDInput

type ZoneIDInput struct {
	ZoneID string `json:"zone_id" jsonschema:"the ID of the DNS zone"`
}

Directories

Path Synopsis
Package dynamic implements the 'dynamic' load mode: instead of exposing the full product tool catalog (110+ tools) to the MCP client, the server exposes only three meta-tools — ionos_search_tools, ionos_describe_tools and ionos_call_tool — through which the model discovers and invokes the real tools at runtime.
Package dynamic implements the 'dynamic' load mode: instead of exposing the full product tool catalog (110+ tools) to the MCP client, the server exposes only three meta-tools — ionos_search_tools, ionos_describe_tools and ionos_call_tool — through which the model discovers and invokes the real tools at runtime.
Package ionosclient builds and maintains the User-Agent string the MCP server attaches to outbound IONOS CLOUD API calls.
Package ionosclient builds and maintains the User-Agent string the MCP server attaches to outbound IONOS CLOUD API calls.

Jump to

Keyboard shortcuts

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