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)
- 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) 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) 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)
- func (s *API) DetachVolume(req *DetachVolumeRequest, opts ...scw.RequestOption) (*DetachVolumeResponse, 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) 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) 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) 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) ServerAction(req *ServerActionRequest, opts ...scw.RequestOption) (*ServerActionResponse, error)
- func (s *API) ServerActionAndWait(req *ServerActionAndWaitRequest) 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) SetServerUserData(req *SetServerUserDataRequest, opts ...scw.RequestOption) error
- func (s *API) UpdateIP(req *UpdateIPRequest, opts ...scw.RequestOption) (*UpdateIPResponse, 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) UpdateVolume(req *UpdateVolumeRequest, opts ...scw.RequestOption) (*UpdateVolumeResponse, error)
- func (s *API) WaitForServer(req *WaitForServerRequest) (*Server, error)
- type Arch
- type AttachIPRequest
- type AttachIPResponse
- type AttachVolumeRequest
- type AttachVolumeResponse
- type BootType
- type Bootscript
- type CreateIPRequest
- type CreateIPResponse
- type CreateImageRequest
- type CreateImageResponse
- type CreatePlacementGroupRequest
- type CreatePlacementGroupResponse
- 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 DeleteSecurityGroupRequest
- type DeleteSecurityGroupRuleRequest
- type DeleteServerRequest
- type DeleteServerUserDataRequest
- type DeleteSnapshotRequest
- type DeleteVolumeRequest
- type DetachIPRequest
- type DetachIPResponse
- type DetachVolumeRequest
- type DetachVolumeResponse
- type From
- type FromBaseSnapshot
- type FromBaseVolume
- type FromSize
- 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 GetSecurityGroupRequest
- type GetSecurityGroupResponse
- type GetSecurityGroupRuleRequest
- type GetSecurityGroupRuleResponse
- type GetServerRequest
- type GetServerResponse
- type GetServerTypeRequest
- type GetServerTypesAvailabilityRequest
- type GetServerTypesAvailabilityResponse
- type GetServerUserDataRequest
- type GetSnapshotRequest
- type GetSnapshotResponse
- type GetVolumeRequest
- type GetVolumeResponse
- type IP
- type Image
- type ImageState
- type ListBootscriptsRequest
- type ListBootscriptsResponse
- type ListIPsRequest
- type ListIPsResponse
- type ListImagesRequest
- type ListImagesResponse
- type ListPlacementGroupsRequest
- type ListPlacementGroupsResponse
- type ListSecurityGroupRulesRequest
- type ListSecurityGroupRulesResponse
- type ListSecurityGroupsRequest
- type ListSecurityGroupsResponse
- type ListServerActionsRequest
- type ListServerActionsResponse
- type ListServerUserDataRequest
- type ListServerUserDataResponse
- type ListServersRequest
- type ListServersResponse
- type ListServersTypesRequest
- type ListServersTypesResponse
- type ListSnapshotsRequest
- type ListSnapshotsResponse
- type ListVolumesRequest
- type ListVolumesResponse
- type Metadata
- type MetadataAPI
- type NullableStringValue
- type PlacementGroup
- type PlacementGroupPolicyMode
- type PlacementGroupPolicyType
- type PlacementGroupServer
- type SecurityGroup
- type SecurityGroupPolicy
- type SecurityGroupRule
- type SecurityGroupRuleAction
- type SecurityGroupRuleDirection
- type SecurityGroupRuleProtocol
- type SecurityGroupSummary
- type SecurityGroupTemplate
- type Server
- type ServerAction
- type ServerActionAndWaitRequest
- type ServerActionRequest
- type ServerActionResponse
- type ServerIP
- type ServerIPv6
- type ServerLocation
- type ServerMaintenance
- type ServerState
- type ServerSummary
- type ServerType
- type ServerTypeNetwork
- type ServerTypeNetworkInterface
- type ServerTypeVolumeConstraintSizes
- type ServerTypeVolumeConstraintsByType
- type ServerTypesAvailability
- type SetAllServerUserDataRequest
- type SetIPRequest
- type SetImageRequest
- type SetPlacementGroupRequest
- type SetPlacementGroupResponse
- type SetPlacementGroupServersRequest
- type SetPlacementGroupServersResponse
- type SetServerUserDataRequest
- type SetSnapshotRequest
- type Snapshot
- type SnapshotBaseVolume
- type SnapshotState
- type Task
- type TaskStatus
- type UpdateIPRequest
- type UpdateIPResponse
- type UpdatePlacementGroupRequest
- type UpdatePlacementGroupResponse
- type UpdatePlacementGroupServersRequest
- type UpdatePlacementGroupServersResponse
- type UpdateSecurityGroupRequest
- type UpdateSecurityGroupResponse
- type UpdateSecurityGroupRuleRequest
- type UpdateSecurityGroupRuleResponse
- type UpdateServerRequest
- type UpdateServerResponse
- type UpdateVolumeRequest
- type UpdateVolumeResponse
- type UserData
- type Volume
- type VolumeState
- type VolumeSummary
- type VolumeTemplate
- type VolumeType
- type WaitForServerRequest
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 ( // 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 ( // 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 ( // 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") )
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 ( // VolumeStateAvailable is [insert doc]. VolumeStateAvailable = VolumeState("available") // VolumeStateSnapshotting is [insert doc]. VolumeStateSnapshotting = VolumeState("snapshotting") // VolumeStateError is [insert doc]. VolumeStateError = VolumeState("error") )
const ( // VolumeTypeLSSD is [insert doc]. VolumeTypeLSSD = VolumeType("l_ssd") // VolumeTypeBSSD is [insert doc]. VolumeTypeBSSD = VolumeType("b_ssd") )
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 ¶
func (s *API) AttachIP(req *AttachIPRequest, opts ...scw.RequestOption) (*AttachIPResponse, error)
AttachIP attaches an IP to a server.
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 an IP
func (*API) CreateImage ¶
func (s *API) CreateImage(req *CreateImageRequest, opts ...scw.RequestOption) (*CreateImageResponse, error)
CreateImage create image
func (*API) CreatePlacementGroup ¶
func (s *API) CreatePlacementGroup(req *CreatePlacementGroupRequest, opts ...scw.RequestOption) (*CreatePlacementGroupResponse, error)
CreatePlacementGroup create placement group
Create a new placement group.
func (*API) CreateSecurityGroup ¶
func (s *API) CreateSecurityGroup(req *CreateSecurityGroupRequest, opts ...scw.RequestOption) (*CreateSecurityGroupResponse, error)
CreateSecurityGroup create 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 snapshot
func (*API) CreateVolume ¶
func (s *API) CreateVolume(req *CreateVolumeRequest, opts ...scw.RequestOption) (*CreateVolumeResponse, error)
CreateVolume create volume
func (*API) DeleteIP ¶
func (s *API) DeleteIP(req *DeleteIPRequest, opts ...scw.RequestOption) error
DeleteIP delete IP
Delete the IP with the given ID.
func (*API) DeleteImage ¶
func (s *API) DeleteImage(req *DeleteImageRequest, opts ...scw.RequestOption) error
DeleteImage delete 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) DeleteSecurityGroup ¶
func (s *API) DeleteSecurityGroup(req *DeleteSecurityGroupRequest, opts ...scw.RequestOption) error
DeleteSecurityGroup delete 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 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 snapshot
Delete the snapshot with the given ID.
func (*API) DeleteVolume ¶
func (s *API) DeleteVolume(req *DeleteVolumeRequest, opts ...scw.RequestOption) error
DeleteVolume delete volume
Delete the volume with the given ID.
func (*API) DetachIP ¶
func (s *API) DetachIP(req *DetachIPRequest, opts ...scw.RequestOption) (*DetachIPResponse, error)
DetachIP detaches an IP from a server.
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) 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 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 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 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) GetSecurityGroup ¶
func (s *API) GetSecurityGroup(req *GetSecurityGroupRequest, opts ...scw.RequestOption) (*GetSecurityGroupResponse, error)
GetSecurityGroup get 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 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 availibility 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 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 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) ListIPs ¶
func (s *API) ListIPs(req *ListIPsRequest, opts ...scw.RequestOption) (*ListIPsResponse, error)
ListIPs list IPs
func (*API) ListImages ¶
func (s *API) ListImages(req *ListImagesRequest, opts ...scw.RequestOption) (*ListImagesResponse, error)
ListImages list 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) 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
Liste 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 register on a given server.
func (*API) ListServers ¶
func (s *API) ListServers(req *ListServersRequest, opts ...scw.RequestOption) (*ListServersResponse, error)
ListServers list 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) 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) 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) 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 updates an IP
func (*API) UpdatePlacementGroup ¶
func (s *API) UpdatePlacementGroup(req *UpdatePlacementGroupRequest, opts ...scw.RequestOption) (*UpdatePlacementGroupResponse, error)
UpdatePlacementGroup update 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) UpdateVolume ¶
func (s *API) UpdateVolume(req *UpdateVolumeRequest, opts ...scw.RequestOption) (*UpdateVolumeResponse, error)
UpdateVolume updates the set fields on the volume.
func (*API) WaitForServer ¶
func (s *API) WaitForServer(req *WaitForServerRequest) (*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.
type AttachIPRequest ¶
type AttachIPRequest struct { Zone scw.Zone `json:"-"` IP string `json:"-"` ServerID string `json:"server_id"` }
AttachIPRequest contains the parameters to attach an IP to a server
type AttachIPResponse ¶
type AttachIPResponse struct {
IP *IP
}
AttachIPResponse contains the updated IP after attaching
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 display the bootscript parameters 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 display the bootscripts ID ID string `json:"id"` // Initrd display the initrd (initial ramdisk) configuration Initrd string `json:"initrd"` // Kernel display the server kernel version Kernel string `json:"kernel"` // Organization display the bootscripts organization Organization string `json:"organization"` // Public provide information if the bootscript is public Public bool `json:"public"` // Title display the bootscripts title Title string `json:"title"` // Arch display the bootscripts arch // // Default value: x86_64 Arch Arch `json:"arch"` }
Bootscript bootscript
type CreateIPRequest ¶
type CreateIPResponse ¶
type CreateImageRequest ¶
type CreateImageRequest struct { Zone scw.Zone `json:"-"` Name string `json:"name,omitempty"` RootVolume string `json:"root_volume,omitempty"` // Arch // // Default value: x86_64 Arch Arch `json:"arch"` DefaultBootscript string `json:"default_bootscript,omitempty"` ExtraVolumes map[string]*VolumeTemplate `json:"extra_volumes,omitempty"` Organization string `json:"organization,omitempty"` Public bool `json:"public,omitempty"` }
type CreateImageResponse ¶
type CreatePlacementGroupRequest ¶
type CreatePlacementGroupRequest struct { Zone scw.Zone `json:"-"` Name string `json:"name,omitempty"` Organization string `json:"organization,omitempty"` // PolicyMode // // Default value: optional PolicyMode PlacementGroupPolicyMode `json:"policy_mode"` // PolicyType // // Default value: max_availability PolicyType PlacementGroupPolicyType `json:"policy_type"` }
type CreatePlacementGroupResponse ¶
type CreatePlacementGroupResponse struct {
PlacementGroup *PlacementGroup `json:"placement_group"`
}
type CreateSecurityGroupRequest ¶
type CreateSecurityGroupRequest struct { Zone scw.Zone `json:"-"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Organization string `json:"organization,omitempty"` // OrganizationDefault // // Default value: false OrganizationDefault bool `json:"organization_default,omitempty"` // Stateful // // Default value: false Stateful bool `json:"stateful,omitempty"` // InboundDefaultPolicy // // Default value: accept InboundDefaultPolicy SecurityGroupPolicy `json:"inbound_default_policy"` // OutboundDefaultPolicy // // Default value: accept OutboundDefaultPolicy SecurityGroupPolicy `json:"outbound_default_policy"` }
type CreateSecurityGroupResponse ¶
type CreateSecurityGroupResponse struct {
SecurityGroup *SecurityGroup `json:"security_group"`
}
type CreateSecurityGroupRuleRequest ¶
type CreateSecurityGroupRuleRequest struct { Zone scw.Zone `json:"-"` 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 *uint32 `json:"dest_port_from,omitempty"` DestPortTo *uint32 `json:"dest_port_to,omitempty"` Position uint32 `json:"position,omitempty"` Editable bool `json:"editable,omitempty"` }
type CreateSecurityGroupRuleResponse ¶
type CreateSecurityGroupRuleResponse struct {
Rule *SecurityGroupRule `json:"rule"`
}
type CreateServerRequest ¶
type CreateServerRequest struct { Zone scw.Zone `json:"-"` // Name display 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]*VolumeTemplate `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"` // Bootscript the bootscript ID to use when `boot_type` is set to `bootscript` Bootscript *string `json:"bootscript,omitempty"` // Organization the server organization ID Organization string `json:"organization,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 CreateSnapshotResponse ¶
type CreateSnapshotResponse struct {
Snapshot *Snapshot `json:"snapshot"`
}
type CreateVolumeRequest ¶
type CreateVolumeRequest struct { Zone scw.Zone `json:"-"` Name string `json:"name,omitempty"` Organization string `json:"organization,omitempty"` // VolumeType // // Default value: l_ssd VolumeType VolumeType `json:"volume_type"` // Precisely one of BaseSnapshot, BaseVolume, Size must be set. Size *scw.Size `json:"size,omitempty"` // Precisely one of BaseSnapshot, BaseVolume, Size must be set. BaseVolume *string `json:"base_volume,omitempty"` // Precisely one of BaseSnapshot, BaseVolume, Size must be set. BaseSnapshot *string `json:"base_snapshot,omitempty"` }
func (*CreateVolumeRequest) GetFrom ¶
func (m *CreateVolumeRequest) GetFrom() From
type CreateVolumeResponse ¶
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"` }
type DeleteIPRequest ¶
type DeleteImageRequest ¶
type DeleteServerRequest ¶
type DeleteSnapshotRequest ¶
type DeleteVolumeRequest ¶
type DetachIPRequest ¶
DetachIPRequest contains the parameters to detach an IP from a server
type DetachIPResponse ¶
type DetachIPResponse struct {
IP *IP
}
DetachIPResponse contains the updated IP after detaching
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 FromBaseSnapshot ¶
type FromBaseSnapshot struct {
Value string
}
type FromBaseVolume ¶
type FromBaseVolume struct {
Value string
}
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 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]ServerTypesAvailability `json:"servers"`
}
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"` }
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 { Bootscripts []*Bootscript `json:"bootscripts"` TotalCount uint32 `json:"total_count"` }
func (*ListBootscriptsResponse) UnsafeAppend ¶
func (r *ListBootscriptsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError)
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 ListIPsResponse ¶
func (*ListIPsResponse) UnsafeAppend ¶
func (r *ListIPsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError)
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 ListImagesResponse ¶
type ListImagesResponse struct { Images []*Image `json:"images"` TotalCount uint32 `json:"total_count"` }
func (*ListImagesResponse) UnsafeAppend ¶
func (r *ListImagesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError)
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 scw.Zone `json:"-"` // PerPage a positive integer lower or equal to 100 to select the number of items to display // // Default value: 20 PerPage *uint32 `json:"-"` // Page a positive integer to choose the page to display Page *int32 `json:"-"` // Organization list only placement groups of this organization Organization *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 { PlacementGroups []*PlacementGroup `json:"placement_groups"` TotalCount uint32 `json:"total_count"` }
func (*ListPlacementGroupsResponse) UnsafeAppend ¶
func (r *ListPlacementGroupsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError)
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 ListSecurityGroupRulesResponse ¶
type ListSecurityGroupRulesResponse struct { Rules []*SecurityGroupRule `json:"rules"` TotalCount uint32 `json:"total_count"` }
func (*ListSecurityGroupRulesResponse) UnsafeAppend ¶
func (r *ListSecurityGroupRulesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError)
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 ListSecurityGroupsResponse ¶
type ListSecurityGroupsResponse struct { SecurityGroups []*SecurityGroup `json:"security_groups"` TotalCount uint32 `json:"total_count"` }
func (*ListSecurityGroupsResponse) UnsafeAppend ¶
func (r *ListSecurityGroupsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError)
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 scw.Zone `json:"-"` // PerPage a positive integer lower or equal to 100 to select the number of items to display // // Default value: 20 PerPage *uint32 `json:"-"` // Page a positive integer to choose the page to display Page *int32 `json:"-"` // Organization list only servers of this organization Organization *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:"-"` }
type ListServersResponse ¶
type ListServersResponse struct { Servers []*Server `json:"servers"` TotalCount uint32 `json:"total_count"` }
func (*ListServersResponse) UnsafeAppend ¶
func (r *ListServersResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError)
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 { Servers map[string]*ServerType `json:"servers"` TotalCount uint32 `json:"total_count"` }
func (*ListServersTypesResponse) UnsafeAppend ¶
func (r *ListServersTypesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError)
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 ListSnapshotsResponse ¶
type ListSnapshotsResponse struct { Snapshots []*Snapshot `json:"snapshots"` TotalCount uint32 `json:"total_count"` }
func (*ListSnapshotsResponse) UnsafeAppend ¶
func (r *ListSnapshotsResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError)
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 scw.Zone `json:"-"` // VolumeType filter by volume type // // Default value: l_ssd VolumeType VolumeType `json:"-"` // PerPage a positive integer lower or equal to 100 to select the number of items to display // // Default value: 20 PerPage *uint32 `json:"-"` // Page a positive integer to choose the page to display Page *int32 `json:"-"` // Organization display volumes of this organization Organization *string `json:"-"` // Name filter volume by name (for eg. "vol" will return "myvolume" but not "data") Name *string `json:"-"` }
type ListVolumesResponse ¶
type ListVolumesResponse struct { Volumes []*Volume `json:"volumes"` TotalCount uint32 `json:"total_count"` }
func (*ListVolumesResponse) UnsafeAppend ¶
func (r *ListVolumesResponse) UnsafeAppend(res interface{}) (uint32, scw.SdkError)
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 Metadata ¶
type Metadata struct { ID string `json:"id,omitempty"` Name string `json:"name,omitempty"` Hostname string `json:"hostname,omitempty"` Organization string `json:"organization,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"` Email string `json:"email,omitempty"` UserAgent struct { Platform string `json:"platform,omitempty"` Version string `json:"version,omitempty"` String string `json:"string,omitempty"` Browser string `json:"browser,omitempty"` } `json:"user_agent,omitempty"` Key string `json:"key,omitempty"` Fingerprint string `json:"fingerprint,omitempty"` ID string `json:"id,omitempty"` CreationDate string `json:"creation_date,omitempty"` Port int `json:"port,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"` 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"` 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"` } }
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 display placement group unique ID ID string `json:"id"` // Name display placement group name Name string `json:"name"` // Organization display placement group organization Organization string `json:"organization"` // 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"` }
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 SecurityGroup ¶
type SecurityGroup struct { // ID display the security groups' unique ID ID string `json:"id"` // Name display the security groups name Name string `json:"name"` // Description display the security groups description Description string `json:"description"` // EnableDefaultSecurity display if the security group is set as default EnableDefaultSecurity bool `json:"enable_default_security"` // InboundDefaultPolicy display the default inbound policy // // Default value: accept InboundDefaultPolicy SecurityGroupPolicy `json:"inbound_default_policy"` // OutboundDefaultPolicy display the default outbound policy // // Default value: accept OutboundDefaultPolicy SecurityGroupPolicy `json:"outbound_default_policy"` // Organization display the security groups organization ID Organization string `json:"organization"` // OrganizationDefault display if the security group is set as organization default OrganizationDefault bool `json:"organization_default"` // CreationDate display the security group creation date CreationDate time.Time `json:"creation_date"` // ModificationDate display 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"` }
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"` }
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 SecurityGroupSummary ¶
type SecurityGroupTemplate ¶
type Server ¶
type Server struct { // ID display the server unique ID ID string `json:"id"` // Name display the server name Name string `json:"name"` // Organization display the server organization Organization string `json:"organization"` // AllowedActions provide as list of allowed actions on the server AllowedActions []ServerAction `json:"allowed_actions"` // Tags display the server associated tags Tags []string `json:"tags"` // CommercialType display the server commercial type (eg. GP1-M) CommercialType string `json:"commercial_type"` // CreationDate display the server creation date CreationDate time.Time `json:"creation_date"` // DynamicIPRequired display if a dynamic IP is required DynamicIPRequired bool `json:"dynamic_ip_required"` // EnableIPv6 display if IPv6 is enabled EnableIPv6 bool `json:"enable_ipv6"` // Hostname display the server host name Hostname string `json:"hostname"` // Image provide information on the server image Image *Image `json:"image"` // Protected display the server protection option is activated Protected bool `json:"protected"` // PrivateIP display the server private IP address PrivateIP *string `json:"private_ip"` // PublicIP display information about the public IP PublicIP *ServerIP `json:"public_ip"` // ModificationDate display the server modification date ModificationDate time.Time `json:"modification_date"` // State display the server state // // Default value: running State ServerState `json:"state"` // Location display the server location Location *ServerLocation `json:"location"` // IPv6 display the server IPv6 address IPv6 *ServerIPv6 `json:"ipv6"` // Bootscript display the server bootscript Bootscript *Bootscript `json:"bootscript"` // BootType display the server boot type // // Default value: local BootType BootType `json:"boot_type"` // Volumes display the server volumes Volumes map[string]*Volume `json:"volumes"` // SecurityGroup display the server security group SecurityGroup *SecurityGroupSummary `json:"security_group"` // Maintenances display the server planned maintenances Maintenances []*ServerMaintenance `json:"maintenances"` // StateDetail display the server state_detail StateDetail string `json:"state_detail"` // Arch display the server arch // // Default value: x86_64 Arch Arch `json:"arch"` // PlacementGroup display the server placement group PlacementGroup *PlacementGroup `json:"placement_group"` }
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 }
ServerActionAndWaitRequest is used by ServerActionAndWait method.
type ServerActionRequest ¶
type ServerActionRequest struct { Zone scw.Zone `json:"-"` ServerID string `json:"-"` // Action // // Default value: poweron Action ServerAction `json:"action"` }
type ServerActionResponse ¶
type ServerActionResponse struct {
Task *Task `json:"task"`
}
type ServerIP ¶
type ServerIP struct { // ID display the unique ID of the IP address ID string `json:"id"` // Address display the server public IPv4 IP-Address Address net.IP `json:"address"` // Dynamic display information if the IP address will be considered as dynamic Dynamic bool `json:"dynamic"` }
ServerIP server. ip
type ServerIPv6 ¶
type ServerIPv6 struct { // Address display the server IPv6 IP-Address Address net.IP `json:"address"` // Gateway display the IPv6 IP-addresses gateway Gateway net.IP `json:"gateway"` // Netmask display 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 { MonthlyPrice float32 `json:"monthly_price"` HourlyPrice float32 `json:"hourly_price"` AltNames []string `json:"alt_names"` PerVolumeConstraint *ServerTypeVolumeConstraintsByType `json:"per_volume_constraint"` VolumesConstraint *ServerTypeVolumeConstraintSizes `json:"volumes_constraint"` Ncpus uint32 `json:"ncpus"` Gpu *uint64 `json:"gpu"` RAM uint64 `json:"ram"` // Arch // // Default value: x86_64 Arch Arch `json:"arch"` Baremetal bool `json:"baremetal"` Network *ServerTypeNetwork `json:"network"` }
type ServerTypeNetwork ¶
type ServerTypeNetwork struct { Interfaces []*ServerTypeNetworkInterface `json:"interfaces"` SumInternalBandwidth *uint64 `json:"sum_internal_bandwidth"` SumInternetBandwidth *uint64 `json:"sum_internet_bandwidth"` IPv6Support bool `json:"ipv6_support"` }
type ServerTypeVolumeConstraintsByType ¶
type ServerTypeVolumeConstraintsByType struct {
LSSD *ServerTypeVolumeConstraintSizes `json:"l_ssd"`
}
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 SetIPRequest ¶
type SetImageRequest ¶
type SetImageRequest struct { 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"` }
type SetPlacementGroupRequest ¶
type SetPlacementGroupRequest struct { 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"` }
type SetPlacementGroupResponse ¶
type SetPlacementGroupResponse struct {
PlacementGroup *PlacementGroup `json:"placement_group"`
}
type SetPlacementGroupServersResponse ¶
type SetPlacementGroupServersResponse struct {
Servers []*PlacementGroupServer `json:"servers"`
}
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 SetSnapshotRequest ¶
type SetSnapshotRequest struct { Zone scw.Zone `json:"-"` ID string `json:"-"` Name string `json:"name"` Organization string `json:"organization"` // VolumeType // // Default value: l_ssd VolumeType VolumeType `json:"volume_type"` Size scw.Size `json:"size"` // State // // Default value: available State SnapshotState `json:"state"` BaseVolume *SnapshotBaseVolume `json:"base_volume"` CreationDate time.Time `json:"creation_date"` ModificationDate time.Time `json:"modification_date"` }
type Snapshot ¶
type Snapshot struct { ID string `json:"id"` Name string `json:"name"` Organization string `json:"organization"` // VolumeType // // Default value: l_ssd VolumeType VolumeType `json:"volume_type"` Size scw.Size `json:"size"` // State // // Default value: available State SnapshotState `json:"state"` BaseVolume *SnapshotBaseVolume `json:"base_volume"` CreationDate time.Time `json:"creation_date"` ModificationDate time.Time `json:"modification_date"` }
type SnapshotBaseVolume ¶
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 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 show the progress of the task in percent Progress int32 `json:"progress"` // StartedAt display the task start date StartedAt time.Time `json:"started_at"` // TerminatedAt display the task end date TerminatedAt time.Time `json:"terminated_at"` // Status display the task status // // Default value: pending Status TaskStatus `json:"status"` HrefFrom string `json:"href_from"` HrefResult string `json:"href_result"` }
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 scw.Zone `json:"-"` IP string `json:"-"` Reverse *NullableStringValue `json:"reverse"` }
UpdateIPRequest contains the parameters to update an IP if Reverse is an empty string, the reverse will be removed
type UpdateIPResponse ¶
type UpdateIPResponse struct {
IP *IP `json:"ip"`
}
type UpdatePlacementGroupRequest ¶
type UpdatePlacementGroupRequest struct { Zone scw.Zone `json:"-"` PlacementGroupID string `json:"-"` Name *string `json:"name,omitempty"` Organization *string `json:"organization,omitempty"` // PolicyMode // // Default value: optional PolicyMode PlacementGroupPolicyMode `json:"policy_mode"` // PolicyType // // Default value: max_availability PolicyType PlacementGroupPolicyType `json:"policy_type"` }
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"` }
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 scw.Zone `json:"-"` ServerID string `json:"-"` Name *string `json:"name,omitempty"` // BootType // // Default value: local BootType *BootType `json:"boot_type,omitempty"` Tags *[]string `json:"tags,omitempty"` Volumes *map[string]*VolumeTemplate `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"` }
type UpdateServerResponse ¶
type UpdateServerResponse struct {
Server *Server `json:"server"`
}
type UpdateVolumeRequest ¶
type UpdateVolumeRequest struct { Zone scw.Zone `json:"-"` // VolumeID is the volumes unique ID VolumeID string `json:"-"` // Name display the volumes names Name *string `json:"name,omitempty"` }
UpdateVolumeRequest contains the parameters to update on a volume
type UpdateVolumeResponse ¶
type UpdateVolumeResponse struct {
Volume *Volume `json:"volume,omitempty"`
}
UpdateVolumeResponse contains the updated volume.
type UserData ¶
type UserData struct {
UserData []string `json:"user_data,omitempty"`
}
UserData represents the user data
type Volume ¶
type Volume struct { // ID display the volumes unique ID ID string `json:"id"` // Name display the volumes names Name string `json:"name"` // ExportURI show the volumes NBD export URI ExportURI string `json:"export_uri"` // Size display the volumes disk size Size scw.Size `json:"size"` // VolumeType display the volumes type // // Default value: l_ssd VolumeType VolumeType `json:"volume_type"` // CreationDate display the volumes creation date CreationDate time.Time `json:"creation_date"` // ModificationDate display the volumes modification date ModificationDate time.Time `json:"modification_date"` // Organization display the volumes organization Organization string `json:"organization"` // Server display information about the server attached to the volume Server *ServerSummary `json:"server"` // State display the volumes state // // Default value: available State VolumeState `json:"state"` }
Volume volume
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 VolumeType `json:"volume_type"` }
type VolumeTemplate ¶
type VolumeTemplate struct { // ID display the volumes unique ID ID string `json:"id,omitempty"` // Name display the volumes name Name string `json:"name,omitempty"` // Size display the volumes disk size Size scw.Size `json:"size,omitempty"` // VolumeType display the volumes type // // Default value: l_ssd VolumeType VolumeType `json:"volume_type,omitempty"` // Organization the organization ID Organization string `json:"organization,omitempty"` }
VolumeTemplate volume template
type VolumeType ¶
type VolumeType string
func (VolumeType) MarshalJSON ¶
func (enum VolumeType) MarshalJSON() ([]byte, error)
func (VolumeType) String ¶
func (enum VolumeType) String() string
func (*VolumeType) UnmarshalJSON ¶
func (enum *VolumeType) UnmarshalJSON(data []byte) error