instance

package
v1.0.0-beta.26 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 23 Imported by: 45

Documentation

Overview

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

Index

Constants

View Source
const (
	ArchUnknownArch = Arch("unknown_arch")
	ArchX86_64      = Arch("x86_64")
	ArchArm         = Arch("arm")
	ArchArm64       = Arch("arm64")
)
View Source
const (
	AttachServerVolumeRequestVolumeTypeUnknownVolumeType = AttachServerVolumeRequestVolumeType("unknown_volume_type")
	AttachServerVolumeRequestVolumeTypeLSSD              = AttachServerVolumeRequestVolumeType("l_ssd")
	AttachServerVolumeRequestVolumeTypeBSSD              = AttachServerVolumeRequestVolumeType("b_ssd")
	AttachServerVolumeRequestVolumeTypeSbsVolume         = AttachServerVolumeRequestVolumeType("sbs_volume")
)
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 (
	SecurityGroupPolicyUnknownPolicy = SecurityGroupPolicy("unknown_policy")
	SecurityGroupPolicyAccept        = SecurityGroupPolicy("accept")
	SecurityGroupPolicyDrop          = SecurityGroupPolicy("drop")
)
View Source
const (
	SecurityGroupRuleActionUnknownAction = SecurityGroupRuleAction("unknown_action")
	SecurityGroupRuleActionAccept        = SecurityGroupRuleAction("accept")
	SecurityGroupRuleActionDrop          = SecurityGroupRuleAction("drop")
)
View Source
const (
	SecurityGroupRuleDirectionUnknownDirection = SecurityGroupRuleDirection("unknown_direction")
	SecurityGroupRuleDirectionInbound          = SecurityGroupRuleDirection("inbound")
	SecurityGroupRuleDirectionOutbound         = SecurityGroupRuleDirection("outbound")
)
View Source
const (
	SecurityGroupRuleProtocolUnknownProtocol = SecurityGroupRuleProtocol("unknown_protocol")
	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")
	ServerActionEnableRoutedIP = ServerAction("enable_routed_ip")
)
View Source
const (
	ServerIPIPFamilyInet  = ServerIPIPFamily("inet")
	ServerIPIPFamilyInet6 = ServerIPIPFamily("inet6")
)
View Source
const (
	ServerIPProvisioningModeManual = ServerIPProvisioningMode("manual")
	ServerIPProvisioningModeDHCP   = ServerIPProvisioningMode("dhcp")
	ServerIPProvisioningModeSlaac  = ServerIPProvisioningMode("slaac")
)
View Source
const (
	ServerIPStateUnknownState = ServerIPState("unknown_state")
	ServerIPStateDetached     = ServerIPState("detached")
	ServerIPStateAttached     = ServerIPState("attached")
	ServerIPStatePending      = ServerIPState("pending")
	ServerIPStateError        = ServerIPState("error")
)
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")
	VolumeServerStateFetching     = VolumeServerState("fetching")
	VolumeServerStateResizing     = VolumeServerState("resizing")
	VolumeServerStateSaving       = VolumeServerState("saving")
	VolumeServerStateHotsyncing   = VolumeServerState("hotsyncing")
	VolumeServerStateError        = VolumeServerState("error")
)
View Source
const (
	VolumeServerVolumeTypeLSSD      = VolumeServerVolumeType("l_ssd")
	VolumeServerVolumeTypeBSSD      = VolumeServerVolumeType("b_ssd")
	VolumeServerVolumeTypeSbsVolume = VolumeServerVolumeType("sbs_volume")
	VolumeServerVolumeTypeScratch   = VolumeServerVolumeType("scratch")
)
View Source
const (
	VolumeStateAvailable    = VolumeState("available")
	VolumeStateSnapshotting = VolumeState("snapshotting")
	VolumeStateFetching     = VolumeState("fetching")
	VolumeStateResizing     = VolumeState("resizing")
	VolumeStateSaving       = VolumeState("saving")
	VolumeStateHotsyncing   = VolumeState("hotsyncing")
	VolumeStateError        = VolumeState("error")
)
View Source
const (
	VolumeVolumeTypeLSSD        = VolumeVolumeType("l_ssd")
	VolumeVolumeTypeBSSD        = VolumeVolumeType("b_ssd")
	VolumeVolumeTypeUnified     = VolumeVolumeType("unified")
	VolumeVolumeTypeScratch     = VolumeVolumeType("scratch")
	VolumeVolumeTypeSbsVolume   = VolumeVolumeType("sbs_volume")
	VolumeVolumeTypeSbsSnapshot = VolumeVolumeType("sbs_snapshot")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

Instance API.

func NewAPI

func NewAPI(client *scw.Client) *API

NewAPI returns a API object from a Scaleway client.

func (*API) ApplyBlockMigration

func (s *API) ApplyBlockMigration(req *ApplyBlockMigrationRequest, opts ...scw.RequestOption) error

ApplyBlockMigration: To be used, this RPC must be preceded by a call to PlanBlockMigration. To migrate all resources mentioned in the MigrationPlan, the validation_key returned in the MigrationPlan must be provided.

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) AttachServerVolume

func (s *API) AttachServerVolume(req *AttachServerVolumeRequest, opts ...scw.RequestOption) (*AttachServerVolumeResponse, error)

AttachServerVolume:

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 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 from the specified snapshot ID.

func (*API) CreatePlacementGroup

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

CreatePlacementGroup: 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 with a specified name and description.

func (*API) CreateSecurityGroupRule

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

CreateSecurityGroupRule: 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 in a specified Availability Zone.

func (*API) CreateVolume

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

CreateVolume: 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 the IP with the specified ID.

func (*API) DeleteImage

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

DeleteImage: 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 with the specified ID.

func (*API) DeleteSecurityGroupRule

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

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

func (*API) DeleteServer

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

DeleteServer: Delete the Instance with the specified ID.

func (*API) DeleteServerUserData

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

DeleteServerUserData: 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 the snapshot with the specified ID.

func (*API) DeleteVolume

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

DeleteVolume: 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) DetachServerVolume

func (s *API) DetachServerVolume(req *DetachServerVolumeRequest, opts ...scw.RequestOption) (*DetachServerVolumeResponse, error)

DetachServerVolume:

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 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 details of a bootscript with the specified ID.

func (*API) GetDashboard

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

GetDashboard:

func (*API) GetIP

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

GetIP: 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 details of an image with the specified ID.

func (*API) GetPlacementGroup

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

GetPlacementGroup: Get the specified placement group.

func (*API) GetPlacementGroupServers

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

GetPlacementGroupServers: 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 private NIC properties.

func (*API) GetSecurityGroup

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

GetSecurityGroup: 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 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 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 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 details of a snapshot with the specified ID.

func (*API) GetVolume

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

GetVolume: 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: 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 in a specified zone.

func (*API) ListImages

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

ListImages: List all existing Instance images.

func (*API) ListPlacementGroups

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

ListPlacementGroups: 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 of a specified Instance.

func (*API) ListSecurityGroupRules

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

ListSecurityGroupRules: 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 all existing security groups.

func (*API) ListServerActions

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

ListServerActions: 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 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 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 available Instance types and their technical details.

func (*API) ListSnapshots

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

ListSnapshots: 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 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 all volume types and their technical details.

func (*API) PlanBlockMigration

func (s *API) PlanBlockMigration(req *PlanBlockMigrationRequest, opts ...scw.RequestOption) (*MigrationPlan, error)

PlanBlockMigration: Given a volume or snapshot, returns the migration plan for a call to the RPC ApplyBlockMigration. This plan will include zero or one volume, and zero or more snapshots, which will need to be migrated together. This RPC does not perform the actual migration itself, ApplyBlockMigration must be used. The validation_key value returned by this call must be provided to the ApplyBlockMigration call to confirm that all resources listed in the plan should be migrated.

func (*API) ServerAction

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

ServerAction: 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 all parameters of the specified placement group.

func (*API) SetPlacementGroupServers

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

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

func (*API) SetSecurityGroupRules

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

SetSecurityGroupRules: 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 in the specified zone with the specified ID.

func (*API) UpdateImage

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

UpdateImage: Update the properties of an image.

func (*API) UpdatePlacementGroup

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

UpdatePlacementGroup: 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 all Instances belonging to the specified placement group.

func (*API) UpdatePrivateNIC

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

UpdatePrivateNIC: 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: Update the properties of security group.

func (*API) UpdateSecurityGroupRule

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

UpdateSecurityGroupRule: Update the properties of a rule from a specified 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)

UpdateSnapshot: Update the properties of a snapshot.

func (*API) UpdateVolume

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

UpdateVolume: 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

type ApplyBlockMigrationRequest

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

	// VolumeID: the volume to migrate, along with potentially other resources, according to the migration plan generated with a call to PlanBlockMigration.
	// Precisely one of VolumeID, SnapshotID must be set.
	VolumeID *string `json:"volume_id,omitempty"`

	// SnapshotID: the snapshot to migrate, along with potentially other resources, according to the migration plan generated with a call to PlanBlockMigration.
	// Precisely one of VolumeID, SnapshotID must be set.
	SnapshotID *string `json:"snapshot_id,omitempty"`

	// ValidationKey: a value to be retrieved from a call to PlanBlockMigration, to confirm that the volume and/or snapshots specified in said plan should be migrated.
	ValidationKey string `json:"validation_key,omitempty"`
}

ApplyBlockMigrationRequest: apply block migration request.

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 AttachServerVolumeRequest

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

	ServerID string `json:"-"`

	VolumeID string `json:"volume_id,omitempty"`

	// VolumeType: default value: unknown_volume_type
	VolumeType AttachServerVolumeRequestVolumeType `json:"volume_type,omitempty"`

	Boot *bool `json:"boot,omitempty"`
}

AttachServerVolumeRequest: attach server volume request.

type AttachServerVolumeRequestVolumeType

type AttachServerVolumeRequestVolumeType string

func (AttachServerVolumeRequestVolumeType) MarshalJSON

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

func (AttachServerVolumeRequestVolumeType) String

func (*AttachServerVolumeRequestVolumeType) UnmarshalJSON

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

type AttachServerVolumeResponse

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

AttachServerVolumeResponse: attach server volume response.

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: unknown_arch
	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 Project, Organization must be set.
	Organization *string `json:"organization,omitempty"`

	// Project: project ID in which the IP is reserved.
	// Precisely one of Project, Organization 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,omitempty"`
}

CreateIPRequest: create ip request.

type CreateIPResponse

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

CreateIPResponse: create ip response.

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: unknown_arch
	Arch Arch `json:"arch,omitempty"`

	// 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 Project, Organization must be set.
	Organization *string `json:"organization,omitempty"`

	// Project: project ID of the image.
	// Precisely one of Project, Organization 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"`
}

CreateImageRequest: create image request.

type CreateImageResponse

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

CreateImageResponse: create image response.

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 Project, Organization must be set.
	Organization *string `json:"organization,omitempty"`

	// Project: project ID of the placement group.
	// Precisely one of Project, Organization 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,omitempty"`

	// PolicyType: policy type of the placement group.
	// Default value: max_availability
	PolicyType PlacementGroupPolicyType `json:"policy_type,omitempty"`
}

CreatePlacementGroupRequest: create placement group request.

type CreatePlacementGroupResponse

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

CreatePlacementGroupResponse: create placement group response.

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

CreatePrivateNICRequest: create private nic request.

type CreatePrivateNICResponse

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

CreatePrivateNICResponse: create private nic response.

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 Project, Organization must be set.
	Organization *string `json:"organization,omitempty"`

	// Project: project ID the security group belong to.
	// Precisely one of Project, Organization 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.
	// 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.
	// Precisely one of OrganizationDefault, ProjectDefault must be set.
	ProjectDefault *bool `json:"project_default,omitempty"`

	// Stateful: whether the security group is stateful or not.
	Stateful bool `json:"stateful,omitempty"`

	// InboundDefaultPolicy: default policy for inbound rules.
	// Default value: unknown_policy
	InboundDefaultPolicy SecurityGroupPolicy `json:"inbound_default_policy,omitempty"`

	// OutboundDefaultPolicy: default policy for outbound rules.
	// Default value: unknown_policy
	OutboundDefaultPolicy SecurityGroupPolicy `json:"outbound_default_policy,omitempty"`

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

CreateSecurityGroupRequest: create security group request.

type CreateSecurityGroupResponse

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

CreateSecurityGroupResponse: create security group response.

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: unknown_protocol
	Protocol SecurityGroupRuleProtocol `json:"protocol,omitempty"`

	// Direction: default value: unknown_direction
	Direction SecurityGroupRuleDirection `json:"direction,omitempty"`

	// Action: default value: unknown_action
	Action SecurityGroupRuleAction `json:"action,omitempty"`

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

CreateSecurityGroupRuleRequest: create security group rule request.

type CreateSecurityGroupRuleResponse

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

CreateSecurityGroupRuleResponse: create security group rule response.

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 Project, Organization must be set.
	Organization *string `json:"organization,omitempty"`

	// Project: instance Project ID.
	// Precisely one of Project, Organization 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"`
}

CreateServerRequest: create server request.

type CreateServerResponse

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

CreateServerResponse: create server response.

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 Project, Organization must be set.
	Organization *string `json:"organization,omitempty"`

	// Project: project ID of the snapshot.
	// Precisely one of Project, Organization must be set.
	Project *string `json:"project,omitempty"`

	// VolumeType: 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,omitempty"`

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

CreateSnapshotRequest: create snapshot request.

type CreateSnapshotResponse

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

	Task *Task `json:"task"`
}

CreateSnapshotResponse: create snapshot response.

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 Project, Organization must be set.
	Organization *string `json:"organization,omitempty"`

	// Project: volume Project ID.
	// Precisely one of Project, Organization 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,omitempty"`

	// Size: volume disk size, must be a multiple of 512.
	// Precisely one of Size, BaseSnapshot must be set.
	Size *scw.Size `json:"size,omitempty"`

	// BaseSnapshot: ID of the snapshot on which this volume will be based.
	// Precisely one of Size, BaseSnapshot must be set.
	BaseSnapshot *string `json:"base_snapshot,omitempty"`
}

CreateVolumeRequest: create volume request.

type CreateVolumeResponse

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

CreateVolumeResponse: create volume response.

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

Dashboard: dashboard.

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

DeleteIPRequest: delete ip request.

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

DeleteImageRequest: delete image request.

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

DeletePlacementGroupRequest: delete placement group request.

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

DeletePrivateNICRequest: delete private nic request.

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

DeleteSecurityGroupRequest: delete security group request.

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

DeleteSecurityGroupRuleRequest: delete security group rule request.

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

DeleteServerRequest: delete server request.

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

DeleteServerUserDataRequest: delete server user data request.

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

DeleteSnapshotRequest: delete snapshot request.

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

DeleteVolumeRequest: delete volume request.

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 DetachServerVolumeRequest

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

	ServerID string `json:"-"`

	VolumeID string `json:"volume_id,omitempty"`
}

DetachServerVolumeRequest: detach server volume request.

type DetachServerVolumeResponse

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

DetachServerVolumeResponse: detach server volume response.

type DetachVolumeRequest

type DetachVolumeRequest struct {
	Zone     scw.Zone `json:"-"`
	VolumeID string   `json:"-"`
	// IsBlockVolume should be set to true if volume is from block API,
	// can be set to false if volume is from instance API,
	// if left nil both API will be tried
	IsBlockVolume *bool `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"`
}

ExportSnapshotRequest: export snapshot request.

type ExportSnapshotResponse

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

ExportSnapshotResponse: export snapshot response.

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

GetBootscriptRequest: get bootscript request.

type GetBootscriptResponse

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

GetBootscriptResponse: get bootscript response.

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

GetDashboardRequest: get dashboard request.

type GetDashboardResponse

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

GetDashboardResponse: get dashboard response.

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

GetIPRequest: get ip request.

type GetIPResponse

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

GetIPResponse: get ip response.

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

GetImageRequest: get image request.

type GetImageResponse

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

GetImageResponse: get image response.

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

GetPlacementGroupRequest: get placement group request.

type GetPlacementGroupResponse

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

GetPlacementGroupResponse: get placement group response.

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

GetPlacementGroupServersRequest: get placement group servers request.

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

GetPrivateNICRequest: get private nic request.

type GetPrivateNICResponse

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

GetPrivateNICResponse: get private nic response.

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

GetSecurityGroupRequest: get security group request.

type GetSecurityGroupResponse

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

GetSecurityGroupResponse: get security group response.

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

GetSecurityGroupRuleRequest: get security group rule request.

type GetSecurityGroupRuleResponse

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

GetSecurityGroupRuleResponse: get security group rule response.

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

GetServerRequest: get server request.

type GetServerResponse

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

GetServerResponse: get server response.

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.
	PerPage *uint32 `json:"-"`

	// Page: a positive integer to choose the page to return.
	Page *int32 `json:"-"`
}

GetServerTypesAvailabilityRequest: get server types availability request.

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

GetServerTypesAvailabilityResponseAvailability: get server types availability response 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:"-"`
}

GetSnapshotRequest: get snapshot request.

type GetSnapshotResponse

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

GetSnapshotResponse: get snapshot response.

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

GetVolumeRequest: get volume request.

type GetVolumeResponse

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

GetVolumeResponse: get volume response.

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

	IpamID string `json:"ipam_id"`

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

IP: ip.

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: unknown_arch
	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: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"zone"`
}

Image: image.

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

ListBootscriptsRequest: list bootscripts request.

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

ListDefaultSecurityGroupRulesRequest: list default security group rules request.

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.
	PerPage *uint32 `json:"-"`

	// Page: a positive integer to choose the page to return.
	Page *int32 `json:"-"`

	// Type: filter on the IP Mobility IP type (whose value should be either 'nat', 'routed_ipv4' or 'routed_ipv6').
	Type *string `json:"-"`
}

ListIPsRequest: list i ps request.

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 i ps 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:"-"`
}

ListImagesRequest: list images request.

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

ListPlacementGroupsRequest: list placement groups request.

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.
	PerPage *uint32 `json:"-"`

	// Page: a positive integer to choose the page to return.
	Page *int32 `json:"-"`
}

ListPrivateNICsRequest: list private ni cs request.

type ListPrivateNICsResponse

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

	TotalCount uint64 `json:"total_count"`
}

ListPrivateNICsResponse: list private ni cs response.

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.
	PerPage *uint32 `json:"-"`

	// Page: a positive integer to choose the page to return.
	Page *int32 `json:"-"`
}

ListSecurityGroupRulesRequest: list security group rules request.

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.
	PerPage *uint32 `json:"-"`

	// Page: a positive integer to choose the page to return.
	Page *int32 `json:"-"`
}

ListSecurityGroupsRequest: list security groups request.

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

ListServerActionsRequest: list server actions request.

type ListServerActionsResponse

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

ListServerActionsResponse: list server actions response.

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

ListServerUserDataRequest: list server user data request.

type ListServerUserDataResponse

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

ListServerUserDataResponse: list server user data response.

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.
	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:"-"`

	// PrivateNetworks: list Instances from the given Private Networks (use commas to separate them).
	PrivateNetworks []string `json:"-"`

	// PrivateNicMacAddress: list Instances associated with the given private NIC MAC address.
	PrivateNicMacAddress *string `json:"-"`

	// Servers: list Instances from these server ids (use commas to separate them).
	Servers []string `json:"-"`
}

ListServersRequest: list servers request.

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

ListServersTypesRequest: list servers types request.

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: list snapshots only for this Organization ID.
	Organization *string `json:"-"`

	// Project: list snapshots only for this Project ID.
	Project *string `json:"-"`

	// PerPage: number of snapshots returned per page (positive integer lower or equal to 100).
	PerPage *uint32 `json:"-"`

	// Page: page to be returned.
	Page *int32 `json:"-"`

	// Name: list snapshots of the requested name.
	Name *string `json:"-"`

	// Tags: list snapshots that have the requested tag.
	Tags *string `json:"-"`

	// BaseVolumeID: list snapshots originating only from this volume.
	BaseVolumeID *string `json:"-"`
}

ListSnapshotsRequest: list snapshots request.

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

ListVolumesRequest: list volumes request.

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

ListVolumesTypesRequest: list volumes types request.

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.

func (*ListVolumesTypesResponse) UnsafeAppend

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

UnsafeAppend should not be used Internal usage only

func (*ListVolumesTypesResponse) UnsafeGetTotalCount

func (r *ListVolumesTypesResponse) UnsafeGetTotalCount() uint32

UnsafeGetTotalCount should not be used Internal usage only

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 IPv4 only
	PublicIP struct {
		ID               string `json:"id"`
		Address          string `json:"address"`
		Dynamic          bool   `json:"dynamic"`
		Gateway          string `json:"gateway"`
		Netmask          string `json:"netmask"`
		Family           string `json:"family"`
		ProvisioningMode string `json:"provisioning_mode"`
	} `json:"public_ip,omitempty"`
	PublicIpsV4 []MetadataIP `json:"public_ips_v4,omitempty"`
	PublicIpsV6 []MetadataIP `json:"public_ips_v6,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 {
	MetadataURL *string
}

MetadataAPI metadata API

func NewMetadataAPI

func NewMetadataAPI() *MetadataAPI

NewMetadataAPI returns a MetadataAPI object from a Scaleway client.

func (*MetadataAPI) DeleteUserData

func (meta *MetadataAPI) DeleteUserData(key string) error

DeleteUserData deletes the userdata key and the associated value

func (*MetadataAPI) GetMetadata

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

GetMetadata returns the metadata available from the server

func (*MetadataAPI) GetUserData

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

GetUserData returns the value for the given metadata key

func (*MetadataAPI) ListUserData

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

ListUserData returns the metadata available from the server

func (*MetadataAPI) SetUserData

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

SetUserData sets the userdata key with the given value

type MetadataIP

type MetadataIP struct {
	ID               string   `json:"id"`
	Address          string   `json:"address"`
	Dynamic          bool     `json:"dynamic"`
	Gateway          string   `json:"gateway"`
	Netmask          string   `json:"netmask"`
	Family           string   `json:"family"`
	ProvisioningMode string   `json:"provisioning_mode"`
	Tags             []string `json:"tags"`
}

MetadataIP represents all public IPs attached

type MigrationPlan

type MigrationPlan struct {
	// Volume: a volume which will be migrated to SBS together with the snapshots, if present.
	Volume *Volume `json:"volume"`

	// Snapshots: a list of snapshots which will be migrated to SBS together and with the volume, if present.
	Snapshots []*Snapshot `json:"snapshots"`

	// ValidationKey: a value to be passed to ApplyBlockMigrationRequest, to confirm that the execution of the plan is being requested.
	ValidationKey string `json:"validation_key"`
}

MigrationPlan: migration plan.

type NullableStringValue

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

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

NullableStringValue: nullable string value.

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 PlanBlockMigrationRequest

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

	// VolumeID: the volume for which the migration plan will be generated.
	// Precisely one of VolumeID, SnapshotID must be set.
	VolumeID *string `json:"volume_id,omitempty"`

	// SnapshotID: the snapshot for which the migration plan will be generated.
	// Precisely one of VolumeID, SnapshotID must be set.
	SnapshotID *string `json:"snapshot_id,omitempty"`
}

PlanBlockMigrationRequest: plan block migration request.

type PrivateNIC

type PrivateNIC struct {
	// ID: private NIC unique ID.
	ID string `json:"id"`

	// ServerID: instance to which the private NIC is attached.
	ServerID string `json:"server_id"`

	// PrivateNetworkID: private Network the private NIC is attached to.
	PrivateNetworkID string `json:"private_network_id"`

	// MacAddress: private NIC MAC address.
	MacAddress string `json:"mac_address"`

	// State: private NIC state.
	// Default value: available
	State PrivateNICState `json:"state"`

	// Tags: private NIC tags.
	Tags []string `json:"tags"`
}

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: unknown_policy
	InboundDefaultPolicy SecurityGroupPolicy `json:"inbound_default_policy"`

	// OutboundDefaultPolicy: default outbound policy.
	// Default value: unknown_policy
	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"`

	// 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: unknown_protocol
	Protocol SecurityGroupRuleProtocol `json:"protocol"`

	// Direction: default value: unknown_direction
	Direction SecurityGroupRuleDirection `json:"direction"`

	// Action: default value: unknown_action
	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: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"zone"`
}

SecurityGroupRule: security group rule.

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

SecurityGroupSummary: security group summary.

type SecurityGroupTemplate

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

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

SecurityGroupTemplate: security group template.

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

	// 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: unknown_arch
	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,omitempty"`

	// Name: 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.
	// This field should only be specified when performing a backup action.
	Volumes map[string]*ServerActionRequestVolumeBackupTemplate `json:"volumes,omitempty"`
}

ServerActionRequest: server action request.

type ServerActionRequestVolumeBackupTemplate

type ServerActionRequestVolumeBackupTemplate struct {
	// VolumeType: 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"`
}

ServerActionResponse: server action response.

type ServerIP

type ServerIP struct {
	// ID: unique ID of the IP address.
	ID string `json:"id"`

	// Address: instance's public IP-Address.
	Address net.IP `json:"address"`

	// Gateway: gateway's IP address.
	Gateway net.IP `json:"gateway"`

	// Netmask: cIDR netmask.
	Netmask string `json:"netmask"`

	// Family: IP address family (inet or inet6).
	// Default value: inet
	Family ServerIPIPFamily `json:"family"`

	// Dynamic: true if the IP address is dynamic.
	Dynamic bool `json:"dynamic"`

	// ProvisioningMode: information about this address provisioning mode.
	// Default value: manual
	ProvisioningMode ServerIPProvisioningMode `json:"provisioning_mode"`

	// Tags: tags associated with the IP.
	Tags []string `json:"tags"`

	// IpamID: the ip_id of an IPAM ip if the ip is created from IPAM, null if not.
	IpamID string `json:"ipam_id"`

	// State: IP address state.
	// Default value: unknown_state
	State ServerIPState `json:"state"`
}

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 ServerIPState

type ServerIPState string

func (ServerIPState) MarshalJSON

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

func (ServerIPState) String

func (enum ServerIPState) String() string

func (*ServerIPState) UnmarshalJSON

func (enum *ServerIPState) 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 i pv6.

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

ServerLocation: server location.

type ServerMaintenance

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

	StartDate *time.Time `json:"start_date"`
}

ServerMaintenance: server maintenance.

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

ServerSummary: server summary.

type ServerType

type ServerType struct {
	// Deprecated: MonthlyPrice: estimated monthly price, for a 30 days month, in Euro.
	MonthlyPrice *float32 `json:"monthly_price"`

	// 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: unknown_arch
	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"`

	// ScratchStorageMaxSize: maximum available scratch storage.
	ScratchStorageMaxSize *scw.Size `json:"scratch_storage_max_size"`
}

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: unknown_arch
	Arch Arch `json:"arch"`

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

	ModificationDate *time.Time `json:"modification_date,omitempty"`

	// Deprecated
	DefaultBootscript *Bootscript `json:"default_bootscript,omitempty"`

	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,omitempty"`

	// State: default value: available
	State ImageState `json:"state"`

	Project string `json:"project"`

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

SetImageRequest: set image request.

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

SetPlacementGroupRequest: set placement group request.

type SetPlacementGroupResponse

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

SetPlacementGroupResponse: set placement group response.

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

SetPlacementGroupServersRequest: set placement group servers request.

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

SetSecurityGroupRulesRequest: set security group rules request.

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: unknown_action
	Action SecurityGroupRuleAction `json:"action"`

	// Protocol: protocol family this rule applies to.
	// Default value: unknown_protocol
	Protocol SecurityGroupRuleProtocol `json:"protocol"`

	// Direction: direction the rule applies to.
	// Default value: unknown_direction
	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"`
}

SetSecurityGroupRulesResponse: set security group rules response.

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,omitempty"`

	// Tags: an array of keywords you want to tag this IP with.
	Tags *[]string `json:"tags,omitempty"`

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

UpdateIPRequest: update ip request.

type UpdateIPResponse

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

UpdateIPResponse: update ip response.

type UpdateImageRequest

type UpdateImageRequest 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.
	ImageID string `json:"-"`

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

	// Arch: architecture of the image.
	// Default value: unknown_arch
	Arch Arch `json:"arch,omitempty"`

	// ExtraVolumes: additional snapshots of the image, with extra_volumeKey being the position of the snapshot in the image.
	ExtraVolumes map[string]*VolumeImageUpdateTemplate `json:"extra_volumes,omitempty"`

	// Tags: tags of the image.
	Tags *[]string `json:"tags,omitempty"`

	// Public: true to set the image as public.
	Public *bool `json:"public,omitempty"`
}

UpdateImageRequest: update image request.

type UpdateImageResponse

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

UpdateImageResponse: update image response.

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

UpdatePlacementGroupRequest: update placement group request.

type UpdatePlacementGroupResponse

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

UpdatePlacementGroupResponse: update placement group response.

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

UpdatePlacementGroupServersRequest: update placement group servers request.

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

UpdatePrivateNICRequest: update private nic request.

type UpdateSecurityGroupRequest

type UpdateSecurityGroupRequest 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:"-"`

	// Name: name of the security group.
	Name *string `json:"name,omitempty"`

	// Description: description of the security group.
	Description *string `json:"description,omitempty"`

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

	// InboundDefaultPolicy: default inbound policy.
	// Default value: unknown_policy
	InboundDefaultPolicy SecurityGroupPolicy `json:"inbound_default_policy,omitempty"`

	// Tags: tags of the security group.
	Tags *[]string `json:"tags,omitempty"`

	// Deprecated: OrganizationDefault: please use project_default instead.
	OrganizationDefault *bool `json:"organization_default,omitempty"`

	// ProjectDefault: true use this security group for future Instances created in this project.
	ProjectDefault *bool `json:"project_default,omitempty"`

	// OutboundDefaultPolicy: default outbound policy.
	// Default value: unknown_policy
	OutboundDefaultPolicy SecurityGroupPolicy `json:"outbound_default_policy,omitempty"`

	// Stateful: true to set the security group as stateful.
	Stateful *bool `json:"stateful,omitempty"`
}

UpdateSecurityGroupRequest: update security group request.

type UpdateSecurityGroupResponse

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

UpdateSecurityGroupResponse: update security group response.

type UpdateSecurityGroupRuleRequest

type UpdateSecurityGroupRuleRequest 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:"-"`

	// SecurityGroupRuleID: UUID of the rule.
	SecurityGroupRuleID string `json:"-"`

	// Protocol: protocol family this rule applies to.
	// Default value: unknown_protocol
	Protocol SecurityGroupRuleProtocol `json:"protocol,omitempty"`

	// Direction: direction the rule applies to.
	// Default value: unknown_direction
	Direction SecurityGroupRuleDirection `json:"direction,omitempty"`

	// Action: action to apply when the rule matches a packet.
	// Default value: unknown_action
	Action SecurityGroupRuleAction `json:"action,omitempty"`

	// IPRange: range of IP addresses these rules apply to.
	IPRange *scw.IPNet `json:"ip_range,omitempty"`

	// DestPortFrom: beginning of the range of ports this rule applies to (inclusive). If 0 is provided, unset the parameter.
	DestPortFrom *uint32 `json:"dest_port_from,omitempty"`

	// DestPortTo: end of the range of ports this rule applies to (inclusive). If 0 is provided, unset the parameter.
	DestPortTo *uint32 `json:"dest_port_to,omitempty"`

	// Position: position of this rule in the security group rules list.
	Position *uint32 `json:"position,omitempty"`
}

UpdateSecurityGroupRuleRequest: update security group rule request.

type UpdateSecurityGroupRuleResponse

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

UpdateSecurityGroupRuleResponse: update security group rule response.

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: a list of reserved IP IDs to attach to the Instance.
	PublicIPs *[]string `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 *[]string `json:"private_nics,omitempty"`

	// CommercialType: warning: This field has some restrictions:
	// - Cannot be changed if the Instance is not in `stopped` state.
	// - Cannot be changed if the Instance is in a placement group.
	// - Local storage requirements of the target commercial_types must be fulfilled (i.e. if an Instance has 80GB of local storage, it can be changed into a GP1-XS, which has a maximum of 150GB, but it cannot be changed into a DEV1-S, which has only 20GB).
	CommercialType *string `json:"commercial_type,omitempty"`
}

UpdateServerRequest: update server request.

type UpdateServerResponse

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

UpdateServerResponse: update server response.

type UpdateSnapshotRequest

type UpdateSnapshotRequest 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.
	SnapshotID string `json:"-"`

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

	// Tags: tags of the snapshot.
	Tags *[]string `json:"tags,omitempty"`
}

UpdateSnapshotRequest: update snapshot request.

type UpdateSnapshotResponse

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

UpdateSnapshotResponse: update snapshot response.

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

UpdateVolumeRequest: update volume request.

type UpdateVolumeResponse

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

UpdateVolumeResponse: update volume response.

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 VolumeImageUpdateTemplate

type VolumeImageUpdateTemplate struct {
	// ID: UUID of the snapshot.
	ID string `json:"id,omitempty"`
}

VolumeImageUpdateTemplate: volume image update template.

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: zone to target. If none is passed will use default zone from the config.
	Zone scw.Zone `json:"zone"`
}

VolumeServer: volume server.

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

VolumeSummary: volume summary.

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 Project, Organization must be set.
	Organization *string `json:"organization,omitempty"`

	// Project: project ID of the volume.
	// Precisely one of Project, Organization 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"`
}

VolumeType: volume type.

type VolumeTypeCapabilities

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

VolumeTypeCapabilities: volume type capabilities.

type VolumeTypeConstraints

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

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

VolumeTypeConstraints: volume type constraints.

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