Documentation ¶
Overview ¶
Package instance provides methods and message types of the instance v1 API.
Index ¶
- Constants
- type API
- func (s *API) AttachIP(req *AttachIPRequest, opts ...scw.RequestOption) (*AttachIPResponse, error)deprecated
- func (s *API) AttachVolume(req *AttachVolumeRequest, opts ...scw.RequestOption) (*AttachVolumeResponse, error)
- func (s *API) CreateIP(req *CreateIPRequest, opts ...scw.RequestOption) (*CreateIPResponse, error)
- func (s *API) CreateImage(req *CreateImageRequest, opts ...scw.RequestOption) (*CreateImageResponse, error)
- func (s *API) CreatePlacementGroup(req *CreatePlacementGroupRequest, opts ...scw.RequestOption) (*CreatePlacementGroupResponse, error)
- func (s *API) CreatePrivateNIC(req *CreatePrivateNICRequest, opts ...scw.RequestOption) (*CreatePrivateNICResponse, error)
- func (s *API) CreateSecurityGroup(req *CreateSecurityGroupRequest, opts ...scw.RequestOption) (*CreateSecurityGroupResponse, error)
- func (s *API) CreateSecurityGroupRule(req *CreateSecurityGroupRuleRequest, opts ...scw.RequestOption) (*CreateSecurityGroupRuleResponse, error)
- func (s *API) CreateServer(req *CreateServerRequest, opts ...scw.RequestOption) (*CreateServerResponse, error)
- func (s *API) CreateSnapshot(req *CreateSnapshotRequest, opts ...scw.RequestOption) (*CreateSnapshotResponse, error)
- func (s *API) CreateVolume(req *CreateVolumeRequest, opts ...scw.RequestOption) (*CreateVolumeResponse, error)
- func (s *API) DeleteIP(req *DeleteIPRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteImage(req *DeleteImageRequest, opts ...scw.RequestOption) error
- func (s *API) DeletePlacementGroup(req *DeletePlacementGroupRequest, opts ...scw.RequestOption) error
- func (s *API) DeletePrivateNIC(req *DeletePrivateNICRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteSecurityGroup(req *DeleteSecurityGroupRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteSecurityGroupRule(req *DeleteSecurityGroupRuleRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteServer(req *DeleteServerRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteServerUserData(req *DeleteServerUserDataRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteSnapshot(req *DeleteSnapshotRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteVolume(req *DeleteVolumeRequest, opts ...scw.RequestOption) error
- func (s *API) DetachIP(req *DetachIPRequest, opts ...scw.RequestOption) (*DetachIPResponse, error)deprecated
- func (s *API) DetachVolume(req *DetachVolumeRequest, opts ...scw.RequestOption) (*DetachVolumeResponse, error)
- func (s *API) ExportSnapshot(req *ExportSnapshotRequest, opts ...scw.RequestOption) (*ExportSnapshotResponse, error)
- func (s *API) GetAllServerUserData(req *GetAllServerUserDataRequest, opts ...scw.RequestOption) (*GetAllServerUserDataResponse, error)
- func (s *API) GetBootscript(req *GetBootscriptRequest, opts ...scw.RequestOption) (*GetBootscriptResponse, error)
- func (s *API) GetDashboard(req *GetDashboardRequest, opts ...scw.RequestOption) (*GetDashboardResponse, error)
- func (s *API) GetIP(req *GetIPRequest, opts ...scw.RequestOption) (*GetIPResponse, error)
- func (s *API) GetImage(req *GetImageRequest, opts ...scw.RequestOption) (*GetImageResponse, error)
- func (s *API) GetPlacementGroup(req *GetPlacementGroupRequest, opts ...scw.RequestOption) (*GetPlacementGroupResponse, error)
- func (s *API) GetPlacementGroupServers(req *GetPlacementGroupServersRequest, opts ...scw.RequestOption) (*GetPlacementGroupServersResponse, error)
- func (s *API) GetPrivateNIC(req *GetPrivateNICRequest, opts ...scw.RequestOption) (*GetPrivateNICResponse, error)
- func (s *API) GetSecurityGroup(req *GetSecurityGroupRequest, opts ...scw.RequestOption) (*GetSecurityGroupResponse, error)
- func (s *API) GetSecurityGroupRule(req *GetSecurityGroupRuleRequest, opts ...scw.RequestOption) (*GetSecurityGroupRuleResponse, error)
- func (s *API) GetServer(req *GetServerRequest, opts ...scw.RequestOption) (*GetServerResponse, error)
- func (s *API) GetServerType(req *GetServerTypeRequest) (*ServerType, error)
- func (s *API) GetServerTypesAvailability(req *GetServerTypesAvailabilityRequest, opts ...scw.RequestOption) (*GetServerTypesAvailabilityResponse, error)
- func (s *API) GetServerUserData(req *GetServerUserDataRequest, opts ...scw.RequestOption) (io.Reader, error)
- func (s *API) GetSnapshot(req *GetSnapshotRequest, opts ...scw.RequestOption) (*GetSnapshotResponse, error)
- func (s *API) GetVolume(req *GetVolumeRequest, opts ...scw.RequestOption) (*GetVolumeResponse, error)
- func (s *API) ListBootscripts(req *ListBootscriptsRequest, opts ...scw.RequestOption) (*ListBootscriptsResponse, error)
- func (s *API) ListDefaultSecurityGroupRules(req *ListDefaultSecurityGroupRulesRequest, opts ...scw.RequestOption) (*ListSecurityGroupRulesResponse, error)
- func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsResponse, error)
- func (s *API) ListImages(req *ListImagesRequest, opts ...scw.RequestOption) (*ListImagesResponse, error)
- func (s *API) ListPlacementGroups(req *ListPlacementGroupsRequest, opts ...scw.RequestOption) (*ListPlacementGroupsResponse, error)
- func (s *API) ListPrivateNICs(req *ListPrivateNICsRequest, opts ...scw.RequestOption) (*ListPrivateNICsResponse, error)
- func (s *API) ListSecurityGroupRules(req *ListSecurityGroupRulesRequest, opts ...scw.RequestOption) (*ListSecurityGroupRulesResponse, error)
- func (s *API) ListSecurityGroups(req *ListSecurityGroupsRequest, opts ...scw.RequestOption) (*ListSecurityGroupsResponse, error)
- func (s *API) ListServerActions(req *ListServerActionsRequest, opts ...scw.RequestOption) (*ListServerActionsResponse, error)
- func (s *API) ListServerUserData(req *ListServerUserDataRequest, opts ...scw.RequestOption) (*ListServerUserDataResponse, error)
- func (s *API) ListServers(req *ListServersRequest, opts ...scw.RequestOption) (*ListServersResponse, error)
- func (s *API) ListServersTypes(req *ListServersTypesRequest, opts ...scw.RequestOption) (*ListServersTypesResponse, error)
- func (s *API) ListSnapshots(req *ListSnapshotsRequest, opts ...scw.RequestOption) (*ListSnapshotsResponse, error)
- func (s *API) ListVolumes(req *ListVolumesRequest, opts ...scw.RequestOption) (*ListVolumesResponse, error)
- func (s *API) ListVolumesTypes(req *ListVolumesTypesRequest, opts ...scw.RequestOption) (*ListVolumesTypesResponse, error)
- func (s *API) ServerAction(req *ServerActionRequest, opts ...scw.RequestOption) (*ServerActionResponse, error)
- func (s *API) ServerActionAndWait(req *ServerActionAndWaitRequest, opts ...scw.RequestOption) error
- func (s *API) SetAllServerUserData(req *SetAllServerUserDataRequest, opts ...scw.RequestOption) error
- func (s *API) SetPlacementGroup(req *SetPlacementGroupRequest, opts ...scw.RequestOption) (*SetPlacementGroupResponse, error)
- func (s *API) SetPlacementGroupServers(req *SetPlacementGroupServersRequest, opts ...scw.RequestOption) (*SetPlacementGroupServersResponse, error)
- func (s *API) SetSecurityGroupRules(req *SetSecurityGroupRulesRequest, opts ...scw.RequestOption) (*SetSecurityGroupRulesResponse, error)
- func (s *API) SetServerUserData(req *SetServerUserDataRequest, opts ...scw.RequestOption) error
- func (s *API) UpdateIP(req *UpdateIPRequest, opts ...scw.RequestOption) (*UpdateIPResponse, error)
- func (s *API) UpdateImage(req *UpdateImageRequest, opts ...scw.RequestOption) (*UpdateImageResponse, error)
- func (s *API) UpdatePlacementGroup(req *UpdatePlacementGroupRequest, opts ...scw.RequestOption) (*UpdatePlacementGroupResponse, error)
- func (s *API) UpdatePlacementGroupServers(req *UpdatePlacementGroupServersRequest, opts ...scw.RequestOption) (*UpdatePlacementGroupServersResponse, error)
- func (s *API) UpdateSecurityGroup(req *UpdateSecurityGroupRequest, opts ...scw.RequestOption) (*UpdateSecurityGroupResponse, error)
- func (s *API) UpdateSecurityGroupRule(req *UpdateSecurityGroupRuleRequest, opts ...scw.RequestOption) (*UpdateSecurityGroupRuleResponse, error)
- func (s *API) UpdateServer(req *UpdateServerRequest, opts ...scw.RequestOption) (*UpdateServerResponse, error)
- func (s *API) UpdateSnapshot(req *UpdateSnapshotRequest, opts ...scw.RequestOption) (*UpdateSnapshotResponse, error)
- func (s *API) UpdateVolume(req *UpdateVolumeRequest, opts ...scw.RequestOption) (*UpdateVolumeResponse, error)
- func (s *API) WaitForImage(req *WaitForImageRequest, opts ...scw.RequestOption) (*Image, error)
- func (s *API) WaitForMACAddress(req *WaitForMACAddressRequest, opts ...scw.RequestOption) (*PrivateNIC, error)
- func (s *API) WaitForPrivateNIC(req *WaitForPrivateNICRequest, opts ...scw.RequestOption) (*PrivateNIC, error)
- func (s *API) WaitForServer(req *WaitForServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) WaitForSnapshot(req *WaitForSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
- func (s *API) WaitForVolume(req *WaitForVolumeRequest, opts ...scw.RequestOption) (*Volume, error)
- type Arch
- type AttachIPRequestdeprecated
- type AttachIPResponsedeprecated
- type AttachVolumeRequest
- type AttachVolumeResponse
- type BootType
- type Bootscript
- type CreateIPRequest
- type CreateIPResponse
- type CreateImageRequest
- type CreateImageResponse
- type CreatePlacementGroupRequest
- type CreatePlacementGroupResponse
- type CreatePrivateNICRequest
- type CreatePrivateNICResponse
- type CreateSecurityGroupRequest
- type CreateSecurityGroupResponse
- type CreateSecurityGroupRuleRequest
- type CreateSecurityGroupRuleResponse
- type CreateServerRequest
- type CreateServerResponse
- type CreateSnapshotRequest
- type CreateSnapshotResponse
- type CreateVolumeRequest
- type CreateVolumeResponse
- type Dashboard
- type DeleteIPRequest
- type DeleteImageRequest
- type DeletePlacementGroupRequest
- type DeletePrivateNICRequest
- type DeleteSecurityGroupRequest
- type DeleteSecurityGroupRuleRequest
- type DeleteServerRequest
- type DeleteServerUserDataRequest
- type DeleteSnapshotRequest
- type DeleteVolumeRequest
- type DetachIPRequestdeprecated
- type DetachIPResponsedeprecated
- type DetachVolumeRequest
- type DetachVolumeResponse
- type ExportSnapshotRequest
- type ExportSnapshotResponse
- type GetAllServerUserDataRequest
- type GetAllServerUserDataResponse
- type GetBootscriptRequest
- type GetBootscriptResponse
- type GetDashboardRequest
- type GetDashboardResponse
- type GetIPRequest
- type GetIPResponse
- type GetImageRequest
- type GetImageResponse
- type GetPlacementGroupRequest
- type GetPlacementGroupResponse
- type GetPlacementGroupServersRequest
- type GetPlacementGroupServersResponse
- type GetPrivateNICRequest
- type GetPrivateNICResponse
- type GetSecurityGroupRequest
- type GetSecurityGroupResponse
- type GetSecurityGroupRuleRequest
- type GetSecurityGroupRuleResponse
- type GetServerRequest
- type GetServerResponse
- type GetServerTypeRequest
- type GetServerTypesAvailabilityRequest
- type GetServerTypesAvailabilityResponse
- type GetServerTypesAvailabilityResponseAvailability
- type GetServerUserDataRequest
- type GetSnapshotRequest
- type GetSnapshotResponse
- type GetVolumeRequest
- type GetVolumeResponse
- type IP
- type Image
- type ImageState
- type ListBootscriptsRequest
- type ListBootscriptsResponse
- type ListDefaultSecurityGroupRulesRequest
- type ListIPsRequest
- type ListIPsResponse
- type ListImagesRequest
- type ListImagesResponse
- type ListPlacementGroupsRequest
- type ListPlacementGroupsResponse
- type ListPrivateNICsRequest
- type ListPrivateNICsResponse
- type ListSecurityGroupRulesRequest
- type ListSecurityGroupRulesResponse
- type ListSecurityGroupsRequest
- type ListSecurityGroupsResponse
- type ListServerActionsRequest
- type ListServerActionsResponse
- type ListServerUserDataRequest
- type ListServerUserDataResponse
- type ListServersRequest
- type ListServersRequestOrder
- type ListServersResponse
- type ListServersTypesRequest
- type ListServersTypesResponse
- type ListSnapshotsRequest
- type ListSnapshotsResponse
- type ListVolumesRequest
- type ListVolumesResponse
- type ListVolumesTypesRequest
- type ListVolumesTypesResponse
- type Metadata
- type MetadataAPI
- type NullableStringValue
- type PlacementGroup
- type PlacementGroupPolicyMode
- type PlacementGroupPolicyType
- type PlacementGroupServer
- type PrivateNIC
- type PrivateNICState
- type SecurityGroup
- type SecurityGroupPolicy
- type SecurityGroupRule
- type SecurityGroupRuleAction
- type SecurityGroupRuleDirection
- type SecurityGroupRuleProtocol
- type SecurityGroupState
- type SecurityGroupSummary
- type SecurityGroupTemplate
- type Server
- type ServerAction
- type ServerActionAndWaitRequest
- type ServerActionRequest
- type ServerActionRequestVolumeBackupTemplate
- type ServerActionResponse
- type ServerIP
- type ServerIPv6
- type ServerLocation
- type ServerMaintenance
- type ServerState
- type ServerSummary
- type ServerType
- type ServerTypeCapabilities
- type ServerTypeNetwork
- type ServerTypeNetworkInterface
- type ServerTypeVolumeConstraintSizes
- type ServerTypeVolumeConstraintsByType
- type ServerTypesAvailability
- type SetAllServerUserDataRequest
- type SetImageRequest
- type SetPlacementGroupRequest
- type SetPlacementGroupResponse
- type SetPlacementGroupServersRequest
- type SetPlacementGroupServersResponse
- type SetSecurityGroupRulesRequest
- type SetSecurityGroupRulesRequestRule
- type SetSecurityGroupRulesResponse
- type SetServerUserDataRequest
- type Snapshot
- type SnapshotBaseVolume
- type SnapshotState
- type SnapshotVolumeType
- type Task
- type TaskStatus
- type UpdateIPRequest
- type UpdateIPResponse
- type UpdateImageRequest
- type UpdateImageResponse
- type UpdatePlacementGroupRequest
- type UpdatePlacementGroupResponse
- type UpdatePlacementGroupServersRequest
- type UpdatePlacementGroupServersResponse
- type UpdateSecurityGroupRequest
- type UpdateSecurityGroupResponse
- type UpdateSecurityGroupRuleRequest
- type UpdateSecurityGroupRuleResponse
- type UpdateServerRequest
- type UpdateServerResponse
- type UpdateSnapshotRequest
- type UpdateSnapshotResponse
- type UpdateVolumeRequest
- type UpdateVolumeResponse
- type UserData
- type Volume
- type VolumeServer
- type VolumeServerState
- type VolumeServerTemplate
- type VolumeServerVolumeType
- type VolumeState
- type VolumeSummary
- type VolumeTemplate
- type VolumeType
- type VolumeTypeCapabilities
- type VolumeTypeConstraints
- type VolumeVolumeType
- type WaitForImageRequest
- type WaitForMACAddressRequest
- type WaitForPrivateNICRequest
- type WaitForServerRequest
- type WaitForSnapshotRequest
- type WaitForVolumeRequest
Constants ¶
const ( // ArchX86_64 is [insert doc]. ArchX86_64 = Arch("x86_64") // ArchArm is [insert doc]. ArchArm = Arch("arm") )
const ( // BootTypeLocal is [insert doc]. BootTypeLocal = BootType("local") // BootTypeBootscript is [insert doc]. BootTypeBootscript = BootType("bootscript") // BootTypeRescue is [insert doc]. BootTypeRescue = BootType("rescue") )
const ( // ImageStateAvailable is [insert doc]. ImageStateAvailable = ImageState("available") // ImageStateCreating is [insert doc]. ImageStateCreating = ImageState("creating") // ImageStateError is [insert doc]. ImageStateError = ImageState("error") )
const ( // ListServersRequestOrderCreationDateDesc is [insert doc]. ListServersRequestOrderCreationDateDesc = ListServersRequestOrder("creation_date_desc") // ListServersRequestOrderCreationDateAsc is [insert doc]. ListServersRequestOrderCreationDateAsc = ListServersRequestOrder("creation_date_asc") // ListServersRequestOrderModificationDateDesc is [insert doc]. ListServersRequestOrderModificationDateDesc = ListServersRequestOrder("modification_date_desc") // ListServersRequestOrderModificationDateAsc is [insert doc]. ListServersRequestOrderModificationDateAsc = ListServersRequestOrder("modification_date_asc") )
const ( // PlacementGroupPolicyModeOptional is [insert doc]. PlacementGroupPolicyModeOptional = PlacementGroupPolicyMode("optional") // PlacementGroupPolicyModeEnforced is [insert doc]. PlacementGroupPolicyModeEnforced = PlacementGroupPolicyMode("enforced") )
const ( // PlacementGroupPolicyTypeMaxAvailability is [insert doc]. PlacementGroupPolicyTypeMaxAvailability = PlacementGroupPolicyType("max_availability") // PlacementGroupPolicyTypeLowLatency is [insert doc]. PlacementGroupPolicyTypeLowLatency = PlacementGroupPolicyType("low_latency") )
const ( // PrivateNICStateAvailable is [insert doc]. PrivateNICStateAvailable = PrivateNICState("available") // PrivateNICStateSyncing is [insert doc]. PrivateNICStateSyncing = PrivateNICState("syncing") // PrivateNICStateSyncingError is [insert doc]. PrivateNICStateSyncingError = PrivateNICState("syncing_error") )
const ( // SecurityGroupPolicyAccept is [insert doc]. SecurityGroupPolicyAccept = SecurityGroupPolicy("accept") // SecurityGroupPolicyDrop is [insert doc]. SecurityGroupPolicyDrop = SecurityGroupPolicy("drop") )
const ( // SecurityGroupRuleActionAccept is [insert doc]. SecurityGroupRuleActionAccept = SecurityGroupRuleAction("accept") // SecurityGroupRuleActionDrop is [insert doc]. SecurityGroupRuleActionDrop = SecurityGroupRuleAction("drop") )
const ( // SecurityGroupRuleDirectionInbound is [insert doc]. SecurityGroupRuleDirectionInbound = SecurityGroupRuleDirection("inbound") // SecurityGroupRuleDirectionOutbound is [insert doc]. SecurityGroupRuleDirectionOutbound = SecurityGroupRuleDirection("outbound") )
const ( // SecurityGroupRuleProtocolTCP is [insert doc]. SecurityGroupRuleProtocolTCP = SecurityGroupRuleProtocol("TCP") // SecurityGroupRuleProtocolUDP is [insert doc]. SecurityGroupRuleProtocolUDP = SecurityGroupRuleProtocol("UDP") // SecurityGroupRuleProtocolICMP is [insert doc]. SecurityGroupRuleProtocolICMP = SecurityGroupRuleProtocol("ICMP") // SecurityGroupRuleProtocolANY is [insert doc]. SecurityGroupRuleProtocolANY = SecurityGroupRuleProtocol("ANY") )
const ( // SecurityGroupStateAvailable is [insert doc]. SecurityGroupStateAvailable = SecurityGroupState("available") // SecurityGroupStateSyncing is [insert doc]. SecurityGroupStateSyncing = SecurityGroupState("syncing") // SecurityGroupStateSyncingError is [insert doc]. SecurityGroupStateSyncingError = SecurityGroupState("syncing_error") )
const ( // ServerActionPoweron is [insert doc]. ServerActionPoweron = ServerAction("poweron") // ServerActionBackup is [insert doc]. ServerActionBackup = ServerAction("backup") // ServerActionStopInPlace is [insert doc]. ServerActionStopInPlace = ServerAction("stop_in_place") // ServerActionPoweroff is [insert doc]. ServerActionPoweroff = ServerAction("poweroff") // ServerActionTerminate is [insert doc]. ServerActionTerminate = ServerAction("terminate") // ServerActionReboot is [insert doc]. ServerActionReboot = ServerAction("reboot") )
const ( // ServerStateRunning is [insert doc]. ServerStateRunning = ServerState("running") // ServerStateStopped is [insert doc]. ServerStateStopped = ServerState("stopped") // ServerStateStoppedInPlace is [insert doc]. ServerStateStoppedInPlace = ServerState("stopped in place") // ServerStateStarting is [insert doc]. ServerStateStarting = ServerState("starting") // ServerStateStopping is [insert doc]. ServerStateStopping = ServerState("stopping") // ServerStateLocked is [insert doc]. ServerStateLocked = ServerState("locked") )
const ( // ServerTypesAvailabilityAvailable is [insert doc]. ServerTypesAvailabilityAvailable = ServerTypesAvailability("available") // ServerTypesAvailabilityScarce is [insert doc]. ServerTypesAvailabilityScarce = ServerTypesAvailability("scarce") // ServerTypesAvailabilityShortage is [insert doc]. ServerTypesAvailabilityShortage = ServerTypesAvailability("shortage") )
const ( // SnapshotStateAvailable is [insert doc]. SnapshotStateAvailable = SnapshotState("available") // SnapshotStateSnapshotting is [insert doc]. SnapshotStateSnapshotting = SnapshotState("snapshotting") // SnapshotStateError is [insert doc]. SnapshotStateError = SnapshotState("error") // SnapshotStateInvalidData is [insert doc]. SnapshotStateInvalidData = SnapshotState("invalid_data") // SnapshotStateImporting is [insert doc]. SnapshotStateImporting = SnapshotState("importing") // SnapshotStateExporting is [insert doc]. SnapshotStateExporting = SnapshotState("exporting") )
const ( // SnapshotVolumeTypeUnknownVolumeType is [insert doc]. SnapshotVolumeTypeUnknownVolumeType = SnapshotVolumeType("unknown_volume_type") // SnapshotVolumeTypeLSSD is [insert doc]. SnapshotVolumeTypeLSSD = SnapshotVolumeType("l_ssd") // SnapshotVolumeTypeBSSD is [insert doc]. SnapshotVolumeTypeBSSD = SnapshotVolumeType("b_ssd") // SnapshotVolumeTypeUnified is [insert doc]. SnapshotVolumeTypeUnified = SnapshotVolumeType("unified") )
const ( // TaskStatusPending is [insert doc]. TaskStatusPending = TaskStatus("pending") // TaskStatusStarted is [insert doc]. TaskStatusStarted = TaskStatus("started") // TaskStatusSuccess is [insert doc]. TaskStatusSuccess = TaskStatus("success") // TaskStatusFailure is [insert doc]. TaskStatusFailure = TaskStatus("failure") // TaskStatusRetry is [insert doc]. TaskStatusRetry = TaskStatus("retry") )
const ( // VolumeServerStateAvailable is [insert doc]. VolumeServerStateAvailable = VolumeServerState("available") // VolumeServerStateSnapshotting is [insert doc]. VolumeServerStateSnapshotting = VolumeServerState("snapshotting") // VolumeServerStateError is [insert doc]. VolumeServerStateError = VolumeServerState("error") // VolumeServerStateFetching is [insert doc]. VolumeServerStateFetching = VolumeServerState("fetching") // VolumeServerStateResizing is [insert doc]. VolumeServerStateResizing = VolumeServerState("resizing") // VolumeServerStateSaving is [insert doc]. VolumeServerStateSaving = VolumeServerState("saving") // VolumeServerStateHotsyncing is [insert doc]. VolumeServerStateHotsyncing = VolumeServerState("hotsyncing") )
const ( // VolumeServerVolumeTypeLSSD is [insert doc]. VolumeServerVolumeTypeLSSD = VolumeServerVolumeType("l_ssd") // VolumeServerVolumeTypeBSSD is [insert doc]. VolumeServerVolumeTypeBSSD = VolumeServerVolumeType("b_ssd") )
const ( // VolumeStateAvailable is [insert doc]. VolumeStateAvailable = VolumeState("available") // VolumeStateSnapshotting is [insert doc]. VolumeStateSnapshotting = VolumeState("snapshotting") // VolumeStateError is [insert doc]. VolumeStateError = VolumeState("error") // VolumeStateFetching is [insert doc]. VolumeStateFetching = VolumeState("fetching") // VolumeStateResizing is [insert doc]. VolumeStateResizing = VolumeState("resizing") // VolumeStateSaving is [insert doc]. VolumeStateSaving = VolumeState("saving") // VolumeStateHotsyncing is [insert doc]. VolumeStateHotsyncing = VolumeState("hotsyncing") )
const ( // VolumeVolumeTypeLSSD is [insert doc]. VolumeVolumeTypeLSSD = VolumeVolumeType("l_ssd") // VolumeVolumeTypeBSSD is [insert doc]. VolumeVolumeTypeBSSD = VolumeVolumeType("b_ssd") // VolumeVolumeTypeUnified is [insert doc]. VolumeVolumeTypeUnified = VolumeVolumeType("unified") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
API: instance API
func (*API) AttachIP
deprecated
func (s *API) AttachIP(req *AttachIPRequest, opts ...scw.RequestOption) (*AttachIPResponse, error)
AttachIP attaches an IP to a server.
Deprecated: UpdateIP() should be used instead
func (*API) AttachVolume ¶
func (s *API) AttachVolume(req *AttachVolumeRequest, opts ...scw.RequestOption) (*AttachVolumeResponse, error)
AttachVolume attaches a volume to a server
Note: Implementation is thread-safe.
func (*API) CreateIP ¶
func (s *API) CreateIP(req *CreateIPRequest, opts ...scw.RequestOption) (*CreateIPResponse, error)
CreateIP: reserve a flexible IP
func (*API) CreateImage ¶
func (s *API) CreateImage(req *CreateImageRequest, opts ...scw.RequestOption) (*CreateImageResponse, error)
CreateImage: create an instance image
func (*API) CreatePlacementGroup ¶
func (s *API) CreatePlacementGroup(req *CreatePlacementGroupRequest, opts ...scw.RequestOption) (*CreatePlacementGroupResponse, error)
CreatePlacementGroup: create a placement group
Create a new placement group.
func (*API) CreatePrivateNIC ¶
func (s *API) CreatePrivateNIC(req *CreatePrivateNICRequest, opts ...scw.RequestOption) (*CreatePrivateNICResponse, error)
CreatePrivateNIC: create a private NIC connecting a server to a private network
Create a private NIC connecting a server to a private network.
func (*API) CreateSecurityGroup ¶
func (s *API) CreateSecurityGroup(req *CreateSecurityGroupRequest, opts ...scw.RequestOption) (*CreateSecurityGroupResponse, error)
CreateSecurityGroup: create a security group
func (*API) CreateSecurityGroupRule ¶
func (s *API) CreateSecurityGroupRule(req *CreateSecurityGroupRuleRequest, opts ...scw.RequestOption) (*CreateSecurityGroupRuleResponse, error)
CreateSecurityGroupRule: create rule
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 given volume or from a QCOW2 file
func (*API) CreateVolume ¶
func (s *API) CreateVolume(req *CreateVolumeRequest, opts ...scw.RequestOption) (*CreateVolumeResponse, error)
CreateVolume: create a volume
func (*API) DeleteIP ¶
func (s *API) DeleteIP(req *DeleteIPRequest, opts ...scw.RequestOption) error
DeleteIP: delete a flexible IP
Delete the IP with the given ID.
func (*API) DeleteImage ¶
func (s *API) DeleteImage(req *DeleteImageRequest, opts ...scw.RequestOption) error
DeleteImage: delete an instance image
Delete the image with the given ID.
func (*API) DeletePlacementGroup ¶
func (s *API) DeletePlacementGroup(req *DeletePlacementGroupRequest, opts ...scw.RequestOption) error
DeletePlacementGroup: delete the given placement group
Delete the given placement group.
func (*API) DeletePrivateNIC ¶
func (s *API) DeletePrivateNIC(req *DeletePrivateNICRequest, opts ...scw.RequestOption) error
DeletePrivateNIC: delete a private NIC
Delete a private NIC.
func (*API) DeleteSecurityGroup ¶
func (s *API) DeleteSecurityGroup(req *DeleteSecurityGroupRequest, opts ...scw.RequestOption) error
DeleteSecurityGroup: delete a security group
func (*API) DeleteSecurityGroupRule ¶
func (s *API) DeleteSecurityGroupRule(req *DeleteSecurityGroupRuleRequest, opts ...scw.RequestOption) error
DeleteSecurityGroupRule: delete rule
Delete a security group rule with the given ID.
func (*API) DeleteServer ¶
func (s *API) DeleteServer(req *DeleteServerRequest, opts ...scw.RequestOption) error
DeleteServer: delete a server
Delete a server with the given ID.
func (*API) DeleteServerUserData ¶
func (s *API) DeleteServerUserData(req *DeleteServerUserDataRequest, opts ...scw.RequestOption) error
DeleteServerUserData: delete user data
Delete the given key from a server user data.
func (*API) DeleteSnapshot ¶
func (s *API) DeleteSnapshot(req *DeleteSnapshotRequest, opts ...scw.RequestOption) error
DeleteSnapshot: delete a snapshot
Delete the snapshot with the given ID.
func (*API) DeleteVolume ¶
func (s *API) DeleteVolume(req *DeleteVolumeRequest, opts ...scw.RequestOption) error
DeleteVolume: delete a volume
Delete the volume with the given ID.
func (*API) DetachIP
deprecated
func (s *API) DetachIP(req *DetachIPRequest, opts ...scw.RequestOption) (*DetachIPResponse, error)
DetachIP detaches an IP from a server.
Deprecated: UpdateIP() should be used instead
func (*API) DetachVolume ¶
func (s *API) DetachVolume(req *DetachVolumeRequest, opts ...scw.RequestOption) (*DetachVolumeResponse, error)
DetachVolume detaches a volume from a server
Note: Implementation is thread-safe.
func (*API) ExportSnapshot ¶
func (s *API) ExportSnapshot(req *ExportSnapshotRequest, opts ...scw.RequestOption) (*ExportSnapshotResponse, error)
ExportSnapshot: export a snapshot
Export a snapshot to a given 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 ¶
func (s *API) GetBootscript(req *GetBootscriptRequest, opts ...scw.RequestOption) (*GetBootscriptResponse, error)
GetBootscript: get bootscripts
Get details of a bootscript with the given ID.
func (*API) GetDashboard ¶
func (s *API) GetDashboard(req *GetDashboardRequest, opts ...scw.RequestOption) (*GetDashboardResponse, error)
func (*API) GetIP ¶
func (s *API) GetIP(req *GetIPRequest, opts ...scw.RequestOption) (*GetIPResponse, error)
GetIP: get a flexible IP
Get details of an IP with the given ID or address.
func (*API) GetImage ¶
func (s *API) GetImage(req *GetImageRequest, opts ...scw.RequestOption) (*GetImageResponse, error)
GetImage: get an instance image
Get details of an image with the given ID.
func (*API) GetPlacementGroup ¶
func (s *API) GetPlacementGroup(req *GetPlacementGroupRequest, opts ...scw.RequestOption) (*GetPlacementGroupResponse, error)
GetPlacementGroup: get a placement group
Get the given placement group.
func (*API) GetPlacementGroupServers ¶
func (s *API) GetPlacementGroupServers(req *GetPlacementGroupServersRequest, opts ...scw.RequestOption) (*GetPlacementGroupServersResponse, error)
GetPlacementGroupServers: get placement group servers
Get all servers belonging to the given placement group.
func (*API) GetPrivateNIC ¶
func (s *API) GetPrivateNIC(req *GetPrivateNICRequest, opts ...scw.RequestOption) (*GetPrivateNICResponse, error)
GetPrivateNIC: get a private NIC
Get private NIC properties.
func (*API) GetSecurityGroup ¶
func (s *API) GetSecurityGroup(req *GetSecurityGroupRequest, opts ...scw.RequestOption) (*GetSecurityGroupResponse, error)
GetSecurityGroup: get a security group
Get the details of a Security Group with the given ID.
func (*API) GetSecurityGroupRule ¶
func (s *API) GetSecurityGroupRule(req *GetSecurityGroupRuleRequest, opts ...scw.RequestOption) (*GetSecurityGroupRuleResponse, error)
GetSecurityGroupRule: get rule
Get details of a security group rule with the given ID.
func (*API) GetServer ¶
func (s *API) GetServer(req *GetServerRequest, opts ...scw.RequestOption) (*GetServerResponse, error)
GetServer: get a server
Get the details of a specified Server.
func (*API) GetServerType ¶
func (s *API) GetServerType(req *GetServerTypeRequest) (*ServerType, error)
GetServerType get server type info by it's name.
func (*API) GetServerTypesAvailability ¶
func (s *API) GetServerTypesAvailability(req *GetServerTypesAvailabilityRequest, opts ...scw.RequestOption) (*GetServerTypesAvailabilityResponse, error)
GetServerTypesAvailability: get availability
Get availability for all server types.
func (*API) GetServerUserData ¶
func (s *API) GetServerUserData(req *GetServerUserDataRequest, opts ...scw.RequestOption) (io.Reader, error)
GetServerUserData gets the content of a user data on a server for the given key.
func (*API) GetSnapshot ¶
func (s *API) GetSnapshot(req *GetSnapshotRequest, opts ...scw.RequestOption) (*GetSnapshotResponse, error)
GetSnapshot: get a snapshot
Get details of a snapshot with the given ID.
func (*API) GetVolume ¶
func (s *API) GetVolume(req *GetVolumeRequest, opts ...scw.RequestOption) (*GetVolumeResponse, error)
GetVolume: get a volume
Get details of a volume with the given ID.
func (*API) ListBootscripts ¶
func (s *API) ListBootscripts(req *ListBootscriptsRequest, opts ...scw.RequestOption) (*ListBootscriptsResponse, error)
ListBootscripts: list bootscripts
func (*API) ListDefaultSecurityGroupRules ¶
func (s *API) ListDefaultSecurityGroupRules(req *ListDefaultSecurityGroupRulesRequest, opts ...scw.RequestOption) (*ListSecurityGroupRulesResponse, error)
ListDefaultSecurityGroupRules: get default rules
Lists the default rules applied to all the security groups.
func (*API) ListIPs ¶
func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsResponse, error)
ListIPs: list all flexible IPs
func (*API) ListImages ¶
func (s *API) ListImages(req *ListImagesRequest, opts ...scw.RequestOption) (*ListImagesResponse, error)
ListImages: list instance images
List all images available in an account.
func (*API) ListPlacementGroups ¶
func (s *API) ListPlacementGroups(req *ListPlacementGroupsRequest, opts ...scw.RequestOption) (*ListPlacementGroupsResponse, error)
ListPlacementGroups: list placement groups
List all placement groups.
func (*API) ListPrivateNICs ¶
func (s *API) ListPrivateNICs(req *ListPrivateNICsRequest, opts ...scw.RequestOption) (*ListPrivateNICsResponse, error)
ListPrivateNICs: list all private NICs
List all private NICs of a given server.
func (*API) ListSecurityGroupRules ¶
func (s *API) ListSecurityGroupRules(req *ListSecurityGroupRulesRequest, opts ...scw.RequestOption) (*ListSecurityGroupRulesResponse, error)
ListSecurityGroupRules: list rules
func (*API) ListSecurityGroups ¶
func (s *API) ListSecurityGroups(req *ListSecurityGroupsRequest, opts ...scw.RequestOption) (*ListSecurityGroupsResponse, error)
ListSecurityGroups: list security groups
List all security groups available in an account.
func (*API) ListServerActions ¶
func (s *API) ListServerActions(req *ListServerActionsRequest, opts ...scw.RequestOption) (*ListServerActionsResponse, error)
ListServerActions: list server actions
List all actions that can currently be performed on a server.
func (*API) ListServerUserData ¶
func (s *API) ListServerUserData(req *ListServerUserDataRequest, opts ...scw.RequestOption) (*ListServerUserDataResponse, error)
ListServerUserData: list user data
List all user data keys registered on a given server.
func (*API) ListServers ¶
func (s *API) ListServers(req *ListServersRequest, opts ...scw.RequestOption) (*ListServersResponse, error)
ListServers: list all servers
func (*API) ListServersTypes ¶
func (s *API) ListServersTypes(req *ListServersTypesRequest, opts ...scw.RequestOption) (*ListServersTypesResponse, error)
ListServersTypes: list server types
Get server types technical details.
func (*API) ListSnapshots ¶
func (s *API) ListSnapshots(req *ListSnapshotsRequest, opts ...scw.RequestOption) (*ListSnapshotsResponse, error)
ListSnapshots: list snapshots
func (*API) ListVolumes ¶
func (s *API) ListVolumes(req *ListVolumesRequest, opts ...scw.RequestOption) (*ListVolumesResponse, error)
ListVolumes: list volumes
func (*API) ListVolumesTypes ¶
func (s *API) ListVolumesTypes(req *ListVolumesTypesRequest, opts ...scw.RequestOption) (*ListVolumesTypesResponse, error)
ListVolumesTypes: list volumes types
Get volumes technical details.
func (*API) ServerAction ¶
func (s *API) ServerAction(req *ServerActionRequest, opts ...scw.RequestOption) (*ServerActionResponse, error)
ServerAction: perform action
Perform power related actions on a server. Be wary that when terminating a server, all the attached volumes (local *and* block storage) are deleted. So, if you want to keep your local volumes, you must use the `archive` action instead of `terminate`. And if you want to keep block-storage volumes, **you must** detach it beforehand you issue the `terminate` call. For more information, read the [Volumes](#volumes-7e8a39) 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.
func (*API) SetPlacementGroup ¶
func (s *API) SetPlacementGroup(req *SetPlacementGroupRequest, opts ...scw.RequestOption) (*SetPlacementGroupResponse, error)
SetPlacementGroup: set placement group
Set all parameters of the given placement group.
func (*API) SetPlacementGroupServers ¶
func (s *API) SetPlacementGroupServers(req *SetPlacementGroupServersRequest, opts ...scw.RequestOption) (*SetPlacementGroupServersResponse, error)
SetPlacementGroupServers: set placement group servers
Set all servers belonging to the given placement group.
func (*API) SetSecurityGroupRules ¶
func (s *API) SetSecurityGroupRules(req *SetSecurityGroupRulesRequest, opts ...scw.RequestOption) (*SetSecurityGroupRulesResponse, error)
SetSecurityGroupRules: update all the rules of a security group
Replaces the 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
func (*API) UpdateImage ¶
func (s *API) UpdateImage(req *UpdateImageRequest, opts ...scw.RequestOption) (*UpdateImageResponse, error)
func (*API) UpdatePlacementGroup ¶
func (s *API) UpdatePlacementGroup(req *UpdatePlacementGroupRequest, opts ...scw.RequestOption) (*UpdatePlacementGroupResponse, error)
UpdatePlacementGroup: update a placement group
Update one or more parameter of the given placement group.
func (*API) UpdatePlacementGroupServers ¶
func (s *API) UpdatePlacementGroupServers(req *UpdatePlacementGroupServersRequest, opts ...scw.RequestOption) (*UpdatePlacementGroupServersResponse, error)
UpdatePlacementGroupServers: update placement group servers
Update all servers belonging to the given placement group.
func (*API) UpdateSecurityGroup ¶
func (s *API) UpdateSecurityGroup(req *UpdateSecurityGroupRequest, opts ...scw.RequestOption) (*UpdateSecurityGroupResponse, error)
UpdateSecurityGroup updates a security group.
func (*API) UpdateSecurityGroupRule ¶
func (s *API) UpdateSecurityGroupRule(req *UpdateSecurityGroupRuleRequest, opts ...scw.RequestOption) (*UpdateSecurityGroupRuleResponse, error)
UpdateSecurityGroupRule updates a security group.
func (*API) UpdateServer ¶
func (s *API) UpdateServer(req *UpdateServerRequest, opts ...scw.RequestOption) (*UpdateServerResponse, error)
UpdateServer updates a server.
Note: Implementation is thread-safe.
func (*API) UpdateSnapshot ¶
func (s *API) UpdateSnapshot(req *UpdateSnapshotRequest, opts ...scw.RequestOption) (*UpdateSnapshotResponse, error)
func (*API) UpdateVolume ¶
func (s *API) UpdateVolume(req *UpdateVolumeRequest, opts ...scw.RequestOption) (*UpdateVolumeResponse, error)
UpdateVolume: update a volume
Replace name and/or size properties of given ID volume with the given value(s). Any volume name can be changed while, for now, only `b_ssd` volume growing is supported.
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.
type AttachIPRequest
deprecated
type AttachIPResponse
deprecated
type AttachIPResponse struct {
IP *IP
}
AttachIPResponse contains the updated IP after attaching
Deprecated: UpdateIPResponse should be used instead
type AttachVolumeRequest ¶
type AttachVolumeRequest struct { Zone scw.Zone `json:"-"` ServerID string `json:"-"` VolumeID string `json:"-"` }
AttachVolumeRequest contains the parameters to attach a volume to a server
type AttachVolumeResponse ¶
type AttachVolumeResponse struct {
Server *Server `json:"-"`
}
AttachVolumeResponse contains the updated server after attaching a volume
type Bootscript ¶
type Bootscript struct { // Bootcmdargs: the bootscript arguments Bootcmdargs string `json:"bootcmdargs"` // Default: dispmay 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: the bootscript ID ID string `json:"id"` // Initrd: the initrd (initial ramdisk) configuration Initrd string `json:"initrd"` // Kernel: the server kernel version Kernel string `json:"kernel"` // Organization: the bootscript organization ID Organization string `json:"organization"` // Project: the bootscript project ID Project string `json:"project"` // Public: provide information if the bootscript is public Public bool `json:"public"` // Title: the bootscript title Title string `json:"title"` // Arch: the bootscript arch // // Default value: x86_64 Arch Arch `json:"arch"` // Zone: the zone in which is the bootscript 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: the organization ID the IP is reserved in // Precisely one of Organization, Project must be set. Organization *string `json:"organization,omitempty"` // Project: the project ID the IP is reserved in // Precisely one of Organization, Project must be set. Project *string `json:"project,omitempty"` // Tags: the tags of the IP Tags []string `json:"tags,omitempty"` // Server: UUID of the server you want to attach the IP to Server *string `json:"server,omitempty"` }
type CreateIPResponse ¶
type CreateIPResponse struct {
IP *IP `json:"ip"`
}
type CreateImageRequest ¶
type CreateImageRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Name: name of the image Name string `json:"name,omitempty"` // RootVolume: UUID of the snapshot RootVolume string `json:"root_volume,omitempty"` // Arch: architecture of the image // // Default value: x86_64 Arch Arch `json:"arch"` // DefaultBootscript: default bootscript of the image DefaultBootscript string `json:"default_bootscript,omitempty"` // ExtraVolumes: additional volumes of the image ExtraVolumes map[string]*VolumeTemplate `json:"extra_volumes,omitempty"` // Deprecated: Organization: organization ID of the image // Precisely one of Organization, Project must be set. Organization *string `json:"organization,omitempty"` // Project: project ID of the image // Precisely one of Organization, Project must be set. Project *string `json:"project,omitempty"` // Tags: the tags of the image Tags []string `json:"tags,omitempty"` // Public: true to create a public image Public bool `json:"public,omitempty"` }
type CreateImageResponse ¶
type CreateImageResponse struct {
Image *Image `json:"image"`
}
type CreatePlacementGroupRequest ¶
type CreatePlacementGroupRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Name: name of the placement group Name string `json:"name,omitempty"` // Deprecated: Organization: organization ID of the placement group // Precisely one of Organization, Project must be set. Organization *string `json:"organization,omitempty"` // Project: project ID of the placement group // Precisely one of Organization, Project must be set. Project *string `json:"project,omitempty"` // Tags: the tags of the placement group Tags []string `json:"tags,omitempty"` // PolicyMode: the operating mode of the placement group // // Default value: optional PolicyMode PlacementGroupPolicyMode `json:"policy_mode"` // PolicyType: the policy type of the placement group // // Default value: max_availability PolicyType PlacementGroupPolicyType `json:"policy_type"` }
type CreatePlacementGroupResponse ¶
type CreatePlacementGroupResponse struct {
PlacementGroup *PlacementGroup `json:"placement_group"`
}
type CreatePrivateNICRequest ¶
type CreatePrivateNICResponse ¶
type CreatePrivateNICResponse struct {
PrivateNic *PrivateNIC `json:"private_nic"`
}
type CreateSecurityGroupRequest ¶
type CreateSecurityGroupRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Name: name of the security group Name string `json:"name,omitempty"` // Description: description of the security group Description string `json:"description,omitempty"` // Deprecated: Organization: organization ID the security group belongs to // Precisely one of Organization, Project must be set. Organization *string `json:"organization,omitempty"` // Project: project ID the security group belong to // Precisely one of Organization, Project must be set. Project *string `json:"project,omitempty"` // Tags: the tags of the security group Tags []string `json:"tags,omitempty"` // Deprecated: OrganizationDefault: whether this security group becomes the default security group for new instances // // Default value: false // Precisely one of OrganizationDefault, ProjectDefault must be set. OrganizationDefault *bool `json:"organization_default,omitempty"` // ProjectDefault: whether this security group becomes the default security group for new instances // // Default value: false // Precisely one of OrganizationDefault, ProjectDefault must be set. ProjectDefault *bool `json:"project_default,omitempty"` // Stateful: whether the security group is stateful or not // // Default value: false Stateful bool `json:"stateful,omitempty"` // InboundDefaultPolicy: default policy for inbound rules // // Default value: accept InboundDefaultPolicy SecurityGroupPolicy `json:"inbound_default_policy"` // OutboundDefaultPolicy: default policy for outbound rules // // Default value: accept OutboundDefaultPolicy SecurityGroupPolicy `json:"outbound_default_policy"` // EnableDefaultSecurity: true to block SMTP on IPv4 and IPv6 EnableDefaultSecurity *bool `json:"enable_default_security,omitempty"` }
type CreateSecurityGroupResponse ¶
type CreateSecurityGroupResponse struct {
SecurityGroup *SecurityGroup `json:"security_group"`
}
type CreateSecurityGroupRuleRequest ¶
type CreateSecurityGroupRuleRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // SecurityGroupID: UUID of the security group SecurityGroupID string `json:"-"` // Protocol: // // Default value: TCP Protocol SecurityGroupRuleProtocol `json:"protocol"` // Direction: // // Default value: inbound Direction SecurityGroupRuleDirection `json:"direction"` // Action: // // Default value: accept Action SecurityGroupRuleAction `json:"action"` IPRange scw.IPNet `json:"ip_range,omitempty"` // DestPortFrom: the beginning of the range of ports to apply this rule to (inclusive) DestPortFrom *uint32 `json:"dest_port_from,omitempty"` // DestPortTo: the end of the range of ports to apply this rule to (inclusive) DestPortTo *uint32 `json:"dest_port_to,omitempty"` // Position: the position of this rule in the security group rules list Position uint32 `json:"position,omitempty"` // Editable: indicates if this rule is editable (will be ignored) Editable bool `json:"editable,omitempty"` }
type CreateSecurityGroupRuleResponse ¶
type CreateSecurityGroupRuleResponse struct {
Rule *SecurityGroupRule `json:"rule"`
}
type CreateServerRequest ¶
type CreateServerRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Name: the server name Name string `json:"name,omitempty"` // DynamicIPRequired: define if a dynamic IP is required for the instance DynamicIPRequired *bool `json:"dynamic_ip_required,omitempty"` // CommercialType: define the server commercial type (i.e. GP1-S) CommercialType string `json:"commercial_type,omitempty"` // Image: the server image ID or label Image string `json:"image,omitempty"` // Volumes: the 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: the ID of the reserved IP to attach to the server PublicIP *string `json:"public_ip,omitempty"` // BootType: the boot type to use // // Default value: local BootType *BootType `json:"boot_type,omitempty"` // Bootscript: the bootscript ID to use when `boot_type` is set to `bootscript` Bootscript *string `json:"bootscript,omitempty"` // Deprecated: Organization: the server organization ID // Precisely one of Organization, Project must be set. Organization *string `json:"organization,omitempty"` // Project: the server project ID // Precisely one of Organization, Project must be set. Project *string `json:"project,omitempty"` // Tags: the server tags Tags []string `json:"tags,omitempty"` // SecurityGroup: the security group ID SecurityGroup *string `json:"security_group,omitempty"` // PlacementGroup: placement group ID if server must be part of a placement group PlacementGroup *string `json:"placement_group,omitempty"` }
type CreateServerResponse ¶
type CreateServerResponse struct {
Server *Server `json:"server"`
}
type CreateSnapshotRequest ¶
type CreateSnapshotRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Name: name of the snapshot Name string `json:"name,omitempty"` // VolumeID: UUID of the volume VolumeID *string `json:"volume_id,omitempty"` // Tags: the tags of the snapshot Tags []string `json:"tags,omitempty"` // Deprecated: Organization: organization ID of the snapshot // Precisely one of Organization, Project must be set. Organization *string `json:"organization,omitempty"` // Project: project ID of the snapshot // Precisely one of Organization, Project must be set. Project *string `json:"project,omitempty"` // VolumeType: the volume type of the snapshot // // Overrides the volume_type of the snapshot. // If omitted, the volume type of the original volume will be used. // // Default value: unknown_volume_type VolumeType SnapshotVolumeType `json:"volume_type"` // Bucket: bucket name for snapshot imports Bucket *string `json:"bucket,omitempty"` // Key: object key for snapshot imports Key *string `json:"key,omitempty"` // Size: imported snapshot size, must be a multiple of 512 Size *scw.Size `json:"size,omitempty"` }
type CreateSnapshotResponse ¶
type CreateVolumeRequest ¶
type CreateVolumeRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Name: the volume name Name string `json:"name,omitempty"` // Deprecated: Organization: the volume organization ID // Precisely one of Organization, Project must be set. Organization *string `json:"organization,omitempty"` // Project: the volume project ID // Precisely one of Organization, Project must be set. Project *string `json:"project,omitempty"` // Tags: the volume tags Tags []string `json:"tags,omitempty"` // VolumeType: the volume type // // Default value: l_ssd VolumeType VolumeVolumeType `json:"volume_type"` // Size: the volume disk size, must be a multiple of 512 // Precisely one of BaseSnapshot, BaseVolume, Size must be set. Size *scw.Size `json:"size,omitempty"` // BaseVolume: the ID of the volume on which this volume will be based // Precisely one of BaseSnapshot, BaseVolume, Size must be set. BaseVolume *string `json:"base_volume,omitempty"` // BaseSnapshot: the ID of the snapshot on which this volume will be based // Precisely one of BaseSnapshot, BaseVolume, Size must be set. BaseSnapshot *string `json:"base_snapshot,omitempty"` }
type CreateVolumeResponse ¶
type CreateVolumeResponse struct {
Volume *Volume `json:"volume"`
}
type Dashboard ¶
type Dashboard struct { VolumesCount uint32 `json:"volumes_count"` RunningServersCount uint32 `json:"running_servers_count"` ServersByTypes map[string]uint32 `json:"servers_by_types"` ImagesCount uint32 `json:"images_count"` SnapshotsCount uint32 `json:"snapshots_count"` ServersCount uint32 `json:"servers_count"` IPsCount uint32 `json:"ips_count"` SecurityGroupsCount uint32 `json:"security_groups_count"` IPsUnused uint32 `json:"ips_unused"` VolumesLSSDCount uint32 `json:"volumes_l_ssd_count"` VolumesBSSDCount uint32 `json:"volumes_b_ssd_count"` VolumesLSSDTotalSize scw.Size `json:"volumes_l_ssd_total_size"` VolumesBSSDTotalSize scw.Size `json:"volumes_b_ssd_total_size"` PrivateNicsCount uint32 `json:"private_nics_count"` PlacementGroupsCount uint32 `json:"placement_groups_count"` }
type DeleteIPRequest ¶
type DeleteImageRequest ¶
type DeletePrivateNICRequest ¶
type DeleteServerRequest ¶
type DeleteSnapshotRequest ¶
type DeleteVolumeRequest ¶
type DetachIPRequest
deprecated
type DetachIPResponse
deprecated
type DetachIPResponse struct {
IP *IP
}
DetachIPResponse contains the updated IP after detaching
Deprecated: UpdateIPResponse should be used instead
type DetachVolumeRequest ¶
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: the snapshot ID SnapshotID string `json:"-"` // Bucket: s3 bucket name Bucket string `json:"bucket,omitempty"` // Key: s3 object key Key string `json:"key,omitempty"` }
type ExportSnapshotResponse ¶
type ExportSnapshotResponse struct {
Task *Task `json:"task"`
}
type GetAllServerUserDataRequest ¶
GetAllServerUserDataRequest is used by GetAllServerUserData method.
type GetAllServerUserDataResponse ¶
GetAllServerUserDataResponse is used by GetAllServerUserData method.
type GetBootscriptRequest ¶
type GetBootscriptResponse ¶
type GetBootscriptResponse struct {
Bootscript *Bootscript `json:"bootscript"`
}
type GetDashboardRequest ¶
type GetDashboardResponse ¶
type GetDashboardResponse struct {
Dashboard *Dashboard `json:"dashboard"`
}
type GetIPRequest ¶
type GetIPResponse ¶
type GetIPResponse struct {
IP *IP `json:"ip"`
}
type GetImageRequest ¶
type GetImageResponse ¶
type GetImageResponse struct {
Image *Image `json:"image"`
}
type GetPlacementGroupResponse ¶
type GetPlacementGroupResponse struct {
PlacementGroup *PlacementGroup `json:"placement_group"`
}
type GetPlacementGroupServersResponse ¶
type GetPlacementGroupServersResponse struct {
Servers []*PlacementGroupServer `json:"servers"`
}
type GetPrivateNICRequest ¶
type GetPrivateNICResponse ¶
type GetPrivateNICResponse struct {
PrivateNic *PrivateNIC `json:"private_nic"`
}
type GetSecurityGroupRequest ¶
type GetSecurityGroupResponse ¶
type GetSecurityGroupResponse struct {
SecurityGroup *SecurityGroup `json:"security_group"`
}
type GetSecurityGroupRuleResponse ¶
type GetSecurityGroupRuleResponse struct {
Rule *SecurityGroupRule `json:"rule"`
}
type GetServerRequest ¶
type GetServerResponse ¶
type GetServerResponse struct {
Server *Server `json:"server"`
}
type GetServerTypeRequest ¶
GetServerTypeRequest is used by GetServerType.
type GetServerTypesAvailabilityResponse ¶
type GetServerTypesAvailabilityResponse struct {
Servers map[string]*GetServerTypesAvailabilityResponseAvailability `json:"servers"`
}
type GetServerTypesAvailabilityResponseAvailability ¶
type GetServerTypesAvailabilityResponseAvailability struct { // Availability: // // Default value: available Availability ServerTypesAvailability `json:"availability"` }
type GetServerUserDataRequest ¶
type GetServerUserDataRequest struct { Zone scw.Zone `json:"-"` ServerID string `json:"-"` // Key defines the user data key to get. Key string `json:"-"` }
GetServerUserDataRequest is used by GetServerUserData method.
type GetSnapshotRequest ¶
type GetSnapshotResponse ¶
type GetSnapshotResponse struct {
Snapshot *Snapshot `json:"snapshot"`
}
type GetVolumeRequest ¶
type GetVolumeResponse ¶
type GetVolumeResponse struct {
Volume *Volume `json:"volume"`
}
type Image ¶
type Image struct { ID string `json:"id"` Name string `json:"name"` // Arch: // // Default value: x86_64 Arch Arch `json:"arch"` CreationDate *time.Time `json:"creation_date"` ModificationDate *time.Time `json:"modification_date"` DefaultBootscript *Bootscript `json:"default_bootscript"` ExtraVolumes map[string]*Volume `json:"extra_volumes"` FromServer string `json:"from_server"` Organization string `json:"organization"` Public bool `json:"public"` RootVolume *VolumeSummary `json:"root_volume"` // State: // // Default value: available State ImageState `json:"state"` Project string `json:"project"` Tags []string `json:"tags"` Zone scw.Zone `json:"zone"` }
type ImageState ¶
type ImageState string
func (ImageState) MarshalJSON ¶
func (enum ImageState) MarshalJSON() ([]byte, error)
func (ImageState) String ¶
func (enum ImageState) String() string
func (*ImageState) UnmarshalJSON ¶
func (enum *ImageState) UnmarshalJSON(data []byte) error
type ListBootscriptsRequest ¶
type 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 ListIPsRequest ¶
type ListIPsRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Project: the project ID the IPs are reserved in Project *string `json:"-"` // Organization: the organization ID the IPs are reserved in Organization *string `json:"-"` // Tags: filter IPs with these exact tags (to filter with several tags, use commas to separate them) Tags []string `json:"-"` // Name: filter on the IP address (Works as a LIKE operation on the IP address) Name *string `json:"-"` // PerPage: a positive integer lower or equal to 100 to select the number of items to return // // Default value: 50 PerPage *uint32 `json:"-"` // Page: a positive integer to choose the page to return Page *int32 `json:"-"` }
type ListIPsResponse ¶
type ListIPsResponse struct { // TotalCount: total number of ips TotalCount uint32 `json:"total_count"` // IPs: list of ips IPs []*IP `json:"ips"` }
ListIPsResponse: list ips response
func (*ListIPsResponse) UnsafeAppend ¶
func (r *ListIPsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListIPsResponse) UnsafeGetTotalCount ¶
func (r *ListIPsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
func (*ListIPsResponse) UnsafeSetTotalCount ¶
func (r *ListIPsResponse) UnsafeSetTotalCount(totalCount int)
UnsafeSetTotalCount should not be used Internal usage only
type ListImagesRequest ¶
type ListImagesRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` Organization *string `json:"-"` PerPage *uint32 `json:"-"` Page *int32 `json:"-"` Name *string `json:"-"` Public *bool `json:"-"` Arch *string `json:"-"` Project *string `json:"-"` Tags *string `json:"-"` }
type ListImagesResponse ¶
type ListImagesResponse struct { // TotalCount: total number of images TotalCount uint32 `json:"total_count"` // Images: list of images Images []*Image `json:"images"` }
ListImagesResponse: list images response
func (*ListImagesResponse) UnsafeAppend ¶
func (r *ListImagesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListImagesResponse) UnsafeGetTotalCount ¶
func (r *ListImagesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
func (*ListImagesResponse) UnsafeSetTotalCount ¶
func (r *ListImagesResponse) UnsafeSetTotalCount(totalCount int)
UnsafeSetTotalCount should not be used Internal usage only
type ListPlacementGroupsRequest ¶
type ListPlacementGroupsRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // PerPage: a positive integer lower or equal to 100 to select the number of items to return // // Default value: 50 PerPage *uint32 `json:"-"` // Page: a positive integer to choose the page to return Page *int32 `json:"-"` // Organization: list only placement groups of this organization ID Organization *string `json:"-"` // Project: list only placement groups of this project ID Project *string `json:"-"` // Tags: list placement groups with these exact tags (to filter with several tags, use commas to separate them) Tags []string `json:"-"` // Name: filter placement groups by name (for eg. "cluster1" will return "cluster100" and "cluster1" but not "foo") Name *string `json:"-"` }
type ListPlacementGroupsResponse ¶
type ListPlacementGroupsResponse struct { // TotalCount: total number of placement groups TotalCount uint32 `json:"total_count"` // PlacementGroups: list of placement groups PlacementGroups []*PlacementGroup `json:"placement_groups"` }
ListPlacementGroupsResponse: list placement groups response
func (*ListPlacementGroupsResponse) UnsafeAppend ¶
func (r *ListPlacementGroupsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListPlacementGroupsResponse) UnsafeGetTotalCount ¶
func (r *ListPlacementGroupsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
type ListPrivateNICsRequest ¶
type ListPrivateNICsResponse ¶
type ListPrivateNICsResponse struct {
PrivateNics []*PrivateNIC `json:"private_nics"`
}
type ListSecurityGroupRulesRequest ¶
type ListSecurityGroupRulesRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // SecurityGroupID: UUID of the security group SecurityGroupID string `json:"-"` // PerPage: a positive integer lower or equal to 100 to select the number of items to return // // Default value: 50 PerPage *uint32 `json:"-"` // Page: a positive integer to choose the page to return Page *int32 `json:"-"` }
type ListSecurityGroupRulesResponse ¶
type ListSecurityGroupRulesResponse struct { // TotalCount: total number of security groups TotalCount uint32 `json:"total_count"` // Rules: list of security rules Rules []*SecurityGroupRule `json:"rules"` }
ListSecurityGroupRulesResponse: list security group rules response
func (*ListSecurityGroupRulesResponse) UnsafeAppend ¶
func (r *ListSecurityGroupRulesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListSecurityGroupRulesResponse) UnsafeGetTotalCount ¶
func (r *ListSecurityGroupRulesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
func (*ListSecurityGroupRulesResponse) UnsafeSetTotalCount ¶
func (r *ListSecurityGroupRulesResponse) UnsafeSetTotalCount(totalCount int)
UnsafeSetTotalCount should not be used Internal usage only
type ListSecurityGroupsRequest ¶
type ListSecurityGroupsRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // Name: name of the security group Name *string `json:"-"` // Organization: the security group organization ID Organization *string `json:"-"` // Project: the security group project ID Project *string `json:"-"` // Tags: list security groups with these exact tags (to filter with several tags, use commas to separate them) Tags []string `json:"-"` // ProjectDefault: filter security groups with this value for project_default ProjectDefault *bool `json:"-"` // PerPage: a positive integer lower or equal to 100 to select the number of items to return // // Default value: 50 PerPage *uint32 `json:"-"` // Page: a positive integer to choose the page to return Page *int32 `json:"-"` }
type ListSecurityGroupsResponse ¶
type ListSecurityGroupsResponse struct { // TotalCount: total number of security groups TotalCount uint32 `json:"total_count"` // SecurityGroups: list of security groups SecurityGroups []*SecurityGroup `json:"security_groups"` }
ListSecurityGroupsResponse: list security groups response
func (*ListSecurityGroupsResponse) UnsafeAppend ¶
func (r *ListSecurityGroupsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListSecurityGroupsResponse) UnsafeGetTotalCount ¶
func (r *ListSecurityGroupsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
func (*ListSecurityGroupsResponse) UnsafeSetTotalCount ¶
func (r *ListSecurityGroupsResponse) UnsafeSetTotalCount(totalCount int)
UnsafeSetTotalCount should not be used Internal usage only
type ListServerActionsResponse ¶
type ListServerActionsResponse struct {
Actions []ServerAction `json:"actions"`
}
type ListServerUserDataResponse ¶
type ListServerUserDataResponse struct {
UserData []string `json:"user_data"`
}
type ListServersRequest ¶
type ListServersRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // PerPage: a positive integer lower or equal to 100 to select the number of items to return // // Default value: 50 PerPage *uint32 `json:"-"` // Page: a positive integer to choose the page to return Page *int32 `json:"-"` // Organization: list only servers of this organization ID Organization *string `json:"-"` // Project: list only servers of this project ID Project *string `json:"-"` // Name: filter servers by name (for eg. "server1" will return "server100" and "server1" but not "foo") Name *string `json:"-"` // PrivateIP: list servers by private_ip PrivateIP *net.IP `json:"-"` // WithoutIP: list servers that are not attached to a public IP WithoutIP *bool `json:"-"` // CommercialType: list servers of this commercial type CommercialType *string `json:"-"` // State: list servers in this state // // Default value: running State *ServerState `json:"-"` // Tags: list servers with these exact tags (to filter with several tags, use commas to separate them) Tags []string `json:"-"` // PrivateNetwork: list servers in this Private Network PrivateNetwork *string `json:"-"` // Order: define the order of the returned servers // // Default value: creation_date_desc Order ListServersRequestOrder `json:"-"` }
type ListServersRequestOrder ¶
type ListServersRequestOrder string
func (ListServersRequestOrder) MarshalJSON ¶
func (enum ListServersRequestOrder) MarshalJSON() ([]byte, error)
func (ListServersRequestOrder) String ¶
func (enum ListServersRequestOrder) String() string
func (*ListServersRequestOrder) UnmarshalJSON ¶
func (enum *ListServersRequestOrder) UnmarshalJSON(data []byte) error
type ListServersResponse ¶
type ListServersResponse struct { // TotalCount: total number of servers TotalCount uint32 `json:"total_count"` // Servers: list of servers 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 ListServersTypesResponse ¶
type ListServersTypesResponse struct { // TotalCount: total number of server types TotalCount uint32 `json:"total_count"` // Servers: list of server types Servers map[string]*ServerType `json:"servers"` }
ListServersTypesResponse: list servers types response
func (*ListServersTypesResponse) UnsafeAppend ¶
func (r *ListServersTypesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListServersTypesResponse) UnsafeGetTotalCount ¶
func (r *ListServersTypesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
func (*ListServersTypesResponse) UnsafeSetTotalCount ¶
func (r *ListServersTypesResponse) UnsafeSetTotalCount(totalCount int)
UnsafeSetTotalCount should not be used Internal usage only
type ListSnapshotsRequest ¶
type ListSnapshotsRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` Organization *string `json:"-"` PerPage *uint32 `json:"-"` Page *int32 `json:"-"` Name *string `json:"-"` Project *string `json:"-"` Tags *string `json:"-"` }
type ListSnapshotsResponse ¶
type ListSnapshotsResponse struct { // TotalCount: total number of snapshots TotalCount uint32 `json:"total_count"` // Snapshots: list of snapshots Snapshots []*Snapshot `json:"snapshots"` }
ListSnapshotsResponse: list snapshots response
func (*ListSnapshotsResponse) UnsafeAppend ¶
func (r *ListSnapshotsResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListSnapshotsResponse) UnsafeGetTotalCount ¶
func (r *ListSnapshotsResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
func (*ListSnapshotsResponse) UnsafeSetTotalCount ¶
func (r *ListSnapshotsResponse) UnsafeSetTotalCount(totalCount int)
UnsafeSetTotalCount should not be used Internal usage only
type ListVolumesRequest ¶
type ListVolumesRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // VolumeType: filter by volume type // // Default value: l_ssd VolumeType *VolumeVolumeType `json:"-"` // PerPage: a positive integer lower or equal to 100 to select the number of items to return // // Default value: 50 PerPage *uint32 `json:"-"` // Page: a positive integer to choose the page to return Page *int32 `json:"-"` // Organization: filter volume by organization ID Organization *string `json:"-"` // Project: filter volume by project ID Project *string `json:"-"` // Tags: filter volumes with these exact tags (to filter with several tags, use commas to separate them) Tags []string `json:"-"` // Name: filter volume by name (for eg. "vol" will return "myvolume" but not "data") Name *string `json:"-"` }
type ListVolumesResponse ¶
type ListVolumesResponse struct { // TotalCount: total number of volumes TotalCount uint32 `json:"total_count"` // Volumes: list of volumes Volumes []*Volume `json:"volumes"` }
ListVolumesResponse: list volumes response
func (*ListVolumesResponse) UnsafeAppend ¶
func (r *ListVolumesResponse) UnsafeAppend(res interface{}) (uint32, error)
UnsafeAppend should not be used Internal usage only
func (*ListVolumesResponse) UnsafeGetTotalCount ¶
func (r *ListVolumesResponse) UnsafeGetTotalCount() uint32
UnsafeGetTotalCount should not be used Internal usage only
func (*ListVolumesResponse) UnsafeSetTotalCount ¶
func (r *ListVolumesResponse) UnsafeSetTotalCount(totalCount int)
UnsafeSetTotalCount should not be used Internal usage only
type ListVolumesTypesRequest ¶
type ListVolumesTypesResponse ¶
type ListVolumesTypesResponse struct { // TotalCount: total number of volume types TotalCount uint32 `json:"total_count"` // Volumes: map of volume types Volumes map[string]*VolumeType `json:"volumes"` }
ListVolumesTypesResponse: list volumes types response
type Metadata ¶
type Metadata struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Hostname string `json:"hostname,omitempty"` Organization string `json:"organization,omitempty"` Project string `json:"project,omitempty"` CommercialType string `json:"commercial_type,omitempty"` PublicIP struct { Dynamic bool `json:"dynamic,omitempty"` ID string `json:"id,omitempty"` Address string `json:"address,omitempty"` } `json:"public_ip,omitempty"` PrivateIP string `json:"private_ip,omitempty"` IPv6 struct { Netmask string `json:"netmask,omitempty"` Gateway string `json:"gateway,omitempty"` Address string `json:"address,omitempty"` } `json:"ipv6,omitempty"` Location struct { PlatformID string `json:"platform_id,omitempty"` HypervisorID string `json:"hypervisor_id,omitempty"` NodeID string `json:"node_id,omitempty"` ClusterID string `json:"cluster_id,omitempty"` ZoneID string `json:"zone_id,omitempty"` } `json:"location,omitempty"` Tags []string `json:"tags,omitempty"` StateDetail string `json:"state_detail,omitempty"` SSHPublicKeys []struct { Description string `json:"description,omitempty"` ModificationDate string `json:"modification_date,omitempty"` IP string `json:"ip,omitempty"` Key string `json:"key,omitempty"` Fingerprint string `json:"fingerprint,omitempty"` ID string `json:"id,omitempty"` CreationDate string `json:"creation_date,omitempty"` } `json:"ssh_public_keys,omitempty"` Timezone string `json:"timezone,omitempty"` Bootscript struct { Kernel string `json:"kernel,omitempty"` Title string `json:"title,omitempty"` Default bool `json:"default,omitempty"` Dtb string `json:"dtb,omitempty"` Public bool `json:"publc,omitempty"` Initrd string `json:"initrd,omitempty"` Bootcmdargs string `json:"bootcmdargs,omitempty"` Architecture string `json:"architecture,omitempty"` Organization string `json:"organization,omitempty"` Project string `json:"project,omitempty"` ID string `json:"id,omitempty"` } `json:"bootscript,omitempty"` Volumes map[string]struct { Name string `json:"name,omitempty"` ModificationDate string `json:"modification_date,omitempty"` ExportURI string `json:"export_uri,omitempty"` VolumeType string `json:"volume_type,omitempty"` CreationDate string `json:"creation_date,omitempty"` State string `json:"state,omitempty"` Organization string `json:"organization,omitempty"` Project string `json:"project,omitempty"` Server struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` } `json:"server,omitempty"` ID string `json:"id,omitempty"` Size int `json:"size,omitempty"` } `json:"volumes,omitempty"` PrivateNICs []struct { ID string `json:"id,omitempty"` PrivateNetworkID string `json:"private_network_id,omitempty"` ServerID string `json:"server_id,omitempty"` MacAddress string `json:"mac_address,omitempty"` CreationDate string `json:"creation_date,omitempty"` Zone string `json:"zone,omitempty"` } `json:"private_nics,omitempty"` }
Metadata represents the struct return by the metadata API
type MetadataAPI ¶
type MetadataAPI struct { }
MetadataAPI metadata API
func NewMetadataAPI ¶
func NewMetadataAPI() *MetadataAPI
NewMetadataAPI returns a MetadataAPI object from a Scaleway client.
func (*MetadataAPI) DeleteUserData ¶
func (*MetadataAPI) DeleteUserData(key string) error
DeleteUserData deletes the userdata key and the associated value
func (*MetadataAPI) GetMetadata ¶
func (*MetadataAPI) GetMetadata() (m *Metadata, err error)
GetMetadata returns the metadata available from the server
func (*MetadataAPI) GetUserData ¶
func (*MetadataAPI) GetUserData(key string) ([]byte, error)
GetUserData returns the value for the given metadata key
func (*MetadataAPI) ListUserData ¶
func (*MetadataAPI) ListUserData() (res *UserData, err error)
ListUserData returns the metadata available from the server
func (*MetadataAPI) SetUserData ¶
func (*MetadataAPI) SetUserData(key string, value []byte) error
SetUserData sets the userdata key with the given value
type NullableStringValue ¶
type NullableStringValue struct { Null bool `json:"null,omitempty"` Value string `json:"value,omitempty"` }
func (*NullableStringValue) MarshalJSON ¶
func (v *NullableStringValue) MarshalJSON() ([]byte, error)
func (*NullableStringValue) UnmarshalJSON ¶
func (v *NullableStringValue) UnmarshalJSON(b []byte) error
type PlacementGroup ¶
type PlacementGroup struct { // ID: the placement group unique ID ID string `json:"id"` // Name: the placement group name Name string `json:"name"` // Organization: the placement group organization ID Organization string `json:"organization"` // Project: the placement group project ID Project string `json:"project"` // Tags: the placement group tags Tags []string `json:"tags"` // PolicyMode: select the failling 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: the zone in which is the placement group 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 PrivateNIC ¶
type PrivateNIC struct { // ID: the private NIC unique ID ID string `json:"id,omitempty"` // ServerID: the server the private NIC is attached to ServerID string `json:"server_id,omitempty"` // PrivateNetworkID: the private network where the private NIC is attached PrivateNetworkID string `json:"private_network_id,omitempty"` // MacAddress: the private NIC MAC address MacAddress string `json:"mac_address,omitempty"` // State: the private NIC state // // Default value: available State PrivateNICState `json:"state,omitempty"` }
PrivateNIC: private nic
type PrivateNICState ¶
type PrivateNICState string
func (PrivateNICState) MarshalJSON ¶
func (enum PrivateNICState) MarshalJSON() ([]byte, error)
func (PrivateNICState) String ¶
func (enum PrivateNICState) String() string
func (*PrivateNICState) UnmarshalJSON ¶
func (enum *PrivateNICState) UnmarshalJSON(data []byte) error
type SecurityGroup ¶
type SecurityGroup struct { // ID: the security groups' unique ID ID string `json:"id"` // Name: the security groups name Name string `json:"name"` // Description: the security groups description Description string `json:"description"` // EnableDefaultSecurity: true if SMTP is blocked on IPv4 and IPv6 EnableDefaultSecurity bool `json:"enable_default_security"` // InboundDefaultPolicy: the default inbound policy // // Default value: accept InboundDefaultPolicy SecurityGroupPolicy `json:"inbound_default_policy"` // OutboundDefaultPolicy: the default outbound policy // // Default value: accept OutboundDefaultPolicy SecurityGroupPolicy `json:"outbound_default_policy"` // Organization: the security groups organization ID Organization string `json:"organization"` // Project: the security group project ID Project string `json:"project"` // Tags: the security group tags Tags []string `json:"tags"` // Deprecated: OrganizationDefault: true if it is your default security group for this organization ID OrganizationDefault *bool `json:"organization_default,omitempty"` // ProjectDefault: true if it is your default security group for this project ID ProjectDefault bool `json:"project_default"` // CreationDate: the security group creation date CreationDate *time.Time `json:"creation_date"` // ModificationDate: the security group modification date ModificationDate *time.Time `json:"modification_date"` // Servers: list of servers attached to this security group Servers []*ServerSummary `json:"servers"` // Stateful: true if the security group is stateful Stateful bool `json:"stateful"` // State: security group state // // Default value: available State SecurityGroupState `json:"state"` // Zone: the zone in which is the security group Zone scw.Zone `json:"zone"` }
SecurityGroup: security group
type SecurityGroupPolicy ¶
type SecurityGroupPolicy string
func (SecurityGroupPolicy) MarshalJSON ¶
func (enum SecurityGroupPolicy) MarshalJSON() ([]byte, error)
func (SecurityGroupPolicy) String ¶
func (enum SecurityGroupPolicy) String() string
func (*SecurityGroupPolicy) UnmarshalJSON ¶
func (enum *SecurityGroupPolicy) UnmarshalJSON(data []byte) error
type SecurityGroupRule ¶
type SecurityGroupRule struct { ID string `json:"id"` // Protocol: // // Default value: TCP Protocol SecurityGroupRuleProtocol `json:"protocol"` // Direction: // // Default value: inbound Direction SecurityGroupRuleDirection `json:"direction"` // Action: // // Default value: accept Action SecurityGroupRuleAction `json:"action"` IPRange scw.IPNet `json:"ip_range"` DestPortFrom *uint32 `json:"dest_port_from"` DestPortTo *uint32 `json:"dest_port_to"` Position uint32 `json:"position"` Editable bool `json:"editable"` Zone scw.Zone `json:"zone"` }
type SecurityGroupRuleAction ¶
type SecurityGroupRuleAction string
func (SecurityGroupRuleAction) MarshalJSON ¶
func (enum SecurityGroupRuleAction) MarshalJSON() ([]byte, error)
func (SecurityGroupRuleAction) String ¶
func (enum SecurityGroupRuleAction) String() string
func (*SecurityGroupRuleAction) UnmarshalJSON ¶
func (enum *SecurityGroupRuleAction) UnmarshalJSON(data []byte) error
type SecurityGroupRuleDirection ¶
type SecurityGroupRuleDirection string
func (SecurityGroupRuleDirection) MarshalJSON ¶
func (enum SecurityGroupRuleDirection) MarshalJSON() ([]byte, error)
func (SecurityGroupRuleDirection) String ¶
func (enum SecurityGroupRuleDirection) String() string
func (*SecurityGroupRuleDirection) UnmarshalJSON ¶
func (enum *SecurityGroupRuleDirection) UnmarshalJSON(data []byte) error
type SecurityGroupRuleProtocol ¶
type SecurityGroupRuleProtocol string
func (SecurityGroupRuleProtocol) MarshalJSON ¶
func (enum SecurityGroupRuleProtocol) MarshalJSON() ([]byte, error)
func (SecurityGroupRuleProtocol) String ¶
func (enum SecurityGroupRuleProtocol) String() string
func (*SecurityGroupRuleProtocol) UnmarshalJSON ¶
func (enum *SecurityGroupRuleProtocol) UnmarshalJSON(data []byte) error
type SecurityGroupState ¶
type SecurityGroupState string
func (SecurityGroupState) MarshalJSON ¶
func (enum SecurityGroupState) MarshalJSON() ([]byte, error)
func (SecurityGroupState) String ¶
func (enum SecurityGroupState) String() string
func (*SecurityGroupState) UnmarshalJSON ¶
func (enum *SecurityGroupState) UnmarshalJSON(data []byte) error
type SecurityGroupSummary ¶
type SecurityGroupTemplate ¶
type Server ¶
type Server struct { // ID: the server unique ID ID string `json:"id"` // Name: the server name Name string `json:"name"` // Organization: the server organization ID Organization string `json:"organization"` // Project: the server project ID Project string `json:"project"` // AllowedActions: provide as list of allowed actions on the server AllowedActions []ServerAction `json:"allowed_actions"` // Tags: the server associated tags Tags []string `json:"tags"` // CommercialType: the server commercial type (eg. GP1-M) CommercialType string `json:"commercial_type"` // CreationDate: the server creation date CreationDate *time.Time `json:"creation_date"` // DynamicIPRequired: true if a dynamic IP is required DynamicIPRequired bool `json:"dynamic_ip_required"` // EnableIPv6: true if IPv6 is enabled EnableIPv6 bool `json:"enable_ipv6"` // Hostname: the server host name Hostname string `json:"hostname"` // Image: provide information on the server image Image *Image `json:"image"` // Protected: the server protection option is activated Protected bool `json:"protected"` // PrivateIP: the server private IP address PrivateIP *string `json:"private_ip"` // PublicIP: information about the public IP PublicIP *ServerIP `json:"public_ip"` // ModificationDate: the server modification date ModificationDate *time.Time `json:"modification_date"` // State: the server state // // Default value: running State ServerState `json:"state"` // Location: the server location Location *ServerLocation `json:"location"` // IPv6: the server IPv6 address IPv6 *ServerIPv6 `json:"ipv6"` // Bootscript: the server bootscript Bootscript *Bootscript `json:"bootscript"` // BootType: the server boot type // // Default value: local BootType BootType `json:"boot_type"` // Volumes: the server volumes Volumes map[string]*VolumeServer `json:"volumes"` // SecurityGroup: the server security group SecurityGroup *SecurityGroupSummary `json:"security_group"` // Maintenances: the server planned maintenances Maintenances []*ServerMaintenance `json:"maintenances"` // StateDetail: the server state_detail StateDetail string `json:"state_detail"` // Arch: the server arch // // Default value: x86_64 Arch Arch `json:"arch"` // PlacementGroup: the server placement group PlacementGroup *PlacementGroup `json:"placement_group"` // PrivateNics: the server private NICs PrivateNics []*PrivateNIC `json:"private_nics"` // Zone: the zone in which is the server 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 server ServerID string `json:"-"` // Action: the action to perform on the server // // Default value: poweron Action ServerAction `json:"action"` // Name: the name of the backup you want to create // // The name of the backup you want to create. // This field should only be specified when performing a backup action. // Name *string `json:"name,omitempty"` // Volumes: for each volume UUID, the snapshot parameters of the volume // // For each volume UUID, the snapshot parameters of the volume. // This field should only be specified when performing a backup action. // Volumes map[string]*ServerActionRequestVolumeBackupTemplate `json:"volumes,omitempty"` }
type ServerActionRequestVolumeBackupTemplate ¶
type ServerActionRequestVolumeBackupTemplate struct { // VolumeType: the snapshot's volume type // // Overrides the volume_type of the snapshot for this volume. // If omitted, the volume type of the original volume will be used. // // Default value: unknown_volume_type VolumeType SnapshotVolumeType `json:"volume_type,omitempty"` }
ServerActionRequestVolumeBackupTemplate: server action request. volume backup template
type ServerActionResponse ¶
type ServerActionResponse struct {
Task *Task `json:"task"`
}
type ServerIP ¶
type ServerIP struct { // ID: the unique ID of the IP address ID string `json:"id"` // Address: the server public IPv4 IP-Address Address net.IP `json:"address"` // Dynamic: true if the IP address is dynamic Dynamic bool `json:"dynamic"` }
ServerIP: server. ip
type ServerIPv6 ¶
type ServerIPv6 struct { // Address: the server IPv6 IP-Address Address net.IP `json:"address"` // Gateway: the IPv6 IP-addresses gateway Gateway net.IP `json:"gateway"` // Netmask: the IPv6 IP-addresses CIDR netmask Netmask string `json:"netmask"` }
ServerIPv6: server. ipv6
type ServerLocation ¶
type ServerMaintenance ¶
type ServerMaintenance struct { }
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 ServerType ¶
type ServerType struct { // Deprecated: MonthlyPrice: estimated monthly price, for a 30 days month, in Euro MonthlyPrice *float32 `json:"monthly_price,omitempty"` // HourlyPrice: hourly price in Euro HourlyPrice float32 `json:"hourly_price"` // AltNames: alternative instance name if any AltNames []string `json:"alt_names"` // PerVolumeConstraint: additional volume constraints PerVolumeConstraint *ServerTypeVolumeConstraintsByType `json:"per_volume_constraint"` // VolumesConstraint: initial volume constraints VolumesConstraint *ServerTypeVolumeConstraintSizes `json:"volumes_constraint"` // Ncpus: number of CPU Ncpus uint32 `json:"ncpus"` // Gpu: number of GPU Gpu *uint64 `json:"gpu"` // RAM: available RAM in bytes RAM uint64 `json:"ram"` // Arch: CPU architecture // // Default value: x86_64 Arch Arch `json:"arch"` // Baremetal: true if it is a baremetal instance Baremetal bool `json:"baremetal"` // Network: network available for the instance Network *ServerTypeNetwork `json:"network"` // Capabilities: capabilities Capabilities *ServerTypeCapabilities `json:"capabilities"` }
ServerType: server type
type ServerTypeCapabilities ¶
type ServerTypeCapabilities struct { // BlockStorage: true if server supports block storage BlockStorage *bool `json:"block_storage"` // BootTypes: list of supported boot types BootTypes []BootType `json:"boot_types"` }
ServerTypeCapabilities: server type. capabilities
type ServerTypeNetwork ¶
type ServerTypeNetwork struct { // Interfaces: list of available network interfaces Interfaces []*ServerTypeNetworkInterface `json:"interfaces"` // SumInternalBandwidth: total maximum internal bandwidth in bits per seconds SumInternalBandwidth *uint64 `json:"sum_internal_bandwidth"` // SumInternetBandwidth: total maximum internet bandwidth in bits per seconds SumInternetBandwidth *uint64 `json:"sum_internet_bandwidth"` // IPv6Support: true if IPv6 is enabled IPv6Support bool `json:"ipv6_support"` }
ServerTypeNetwork: server type. network
type ServerTypeNetworkInterface ¶
type ServerTypeNetworkInterface struct { // InternalBandwidth: maximum internal bandwidth in bits per seconds InternalBandwidth *uint64 `json:"internal_bandwidth"` // InternetBandwidth: maximum internet bandwidth in bits per seconds InternetBandwidth *uint64 `json:"internet_bandwidth"` }
ServerTypeNetworkInterface: server type. network. interface
type ServerTypeVolumeConstraintSizes ¶
type ServerTypeVolumeConstraintSizes struct { // MinSize: minimum volume size in bytes MinSize scw.Size `json:"min_size"` // MaxSize: maximum volume size in bytes MaxSize scw.Size `json:"max_size"` }
ServerTypeVolumeConstraintSizes: server type. volume constraint sizes
type ServerTypeVolumeConstraintsByType ¶
type ServerTypeVolumeConstraintsByType struct { // LSSD: local SSD volumes LSSD *ServerTypeVolumeConstraintSizes `json:"l_ssd"` }
ServerTypeVolumeConstraintsByType: server type. volume constraints by type
type ServerTypesAvailability ¶
type ServerTypesAvailability string
func (ServerTypesAvailability) MarshalJSON ¶
func (enum ServerTypesAvailability) MarshalJSON() ([]byte, error)
func (ServerTypesAvailability) String ¶
func (enum ServerTypesAvailability) String() string
func (*ServerTypesAvailability) UnmarshalJSON ¶
func (enum *ServerTypesAvailability) UnmarshalJSON(data []byte) error
type SetAllServerUserDataRequest ¶
type SetAllServerUserDataRequest struct { Zone scw.Zone `json:"-"` ServerID string `json:"-"` // UserData defines all user data that will be set to the server. // This map is idempotent, it means that all the current data will be overwritten and // all keys not present in this map will be deleted.. All data will be removed if this map is nil. UserData map[string]io.Reader `json:"-"` }
SetAllServerUserDataRequest is used by SetAllServerUserData method.
type SetImageRequest ¶
type SetImageRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` ID string `json:"-"` Name string `json:"name"` // Arch: // // Default value: x86_64 Arch Arch `json:"arch"` CreationDate *time.Time `json:"creation_date"` ModificationDate *time.Time `json:"modification_date"` DefaultBootscript *Bootscript `json:"default_bootscript"` ExtraVolumes map[string]*Volume `json:"extra_volumes"` FromServer string `json:"from_server"` Organization string `json:"organization"` Public bool `json:"public"` RootVolume *VolumeSummary `json:"root_volume"` // State: // // Default value: available State ImageState `json:"state"` Project string `json:"project"` Tags *[]string `json:"tags"` }
type SetPlacementGroupRequest ¶
type SetPlacementGroupRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` PlacementGroupID string `json:"-"` Name string `json:"name"` Organization string `json:"organization"` // PolicyMode: // // Default value: optional PolicyMode PlacementGroupPolicyMode `json:"policy_mode"` // PolicyType: // // Default value: max_availability PolicyType PlacementGroupPolicyType `json:"policy_type"` Project string `json:"project"` Tags *[]string `json:"tags"` }
type SetPlacementGroupResponse ¶
type SetPlacementGroupResponse struct {
PlacementGroup *PlacementGroup `json:"placement_group"`
}
type SetPlacementGroupServersResponse ¶
type SetPlacementGroupServersResponse struct {
Servers []*PlacementGroupServer `json:"servers"`
}
type SetSecurityGroupRulesRequest ¶
type SetSecurityGroupRulesRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // SecurityGroupID: UUID of the security group to update the rules on SecurityGroupID string `json:"-"` // Rules: list of rules to update in the security group Rules []*SetSecurityGroupRulesRequestRule `json:"rules"` }
type SetSecurityGroupRulesRequestRule ¶
type SetSecurityGroupRulesRequestRule struct { // ID: UUID of the security rule to update. If no value is provided, a new rule will be created ID *string `json:"id"` // Action: action to apply when the rule matches a packet // // Default value: accept Action SecurityGroupRuleAction `json:"action"` // Protocol: protocol family this rule applies to // // Default value: TCP Protocol SecurityGroupRuleProtocol `json:"protocol"` // Direction: direction the rule applies to // // Default value: inbound Direction SecurityGroupRuleDirection `json:"direction"` // IPRange: the range of IP address this rules applies to IPRange scw.IPNet `json:"ip_range"` // DestPortFrom: beginning of the range of ports this rule applies to (inclusive). This value will be set to null if protocol is ICMP or ANY DestPortFrom *uint32 `json:"dest_port_from"` // DestPortTo: end of the range of ports this rule applies to (inclusive). This value will be set to null if protocol is ICMP or ANY, or if it is equal to dest_port_from DestPortTo *uint32 `json:"dest_port_to"` // Position: position of this rule in the security group rules list. If several rules are passed with the same position, the resulting order is undefined Position uint32 `json:"position"` // Editable: indicates if this rule is editable. Rules with the value false will be ignored Editable *bool `json:"editable"` // Zone: zone of the rule. This field is ignored Zone scw.Zone `json:"zone"` }
SetSecurityGroupRulesRequestRule: set security group rules request. rule
type SetSecurityGroupRulesResponse ¶
type SetSecurityGroupRulesResponse struct {
Rules []*SecurityGroupRule `json:"rules"`
}
type SetServerUserDataRequest ¶
type SetServerUserDataRequest struct { Zone scw.Zone `json:"-"` ServerID string `json:"-"` // Key defines the user data key to set. Key string `json:"-"` // Content defines the data to set. Content io.Reader }
SetServerUserDataRequest is used by SetServerUserData method.
type Snapshot ¶
type Snapshot struct { // ID: the snapshot ID ID string `json:"id"` // Name: the snapshot name Name string `json:"name"` // Organization: the snapshot organization ID Organization string `json:"organization"` // Project: the snapshot project ID Project string `json:"project"` // Tags: the snapshot tags Tags []string `json:"tags"` // VolumeType: the snapshot volume type // // Default value: l_ssd VolumeType VolumeVolumeType `json:"volume_type"` // Size: the snapshot size Size scw.Size `json:"size"` // State: the snapshot state // // Default value: available State SnapshotState `json:"state"` // BaseVolume: the volume on which the snapshot is based on BaseVolume *SnapshotBaseVolume `json:"base_volume"` // CreationDate: the snapshot creation date CreationDate *time.Time `json:"creation_date"` // ModificationDate: the snapshot modification date ModificationDate *time.Time `json:"modification_date"` // Zone: the snapshot zone Zone scw.Zone `json:"zone"` // ErrorReason: the reason for the failed snapshot import ErrorReason *string `json:"error_reason"` }
Snapshot: snapshot
type SnapshotBaseVolume ¶
type SnapshotBaseVolume struct { // ID: the volume ID on which the snapshot is based on ID string `json:"id"` // Name: the 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: the unique ID of the task ID string `json:"id"` // Description: the description of the task Description string `json:"description"` // Progress: the progress of the task in percent Progress int32 `json:"progress"` // StartedAt: the task start date StartedAt *time.Time `json:"started_at"` // TerminatedAt: the task end date TerminatedAt *time.Time `json:"terminated_at"` // Status: the task status // // Default value: pending Status TaskStatus `json:"status"` HrefFrom string `json:"href_from"` HrefResult string `json:"href_result"` // Zone: the zone in which is the task 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"` // Tags: an array of keywords you want to tag this IP with Tags *[]string `json:"tags,omitempty"` Server *NullableStringValue `json:"server,omitempty"` }
type UpdateIPResponse ¶
type UpdateIPResponse struct {
IP *IP `json:"ip"`
}
type UpdateImageRequest ¶
type UpdateImageRequest struct { Zone scw.Zone `json:"zone"` ImageID string `json:"id"` Name *string `json:"name,omitempty"` Arch Arch `json:"arch,omitempty"` CreationDate *time.Time `json:"creation_date"` ModificationDate *time.Time `json:"modification_date"` ExtraVolumes map[string]*VolumeTemplate `json:"extra_volumes"` FromServer string `json:"from_server,omitempty"` Organization string `json:"organization"` Public bool `json:"public"` RootVolume *VolumeSummary `json:"root_volume,omitempty"` State ImageState `json:"state"` Project string `json:"project"` Tags *[]string `json:"tags,omitempty"` }
type UpdateImageResponse ¶
type UpdateImageResponse struct {
Image *Image
}
type UpdatePlacementGroupRequest ¶
type UpdatePlacementGroupRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // PlacementGroupID: UUID of the placement group PlacementGroupID string `json:"-"` // Name: name of the placement group Name *string `json:"name,omitempty"` // Tags: the tags of the placement group Tags *[]string `json:"tags,omitempty"` // PolicyMode: the operating mode of the placement group // // Default value: optional PolicyMode *PlacementGroupPolicyMode `json:"policy_mode,omitempty"` // PolicyType: the policy type of the placement group // // Default value: max_availability PolicyType *PlacementGroupPolicyType `json:"policy_type,omitempty"` }
type UpdatePlacementGroupResponse ¶
type UpdatePlacementGroupResponse struct {
PlacementGroup *PlacementGroup `json:"placement_group"`
}
type UpdatePlacementGroupServersResponse ¶
type UpdatePlacementGroupServersResponse struct {
Servers []*PlacementGroupServer `json:"servers"`
}
type UpdateSecurityGroupRequest ¶
type UpdateSecurityGroupRequest struct { Zone scw.Zone `json:"-"` SecurityGroupID string `json:"-"` Name *string `json:"name,omitempty"` Description *string `json:"description,omitempty"` InboundDefaultPolicy *SecurityGroupPolicy `json:"inbound_default_policy,omitempty"` OutboundDefaultPolicy *SecurityGroupPolicy `json:"outbound_default_policy,omitempty"` Stateful *bool `json:"stateful,omitempty"` OrganizationDefault *bool `json:"organization_default,omitempty"` ProjectDefault *bool `json:"project_default,omitempty"` EnableDefaultSecurity *bool `json:"enable_default_security,omitempty"` Tags *[]string `json:"tags,omitempty"` }
UpdateSecurityGroupRequest contains the parameters to update a security group
type UpdateSecurityGroupResponse ¶
type UpdateSecurityGroupResponse struct {
SecurityGroup *SecurityGroup
}
type UpdateSecurityGroupRuleRequest ¶
type UpdateSecurityGroupRuleRequest struct { Zone scw.Zone `json:"-"` SecurityGroupID string `json:"-"` SecurityGroupRuleID string `json:"-"` Protocol *SecurityGroupRuleProtocol `json:"protocol"` Direction *SecurityGroupRuleDirection `json:"direction"` Action *SecurityGroupRuleAction `json:"action"` IPRange *scw.IPNet `json:"ip_range"` Position *uint32 `json:"position"` // If set to 0, DestPortFrom will be removed. // See SecurityGroupRule.DestPortFrom for more information DestPortFrom *uint32 `json:"dest_port_from"` // If set to 0, DestPortTo will be removed. // See SecurityGroupRule.DestPortTo for more information DestPortTo *uint32 `json:"dest_port_to"` }
UpdateSecurityGroupRuleRequest contains the parameters to update a security group rule
type UpdateSecurityGroupRuleResponse ¶
type UpdateSecurityGroupRuleResponse struct {
Rule *SecurityGroupRule `json:"security_rule"`
}
type UpdateServerRequest ¶
type UpdateServerRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // ServerID: UUID of the server ServerID string `json:"-"` // Name: name of the server Name *string `json:"name,omitempty"` // BootType: // // Default value: local BootType *BootType `json:"boot_type,omitempty"` // Tags: tags of the server Tags *[]string `json:"tags,omitempty"` Volumes *map[string]*VolumeServerTemplate `json:"volumes,omitempty"` Bootscript *string `json:"bootscript,omitempty"` DynamicIPRequired *bool `json:"dynamic_ip_required,omitempty"` EnableIPv6 *bool `json:"enable_ipv6,omitempty"` Protected *bool `json:"protected,omitempty"` SecurityGroup *SecurityGroupTemplate `json:"security_group,omitempty"` // PlacementGroup: placement group ID if server must be part of a placement group PlacementGroup *NullableStringValue `json:"placement_group,omitempty"` // PrivateNics: the server private NICs PrivateNics []*PrivateNIC `json:"private_nics,omitempty"` }
type UpdateServerResponse ¶
type UpdateServerResponse struct {
Server *Server `json:"server"`
}
type UpdateSnapshotRequest ¶
type UpdateSnapshotResponse ¶
type UpdateSnapshotResponse struct {
Snapshot *Snapshot
}
type UpdateVolumeRequest ¶
type UpdateVolumeRequest struct { // Zone: // // Zone to target. If none is passed will use default zone from the config Zone scw.Zone `json:"-"` // VolumeID: UUID of the volume VolumeID string `json:"-"` // Name: the volume name Name *string `json:"name,omitempty"` // Tags: the tags of the volume Tags *[]string `json:"tags,omitempty"` // Size: the volume disk size, must be a multiple of 512 Size *scw.Size `json:"size,omitempty"` }
type UpdateVolumeResponse ¶
type UpdateVolumeResponse struct {
Volume *Volume `json:"volume"`
}
type UserData ¶
type UserData struct {
UserData []string `json:"user_data,omitempty"`
}
UserData represents the user data
type Volume ¶
type Volume struct { // ID: the volume unique ID ID string `json:"id"` // Name: the volume name Name string `json:"name"` // Deprecated: ExportURI: show the volume NBD export URI ExportURI *string `json:"export_uri"` // Size: the volume disk size Size scw.Size `json:"size"` // VolumeType: the volume type // // Default value: l_ssd VolumeType VolumeVolumeType `json:"volume_type"` // CreationDate: the volume creation date CreationDate *time.Time `json:"creation_date"` // ModificationDate: the volume modification date ModificationDate *time.Time `json:"modification_date"` // Organization: the volume organization ID Organization string `json:"organization"` // Project: the volume project ID Project string `json:"project"` // Tags: the volume tags Tags []string `json:"tags"` // Server: the server attached to the volume Server *ServerSummary `json:"server"` // State: the volume state // // Default value: available State VolumeState `json:"state"` // Zone: the zone in which is the volume Zone scw.Zone `json:"zone"` }
Volume: volume
type VolumeServer ¶
type VolumeServer struct { ID string `json:"id"` Name string `json:"name"` ExportURI string `json:"export_uri"` Organization string `json:"organization"` Server *ServerSummary `json:"server"` Size scw.Size `json:"size"` // VolumeType: // // Default value: l_ssd VolumeType VolumeServerVolumeType `json:"volume_type"` CreationDate *time.Time `json:"creation_date"` ModificationDate *time.Time `json:"modification_date"` // State: // // Default value: available State VolumeServerState `json:"state"` Project string `json:"project"` Boot bool `json:"boot"` Zone scw.Zone `json:"zone"` }
type VolumeServerState ¶
type VolumeServerState string
func (VolumeServerState) MarshalJSON ¶
func (enum VolumeServerState) MarshalJSON() ([]byte, error)
func (VolumeServerState) String ¶
func (enum VolumeServerState) String() string
func (*VolumeServerState) UnmarshalJSON ¶
func (enum *VolumeServerState) UnmarshalJSON(data []byte) error
type VolumeServerTemplate ¶
type VolumeServerTemplate struct { // ID: UUID of the volume ID string `json:"id,omitempty"` // Boot: force the server to boot on this volume // // Default value: false Boot bool `json:"boot,omitempty"` // Name: name of the volume Name string `json:"name,omitempty"` // Size: disk size of the volume, must be a multiple of 512 Size scw.Size `json:"size,omitempty"` // VolumeType: type of the volume // // Default value: l_ssd VolumeType VolumeVolumeType `json:"volume_type,omitempty"` // BaseSnapshot: the ID of the snapshot on which this volume will be based BaseSnapshot string `json:"base_snapshot,omitempty"` // Organization: organization ID of the volume Organization string `json:"organization,omitempty"` // Project: project ID of the volume Project string `json:"project,omitempty"` }
VolumeServerTemplate: volume server template
type VolumeServerVolumeType ¶
type VolumeServerVolumeType string
func (VolumeServerVolumeType) MarshalJSON ¶
func (enum VolumeServerVolumeType) MarshalJSON() ([]byte, error)
func (VolumeServerVolumeType) String ¶
func (enum VolumeServerVolumeType) String() string
func (*VolumeServerVolumeType) UnmarshalJSON ¶
func (enum *VolumeServerVolumeType) UnmarshalJSON(data []byte) error
type VolumeState ¶
type VolumeState string
func (VolumeState) MarshalJSON ¶
func (enum VolumeState) MarshalJSON() ([]byte, error)
func (VolumeState) String ¶
func (enum VolumeState) String() string
func (*VolumeState) UnmarshalJSON ¶
func (enum *VolumeState) UnmarshalJSON(data []byte) error
type VolumeSummary ¶
type VolumeSummary struct { ID string `json:"id"` Name string `json:"name"` Size scw.Size `json:"size"` // VolumeType: // // Default value: l_ssd VolumeType VolumeVolumeType `json:"volume_type"` }
type VolumeTemplate ¶
type VolumeTemplate struct { // ID: UUID of the volume ID string `json:"id,omitempty"` // Name: name of the volume Name string `json:"name,omitempty"` // Size: disk size of the volume, must be a multiple of 512 Size scw.Size `json:"size,omitempty"` // VolumeType: type of the volume // // Default value: l_ssd VolumeType VolumeVolumeType `json:"volume_type,omitempty"` // Deprecated: Organization: organization ID of the volume // Precisely one of Organization, Project must be set. Organization *string `json:"organization,omitempty"` // Project: project ID of the volume // Precisely one of Organization, Project must be set. Project *string `json:"project,omitempty"` }
VolumeTemplate: volume template
type VolumeType ¶
type VolumeType struct { DisplayName string `json:"display_name"` Capabilities *VolumeTypeCapabilities `json:"capabilities"` Constraints *VolumeTypeConstraints `json:"constraints"` }
type VolumeTypeCapabilities ¶
type VolumeTypeCapabilities struct {
Snapshot bool `json:"snapshot"`
}
type VolumeTypeConstraints ¶
type 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.