instance

package
v1.0.0-beta.18 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 21 Imported by: 48

Documentation

Overview

Package instance provides methods and message types of the instance v1 API.

Index

Constants

View Source
const (
	ArchX86_64 = Arch("x86_64")
	ArchArm    = Arch("arm")
)
View Source
const (
	BootTypeLocal      = BootType("local")
	BootTypeBootscript = BootType("bootscript")
	BootTypeRescue     = BootType("rescue")
)
View Source
const (
	IPStateUnknownState = IPState("unknown_state")
	IPStateDetached     = IPState("detached")
	IPStateAttached     = IPState("attached")
	IPStatePending      = IPState("pending")
	IPStateError        = IPState("error")
)
View Source
const (
	IPTypeUnknownIptype = IPType("unknown_iptype")
	IPTypeNat           = IPType("nat")
	IPTypeRoutedIPv4    = IPType("routed_ipv4")
	IPTypeRoutedIPv6    = IPType("routed_ipv6")
)
View Source
const (
	ImageStateAvailable = ImageState("available")
	ImageStateCreating  = ImageState("creating")
	ImageStateError     = ImageState("error")
)
View Source
const (
	ListServersRequestOrderCreationDateDesc     = ListServersRequestOrder("creation_date_desc")
	ListServersRequestOrderCreationDateAsc      = ListServersRequestOrder("creation_date_asc")
	ListServersRequestOrderModificationDateDesc = ListServersRequestOrder("modification_date_desc")
	ListServersRequestOrderModificationDateAsc  = ListServersRequestOrder("modification_date_asc")
)
View Source
const (
	PlacementGroupPolicyModeOptional = PlacementGroupPolicyMode("optional")
	PlacementGroupPolicyModeEnforced = PlacementGroupPolicyMode("enforced")
)
View Source
const (
	PlacementGroupPolicyTypeMaxAvailability = PlacementGroupPolicyType("max_availability")
	PlacementGroupPolicyTypeLowLatency      = PlacementGroupPolicyType("low_latency")
)
View Source
const (
	PrivateNICStateAvailable    = PrivateNICState("available")
	PrivateNICStateSyncing      = PrivateNICState("syncing")
	PrivateNICStateSyncingError = PrivateNICState("syncing_error")
)
View Source
const (
	SecurityGroupPolicyAccept = SecurityGroupPolicy("accept")
	SecurityGroupPolicyDrop   = SecurityGroupPolicy("drop")
)
View Source
const (
	SecurityGroupRuleActionAccept = SecurityGroupRuleAction("accept")
	SecurityGroupRuleActionDrop   = SecurityGroupRuleAction("drop")
)
View Source
const (
	SecurityGroupRuleDirectionInbound  = SecurityGroupRuleDirection("inbound")
	SecurityGroupRuleDirectionOutbound = SecurityGroupRuleDirection("outbound")
)
View Source
const (
	SecurityGroupRuleProtocolTCP  = SecurityGroupRuleProtocol("TCP")
	SecurityGroupRuleProtocolUDP  = SecurityGroupRuleProtocol("UDP")
	SecurityGroupRuleProtocolICMP = SecurityGroupRuleProtocol("ICMP")
	SecurityGroupRuleProtocolANY  = SecurityGroupRuleProtocol("ANY")
)
View Source
const (
	SecurityGroupStateAvailable    = SecurityGroupState("available")
	SecurityGroupStateSyncing      = SecurityGroupState("syncing")
	SecurityGroupStateSyncingError = SecurityGroupState("syncing_error")
)
View Source
const (
	ServerActionPoweron     = ServerAction("poweron")
	ServerActionBackup      = ServerAction("backup")
	ServerActionStopInPlace = ServerAction("stop_in_place")
	ServerActionPoweroff    = ServerAction("poweroff")
	ServerActionTerminate   = ServerAction("terminate")
	ServerActionReboot      = ServerAction("reboot")
)
View Source
const (
	ServerIPIPFamilyInet  = ServerIPIPFamily("inet")
	ServerIPIPFamilyInet6 = ServerIPIPFamily("inet6")
)
View Source
const (
	ServerIPProvisioningModeManual = ServerIPProvisioningMode("manual")
	ServerIPProvisioningModeDHCP   = ServerIPProvisioningMode("dhcp")
	ServerIPProvisioningModeSlaac  = ServerIPProvisioningMode("slaac")
)
View Source
const (
	ServerStateRunning        = ServerState("running")
	ServerStateStopped        = ServerState("stopped")
	ServerStateStoppedInPlace = ServerState("stopped in place")
	ServerStateStarting       = ServerState("starting")
	ServerStateStopping       = ServerState("stopping")
	ServerStateLocked         = ServerState("locked")
)
View Source
const (
	ServerTypesAvailabilityAvailable = ServerTypesAvailability("available")
	ServerTypesAvailabilityScarce    = ServerTypesAvailability("scarce")
	ServerTypesAvailabilityShortage  = ServerTypesAvailability("shortage")
)
View Source
const (
	SnapshotStateAvailable    = SnapshotState("available")
	SnapshotStateSnapshotting = SnapshotState("snapshotting")
	SnapshotStateError        = SnapshotState("error")
	SnapshotStateInvalidData  = SnapshotState("invalid_data")
	SnapshotStateImporting    = SnapshotState("importing")
	SnapshotStateExporting    = SnapshotState("exporting")
)
View Source
const (
	SnapshotVolumeTypeUnknownVolumeType = SnapshotVolumeType("unknown_volume_type")
	SnapshotVolumeTypeLSSD              = SnapshotVolumeType("l_ssd")
	SnapshotVolumeTypeBSSD              = SnapshotVolumeType("b_ssd")
	SnapshotVolumeTypeUnified           = SnapshotVolumeType("unified")
)
View Source
const (
	TaskStatusPending = TaskStatus("pending")
	TaskStatusStarted = TaskStatus("started")
	TaskStatusSuccess = TaskStatus("success")
	TaskStatusFailure = TaskStatus("failure")
	TaskStatusRetry   = TaskStatus("retry")
)
View Source
const (
	VolumeServerStateAvailable    = VolumeServerState("available")
	VolumeServerStateSnapshotting = VolumeServerState("snapshotting")
	VolumeServerStateError        = VolumeServerState("error")
	VolumeServerStateFetching     = VolumeServerState("fetching")
	VolumeServerStateResizing     = VolumeServerState("resizing")
	VolumeServerStateSaving       = VolumeServerState("saving")
	VolumeServerStateHotsyncing   = VolumeServerState("hotsyncing")
)
View Source
const (
	VolumeServerVolumeTypeLSSD = VolumeServerVolumeType("l_ssd")
	VolumeServerVolumeTypeBSSD = VolumeServerVolumeType("b_ssd")
)
View Source
const (
	VolumeStateAvailable    = VolumeState("available")
	VolumeStateSnapshotting = VolumeState("snapshotting")
	VolumeStateError        = VolumeState("error")
	VolumeStateFetching     = VolumeState("fetching")
	VolumeStateResizing     = VolumeState("resizing")
	VolumeStateSaving       = VolumeState("saving")
	VolumeStateHotsyncing   = VolumeState("hotsyncing")
)
View Source
const (
	VolumeVolumeTypeLSSD    = VolumeVolumeType("l_ssd")
	VolumeVolumeTypeBSSD    = VolumeVolumeType("b_ssd")
	VolumeVolumeTypeUnified = VolumeVolumeType("unified")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API: instance API.

func NewAPI

func NewAPI(client *scw.Client) *API

NewAPI returns a API object from a Scaleway client.

func (*API) AttachIP deprecated

func (s *API) AttachIP(req *AttachIPRequest, opts ...scw.RequestOption) (*AttachIPResponse, error)

AttachIP attaches an IP to a server.

Deprecated: UpdateIP() should be used instead

func (*API) AttachVolume

func (s *API) AttachVolume(req *AttachVolumeRequest, opts ...scw.RequestOption) (*AttachVolumeResponse, error)

AttachVolume attaches a volume to a server

Note: Implementation is thread-safe.

func (*API) CreateIP

func (s *API) CreateIP(req *CreateIPRequest, opts ...scw.RequestOption) (*CreateIPResponse, error)

CreateIP: reserve a flexible IP. Reserve a flexible IP and attach it to the specified Instance.

func (*API) CreateImage

func (s *API) CreateImage(req *CreateImageRequest, opts ...scw.RequestOption) (*CreateImageResponse, error)

CreateImage: create an Instance image. Create an Instance image from the specified snapshot ID.

func (*API) CreatePlacementGroup

func (s *API) CreatePlacementGroup(req *CreatePlacementGroupRequest, opts ...scw.RequestOption) (*CreatePlacementGroupResponse, error)

CreatePlacementGroup: create a placement group. Create a new placement group in a specified Availability Zone.

func (*API) CreatePrivateNIC

func (s *API) CreatePrivateNIC(req *CreatePrivateNICRequest, opts ...scw.RequestOption) (*CreatePrivateNICResponse, error)

CreatePrivateNIC: create a private NIC connecting an Instance to a Private Network.

func (*API) CreateSecurityGroup

func (s *API) CreateSecurityGroup(req *CreateSecurityGroupRequest, opts ...scw.RequestOption) (*CreateSecurityGroupResponse, error)

CreateSecurityGroup: create a security group. Create a security group with a specified name and description.

func (*API) CreateSecurityGroupRule

func (s *API) CreateSecurityGroupRule(req *CreateSecurityGroupRuleRequest, opts ...scw.RequestOption) (*CreateSecurityGroupRuleResponse, error)

CreateSecurityGroupRule: create rule. Create a rule in the specified security group ID.

func (*API) CreateServer

func (s *API) CreateServer(req *CreateServerRequest, opts ...scw.RequestOption) (*CreateServerResponse, error)

CreateServer creates a server.

func (*API) CreateSnapshot

func (s *API) CreateSnapshot(req *CreateSnapshotRequest, opts ...scw.RequestOption) (*CreateSnapshotResponse, error)

CreateSnapshot: create a snapshot from a specified volume or from a QCOW2 file. Create a snapshot from a specified volume or from a QCOW2 file in a specified Availability Zone.

func (*API) CreateVolume

func (s *API) CreateVolume(req *CreateVolumeRequest, opts ...scw.RequestOption) (*CreateVolumeResponse, error)

CreateVolume: create a volume. Create a volume of a specified type in an Availability Zone.

func (*API) DeleteIP

func (s *API) DeleteIP(req *DeleteIPRequest, opts ...scw.RequestOption) error

DeleteIP: delete a flexible IP. Delete the IP with the specified ID.

func (*API) DeleteImage

func (s *API) DeleteImage(req *DeleteImageRequest, opts ...scw.RequestOption) error

DeleteImage: delete an Instance image. Delete the image with the specified ID.

func (*API) DeletePlacementGroup

func (s *API) DeletePlacementGroup(req *DeletePlacementGroupRequest, opts ...scw.RequestOption) error

DeletePlacementGroup: delete the specified placement group.

func (*API) DeletePrivateNIC

func (s *API) DeletePrivateNIC(req *DeletePrivateNICRequest, opts ...scw.RequestOption) error

DeletePrivateNIC: delete a private NIC.

func (*API) DeleteSecurityGroup

func (s *API) DeleteSecurityGroup(req *DeleteSecurityGroupRequest, opts ...scw.RequestOption) error

DeleteSecurityGroup: delete a security group. Delete a security group with the specified ID.

func (*API) DeleteSecurityGroupRule

func (s *API) DeleteSecurityGroupRule(req *DeleteSecurityGroupRuleRequest, opts ...scw.RequestOption) error

DeleteSecurityGroupRule: delete rule. Delete a security group rule with the specified ID.

func (*API) DeleteServer

func (s *API) DeleteServer(req *DeleteServerRequest, opts ...scw.RequestOption) error

DeleteServer: delete an Instance. Delete the Instance with the specified ID.

func (*API) DeleteServerUserData

func (s *API) DeleteServerUserData(req *DeleteServerUserDataRequest, opts ...scw.RequestOption) error

DeleteServerUserData: delete user data. Delete the specified key from an Instance's user data.

func (*API) DeleteSnapshot

func (s *API) DeleteSnapshot(req *DeleteSnapshotRequest, opts ...scw.RequestOption) error

DeleteSnapshot: delete a snapshot. Delete the snapshot with the specified ID.

func (*API) DeleteVolume

func (s *API) DeleteVolume(req *DeleteVolumeRequest, opts ...scw.RequestOption) error

DeleteVolume: delete a volume. Delete the volume with the specified ID.

func (*API) DetachIP deprecated

func (s *API) DetachIP(req *DetachIPRequest, opts ...scw.RequestOption) (*DetachIPResponse, error)

DetachIP detaches an IP from a server.

Deprecated: UpdateIP() should be used instead

func (*API) DetachVolume

func (s *API) DetachVolume(req *DetachVolumeRequest, opts ...scw.RequestOption) (*DetachVolumeResponse, error)

DetachVolume detaches a volume from a server

Note: Implementation is thread-safe.

func (*API) ExportSnapshot

func (s *API) ExportSnapshot(req *ExportSnapshotRequest, opts ...scw.RequestOption) (*ExportSnapshotResponse, error)

ExportSnapshot: export a snapshot. Export a snapshot to a specified S3 bucket in the same region.

func (*API) GetAllServerUserData

func (s *API) GetAllServerUserData(req *GetAllServerUserDataRequest, opts ...scw.RequestOption) (*GetAllServerUserDataResponse, error)

GetAllServerUserData gets all user data on a server.

func (*API) GetBootscript deprecated

func (s *API) GetBootscript(req *GetBootscriptRequest, opts ...scw.RequestOption) (*GetBootscriptResponse, error)

Deprecated: GetBootscript: get bootscripts. Get details of a bootscript with the specified ID.

func (*API) GetDashboard

func (s *API) GetDashboard(req *GetDashboardRequest, opts ...scw.RequestOption) (*GetDashboardResponse, error)

func (*API) GetIP

func (s *API) GetIP(req *GetIPRequest, opts ...scw.RequestOption) (*GetIPResponse, error)

GetIP: get a flexible IP. Get details of an IP with the specified ID or address.

func (*API) GetImage

func (s *API) GetImage(req *GetImageRequest, opts ...scw.RequestOption) (*GetImageResponse, error)

GetImage: get an Instance image. Get details of an image with the specified ID.

func (*API) GetPlacementGroup

func (s *API) GetPlacementGroup(req *GetPlacementGroupRequest, opts ...scw.RequestOption) (*GetPlacementGroupResponse, error)

GetPlacementGroup: get a placement group. Get the specified placement group.

func (*API) GetPlacementGroupServers

func (s *API) GetPlacementGroupServers(req *GetPlacementGroupServersRequest, opts ...scw.RequestOption) (*GetPlacementGroupServersResponse, error)

GetPlacementGroupServers: get placement group servers. Get all Instances belonging to the specified placement group.

func (*API) GetPrivateNIC

func (s *API) GetPrivateNIC(req *GetPrivateNICRequest, opts ...scw.RequestOption) (*GetPrivateNICResponse, error)

GetPrivateNIC: get a private NIC. Get private NIC properties.

func (*API) GetSecurityGroup

func (s *API) GetSecurityGroup(req *GetSecurityGroupRequest, opts ...scw.RequestOption) (*GetSecurityGroupResponse, error)

GetSecurityGroup: get a security group. Get the details of a security group with the specified ID.

func (*API) GetSecurityGroupRule

func (s *API) GetSecurityGroupRule(req *GetSecurityGroupRuleRequest, opts ...scw.RequestOption) (*GetSecurityGroupRuleResponse, error)

GetSecurityGroupRule: get rule. Get details of a security group rule with the specified ID.

func (*API) GetServer

func (s *API) GetServer(req *GetServerRequest, opts ...scw.RequestOption) (*GetServerResponse, error)

GetServer: get an Instance. Get the details of a specified Instance.

func (*API) GetServerType

func (s *API) GetServerType(req *GetServerTypeRequest) (*ServerType, error)

GetServerType get server type info by it's name.

func (*API) GetServerTypesAvailability

func (s *API) GetServerTypesAvailability(req *GetServerTypesAvailabilityRequest, opts ...scw.RequestOption) (*GetServerTypesAvailabilityResponse, error)

GetServerTypesAvailability: get availability. Get availability for all Instance types.

func (*API) GetServerUserData

func (s *API) GetServerUserData(req *GetServerUserDataRequest, opts ...scw.RequestOption) (io.Reader, error)

GetServerUserData gets the content of a user data on a server for the given key.

func (*API) GetSnapshot

func (s *API) GetSnapshot(req *GetSnapshotRequest, opts ...scw.RequestOption) (*GetSnapshotResponse, error)

GetSnapshot: get a snapshot. Get details of a snapshot with the specified ID.

func (*API) GetVolume

func (s *API) GetVolume(req *GetVolumeRequest, opts ...scw.RequestOption) (*GetVolumeResponse, error)

GetVolume: get a volume. Get details of a volume with the specified ID.

func (*API) ListBootscripts deprecated

func (s *API) ListBootscripts(req *ListBootscriptsRequest, opts ...scw.RequestOption) (*ListBootscriptsResponse, error)

Deprecated: ListBootscripts: list bootscripts.

func (*API) ListDefaultSecurityGroupRules

func (s *API) ListDefaultSecurityGroupRules(req *ListDefaultSecurityGroupRulesRequest, opts ...scw.RequestOption) (*ListSecurityGroupRulesResponse, error)

ListDefaultSecurityGroupRules: get default rules. Lists the default rules applied to all the security groups.

func (*API) ListIPs

func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsResponse, error)

ListIPs: list all flexible IPs. List all flexible IPs in a specified zone.

func (*API) ListImages

func (s *API) ListImages(req *ListImagesRequest, opts ...scw.RequestOption) (*ListImagesResponse, error)

ListImages: list Instance images. List all existing Instance images.

func (*API) ListPlacementGroups

func (s *API) ListPlacementGroups(req *ListPlacementGroupsRequest, opts ...scw.RequestOption) (*ListPlacementGroupsResponse, error)

ListPlacementGroups: list placement groups. List all placement groups in a specified Availability Zone.

func (*API) ListPrivateNICs

func (s *API) ListPrivateNICs(req *ListPrivateNICsRequest, opts ...scw.RequestOption) (*ListPrivateNICsResponse, error)

ListPrivateNICs: list all private NICs. List all private NICs of a specified Instance.

func (*API) ListSecurityGroupRules

func (s *API) ListSecurityGroupRules(req *ListSecurityGroupRulesRequest, opts ...scw.RequestOption) (*ListSecurityGroupRulesResponse, error)

ListSecurityGroupRules: list rules. List the rules of the a specified security group ID.

func (*API) ListSecurityGroups

func (s *API) ListSecurityGroups(req *ListSecurityGroupsRequest, opts ...scw.RequestOption) (*ListSecurityGroupsResponse, error)

ListSecurityGroups: list security groups. List all existing security groups.

func (*API) ListServerActions

func (s *API) ListServerActions(req *ListServerActionsRequest, opts ...scw.RequestOption) (*ListServerActionsResponse, error)

ListServerActions: list Instance actions. List all actions (e.g. power on, power off, reboot) that can currently be performed on an Instance.

func (*API) ListServerUserData

func (s *API) ListServerUserData(req *ListServerUserDataRequest, opts ...scw.RequestOption) (*ListServerUserDataResponse, error)

ListServerUserData: list user data. List all user data keys registered on a specified Instance.

func (*API) ListServers

func (s *API) ListServers(req *ListServersRequest, opts ...scw.RequestOption) (*ListServersResponse, error)

ListServers: list all Instances. List all Instances in a specified Availability Zone, e.g. `fr-par-1`.

func (*API) ListServersTypes

func (s *API) ListServersTypes(req *ListServersTypesRequest, opts ...scw.RequestOption) (*ListServersTypesResponse, error)

ListServersTypes: list Instance types. List available Instance types and their technical details.

func (*API) ListSnapshots

func (s *API) ListSnapshots(req *ListSnapshotsRequest, opts ...scw.RequestOption) (*ListSnapshotsResponse, error)

ListSnapshots: list snapshots. List all snapshots of an Organization in a specified Availability Zone.

func (*API) ListVolumes

func (s *API) ListVolumes(req *ListVolumesRequest, opts ...scw.RequestOption) (*ListVolumesResponse, error)

ListVolumes: list volumes. List volumes in the specified Availability Zone. You can filter the output by volume type.

func (*API) ListVolumesTypes

func (s *API) ListVolumesTypes(req *ListVolumesTypesRequest, opts ...scw.RequestOption) (*ListVolumesTypesResponse, error)

ListVolumesTypes: list volume types. List all volume types and their technical details.

func (*API) ServerAction

func (s *API) ServerAction(req *ServerActionRequest, opts ...scw.RequestOption) (*ServerActionResponse, error)

ServerAction: perform action. Perform an action on an Instance. Available actions are: * `poweron`: Start a stopped Instance. * `poweroff`: Fully stop the Instance and release the hypervisor slot. * `stop_in_place`: Stop the Instance, but keep the slot on the hypervisor. * `reboot`: Stop the instance and restart it. * `backup`: Create an image with all the volumes of an Instance. * `terminate`: Delete the Instance along with all attached volumes. * `enable_routed_ip`: Migrate the Instance to the new network stack.

Keep in mind that terminating an Instance will result in the deletion of all attached volumes, including local and block storage. If you want to preserve your local volumes, you should use the `archive` action instead of `terminate`. Similarly, if you want to keep your block storage volumes, you must first detach them before issuing the `terminate` command. For more information, read the [Volumes](#path-volumes-list-volumes) documentation.

func (*API) ServerActionAndWait

func (s *API) ServerActionAndWait(req *ServerActionAndWaitRequest, opts ...scw.RequestOption) error

ServerActionAndWait start an action and wait for the server to be in the correct "terminal state" expected by this action.

func (*API) SetAllServerUserData

func (s *API) SetAllServerUserData(req *SetAllServerUserDataRequest, opts ...scw.RequestOption) error

SetAllServerUserData sets all user data on a server, it deletes every keys previously set.

func (*API) SetPlacementGroup

func (s *API) SetPlacementGroup(req *SetPlacementGroupRequest, opts ...scw.RequestOption) (*SetPlacementGroupResponse, error)

SetPlacementGroup: set placement group. Set all parameters of the specified placement group.

func (*API) SetPlacementGroupServers

func (s *API) SetPlacementGroupServers(req *SetPlacementGroupServersRequest, opts ...scw.RequestOption) (*SetPlacementGroupServersResponse, error)

SetPlacementGroupServers: set placement group servers. Set all Instances belonging to the specified placement group.

func (*API) SetSecurityGroupRules

func (s *API) SetSecurityGroupRules(req *SetSecurityGroupRulesRequest, opts ...scw.RequestOption) (*SetSecurityGroupRulesResponse, error)

SetSecurityGroupRules: update all the rules of a security group. Replaces the existing rules of the security group with the rules provided. This endpoint supports the update of existing rules, creation of new rules and deletion of existing rules when they are not passed in the request.

func (*API) SetServerUserData

func (s *API) SetServerUserData(req *SetServerUserDataRequest, opts ...scw.RequestOption) error

SetServerUserData sets the content of a user data on a server for the given key.

func (*API) UpdateIP

func (s *API) UpdateIP(req *UpdateIPRequest, opts ...scw.RequestOption) (*UpdateIPResponse, error)

UpdateIP: update a flexible IP. Update a flexible IP in the specified zone with the specified ID.

func (*API) UpdateImage

func (s *API) UpdateImage(req *UpdateImageRequest, opts ...scw.RequestOption) (*UpdateImageResponse, error)

func (*API) UpdatePlacementGroup

func (s *API) UpdatePlacementGroup(req *UpdatePlacementGroupRequest, opts ...scw.RequestOption) (*UpdatePlacementGroupResponse, error)

UpdatePlacementGroup: update a placement group. Update one or more parameter of the specified placement group.

func (*API) UpdatePlacementGroupServers

func (s *API) UpdatePlacementGroupServers(req *UpdatePlacementGroupServersRequest, opts ...scw.RequestOption) (*UpdatePlacementGroupServersResponse, error)

UpdatePlacementGroupServers: update placement group servers. Update all Instances belonging to the specified placement group.

func (*API) UpdatePrivateNIC

func (s *API) UpdatePrivateNIC(req *UpdatePrivateNICRequest, opts ...scw.RequestOption) (*PrivateNIC, error)

UpdatePrivateNIC: update a private NIC. Update one or more parameter(s) of a specified private NIC.

func (*API) UpdateSecurityGroup

func (s *API) UpdateSecurityGroup(req *UpdateSecurityGroupRequest, opts ...scw.RequestOption) (*UpdateSecurityGroupResponse, error)

UpdateSecurityGroup updates a security group.

func (*API) UpdateSecurityGroupRule

func (s *API) UpdateSecurityGroupRule(req *UpdateSecurityGroupRuleRequest, opts ...scw.RequestOption) (*UpdateSecurityGroupRuleResponse, error)

UpdateSecurityGroupRule updates a security group.

func (*API) UpdateServer

func (s *API) UpdateServer(req *UpdateServerRequest, opts ...scw.RequestOption) (*UpdateServerResponse, error)

UpdateServer updates a server.

Note: Implementation is thread-safe.

func (*API) UpdateSnapshot

func (s *API) UpdateSnapshot(req *UpdateSnapshotRequest, opts ...scw.RequestOption) (*UpdateSnapshotResponse, error)

func (*API) UpdateVolume

func (s *API) UpdateVolume(req *UpdateVolumeRequest, opts ...scw.RequestOption) (*UpdateVolumeResponse, error)

UpdateVolume: update a volume. Replace the name and/or size properties of a volume specified by its ID, with the specified value(s). Any volume name can be changed, however only `b_ssd` volumes can currently be increased in size.

func (*API) WaitForImage

func (s *API) WaitForImage(req *WaitForImageRequest, opts ...scw.RequestOption) (*Image, error)

WaitForImage wait for the image to be in a "terminal state" before returning.

func (*API) WaitForMACAddress

func (s *API) WaitForMACAddress(req *WaitForMACAddressRequest, opts ...scw.RequestOption) (*PrivateNIC, error)

WaitForMACAddress wait for the MAC address be assigned on instance before returning. This function can be used to wait for the private network to be attached for example.

func (*API) WaitForPrivateNIC

func (s *API) WaitForPrivateNIC(req *WaitForPrivateNICRequest, opts ...scw.RequestOption) (*PrivateNIC, error)

WaitForPrivateNIC wait for the private network to be in a "terminal state" before returning. This function can be used to wait for the private network to be attached for example.

func (*API) WaitForServer

func (s *API) WaitForServer(req *WaitForServerRequest, opts ...scw.RequestOption) (*Server, error)

WaitForServer wait for the server to be in a "terminal state" before returning. This function can be used to wait for a server to be started for example.

func (*API) WaitForSnapshot

func (s *API) WaitForSnapshot(req *WaitForSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)

WaitForSnapshot wait for the snapshot to be in a "terminal state" before returning.

func (*API) WaitForVolume

func (s *API) WaitForVolume(req *WaitForVolumeRequest, opts ...scw.RequestOption) (*Volume, error)

WaitForSnapshot wait for the snapshot to be in a "terminal state" before returning.

func (*API) Zones

func (s *API) Zones() []scw.Zone

Zones list localities the api is available in

type Arch

type Arch string

func (Arch) MarshalJSON

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

func (Arch) String

func (enum Arch) String() string

func (*Arch) UnmarshalJSON

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

type AttachIPRequest deprecated

type AttachIPRequest struct {
	Zone     scw.Zone `json:"-"`
	IP       string   `json:"-"`
	ServerID string   `json:"server_id"`
}

AttachIPRequest contains the parameters to attach an IP to a server

Deprecated: UpdateIPRequest should be used instead

type AttachIPResponse deprecated

type AttachIPResponse struct {
	IP *IP
}

AttachIPResponse contains the updated IP after attaching

Deprecated: UpdateIPResponse should be used instead

type AttachVolumeRequest

type AttachVolumeRequest struct {
	Zone     scw.Zone `json:"-"`
	ServerID string   `json:"-"`
	VolumeID string   `json:"-"`
}

AttachVolumeRequest contains the parameters to attach a volume to a server

type AttachVolumeResponse

type AttachVolumeResponse struct {
	Server *Server `json:"-"`
}

AttachVolumeResponse contains the updated server after attaching a volume

type BootType

type BootType string

func (BootType) MarshalJSON

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

func (BootType) String

func (enum BootType) String() string

func (*BootType) UnmarshalJSON

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

type Bootscript

type Bootscript struct {
	// Bootcmdargs: bootscript arguments.
	Bootcmdargs string `json:"bootcmdargs"`
	// Default: display if the bootscript is the default bootscript (if no other boot option is configured).
	Default bool `json:"default"`
	// Dtb: provide information regarding a Device Tree Binary (DTB) for use with C1 servers.
	Dtb string `json:"dtb"`
	// ID: bootscript ID.
	ID string `json:"id"`
	// Initrd: initrd (initial ramdisk) configuration.
	Initrd string `json:"initrd"`
	// Kernel: instance kernel version.
	Kernel string `json:"kernel"`
	// Organization: bootscript Organization ID.
	Organization string `json:"organization"`
	// Project: bootscript Project ID.
	Project string `json:"project"`
	// Public: provide information if the bootscript is public.
	Public bool `json:"public"`
	// Title: bootscript title.
	Title string `json:"title"`
	// Arch: bootscript architecture.
	// Default value: x86_64
	Arch Arch `json:"arch"`
	// Zone: zone in which the bootscript is located.
	Zone scw.Zone `json:"zone"`
}

Bootscript: bootscript.

type CreateIPRequest

type CreateIPRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// Deprecated: Organization: organization ID in which the IP is reserved.
	// Precisely one of Organization, Project must be set.
	Organization *string `json:"organization,omitempty"`
	// Project: project ID in which the IP is reserved.
	// Precisely one of Organization, Project must be set.
	Project *string `json:"project,omitempty"`
	// Tags: tags of the IP.
	Tags []string `json:"tags,omitempty"`
	// Server: UUID of the Instance you want to attach the IP to.
	Server *string `json:"server,omitempty"`
	// Type: IP type to reserve (either 'nat', 'routed_ipv4' or 'routed_ipv6').
	// Default value: unknown_iptype
	Type IPType `json:"type"`
}

type CreateIPResponse

type CreateIPResponse struct {
	IP *IP `json:"ip"`
}

type CreateImageRequest

type CreateImageRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// Name: name of the image.
	Name string `json:"name,omitempty"`
	// RootVolume: UUID of the snapshot.
	RootVolume string `json:"root_volume,omitempty"`
	// Arch: architecture of the image.
	// Default value: x86_64
	Arch Arch `json:"arch"`
	// Deprecated: DefaultBootscript: default bootscript of the image.
	DefaultBootscript *string `json:"default_bootscript,omitempty"`
	// ExtraVolumes: additional volumes of the image.
	ExtraVolumes map[string]*VolumeTemplate `json:"extra_volumes,omitempty"`
	// Deprecated: Organization: organization ID of the image.
	// Precisely one of Organization, Project must be set.
	Organization *string `json:"organization,omitempty"`
	// Project: project ID of the image.
	// Precisely one of Organization, Project must be set.
	Project *string `json:"project,omitempty"`
	// Tags: tags of the image.
	Tags []string `json:"tags,omitempty"`
	// Public: true to create a public image.
	Public *bool `json:"public,omitempty"`
}

type CreateImageResponse

type CreateImageResponse struct {
	Image *Image `json:"image"`
}

type CreatePlacementGroupRequest

type CreatePlacementGroupRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// Name: name of the placement group.
	Name string `json:"name,omitempty"`
	// Deprecated: Organization: organization ID of the placement group.
	// Precisely one of Organization, Project must be set.
	Organization *string `json:"organization,omitempty"`
	// Project: project ID of the placement group.
	// Precisely one of Organization, Project must be set.
	Project *string `json:"project,omitempty"`
	// Tags: tags of the placement group.
	Tags []string `json:"tags,omitempty"`
	// PolicyMode: operating mode of the placement group.
	// Default value: optional
	PolicyMode PlacementGroupPolicyMode `json:"policy_mode"`
	// PolicyType: policy type of the placement group.
	// Default value: max_availability
	PolicyType PlacementGroupPolicyType `json:"policy_type"`
}

type CreatePlacementGroupResponse

type CreatePlacementGroupResponse struct {
	PlacementGroup *PlacementGroup `json:"placement_group"`
}

type CreatePrivateNICRequest

type CreatePrivateNICRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// ServerID: UUID of the Instance the private NIC will be attached to.
	ServerID string `json:"-"`
	// PrivateNetworkID: UUID of the private network where the private NIC will be attached.
	PrivateNetworkID string `json:"private_network_id,omitempty"`
	// Tags: private NIC tags.
	Tags []string `json:"tags,omitempty"`
	// IPIDs: ip_ids defined from IPAM.
	IPIDs []string `json:"ip_ids,omitempty"`
}

type CreatePrivateNICResponse

type CreatePrivateNICResponse struct {
	PrivateNic *PrivateNIC `json:"private_nic"`
}

type CreateSecurityGroupRequest

type CreateSecurityGroupRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// Name: name of the security group.
	Name string `json:"name,omitempty"`
	// Description: description of the security group.
	Description string `json:"description,omitempty"`
	// Deprecated: Organization: organization ID the security group belongs to.
	// Precisely one of Organization, Project must be set.
	Organization *string `json:"organization,omitempty"`
	// Project: project ID the security group belong to.
	// Precisely one of Organization, Project must be set.
	Project *string `json:"project,omitempty"`
	// Tags: tags of the security group.
	Tags []string `json:"tags,omitempty"`
	// Deprecated: OrganizationDefault: defines whether this security group becomes the default security group for new Instances.
	// Default value: false
	// Precisely one of OrganizationDefault, ProjectDefault must be set.
	OrganizationDefault *bool `json:"organization_default,omitempty"`
	// ProjectDefault: whether this security group becomes the default security group for new Instances.
	// Default value: false
	// Precisely one of OrganizationDefault, ProjectDefault must be set.
	ProjectDefault *bool `json:"project_default,omitempty"`
	// Stateful: whether the security group is stateful or not.
	// Default value: false
	Stateful bool `json:"stateful,omitempty"`
	// InboundDefaultPolicy: default policy for inbound rules.
	// Default value: accept
	InboundDefaultPolicy SecurityGroupPolicy `json:"inbound_default_policy"`
	// OutboundDefaultPolicy: default policy for outbound rules.
	// Default value: accept
	OutboundDefaultPolicy SecurityGroupPolicy `json:"outbound_default_policy"`
	// EnableDefaultSecurity: true to block SMTP on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable.
	EnableDefaultSecurity *bool `json:"enable_default_security,omitempty"`
}

type CreateSecurityGroupResponse

type CreateSecurityGroupResponse struct {
	SecurityGroup *SecurityGroup `json:"security_group"`
}

type CreateSecurityGroupRuleRequest

type CreateSecurityGroupRuleRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// SecurityGroupID: UUID of the security group.
	SecurityGroupID string `json:"-"`
	// Protocol: default value: TCP
	Protocol SecurityGroupRuleProtocol `json:"protocol"`
	// Direction: default value: inbound
	Direction SecurityGroupRuleDirection `json:"direction"`
	// Action: default value: accept
	Action SecurityGroupRuleAction `json:"action"`

	IPRange scw.IPNet `json:"ip_range,omitempty"`
	// DestPortFrom: beginning of the range of ports to apply this rule to (inclusive).
	DestPortFrom *uint32 `json:"dest_port_from,omitempty"`
	// DestPortTo: end of the range of ports to apply this rule to (inclusive).
	DestPortTo *uint32 `json:"dest_port_to,omitempty"`
	// Position: position of this rule in the security group rules list.
	Position uint32 `json:"position,omitempty"`
	// Editable: indicates if this rule is editable (will be ignored).
	Editable bool `json:"editable,omitempty"`
}

type CreateSecurityGroupRuleResponse

type CreateSecurityGroupRuleResponse struct {
	Rule *SecurityGroupRule `json:"rule"`
}

type CreateServerRequest

type CreateServerRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// Name: instance name.
	Name string `json:"name,omitempty"`
	// DynamicIPRequired: define if a dynamic IPv4 is required for the Instance.
	DynamicIPRequired *bool `json:"dynamic_ip_required,omitempty"`
	// RoutedIPEnabled: if true, configure the Instance so it uses the new routed IP mode.
	RoutedIPEnabled *bool `json:"routed_ip_enabled,omitempty"`
	// CommercialType: define the Instance commercial type (i.e. GP1-S).
	CommercialType string `json:"commercial_type,omitempty"`
	// Image: instance image ID or label.
	Image string `json:"image,omitempty"`
	// Volumes: volumes attached to the server.
	Volumes map[string]*VolumeServerTemplate `json:"volumes,omitempty"`
	// EnableIPv6: true if IPv6 is enabled on the server.
	EnableIPv6 bool `json:"enable_ipv6,omitempty"`
	// PublicIP: ID of the reserved IP to attach to the Instance.
	PublicIP *string `json:"public_ip,omitempty"`
	// PublicIPs: a list of reserved IP IDs to attach to the Instance.
	PublicIPs []*string `json:"public_ips,omitempty"`
	// BootType: boot type to use.
	// Default value: local
	BootType *BootType `json:"boot_type,omitempty"`
	// Deprecated: Bootscript: bootscript ID to use when `boot_type` is set to `bootscript`.
	Bootscript *string `json:"bootscript,omitempty"`
	// Deprecated: Organization: instance Organization ID.
	// Precisely one of Organization, Project must be set.
	Organization *string `json:"organization,omitempty"`
	// Project: instance Project ID.
	// Precisely one of Organization, Project must be set.
	Project *string `json:"project,omitempty"`
	// Tags: instance tags.
	Tags []string `json:"tags,omitempty"`
	// SecurityGroup: security group ID.
	SecurityGroup *string `json:"security_group,omitempty"`
	// PlacementGroup: placement group ID if Instance must be part of a placement group.
	PlacementGroup *string `json:"placement_group,omitempty"`
}

type CreateServerResponse

type CreateServerResponse struct {
	Server *Server `json:"server"`
}

type CreateSnapshotRequest

type CreateSnapshotRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// Name: name of the snapshot.
	Name string `json:"name,omitempty"`
	// VolumeID: UUID of the volume.
	VolumeID *string `json:"volume_id,omitempty"`
	// Tags: tags of the snapshot.
	Tags []string `json:"tags,omitempty"`
	// Deprecated: Organization: organization ID of the snapshot.
	// Precisely one of Organization, Project must be set.
	Organization *string `json:"organization,omitempty"`
	// Project: project ID of the snapshot.
	// Precisely one of Organization, Project must be set.
	Project *string `json:"project,omitempty"`
	// VolumeType: volume type of the snapshot.
	// Overrides the volume_type of the snapshot.
	// If omitted, the volume type of the original volume will be used.
	// Default value: unknown_volume_type
	VolumeType SnapshotVolumeType `json:"volume_type"`
	// Bucket: bucket name for snapshot imports.
	Bucket *string `json:"bucket,omitempty"`
	// Key: object key for snapshot imports.
	Key *string `json:"key,omitempty"`
	// Size: imported snapshot size, must be a multiple of 512.
	Size *scw.Size `json:"size,omitempty"`
}

type CreateSnapshotResponse

type CreateSnapshotResponse struct {
	Snapshot *Snapshot `json:"snapshot"`

	Task *Task `json:"task"`
}

type CreateVolumeRequest

type CreateVolumeRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// Name: volume name.
	Name string `json:"name,omitempty"`
	// Deprecated: Organization: volume Organization ID.
	// Precisely one of Organization, Project must be set.
	Organization *string `json:"organization,omitempty"`
	// Project: volume Project ID.
	// Precisely one of Organization, Project must be set.
	Project *string `json:"project,omitempty"`
	// Tags: volume tags.
	Tags []string `json:"tags,omitempty"`
	// VolumeType: volume type.
	// Default value: l_ssd
	VolumeType VolumeVolumeType `json:"volume_type"`
	// Size: volume disk size, must be a multiple of 512.
	// Precisely one of BaseSnapshot, BaseVolume, Size must be set.
	Size *scw.Size `json:"size,omitempty"`
	// BaseVolume: ID of the volume on which this volume will be based.
	// Precisely one of BaseSnapshot, BaseVolume, Size must be set.
	BaseVolume *string `json:"base_volume,omitempty"`
	// BaseSnapshot: ID of the snapshot on which this volume will be based.
	// Precisely one of BaseSnapshot, BaseVolume, Size must be set.
	BaseSnapshot *string `json:"base_snapshot,omitempty"`
}

type CreateVolumeResponse

type CreateVolumeResponse struct {
	Volume *Volume `json:"volume"`
}

type Dashboard

type Dashboard struct {
	VolumesCount uint32 `json:"volumes_count"`

	RunningServersCount uint32 `json:"running_servers_count"`

	ServersByTypes map[string]uint32 `json:"servers_by_types"`

	ImagesCount uint32 `json:"images_count"`

	SnapshotsCount uint32 `json:"snapshots_count"`

	ServersCount uint32 `json:"servers_count"`

	IPsCount uint32 `json:"ips_count"`

	SecurityGroupsCount uint32 `json:"security_groups_count"`

	IPsUnused uint32 `json:"ips_unused"`

	VolumesLSSDCount uint32 `json:"volumes_l_ssd_count"`

	VolumesBSSDCount uint32 `json:"volumes_b_ssd_count"`

	VolumesLSSDTotalSize scw.Size `json:"volumes_l_ssd_total_size"`

	VolumesBSSDTotalSize scw.Size `json:"volumes_b_ssd_total_size"`

	PrivateNicsCount uint32 `json:"private_nics_count"`

	PlacementGroupsCount uint32 `json:"placement_groups_count"`
}

type DeleteIPRequest

type DeleteIPRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// IP: ID or address of the IP to delete.
	IP string `json:"-"`
}

type DeleteImageRequest

type DeleteImageRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// ImageID: UUID of the image you want to delete.
	ImageID string `json:"-"`
}

type DeletePlacementGroupRequest

type DeletePlacementGroupRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// PlacementGroupID: UUID of the placement group you want to delete.
	PlacementGroupID string `json:"-"`
}

type DeletePrivateNICRequest

type DeletePrivateNICRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// ServerID: instance to which the private NIC is attached.
	ServerID string `json:"-"`
	// PrivateNicID: private NIC unique ID.
	PrivateNicID string `json:"-"`
}

type DeleteSecurityGroupRequest

type DeleteSecurityGroupRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// SecurityGroupID: UUID of the security group you want to delete.
	SecurityGroupID string `json:"-"`
}

type DeleteSecurityGroupRuleRequest

type DeleteSecurityGroupRuleRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	SecurityGroupID string `json:"-"`

	SecurityGroupRuleID string `json:"-"`
}

type DeleteServerRequest

type DeleteServerRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	ServerID string `json:"-"`
}

type DeleteServerUserDataRequest

type DeleteServerUserDataRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// ServerID: UUID of the Instance.
	ServerID string `json:"-"`
	// Key: key of the user data to delete.
	Key string `json:"-"`
}

type DeleteSnapshotRequest

type DeleteSnapshotRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// SnapshotID: UUID of the snapshot you want to delete.
	SnapshotID string `json:"-"`
}

type DeleteVolumeRequest

type DeleteVolumeRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// VolumeID: UUID of the volume you want to delete.
	VolumeID string `json:"-"`
}

type DetachIPRequest deprecated

type DetachIPRequest struct {
	Zone scw.Zone `json:"-"`
	IP   string   `json:"-"`
}

DetachIPRequest contains the parameters to detach an IP from a server

Deprecated: UpdateIPRequest should be used instead

type DetachIPResponse deprecated

type DetachIPResponse struct {
	IP *IP
}

DetachIPResponse contains the updated IP after detaching

Deprecated: UpdateIPResponse should be used instead

type DetachVolumeRequest

type DetachVolumeRequest struct {
	Zone     scw.Zone `json:"-"`
	VolumeID string   `json:"-"`
}

DetachVolumeRequest contains the parameters to detach a volume from a server

type DetachVolumeResponse

type DetachVolumeResponse struct {
	Server *Server `json:"-"`
}

DetachVolumeResponse contains the updated server after detaching a volume

type ExportSnapshotRequest

type ExportSnapshotRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// SnapshotID: snapshot ID.
	SnapshotID string `json:"-"`
	// Bucket: s3 bucket name.
	Bucket string `json:"bucket,omitempty"`
	// Key: s3 object key.
	Key string `json:"key,omitempty"`
}

type ExportSnapshotResponse

type ExportSnapshotResponse struct {
	Task *Task `json:"task"`
}

type GetAllServerUserDataRequest

type GetAllServerUserDataRequest struct {
	Zone     scw.Zone `json:"-"`
	ServerID string   `json:"-"`
}

GetAllServerUserDataRequest is used by GetAllServerUserData method.

type GetAllServerUserDataResponse

type GetAllServerUserDataResponse struct {
	UserData map[string]io.Reader `json:"-"`
}

GetAllServerUserDataResponse is used by GetAllServerUserData method.

type GetBootscriptRequest

type GetBootscriptRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	BootscriptID string `json:"-"`
}

type GetBootscriptResponse

type GetBootscriptResponse struct {
	Bootscript *Bootscript `json:"bootscript"`
}

type GetDashboardRequest

type GetDashboardRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	Organization *string `json:"-"`

	Project *string `json:"-"`
}

type GetDashboardResponse

type GetDashboardResponse struct {
	Dashboard *Dashboard `json:"dashboard"`
}

type GetIPRequest

type GetIPRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// IP: IP ID or address to get.
	IP string `json:"-"`
}

type GetIPResponse

type GetIPResponse struct {
	IP *IP `json:"ip"`
}

type GetImageRequest

type GetImageRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// ImageID: UUID of the image you want to get.
	ImageID string `json:"-"`
}

type GetImageResponse

type GetImageResponse struct {
	Image *Image `json:"image"`
}

type GetPlacementGroupRequest

type GetPlacementGroupRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// PlacementGroupID: UUID of the placement group you want to get.
	PlacementGroupID string `json:"-"`
}

type GetPlacementGroupResponse

type GetPlacementGroupResponse struct {
	PlacementGroup *PlacementGroup `json:"placement_group"`
}

type GetPlacementGroupServersRequest

type GetPlacementGroupServersRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// PlacementGroupID: UUID of the placement group you want to get.
	PlacementGroupID string `json:"-"`
}

type GetPlacementGroupServersResponse

type GetPlacementGroupServersResponse struct {
	// Servers: instances attached to the placement group.
	Servers []*PlacementGroupServer `json:"servers"`
}

GetPlacementGroupServersResponse: get placement group servers response.

type GetPrivateNICRequest

type GetPrivateNICRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// ServerID: instance to which the private NIC is attached.
	ServerID string `json:"-"`
	// PrivateNicID: private NIC unique ID.
	PrivateNicID string `json:"-"`
}

type GetPrivateNICResponse

type GetPrivateNICResponse struct {
	PrivateNic *PrivateNIC `json:"private_nic"`
}

type GetSecurityGroupRequest

type GetSecurityGroupRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// SecurityGroupID: UUID of the security group you want to get.
	SecurityGroupID string `json:"-"`
}

type GetSecurityGroupResponse

type GetSecurityGroupResponse struct {
	SecurityGroup *SecurityGroup `json:"security_group"`
}

type GetSecurityGroupRuleRequest

type GetSecurityGroupRuleRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	SecurityGroupID string `json:"-"`

	SecurityGroupRuleID string `json:"-"`
}

type GetSecurityGroupRuleResponse

type GetSecurityGroupRuleResponse struct {
	Rule *SecurityGroupRule `json:"rule"`
}

type GetServerRequest

type GetServerRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// ServerID: UUID of the Instance you want to get.
	ServerID string `json:"-"`
}

type GetServerResponse

type GetServerResponse struct {
	Server *Server `json:"server"`
}

type GetServerTypeRequest

type GetServerTypeRequest struct {
	Zone scw.Zone
	Name string
}

GetServerTypeRequest is used by GetServerType.

type GetServerTypesAvailabilityRequest

type GetServerTypesAvailabilityRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// PerPage: a positive integer lower or equal to 100 to select the number of items to return.
	// Default value: 50
	PerPage *uint32 `json:"-"`
	// Page: a positive integer to choose the page to return.
	Page *int32 `json:"-"`
}

type GetServerTypesAvailabilityResponse

type GetServerTypesAvailabilityResponse struct {
	// Servers: map of server types.
	Servers map[string]*GetServerTypesAvailabilityResponseAvailability `json:"servers"`

	TotalCount uint32 `json:"total_count"`
}

GetServerTypesAvailabilityResponse: get server types availability response.

func (*GetServerTypesAvailabilityResponse) UnsafeAppend

func (r *GetServerTypesAvailabilityResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*GetServerTypesAvailabilityResponse) UnsafeGetTotalCount

func (r *GetServerTypesAvailabilityResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

func (*GetServerTypesAvailabilityResponse) UnsafeSetTotalCount

func (r *GetServerTypesAvailabilityResponse) UnsafeSetTotalCount(totalCount int)

UnsafeSetTotalCount should not be used Internal usage only

type GetServerTypesAvailabilityResponseAvailability

type GetServerTypesAvailabilityResponseAvailability struct {
	// Availability: default value: available
	Availability ServerTypesAvailability `json:"availability"`
}

type GetServerUserDataRequest

type GetServerUserDataRequest struct {
	Zone     scw.Zone `json:"-"`
	ServerID string   `json:"-"`

	// Key defines the user data key to get.
	Key string `json:"-"`
}

GetServerUserDataRequest is used by GetServerUserData method.

type GetSnapshotRequest

type GetSnapshotRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// SnapshotID: UUID of the snapshot you want to get.
	SnapshotID string `json:"-"`
}

type GetSnapshotResponse

type GetSnapshotResponse struct {
	Snapshot *Snapshot `json:"snapshot"`
}

type GetVolumeRequest

type GetVolumeRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// VolumeID: UUID of the volume you want to get.
	VolumeID string `json:"-"`
}

type GetVolumeResponse

type GetVolumeResponse struct {
	Volume *Volume `json:"volume"`
}

type IP

type IP struct {
	ID string `json:"id"`

	Address net.IP `json:"address"`

	Reverse *string `json:"reverse"`

	Server *ServerSummary `json:"server"`

	Organization string `json:"organization"`

	Tags []string `json:"tags"`

	Project string `json:"project"`
	// Type: default value: unknown_iptype
	Type IPType `json:"type"`
	// State: default value: unknown_state
	State IPState `json:"state"`

	Prefix scw.IPNet `json:"prefix"`

	Zone scw.Zone `json:"zone"`
}

type IPState

type IPState string

func (IPState) MarshalJSON

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

func (IPState) String

func (enum IPState) String() string

func (*IPState) UnmarshalJSON

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

type IPType

type IPType string

func (IPType) MarshalJSON

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

func (IPType) String

func (enum IPType) String() string

func (*IPType) UnmarshalJSON

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

type Image

type Image struct {
	ID string `json:"id"`

	Name string `json:"name"`
	// Arch: default value: x86_64
	Arch Arch `json:"arch"`

	CreationDate *time.Time `json:"creation_date"`

	ModificationDate *time.Time `json:"modification_date"`
	// Deprecated
	DefaultBootscript *Bootscript `json:"default_bootscript"`

	ExtraVolumes map[string]*Volume `json:"extra_volumes"`

	FromServer string `json:"from_server"`

	Organization string `json:"organization"`

	Public bool `json:"public"`

	RootVolume *VolumeSummary `json:"root_volume"`
	// State: default value: available
	State ImageState `json:"state"`

	Project string `json:"project"`

	Tags []string `json:"tags"`

	Zone scw.Zone `json:"zone"`
}

type ImageState

type ImageState string

func (ImageState) MarshalJSON

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

func (ImageState) String

func (enum ImageState) String() string

func (*ImageState) UnmarshalJSON

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

type ListBootscriptsRequest

type ListBootscriptsRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	Arch *string `json:"-"`

	Title *string `json:"-"`

	Default *bool `json:"-"`

	Public *bool `json:"-"`

	PerPage *uint32 `json:"-"`

	Page *int32 `json:"-"`
}

type ListBootscriptsResponse

type ListBootscriptsResponse struct {
	// TotalCount: total number of bootscripts.
	TotalCount uint32 `json:"total_count"`
	// Bootscripts: list of bootscripts.
	Bootscripts []*Bootscript `json:"bootscripts"`
}

ListBootscriptsResponse: list bootscripts response.

func (*ListBootscriptsResponse) UnsafeAppend

func (r *ListBootscriptsResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListBootscriptsResponse) UnsafeGetTotalCount

func (r *ListBootscriptsResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

func (*ListBootscriptsResponse) UnsafeSetTotalCount

func (r *ListBootscriptsResponse) UnsafeSetTotalCount(totalCount int)

UnsafeSetTotalCount should not be used Internal usage only

type ListDefaultSecurityGroupRulesRequest

type ListDefaultSecurityGroupRulesRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
}

type ListIPsRequest

type ListIPsRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// Project: project ID in which the IPs are reserved.
	Project *string `json:"-"`
	// Organization: organization ID in which the IPs are reserved.
	Organization *string `json:"-"`
	// Tags: filter IPs with these exact tags (to filter with several tags, use commas to separate them).
	Tags []string `json:"-"`
	// Name: filter on the IP address (Works as a LIKE operation on the IP address).
	Name *string `json:"-"`
	// PerPage: a positive integer lower or equal to 100 to select the number of items to return.
	// Default value: 50
	PerPage *uint32 `json:"-"`
	// Page: a positive integer to choose the page to return.
	Page *int32 `json:"-"`
}

type ListIPsResponse

type ListIPsResponse struct {
	// TotalCount: total number of ips.
	TotalCount uint32 `json:"total_count"`
	// IPs: list of ips.
	IPs []*IP `json:"ips"`
}

ListIPsResponse: list ips response.

func (*ListIPsResponse) UnsafeAppend

func (r *ListIPsResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListIPsResponse) UnsafeGetTotalCount

func (r *ListIPsResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

func (*ListIPsResponse) UnsafeSetTotalCount

func (r *ListIPsResponse) UnsafeSetTotalCount(totalCount int)

UnsafeSetTotalCount should not be used Internal usage only

type ListImagesRequest

type ListImagesRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	Organization *string `json:"-"`

	PerPage *uint32 `json:"-"`

	Page *int32 `json:"-"`

	Name *string `json:"-"`

	Public *bool `json:"-"`

	Arch *string `json:"-"`

	Project *string `json:"-"`

	Tags *string `json:"-"`
}

type ListImagesResponse

type ListImagesResponse struct {
	// TotalCount: total number of images.
	TotalCount uint32 `json:"total_count"`
	// Images: list of images.
	Images []*Image `json:"images"`
}

ListImagesResponse: list images response.

func (*ListImagesResponse) UnsafeAppend

func (r *ListImagesResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListImagesResponse) UnsafeGetTotalCount

func (r *ListImagesResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

func (*ListImagesResponse) UnsafeSetTotalCount

func (r *ListImagesResponse) UnsafeSetTotalCount(totalCount int)

UnsafeSetTotalCount should not be used Internal usage only

type ListPlacementGroupsRequest

type ListPlacementGroupsRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// PerPage: a positive integer lower or equal to 100 to select the number of items to return.
	// Default value: 50
	PerPage *uint32 `json:"-"`
	// Page: a positive integer to choose the page to return.
	Page *int32 `json:"-"`
	// Organization: list only placement groups of this Organization ID.
	Organization *string `json:"-"`
	// Project: list only placement groups of this Project ID.
	Project *string `json:"-"`
	// Tags: list placement groups with these exact tags (to filter with several tags, use commas to separate them).
	Tags []string `json:"-"`
	// Name: filter placement groups by name (for eg. "cluster1" will return "cluster100" and "cluster1" but not "foo").
	Name *string `json:"-"`
}

type ListPlacementGroupsResponse

type ListPlacementGroupsResponse struct {
	// TotalCount: total number of placement groups.
	TotalCount uint32 `json:"total_count"`
	// PlacementGroups: list of placement groups.
	PlacementGroups []*PlacementGroup `json:"placement_groups"`
}

ListPlacementGroupsResponse: list placement groups response.

func (*ListPlacementGroupsResponse) UnsafeAppend

func (r *ListPlacementGroupsResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListPlacementGroupsResponse) UnsafeGetTotalCount

func (r *ListPlacementGroupsResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

type ListPrivateNICsRequest

type ListPrivateNICsRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// ServerID: instance to which the private NIC is attached.
	ServerID string `json:"-"`
	// Tags: private NIC tags.
	Tags []string `json:"-"`
	// PerPage: a positive integer lower or equal to 100 to select the number of items to return.
	// Default value: 50
	PerPage *uint32 `json:"-"`
	// Page: a positive integer to choose the page to return.
	Page *int32 `json:"-"`
}

type ListPrivateNICsResponse

type ListPrivateNICsResponse struct {
	PrivateNics []*PrivateNIC `json:"private_nics"`

	TotalCount uint64 `json:"total_count"`
}

func (*ListPrivateNICsResponse) UnsafeAppend

func (r *ListPrivateNICsResponse) UnsafeAppend(res interface{}) (uint64, error)

UnsafeAppend should not be used Internal usage only

func (*ListPrivateNICsResponse) UnsafeGetTotalCount

func (r *ListPrivateNICsResponse) UnsafeGetTotalCount() uint64

UnsafeGetTotalCount should not be used Internal usage only

type ListSecurityGroupRulesRequest

type ListSecurityGroupRulesRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// SecurityGroupID: UUID of the security group.
	SecurityGroupID string `json:"-"`
	// PerPage: a positive integer lower or equal to 100 to select the number of items to return.
	// Default value: 50
	PerPage *uint32 `json:"-"`
	// Page: a positive integer to choose the page to return.
	Page *int32 `json:"-"`
}

type ListSecurityGroupRulesResponse

type ListSecurityGroupRulesResponse struct {
	// TotalCount: total number of security groups.
	TotalCount uint32 `json:"total_count"`
	// Rules: list of security rules.
	Rules []*SecurityGroupRule `json:"rules"`
}

ListSecurityGroupRulesResponse: list security group rules response.

func (*ListSecurityGroupRulesResponse) UnsafeAppend

func (r *ListSecurityGroupRulesResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListSecurityGroupRulesResponse) UnsafeGetTotalCount

func (r *ListSecurityGroupRulesResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

func (*ListSecurityGroupRulesResponse) UnsafeSetTotalCount

func (r *ListSecurityGroupRulesResponse) UnsafeSetTotalCount(totalCount int)

UnsafeSetTotalCount should not be used Internal usage only

type ListSecurityGroupsRequest

type ListSecurityGroupsRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// Name: name of the security group.
	Name *string `json:"-"`
	// Organization: security group Organization ID.
	Organization *string `json:"-"`
	// Project: security group Project ID.
	Project *string `json:"-"`
	// Tags: list security groups with these exact tags (to filter with several tags, use commas to separate them).
	Tags []string `json:"-"`
	// ProjectDefault: filter security groups with this value for project_default.
	ProjectDefault *bool `json:"-"`
	// PerPage: a positive integer lower or equal to 100 to select the number of items to return.
	// Default value: 50
	PerPage *uint32 `json:"-"`
	// Page: a positive integer to choose the page to return.
	Page *int32 `json:"-"`
}

type ListSecurityGroupsResponse

type ListSecurityGroupsResponse struct {
	// TotalCount: total number of security groups.
	TotalCount uint32 `json:"total_count"`
	// SecurityGroups: list of security groups.
	SecurityGroups []*SecurityGroup `json:"security_groups"`
}

ListSecurityGroupsResponse: list security groups response.

func (*ListSecurityGroupsResponse) UnsafeAppend

func (r *ListSecurityGroupsResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListSecurityGroupsResponse) UnsafeGetTotalCount

func (r *ListSecurityGroupsResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

func (*ListSecurityGroupsResponse) UnsafeSetTotalCount

func (r *ListSecurityGroupsResponse) UnsafeSetTotalCount(totalCount int)

UnsafeSetTotalCount should not be used Internal usage only

type ListServerActionsRequest

type ListServerActionsRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	ServerID string `json:"-"`
}

type ListServerActionsResponse

type ListServerActionsResponse struct {
	Actions []ServerAction `json:"actions"`
}

type ListServerUserDataRequest

type ListServerUserDataRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// ServerID: UUID of the Instance.
	ServerID string `json:"-"`
}

type ListServerUserDataResponse

type ListServerUserDataResponse struct {
	UserData []string `json:"user_data"`
}

type ListServersRequest

type ListServersRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// PerPage: a positive integer lower or equal to 100 to select the number of items to return.
	// Default value: 50
	PerPage *uint32 `json:"-"`
	// Page: a positive integer to choose the page to return.
	Page *int32 `json:"-"`
	// Organization: list only Instances of this Organization ID.
	Organization *string `json:"-"`
	// Project: list only Instances of this Project ID.
	Project *string `json:"-"`
	// Name: filter Instances by name (eg. "server1" will return "server100" and "server1" but not "foo").
	Name *string `json:"-"`
	// PrivateIP: list Instances by private_ip.
	PrivateIP *net.IP `json:"-"`
	// WithoutIP: list Instances that are not attached to a public IP.
	WithoutIP *bool `json:"-"`
	// CommercialType: list Instances of this commercial type.
	CommercialType *string `json:"-"`
	// State: list Instances in this state.
	// Default value: running
	State *ServerState `json:"-"`
	// Tags: list Instances with these exact tags (to filter with several tags, use commas to separate them).
	Tags []string `json:"-"`
	// PrivateNetwork: list Instances in this Private Network.
	PrivateNetwork *string `json:"-"`
	// Order: define the order of the returned servers.
	// Default value: creation_date_desc
	Order ListServersRequestOrder `json:"-"`
}

type ListServersRequestOrder

type ListServersRequestOrder string

func (ListServersRequestOrder) MarshalJSON

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

func (ListServersRequestOrder) String

func (enum ListServersRequestOrder) String() string

func (*ListServersRequestOrder) UnmarshalJSON

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

type ListServersResponse

type ListServersResponse struct {
	// TotalCount: total number of Instances.
	TotalCount uint32 `json:"total_count"`
	// Servers: list of Instances.
	Servers []*Server `json:"servers"`
}

ListServersResponse: list servers response.

func (*ListServersResponse) UnsafeAppend

func (r *ListServersResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListServersResponse) UnsafeGetTotalCount

func (r *ListServersResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

func (*ListServersResponse) UnsafeSetTotalCount

func (r *ListServersResponse) UnsafeSetTotalCount(totalCount int)

UnsafeSetTotalCount should not be used Internal usage only

type ListServersTypesRequest

type ListServersTypesRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	PerPage *uint32 `json:"-"`

	Page *int32 `json:"-"`
}

type ListServersTypesResponse

type ListServersTypesResponse struct {
	// TotalCount: total number of Instance types.
	TotalCount uint32 `json:"total_count"`
	// Servers: list of Instance types.
	Servers map[string]*ServerType `json:"servers"`
}

ListServersTypesResponse: list servers types response.

func (*ListServersTypesResponse) UnsafeAppend

func (r *ListServersTypesResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListServersTypesResponse) UnsafeGetTotalCount

func (r *ListServersTypesResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

func (*ListServersTypesResponse) UnsafeSetTotalCount

func (r *ListServersTypesResponse) UnsafeSetTotalCount(totalCount int)

UnsafeSetTotalCount should not be used Internal usage only

type ListSnapshotsRequest

type ListSnapshotsRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	Organization *string `json:"-"`

	PerPage *uint32 `json:"-"`

	Page *int32 `json:"-"`

	Name *string `json:"-"`

	Project *string `json:"-"`

	Tags *string `json:"-"`
}

type ListSnapshotsResponse

type ListSnapshotsResponse struct {
	// TotalCount: total number of snapshots.
	TotalCount uint32 `json:"total_count"`
	// Snapshots: list of snapshots.
	Snapshots []*Snapshot `json:"snapshots"`
}

ListSnapshotsResponse: list snapshots response.

func (*ListSnapshotsResponse) UnsafeAppend

func (r *ListSnapshotsResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListSnapshotsResponse) UnsafeGetTotalCount

func (r *ListSnapshotsResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

func (*ListSnapshotsResponse) UnsafeSetTotalCount

func (r *ListSnapshotsResponse) UnsafeSetTotalCount(totalCount int)

UnsafeSetTotalCount should not be used Internal usage only

type ListVolumesRequest

type ListVolumesRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// VolumeType: filter by volume type.
	// Default value: l_ssd
	VolumeType *VolumeVolumeType `json:"-"`
	// PerPage: a positive integer lower or equal to 100 to select the number of items to return.
	// Default value: 50
	PerPage *uint32 `json:"-"`
	// Page: a positive integer to choose the page to return.
	Page *int32 `json:"-"`
	// Organization: filter volume by Organization ID.
	Organization *string `json:"-"`
	// Project: filter volume by Project ID.
	Project *string `json:"-"`
	// Tags: filter volumes with these exact tags (to filter with several tags, use commas to separate them).
	Tags []string `json:"-"`
	// Name: filter volume by name (for eg. "vol" will return "myvolume" but not "data").
	Name *string `json:"-"`
}

type ListVolumesResponse

type ListVolumesResponse struct {
	// TotalCount: total number of volumes.
	TotalCount uint32 `json:"total_count"`
	// Volumes: list of volumes.
	Volumes []*Volume `json:"volumes"`
}

ListVolumesResponse: list volumes response.

func (*ListVolumesResponse) UnsafeAppend

func (r *ListVolumesResponse) UnsafeAppend(res interface{}) (uint32, error)

UnsafeAppend should not be used Internal usage only

func (*ListVolumesResponse) UnsafeGetTotalCount

func (r *ListVolumesResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

func (*ListVolumesResponse) UnsafeSetTotalCount

func (r *ListVolumesResponse) UnsafeSetTotalCount(totalCount int)

UnsafeSetTotalCount should not be used Internal usage only

type ListVolumesTypesRequest

type ListVolumesTypesRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	PerPage *uint32 `json:"-"`

	Page *int32 `json:"-"`
}

type ListVolumesTypesResponse

type ListVolumesTypesResponse struct {
	// TotalCount: total number of volume types.
	TotalCount uint32 `json:"total_count"`
	// Volumes: map of volume types.
	Volumes map[string]*VolumeType `json:"volumes"`
}

ListVolumesTypesResponse: list volumes types response.

type Metadata

type Metadata struct {
	ID             string `json:"id,omitempty"`
	Name           string `json:"name,omitempty"`
	Hostname       string `json:"hostname,omitempty"`
	Organization   string `json:"organization,omitempty"`
	Project        string `json:"project,omitempty"`
	CommercialType string `json:"commercial_type,omitempty"`
	PublicIP       struct {
		Dynamic bool   `json:"dynamic,omitempty"`
		ID      string `json:"id,omitempty"`
		Address string `json:"address,omitempty"`
	} `json:"public_ip,omitempty"`
	PrivateIP string `json:"private_ip,omitempty"`
	IPv6      struct {
		Netmask string `json:"netmask,omitempty"`
		Gateway string `json:"gateway,omitempty"`
		Address string `json:"address,omitempty"`
	} `json:"ipv6,omitempty"`
	Location struct {
		PlatformID   string `json:"platform_id,omitempty"`
		HypervisorID string `json:"hypervisor_id,omitempty"`
		NodeID       string `json:"node_id,omitempty"`
		ClusterID    string `json:"cluster_id,omitempty"`
		ZoneID       string `json:"zone_id,omitempty"`
	} `json:"location,omitempty"`
	Tags          []string `json:"tags,omitempty"`
	StateDetail   string   `json:"state_detail,omitempty"`
	SSHPublicKeys []struct {
		Description      string `json:"description,omitempty"`
		ModificationDate string `json:"modification_date,omitempty"`
		IP               string `json:"ip,omitempty"`
		Key              string `json:"key,omitempty"`
		Fingerprint      string `json:"fingerprint,omitempty"`
		ID               string `json:"id,omitempty"`
		CreationDate     string `json:"creation_date,omitempty"`
	} `json:"ssh_public_keys,omitempty"`
	Timezone   string `json:"timezone,omitempty"`
	Bootscript struct {
		Kernel       string `json:"kernel,omitempty"`
		Title        string `json:"title,omitempty"`
		Default      bool   `json:"default,omitempty"`
		Dtb          string `json:"dtb,omitempty"`
		Public       bool   `json:"publc,omitempty"`
		Initrd       string `json:"initrd,omitempty"`
		Bootcmdargs  string `json:"bootcmdargs,omitempty"`
		Architecture string `json:"architecture,omitempty"`
		Organization string `json:"organization,omitempty"`
		Project      string `json:"project,omitempty"`
		ID           string `json:"id,omitempty"`
	} `json:"bootscript,omitempty"`
	Volumes map[string]struct {
		Name             string `json:"name,omitempty"`
		ModificationDate string `json:"modification_date,omitempty"`
		ExportURI        string `json:"export_uri,omitempty"`
		VolumeType       string `json:"volume_type,omitempty"`
		CreationDate     string `json:"creation_date,omitempty"`
		State            string `json:"state,omitempty"`
		Organization     string `json:"organization,omitempty"`
		Project          string `json:"project,omitempty"`
		Server           struct {
			ID   string `json:"id,omitempty"`
			Name string `json:"name,omitempty"`
		} `json:"server,omitempty"`
		ID   string `json:"id,omitempty"`
		Size int    `json:"size,omitempty"`
	} `json:"volumes,omitempty"`
	PrivateNICs []struct {
		ID               string `json:"id,omitempty"`
		PrivateNetworkID string `json:"private_network_id,omitempty"`
		ServerID         string `json:"server_id,omitempty"`
		MacAddress       string `json:"mac_address,omitempty"`
		CreationDate     string `json:"creation_date,omitempty"`
		Zone             string `json:"zone,omitempty"`
	} `json:"private_nics,omitempty"`
}

Metadata represents the struct return by the metadata API

type MetadataAPI

type MetadataAPI struct {
}

MetadataAPI metadata API

func NewMetadataAPI

func NewMetadataAPI() *MetadataAPI

NewMetadataAPI returns a MetadataAPI object from a Scaleway client.

func (*MetadataAPI) DeleteUserData

func (*MetadataAPI) DeleteUserData(key string) error

DeleteUserData deletes the userdata key and the associated value

func (*MetadataAPI) GetMetadata

func (*MetadataAPI) GetMetadata() (m *Metadata, err error)

GetMetadata returns the metadata available from the server

func (*MetadataAPI) GetUserData

func (*MetadataAPI) GetUserData(key string) ([]byte, error)

GetUserData returns the value for the given metadata key

func (*MetadataAPI) ListUserData

func (*MetadataAPI) ListUserData() (res *UserData, err error)

ListUserData returns the metadata available from the server

func (*MetadataAPI) SetUserData

func (*MetadataAPI) SetUserData(key string, value []byte) error

SetUserData sets the userdata key with the given value

type NullableStringValue

type NullableStringValue struct {
	Null bool `json:"null,omitempty"`

	Value string `json:"value,omitempty"`
}

func (*NullableStringValue) MarshalJSON

func (v *NullableStringValue) MarshalJSON() ([]byte, error)

func (*NullableStringValue) UnmarshalJSON

func (v *NullableStringValue) UnmarshalJSON(b []byte) error

type PlacementGroup

type PlacementGroup struct {
	// ID: placement group unique ID.
	ID string `json:"id"`
	// Name: placement group name.
	Name string `json:"name"`
	// Organization: placement group Organization ID.
	Organization string `json:"organization"`
	// Project: placement group Project ID.
	Project string `json:"project"`
	// Tags: placement group tags.
	Tags []string `json:"tags"`
	// PolicyMode: select the failure mode when the placement cannot be respected, either optional or enforced.
	// Default value: optional
	PolicyMode PlacementGroupPolicyMode `json:"policy_mode"`
	// PolicyType: select the behavior of the placement group, either low_latency (group) or max_availability (spread).
	// Default value: max_availability
	PolicyType PlacementGroupPolicyType `json:"policy_type"`
	// PolicyRespected: returns true if the policy is respected, false otherwise.
	PolicyRespected bool `json:"policy_respected"`
	// Zone: zone in which the placement group is located.
	Zone scw.Zone `json:"zone"`
}

PlacementGroup: placement group.

type PlacementGroupPolicyMode

type PlacementGroupPolicyMode string

func (PlacementGroupPolicyMode) MarshalJSON

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

func (PlacementGroupPolicyMode) String

func (enum PlacementGroupPolicyMode) String() string

func (*PlacementGroupPolicyMode) UnmarshalJSON

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

type PlacementGroupPolicyType

type PlacementGroupPolicyType string

func (PlacementGroupPolicyType) MarshalJSON

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

func (PlacementGroupPolicyType) String

func (enum PlacementGroupPolicyType) String() string

func (*PlacementGroupPolicyType) UnmarshalJSON

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

type PlacementGroupServer

type PlacementGroupServer struct {
	// ID: instance UUID.
	ID string `json:"id"`
	// Name: instance name.
	Name string `json:"name"`
	// PolicyRespected: defines whether the placement group policy is respected (either 1 or 0).
	PolicyRespected bool `json:"policy_respected"`
}

PlacementGroupServer: placement group server.

type PrivateNIC

type PrivateNIC struct {
	// ID: private NIC unique ID.
	ID string `json:"id,omitempty"`
	// ServerID: instance to which the private NIC is attached.
	ServerID string `json:"server_id,omitempty"`
	// PrivateNetworkID: private Network the private NIC is attached to.
	PrivateNetworkID string `json:"private_network_id,omitempty"`
	// MacAddress: private NIC MAC address.
	MacAddress string `json:"mac_address,omitempty"`
	// State: private NIC state.
	// Default value: available
	State PrivateNICState `json:"state,omitempty"`
	// Tags: private NIC tags.
	Tags []string `json:"tags,omitempty"`
}

PrivateNIC: private nic.

type PrivateNICState

type PrivateNICState string

func (PrivateNICState) MarshalJSON

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

func (PrivateNICState) String

func (enum PrivateNICState) String() string

func (*PrivateNICState) UnmarshalJSON

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

type SecurityGroup

type SecurityGroup struct {
	// ID: security group unique ID.
	ID string `json:"id"`
	// Name: security group name.
	Name string `json:"name"`
	// Description: security group description.
	Description string `json:"description"`
	// EnableDefaultSecurity: true if SMTP is blocked on IPv4 and IPv6. This feature is read only, please open a support ticket if you need to make it configurable.
	EnableDefaultSecurity bool `json:"enable_default_security"`
	// InboundDefaultPolicy: default inbound policy.
	// Default value: accept
	InboundDefaultPolicy SecurityGroupPolicy `json:"inbound_default_policy"`
	// OutboundDefaultPolicy: default outbound policy.
	// Default value: accept
	OutboundDefaultPolicy SecurityGroupPolicy `json:"outbound_default_policy"`
	// Organization: security group Organization ID.
	Organization string `json:"organization"`
	// Project: security group Project ID.
	Project string `json:"project"`
	// Tags: security group tags.
	Tags []string `json:"tags"`
	// Deprecated: OrganizationDefault: true if it is your default security group for this Organization ID.
	OrganizationDefault *bool `json:"organization_default,omitempty"`
	// ProjectDefault: true if it is your default security group for this Project ID.
	ProjectDefault bool `json:"project_default"`
	// CreationDate: security group creation date.
	CreationDate *time.Time `json:"creation_date"`
	// ModificationDate: security group modification date.
	ModificationDate *time.Time `json:"modification_date"`
	// Servers: list of Instances attached to this security group.
	Servers []*ServerSummary `json:"servers"`
	// Stateful: defines whether the security group is stateful.
	Stateful bool `json:"stateful"`
	// State: security group state.
	// Default value: available
	State SecurityGroupState `json:"state"`
	// Zone: zone in which the security group is located.
	Zone scw.Zone `json:"zone"`
}

SecurityGroup: security group.

type SecurityGroupPolicy

type SecurityGroupPolicy string

func (SecurityGroupPolicy) MarshalJSON

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

func (SecurityGroupPolicy) String

func (enum SecurityGroupPolicy) String() string

func (*SecurityGroupPolicy) UnmarshalJSON

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

type SecurityGroupRule

type SecurityGroupRule struct {
	ID string `json:"id"`
	// Protocol: default value: TCP
	Protocol SecurityGroupRuleProtocol `json:"protocol"`
	// Direction: default value: inbound
	Direction SecurityGroupRuleDirection `json:"direction"`
	// Action: default value: accept
	Action SecurityGroupRuleAction `json:"action"`

	IPRange scw.IPNet `json:"ip_range"`

	DestPortFrom *uint32 `json:"dest_port_from"`

	DestPortTo *uint32 `json:"dest_port_to"`

	Position uint32 `json:"position"`

	Editable bool `json:"editable"`

	Zone scw.Zone `json:"zone"`
}

type SecurityGroupRuleAction

type SecurityGroupRuleAction string

func (SecurityGroupRuleAction) MarshalJSON

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

func (SecurityGroupRuleAction) String

func (enum SecurityGroupRuleAction) String() string

func (*SecurityGroupRuleAction) UnmarshalJSON

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

type SecurityGroupRuleDirection

type SecurityGroupRuleDirection string

func (SecurityGroupRuleDirection) MarshalJSON

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

func (SecurityGroupRuleDirection) String

func (enum SecurityGroupRuleDirection) String() string

func (*SecurityGroupRuleDirection) UnmarshalJSON

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

type SecurityGroupRuleProtocol

type SecurityGroupRuleProtocol string

func (SecurityGroupRuleProtocol) MarshalJSON

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

func (SecurityGroupRuleProtocol) String

func (enum SecurityGroupRuleProtocol) String() string

func (*SecurityGroupRuleProtocol) UnmarshalJSON

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

type SecurityGroupState

type SecurityGroupState string

func (SecurityGroupState) MarshalJSON

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

func (SecurityGroupState) String

func (enum SecurityGroupState) String() string

func (*SecurityGroupState) UnmarshalJSON

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

type SecurityGroupSummary

type SecurityGroupSummary struct {
	ID string `json:"id"`

	Name string `json:"name"`
}

type SecurityGroupTemplate

type SecurityGroupTemplate struct {
	ID string `json:"id,omitempty"`

	Name string `json:"name,omitempty"`
}

type Server

type Server struct {
	// ID: instance unique ID.
	ID string `json:"id"`
	// Name: instance name.
	Name string `json:"name"`
	// Organization: instance Organization ID.
	Organization string `json:"organization"`
	// Project: instance Project ID.
	Project string `json:"project"`
	// AllowedActions: list of allowed actions on the Instance.
	AllowedActions []ServerAction `json:"allowed_actions"`
	// Tags: tags associated with the Instance.
	Tags []string `json:"tags"`
	// CommercialType: instance commercial type (eg. GP1-M).
	CommercialType string `json:"commercial_type"`
	// CreationDate: instance creation date.
	CreationDate *time.Time `json:"creation_date"`
	// DynamicIPRequired: true if a dynamic IPv4 is required.
	DynamicIPRequired bool `json:"dynamic_ip_required"`
	// RoutedIPEnabled: true to configure the instance so it uses the new routed IP mode.
	RoutedIPEnabled bool `json:"routed_ip_enabled"`
	// EnableIPv6: true if IPv6 is enabled.
	EnableIPv6 bool `json:"enable_ipv6"`
	// Hostname: instance host name.
	Hostname string `json:"hostname"`
	// Image: information about the Instance image.
	Image *Image `json:"image"`
	// Protected: defines whether the Instance protection option is activated.
	Protected bool `json:"protected"`
	// PrivateIP: private IP address of the Instance.
	PrivateIP *string `json:"private_ip"`
	// PublicIP: information about the public IP.
	PublicIP *ServerIP `json:"public_ip"`
	// PublicIPs: information about all the public IPs attached to the server.
	PublicIPs []*ServerIP `json:"public_ips"`
	// MacAddress: the server's MAC address.
	MacAddress string `json:"mac_address"`
	// ModificationDate: instance modification date.
	ModificationDate *time.Time `json:"modification_date"`
	// State: instance state.
	// Default value: running
	State ServerState `json:"state"`
	// Location: instance location.
	Location *ServerLocation `json:"location"`
	// IPv6: instance IPv6 address.
	IPv6 *ServerIPv6 `json:"ipv6"`
	// Deprecated: Bootscript: instance bootscript.
	Bootscript *Bootscript `json:"bootscript,omitempty"`
	// BootType: instance boot type.
	// Default value: local
	BootType BootType `json:"boot_type"`
	// Volumes: instance volumes.
	Volumes map[string]*VolumeServer `json:"volumes"`
	// SecurityGroup: instance security group.
	SecurityGroup *SecurityGroupSummary `json:"security_group"`
	// Maintenances: instance planned maintenance.
	Maintenances []*ServerMaintenance `json:"maintenances"`
	// StateDetail: detailed information about the Instance state.
	StateDetail string `json:"state_detail"`
	// Arch: instance architecture.
	// Default value: x86_64
	Arch Arch `json:"arch"`
	// PlacementGroup: instance placement group.
	PlacementGroup *PlacementGroup `json:"placement_group"`
	// PrivateNics: instance private NICs.
	PrivateNics []*PrivateNIC `json:"private_nics"`
	// Zone: zone in which the Instance is located.
	Zone scw.Zone `json:"zone"`
}

Server: server.

type ServerAction

type ServerAction string

func (ServerAction) MarshalJSON

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

func (ServerAction) String

func (enum ServerAction) String() string

func (*ServerAction) UnmarshalJSON

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

type ServerActionAndWaitRequest

type ServerActionAndWaitRequest struct {
	ServerID string
	Zone     scw.Zone
	Action   ServerAction

	// Timeout: maximum time to wait before (default: 5 minutes)
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

ServerActionAndWaitRequest is used by ServerActionAndWait method.

type ServerActionRequest

type ServerActionRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// ServerID: UUID of the Instance.
	ServerID string `json:"-"`
	// Action: action to perform on the Instance.
	// Default value: poweron
	Action ServerAction `json:"action"`
	// Name: name of the backup you want to create.
	// Name of the backup you want to create.
	// This field should only be specified when performing a backup action.
	Name *string `json:"name,omitempty"`
	// Volumes: for each volume UUID, the snapshot parameters of the volume.
	// For each volume UUID, the snapshot parameters of the volume.
	// This field should only be specified when performing a backup action.
	Volumes map[string]*ServerActionRequestVolumeBackupTemplate `json:"volumes,omitempty"`
}

type ServerActionRequestVolumeBackupTemplate

type ServerActionRequestVolumeBackupTemplate struct {
	// VolumeType: snapshot's volume type.
	// Overrides the `volume_type` of the snapshot for this volume.
	// If omitted, the volume type of the original volume will be used.
	// Default value: unknown_volume_type
	VolumeType SnapshotVolumeType `json:"volume_type,omitempty"`
}

ServerActionRequestVolumeBackupTemplate: server action request. volume backup template.

type ServerActionResponse

type ServerActionResponse struct {
	Task *Task `json:"task"`
}

type ServerIP

type ServerIP struct {
	// ID: unique ID of the IP address.
	ID string `json:"id,omitempty"`
	// Address: instance's public IP-Address.
	Address net.IP `json:"address,omitempty"`
	// Gateway: gateway's IP address.
	Gateway net.IP `json:"gateway,omitempty"`
	// Netmask: cIDR netmask.
	Netmask string `json:"netmask,omitempty"`
	// Family: IP address family (inet or inet6).
	// Default value: inet
	Family ServerIPIPFamily `json:"family,omitempty"`
	// Dynamic: true if the IP address is dynamic.
	Dynamic bool `json:"dynamic,omitempty"`
	// ProvisioningMode: information about this address provisioning mode.
	// Default value: manual
	ProvisioningMode ServerIPProvisioningMode `json:"provisioning_mode,omitempty"`
}

ServerIP: server. ip.

type ServerIPIPFamily

type ServerIPIPFamily string

func (ServerIPIPFamily) MarshalJSON

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

func (ServerIPIPFamily) String

func (enum ServerIPIPFamily) String() string

func (*ServerIPIPFamily) UnmarshalJSON

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

type ServerIPProvisioningMode

type ServerIPProvisioningMode string

func (ServerIPProvisioningMode) MarshalJSON

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

func (ServerIPProvisioningMode) String

func (enum ServerIPProvisioningMode) String() string

func (*ServerIPProvisioningMode) UnmarshalJSON

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

type ServerIPv6

type ServerIPv6 struct {
	// Address: instance IPv6 IP-Address.
	Address net.IP `json:"address"`
	// Gateway: iPv6 IP-addresses gateway.
	Gateway net.IP `json:"gateway"`
	// Netmask: iPv6 IP-addresses CIDR netmask.
	Netmask string `json:"netmask"`
}

ServerIPv6: server. ipv6.

type ServerLocation

type ServerLocation struct {
	ClusterID string `json:"cluster_id"`

	HypervisorID string `json:"hypervisor_id"`

	NodeID string `json:"node_id"`

	PlatformID string `json:"platform_id"`

	ZoneID string `json:"zone_id"`
}

type ServerMaintenance

type ServerMaintenance struct {
	Reason string `json:"reason"`
}

type ServerState

type ServerState string

func (ServerState) MarshalJSON

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

func (ServerState) String

func (enum ServerState) String() string

func (*ServerState) UnmarshalJSON

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

type ServerSummary

type ServerSummary struct {
	ID string `json:"id"`

	Name string `json:"name"`
}

type ServerType

type ServerType struct {
	// Deprecated: MonthlyPrice: estimated monthly price, for a 30 days month, in Euro.
	MonthlyPrice *float32 `json:"monthly_price,omitempty"`
	// HourlyPrice: hourly price in Euro.
	HourlyPrice float32 `json:"hourly_price"`
	// AltNames: alternative Instance name, if any.
	AltNames []string `json:"alt_names"`
	// PerVolumeConstraint: additional volume constraints.
	PerVolumeConstraint *ServerTypeVolumeConstraintsByType `json:"per_volume_constraint"`
	// VolumesConstraint: initial volume constraints.
	VolumesConstraint *ServerTypeVolumeConstraintSizes `json:"volumes_constraint"`
	// Ncpus: number of CPU.
	Ncpus uint32 `json:"ncpus"`
	// Gpu: number of GPU.
	Gpu *uint64 `json:"gpu"`
	// RAM: available RAM in bytes.
	RAM uint64 `json:"ram"`
	// Arch: CPU architecture.
	// Default value: x86_64
	Arch Arch `json:"arch"`
	// Baremetal: true if it is a baremetal Instance.
	Baremetal bool `json:"baremetal"`
	// Network: network available for the Instance.
	Network *ServerTypeNetwork `json:"network"`
	// Capabilities: capabilities.
	Capabilities *ServerTypeCapabilities `json:"capabilities"`
}

ServerType: server type.

type ServerTypeCapabilities

type ServerTypeCapabilities struct {
	// BlockStorage: defines whether the Instance supports block storage.
	BlockStorage *bool `json:"block_storage"`
	// BootTypes: list of supported boot types.
	BootTypes []BootType `json:"boot_types"`
}

ServerTypeCapabilities: server type. capabilities.

type ServerTypeNetwork

type ServerTypeNetwork struct {
	// Interfaces: list of available network interfaces.
	Interfaces []*ServerTypeNetworkInterface `json:"interfaces"`
	// SumInternalBandwidth: total maximum internal bandwidth in bits per seconds.
	SumInternalBandwidth *uint64 `json:"sum_internal_bandwidth"`
	// SumInternetBandwidth: total maximum internet bandwidth in bits per seconds.
	SumInternetBandwidth *uint64 `json:"sum_internet_bandwidth"`
	// IPv6Support: true if IPv6 is enabled.
	IPv6Support bool `json:"ipv6_support"`
}

ServerTypeNetwork: server type. network.

type ServerTypeNetworkInterface

type ServerTypeNetworkInterface struct {
	// InternalBandwidth: maximum internal bandwidth in bits per seconds.
	InternalBandwidth *uint64 `json:"internal_bandwidth"`
	// InternetBandwidth: maximum internet bandwidth in bits per seconds.
	InternetBandwidth *uint64 `json:"internet_bandwidth"`
}

ServerTypeNetworkInterface: server type. network. interface.

type ServerTypeVolumeConstraintSizes

type ServerTypeVolumeConstraintSizes struct {
	// MinSize: minimum volume size in bytes.
	MinSize scw.Size `json:"min_size"`
	// MaxSize: maximum volume size in bytes.
	MaxSize scw.Size `json:"max_size"`
}

ServerTypeVolumeConstraintSizes: server type. volume constraint sizes.

type ServerTypeVolumeConstraintsByType

type ServerTypeVolumeConstraintsByType struct {
	// LSSD: local SSD volumes.
	LSSD *ServerTypeVolumeConstraintSizes `json:"l_ssd"`
}

ServerTypeVolumeConstraintsByType: server type. volume constraints by type.

type ServerTypesAvailability

type ServerTypesAvailability string

func (ServerTypesAvailability) MarshalJSON

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

func (ServerTypesAvailability) String

func (enum ServerTypesAvailability) String() string

func (*ServerTypesAvailability) UnmarshalJSON

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

type SetAllServerUserDataRequest

type SetAllServerUserDataRequest struct {
	Zone     scw.Zone `json:"-"`
	ServerID string   `json:"-"`

	// UserData defines all user data that will be set to the server.
	// This map is idempotent, it means that all the current data will be overwritten and
	// all keys not present in this map will be deleted.. All data will be removed if this map is nil.
	UserData map[string]io.Reader `json:"-"`
}

SetAllServerUserDataRequest is used by SetAllServerUserData method.

type SetImageRequest

type SetImageRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	ID string `json:"-"`

	Name string `json:"name"`
	// Arch: default value: x86_64
	Arch Arch `json:"arch"`

	CreationDate *time.Time `json:"creation_date"`

	ModificationDate *time.Time `json:"modification_date"`
	// Deprecated
	DefaultBootscript *Bootscript `json:"default_bootscript"`

	ExtraVolumes map[string]*Volume `json:"extra_volumes"`

	FromServer string `json:"from_server"`

	Organization string `json:"organization"`

	Public bool `json:"public"`

	RootVolume *VolumeSummary `json:"root_volume"`
	// State: default value: available
	State ImageState `json:"state"`

	Project string `json:"project"`

	Tags *[]string `json:"tags"`
}

type SetPlacementGroupRequest

type SetPlacementGroupRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`

	PlacementGroupID string `json:"-"`

	Name string `json:"name"`

	Organization string `json:"organization"`
	// PolicyMode: default value: optional
	PolicyMode PlacementGroupPolicyMode `json:"policy_mode"`
	// PolicyType: default value: max_availability
	PolicyType PlacementGroupPolicyType `json:"policy_type"`

	Project string `json:"project"`

	Tags *[]string `json:"tags"`
}

type SetPlacementGroupResponse

type SetPlacementGroupResponse struct {
	PlacementGroup *PlacementGroup `json:"placement_group"`
}

type SetPlacementGroupServersRequest

type SetPlacementGroupServersRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// PlacementGroupID: UUID of the placement group you want to set.
	PlacementGroupID string `json:"-"`
	// Servers: an array of the Instances' UUIDs you want to configure.
	Servers []string `json:"servers"`
}

type SetPlacementGroupServersResponse

type SetPlacementGroupServersResponse struct {
	// Servers: instances attached to the placement group.
	Servers []*PlacementGroupServer `json:"servers"`
}

SetPlacementGroupServersResponse: set placement group servers response.

type SetSecurityGroupRulesRequest

type SetSecurityGroupRulesRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// SecurityGroupID: UUID of the security group to update the rules on.
	SecurityGroupID string `json:"-"`
	// Rules: list of rules to update in the security group.
	Rules []*SetSecurityGroupRulesRequestRule `json:"rules"`
}

type SetSecurityGroupRulesRequestRule

type SetSecurityGroupRulesRequestRule struct {
	// ID: UUID of the security rule to update. If no value is provided, a new rule will be created.
	ID *string `json:"id"`
	// Action: action to apply when the rule matches a packet.
	// Default value: accept
	Action SecurityGroupRuleAction `json:"action"`
	// Protocol: protocol family this rule applies to.
	// Default value: TCP
	Protocol SecurityGroupRuleProtocol `json:"protocol"`
	// Direction: direction the rule applies to.
	// Default value: inbound
	Direction SecurityGroupRuleDirection `json:"direction"`
	// IPRange: range of IP addresses these rules apply to.
	IPRange scw.IPNet `json:"ip_range"`
	// DestPortFrom: beginning of the range of ports this rule applies to (inclusive). This value will be set to null if protocol is ICMP or ANY.
	DestPortFrom *uint32 `json:"dest_port_from"`
	// DestPortTo: end of the range of ports this rule applies to (inclusive). This value will be set to null if protocol is ICMP or ANY, or if it is equal to dest_port_from.
	DestPortTo *uint32 `json:"dest_port_to"`
	// Position: position of this rule in the security group rules list. If several rules are passed with the same position, the resulting order is undefined.
	Position uint32 `json:"position"`
	// Editable: indicates if this rule is editable. Rules with the value false will be ignored.
	Editable *bool `json:"editable"`
	// Zone: zone of the rule. This field is ignored.
	Zone *scw.Zone `json:"zone"`
}

SetSecurityGroupRulesRequestRule: set security group rules request. rule.

type SetSecurityGroupRulesResponse

type SetSecurityGroupRulesResponse struct {
	Rules []*SecurityGroupRule `json:"rules"`
}

type SetServerUserDataRequest

type SetServerUserDataRequest struct {
	Zone     scw.Zone `json:"-"`
	ServerID string   `json:"-"`

	// Key defines the user data key to set.
	Key string `json:"-"`

	// Content defines the data to set.
	Content io.Reader
}

SetServerUserDataRequest is used by SetServerUserData method.

type Snapshot

type Snapshot struct {
	// ID: snapshot ID.
	ID string `json:"id"`
	// Name: snapshot name.
	Name string `json:"name"`
	// Organization: snapshot Organization ID.
	Organization string `json:"organization"`
	// Project: snapshot Project ID.
	Project string `json:"project"`
	// Tags: snapshot tags.
	Tags []string `json:"tags"`
	// VolumeType: snapshot volume type.
	// Default value: l_ssd
	VolumeType VolumeVolumeType `json:"volume_type"`
	// Size: snapshot size.
	Size scw.Size `json:"size"`
	// State: snapshot state.
	// Default value: available
	State SnapshotState `json:"state"`
	// BaseVolume: volume on which the snapshot is based on.
	BaseVolume *SnapshotBaseVolume `json:"base_volume"`
	// CreationDate: snapshot creation date.
	CreationDate *time.Time `json:"creation_date"`
	// ModificationDate: snapshot modification date.
	ModificationDate *time.Time `json:"modification_date"`
	// Zone: snapshot zone.
	Zone scw.Zone `json:"zone"`
	// ErrorReason: reason for the failed snapshot import.
	ErrorReason *string `json:"error_reason"`
}

Snapshot: snapshot.

type SnapshotBaseVolume

type SnapshotBaseVolume struct {
	// ID: volume ID on which the snapshot is based.
	ID string `json:"id"`
	// Name: volume name on which the snapshot is based on.
	Name string `json:"name"`
}

SnapshotBaseVolume: snapshot. base volume.

type SnapshotState

type SnapshotState string

func (SnapshotState) MarshalJSON

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

func (SnapshotState) String

func (enum SnapshotState) String() string

func (*SnapshotState) UnmarshalJSON

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

type SnapshotVolumeType

type SnapshotVolumeType string

func (SnapshotVolumeType) MarshalJSON

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

func (SnapshotVolumeType) String

func (enum SnapshotVolumeType) String() string

func (*SnapshotVolumeType) UnmarshalJSON

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

type Task

type Task struct {
	// ID: unique ID of the task.
	ID string `json:"id"`
	// Description: description of the task.
	Description string `json:"description"`
	// Progress: progress of the task in percent.
	Progress int32 `json:"progress"`
	// StartedAt: task start date.
	StartedAt *time.Time `json:"started_at"`
	// TerminatedAt: task end date.
	TerminatedAt *time.Time `json:"terminated_at"`
	// Status: task status.
	// Default value: pending
	Status TaskStatus `json:"status"`

	HrefFrom string `json:"href_from"`

	HrefResult string `json:"href_result"`
	// Zone: zone in which the task is excecuted.
	Zone scw.Zone `json:"zone"`
}

Task: task.

type TaskStatus

type TaskStatus string

func (TaskStatus) MarshalJSON

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

func (TaskStatus) String

func (enum TaskStatus) String() string

func (*TaskStatus) UnmarshalJSON

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

type UpdateIPRequest

type UpdateIPRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// IP: IP ID or IP address.
	IP string `json:"-"`
	// Reverse: reverse domain name.
	Reverse *NullableStringValue `json:"reverse,omitempty"`
	// Type: convert a 'nat' IP to a 'routed_ipv4'.
	// Default value: unknown_iptype
	Type IPType `json:"type"`
	// Tags: an array of keywords you want to tag this IP with.
	Tags *[]string `json:"tags,omitempty"`

	Server *NullableStringValue `json:"server,omitempty"`
}

type UpdateIPResponse

type UpdateIPResponse struct {
	IP *IP `json:"ip"`
}

type UpdateImageRequest

type UpdateImageRequest struct {
	Zone             scw.Zone                   `json:"zone"`
	ImageID          string                     `json:"id"`
	Name             *string                    `json:"name,omitempty"`
	Arch             Arch                       `json:"arch,omitempty"`
	CreationDate     *time.Time                 `json:"creation_date"`
	ModificationDate *time.Time                 `json:"modification_date"`
	ExtraVolumes     map[string]*VolumeTemplate `json:"extra_volumes"`
	FromServer       string                     `json:"from_server,omitempty"`
	Organization     string                     `json:"organization"`
	Public           bool                       `json:"public"`
	RootVolume       *VolumeSummary             `json:"root_volume,omitempty"`
	State            ImageState                 `json:"state"`
	Project          string                     `json:"project"`
	Tags             *[]string                  `json:"tags,omitempty"`
}

type UpdateImageResponse

type UpdateImageResponse struct {
	Image *Image
}

type UpdatePlacementGroupRequest

type UpdatePlacementGroupRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// PlacementGroupID: UUID of the placement group.
	PlacementGroupID string `json:"-"`
	// Name: name of the placement group.
	Name *string `json:"name,omitempty"`
	// Tags: tags of the placement group.
	Tags *[]string `json:"tags,omitempty"`
	// PolicyMode: operating mode of the placement group.
	// Default value: optional
	PolicyMode *PlacementGroupPolicyMode `json:"policy_mode,omitempty"`
	// PolicyType: policy type of the placement group.
	// Default value: max_availability
	PolicyType *PlacementGroupPolicyType `json:"policy_type,omitempty"`
}

type UpdatePlacementGroupResponse

type UpdatePlacementGroupResponse struct {
	PlacementGroup *PlacementGroup `json:"placement_group"`
}

type UpdatePlacementGroupServersRequest

type UpdatePlacementGroupServersRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// PlacementGroupID: UUID of the placement group you want to update.
	PlacementGroupID string `json:"-"`
	// Servers: an array of the Instances' UUIDs you want to configure.
	Servers []string `json:"servers,omitempty"`
}

type UpdatePlacementGroupServersResponse

type UpdatePlacementGroupServersResponse struct {
	// Servers: instances attached to the placement group.
	Servers []*PlacementGroupServer `json:"servers"`
}

UpdatePlacementGroupServersResponse: update placement group servers response.

type UpdatePrivateNICRequest

type UpdatePrivateNICRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// ServerID: UUID of the Instance the private NIC will be attached to.
	ServerID string `json:"-"`
	// PrivateNicID: private NIC unique ID.
	PrivateNicID string `json:"-"`
	// Tags: tags used to select private NIC/s.
	Tags *[]string `json:"tags,omitempty"`
}

type UpdateSecurityGroupRequest

type UpdateSecurityGroupRequest struct {
	Zone            scw.Zone `json:"-"`
	SecurityGroupID string   `json:"-"`

	Name                  *string              `json:"name,omitempty"`
	Description           *string              `json:"description,omitempty"`
	InboundDefaultPolicy  *SecurityGroupPolicy `json:"inbound_default_policy,omitempty"`
	OutboundDefaultPolicy *SecurityGroupPolicy `json:"outbound_default_policy,omitempty"`
	Stateful              *bool                `json:"stateful,omitempty"`
	OrganizationDefault   *bool                `json:"organization_default,omitempty"`
	ProjectDefault        *bool                `json:"project_default,omitempty"`
	EnableDefaultSecurity *bool                `json:"enable_default_security,omitempty"`
	Tags                  *[]string            `json:"tags,omitempty"`
}

UpdateSecurityGroupRequest contains the parameters to update a security group

type UpdateSecurityGroupResponse

type UpdateSecurityGroupResponse struct {
	SecurityGroup *SecurityGroup
}

type UpdateSecurityGroupRuleRequest

type UpdateSecurityGroupRuleRequest struct {
	Zone                scw.Zone `json:"-"`
	SecurityGroupID     string   `json:"-"`
	SecurityGroupRuleID string   `json:"-"`

	Protocol  *SecurityGroupRuleProtocol  `json:"protocol"`
	Direction *SecurityGroupRuleDirection `json:"direction"`
	Action    *SecurityGroupRuleAction    `json:"action"`
	IPRange   *scw.IPNet                  `json:"ip_range"`
	Position  *uint32                     `json:"position"`

	// If set to 0, DestPortFrom will be removed.
	// See SecurityGroupRule.DestPortFrom for more information
	DestPortFrom *uint32 `json:"dest_port_from"`

	// If set to 0, DestPortTo will be removed.
	// See SecurityGroupRule.DestPortTo for more information
	DestPortTo *uint32 `json:"dest_port_to"`
}

UpdateSecurityGroupRuleRequest contains the parameters to update a security group rule

type UpdateSecurityGroupRuleResponse

type UpdateSecurityGroupRuleResponse struct {
	Rule *SecurityGroupRule `json:"security_rule"`
}

type UpdateServerRequest

type UpdateServerRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// ServerID: UUID of the Instance.
	ServerID string `json:"-"`
	// Name: name of the Instance.
	Name *string `json:"name,omitempty"`
	// BootType: default value: local
	BootType *BootType `json:"boot_type,omitempty"`
	// Tags: tags of the Instance.
	Tags *[]string `json:"tags,omitempty"`

	Volumes *map[string]*VolumeServerTemplate `json:"volumes,omitempty"`
	// Deprecated
	Bootscript *string `json:"bootscript,omitempty"`

	DynamicIPRequired *bool `json:"dynamic_ip_required,omitempty"`
	// RoutedIPEnabled: true to configure the instance so it uses the new routed IP mode (once this is set to True you cannot set it back to False).
	RoutedIPEnabled *bool `json:"routed_ip_enabled,omitempty"`

	PublicIPs []*ServerIP `json:"public_ips,omitempty"`

	EnableIPv6 *bool `json:"enable_ipv6,omitempty"`

	Protected *bool `json:"protected,omitempty"`

	SecurityGroup *SecurityGroupTemplate `json:"security_group,omitempty"`
	// PlacementGroup: placement group ID if Instance must be part of a placement group.
	PlacementGroup *NullableStringValue `json:"placement_group,omitempty"`
	// PrivateNics: instance private NICs.
	PrivateNics []*PrivateNIC `json:"private_nics,omitempty"`
}

type UpdateServerResponse

type UpdateServerResponse struct {
	Server *Server `json:"server"`
}

type UpdateSnapshotRequest

type UpdateSnapshotRequest struct {
	Zone       scw.Zone
	SnapshotID string
	Name       *string   `json:"name,omitempty"`
	Tags       *[]string `json:"tags,omitempty"`
}

type UpdateSnapshotResponse

type UpdateSnapshotResponse struct {
	Snapshot *Snapshot
}

type UpdateVolumeRequest

type UpdateVolumeRequest struct {
	// Zone: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"-"`
	// VolumeID: UUID of the volume.
	VolumeID string `json:"-"`
	// Name: volume name.
	Name *string `json:"name,omitempty"`
	// Tags: tags of the volume.
	Tags *[]string `json:"tags,omitempty"`
	// Size: volume disk size, must be a multiple of 512.
	Size *scw.Size `json:"size,omitempty"`
}

type UpdateVolumeResponse

type UpdateVolumeResponse struct {
	Volume *Volume `json:"volume"`
}

type UserData

type UserData struct {
	UserData []string `json:"user_data,omitempty"`
}

UserData represents the user data

type Volume

type Volume struct {
	// ID: volume unique ID.
	ID string `json:"id"`
	// Name: volume name.
	Name string `json:"name"`
	// Deprecated: ExportURI: show the volume NBD export URI.
	ExportURI *string `json:"export_uri"`
	// Size: volume disk size.
	Size scw.Size `json:"size"`
	// VolumeType: volume type.
	// Default value: l_ssd
	VolumeType VolumeVolumeType `json:"volume_type"`
	// CreationDate: volume creation date.
	CreationDate *time.Time `json:"creation_date"`
	// ModificationDate: volume modification date.
	ModificationDate *time.Time `json:"modification_date"`
	// Organization: volume Organization ID.
	Organization string `json:"organization"`
	// Project: volume Project ID.
	Project string `json:"project"`
	// Tags: volume tags.
	Tags []string `json:"tags"`
	// Server: instance attached to the volume.
	Server *ServerSummary `json:"server"`
	// State: volume state.
	// Default value: available
	State VolumeState `json:"state"`
	// Zone: zone in which the volume is located.
	Zone scw.Zone `json:"zone"`
}

Volume: volume.

type VolumeServer

type VolumeServer struct {
	ID string `json:"id"`

	Name string `json:"name"`

	ExportURI string `json:"export_uri"`

	Organization string `json:"organization"`

	Server *ServerSummary `json:"server"`

	Size scw.Size `json:"size"`
	// VolumeType: default value: l_ssd
	VolumeType VolumeServerVolumeType `json:"volume_type"`

	CreationDate *time.Time `json:"creation_date"`

	ModificationDate *time.Time `json:"modification_date"`
	// State: default value: available
	State VolumeServerState `json:"state"`

	Project string `json:"project"`

	Boot bool `json:"boot"`

	Zone scw.Zone `json:"zone"`
}

type VolumeServerState

type VolumeServerState string

func (VolumeServerState) MarshalJSON

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

func (VolumeServerState) String

func (enum VolumeServerState) String() string

func (*VolumeServerState) UnmarshalJSON

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

type VolumeServerTemplate

type VolumeServerTemplate struct {
	// ID: UUID of the volume.
	ID *string `json:"id,omitempty"`
	// Boot: force the Instance to boot on this volume.
	// Default value: false
	Boot *bool `json:"boot,omitempty"`
	// Name: name of the volume.
	Name *string `json:"name,omitempty"`
	// Size: disk size of the volume, must be a multiple of 512.
	Size *scw.Size `json:"size,omitempty"`
	// VolumeType: type of the volume.
	// Default value: l_ssd
	VolumeType VolumeVolumeType `json:"volume_type,omitempty"`
	// BaseSnapshot: ID of the snapshot on which this volume will be based.
	BaseSnapshot *string `json:"base_snapshot,omitempty"`
	// Organization: organization ID of the volume.
	Organization *string `json:"organization,omitempty"`
	// Project: project ID of the volume.
	Project *string `json:"project,omitempty"`
}

VolumeServerTemplate: volume server template.

type VolumeServerVolumeType

type VolumeServerVolumeType string

func (VolumeServerVolumeType) MarshalJSON

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

func (VolumeServerVolumeType) String

func (enum VolumeServerVolumeType) String() string

func (*VolumeServerVolumeType) UnmarshalJSON

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

type VolumeState

type VolumeState string

func (VolumeState) MarshalJSON

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

func (VolumeState) String

func (enum VolumeState) String() string

func (*VolumeState) UnmarshalJSON

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

type VolumeSummary

type VolumeSummary struct {
	ID string `json:"id"`

	Name string `json:"name"`

	Size scw.Size `json:"size"`
	// VolumeType: default value: l_ssd
	VolumeType VolumeVolumeType `json:"volume_type"`
}

type VolumeTemplate

type VolumeTemplate struct {
	// ID: UUID of the volume.
	ID string `json:"id,omitempty"`
	// Name: name of the volume.
	Name string `json:"name,omitempty"`
	// Size: disk size of the volume, must be a multiple of 512.
	Size scw.Size `json:"size,omitempty"`
	// VolumeType: type of the volume.
	// Default value: l_ssd
	VolumeType VolumeVolumeType `json:"volume_type,omitempty"`
	// Deprecated: Organization: organization ID of the volume.
	// Precisely one of Organization, Project must be set.
	Organization *string `json:"organization,omitempty"`
	// Project: project ID of the volume.
	// Precisely one of Organization, Project must be set.
	Project *string `json:"project,omitempty"`
}

VolumeTemplate: volume template.

type VolumeType

type VolumeType struct {
	DisplayName string `json:"display_name"`

	Capabilities *VolumeTypeCapabilities `json:"capabilities"`

	Constraints *VolumeTypeConstraints `json:"constraints"`
}

type VolumeTypeCapabilities

type VolumeTypeCapabilities struct {
	Snapshot bool `json:"snapshot"`
}

type VolumeTypeConstraints

type VolumeTypeConstraints struct {
	Min scw.Size `json:"min"`

	Max scw.Size `json:"max"`
}

type VolumeVolumeType

type VolumeVolumeType string

func (VolumeVolumeType) MarshalJSON

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

func (VolumeVolumeType) String

func (enum VolumeVolumeType) String() string

func (*VolumeVolumeType) UnmarshalJSON

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

type WaitForImageRequest

type WaitForImageRequest struct {
	ImageID       string
	Zone          scw.Zone
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

WaitForImageRequest is used by WaitForImage method.

type WaitForMACAddressRequest

type WaitForMACAddressRequest struct {
	ServerID      string
	PrivateNicID  string
	Zone          scw.Zone
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

WaitForMACAddressRequest is used by WaitForMACAddress method.

type WaitForPrivateNICRequest

type WaitForPrivateNICRequest struct {
	ServerID      string
	PrivateNicID  string
	Zone          scw.Zone
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

WaitForPrivateNICRequest is used by WaitForPrivateNIC method.

type WaitForServerRequest

type WaitForServerRequest struct {
	ServerID      string
	Zone          scw.Zone
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

WaitForServerRequest is used by WaitForServer method.

type WaitForSnapshotRequest

type WaitForSnapshotRequest struct {
	SnapshotID    string
	Zone          scw.Zone
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

WaitForImageRequest is used by WaitForImage method.

type WaitForVolumeRequest

type WaitForVolumeRequest struct {
	VolumeID      string
	Zone          scw.Zone
	Timeout       *time.Duration
	RetryInterval *time.Duration
}

WaitForImageRequest is used by WaitForImage method.

Jump to

Keyboard shortcuts

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