Documentation ¶
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) CreateComputeCluster(req *CreateComputeClusterRequest, opts ...scw.RequestOption) (*CreateComputeClusterResponse, 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) 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) DeleteComputeCluster(req *DeleteComputeClusterRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteComputeClusterServers(req *DeleteComputeClusterServersRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteIP(req *DeleteIPRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteImage(req *DeleteImageRequest, 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) GetComputeCluster(req *GetComputeClusterRequest, opts ...scw.RequestOption) (*GetComputeClusterResponse, error)
- func (s *API) GetComputeClusterServers(req *GetComputeClusterServersRequest, opts ...scw.RequestOption) (*GetComputeClusterServersResponse, 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) 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) ListComputeClusters(req *ListComputeClustersRequest, opts ...scw.RequestOption) (*ListComputeClustersResponse, 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) 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) SetComputeCluster(req *SetComputeClusterRequest, opts ...scw.RequestOption) (*SetComputeClusterResponse, error)
- func (s *API) SetComputeClusterServers(req *SetComputeClusterServersRequest, opts ...scw.RequestOption) (*SetComputeClusterServersResponse, error)
- func (s *API) SetServerUserData(req *SetServerUserDataRequest, opts ...scw.RequestOption) error
- func (s *API) UpdateComputeCluster(req *UpdateComputeClusterRequest, opts ...scw.RequestOption) (*UpdateComputeClusterResponse, error)
- func (s *API) UpdateComputeClusterServers(req *UpdateComputeClusterServersRequest, opts ...scw.RequestOption) (*UpdateComputeClusterServersResponse, error)
- func (s *API) UpdateIP(req *UpdateIPRequest, opts ...scw.RequestOption) (*UpdateIPResponse, 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)
- type Arch
- type AttachIPRequest
- type AttachIPResponse
- type AttachVolumeRequest
- type AttachVolumeResponse
- type Bootscript
- type ComputeCluster
- type ComputeClusterPolicyMode
- type ComputeClusterPolicyType
- type ComputeClusterServer
- type CreateComputeClusterRequest
- type CreateComputeClusterResponse
- type CreateIPRequest
- type CreateIPResponse
- type CreateImageRequest
- type CreateImageResponse
- type CreateSecurityGroupRequest
- type CreateSecurityGroupResponse
- type CreateSecurityGroupRuleRequest
- type CreateSecurityGroupRuleResponse
- type CreateServerRequest
- type CreateServerResponse
- type CreateSnapshotRequest
- type CreateSnapshotResponse
- type CreateVolumeRequest
- type CreateVolumeResponse
- type Dashboard
- type DeleteComputeClusterRequest
- type DeleteComputeClusterServersRequest
- type DeleteIPRequest
- type DeleteImageRequest
- 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 GetComputeClusterRequest
- type GetComputeClusterResponse
- type GetComputeClusterServersRequest
- type GetComputeClusterServersResponse
- type GetDashboardRequest
- type GetDashboardResponse
- type GetIPRequest
- type GetIPResponse
- type GetImageRequest
- type GetImageResponse
- 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 ListComputeClustersRequest
- type ListComputeClustersResponse
- type ListIPsRequest
- type ListIPsResponse
- type ListImagesRequest
- type ListImagesResponse
- 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 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 ServerBootType
- type ServerIP
- type ServerIPv6
- type ServerLocation
- type ServerMaintenance
- type ServerState
- type ServerSummary
- type ServerType
- type ServerTypeNetwork
- type ServerTypeNetworkInterface
- type ServerTypeVolumeConstraintSizes
- type ServerTypeVolumeConstraintsByType
- type SetAllServerUserDataRequest
- type SetComputeClusterRequest
- type SetComputeClusterResponse
- type SetComputeClusterServersRequest
- type SetComputeClusterServersResponse
- type SetServerUserDataRequest
- type Snapshot
- type SnapshotBaseVolume
- type SnapshotState
- type Task
- type TaskStatus
- type UpdateComputeClusterRequest
- type UpdateComputeClusterResponse
- type UpdateComputeClusterServersRequest
- type UpdateComputeClusterServersResponse
- type UpdateIPRequest
- type UpdateIPResponse
- 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
Constants ¶
const ( // ArchX86_64 is [insert doc]. ArchX86_64 = Arch("x86_64") // ArchArm is [insert doc]. ArchArm = Arch("arm") )
const ( // ComputeClusterPolicyModeOptional is [insert doc]. ComputeClusterPolicyModeOptional = ComputeClusterPolicyMode("optional") // ComputeClusterPolicyModeEnforced is [insert doc]. ComputeClusterPolicyModeEnforced = ComputeClusterPolicyMode("enforced") )
const ( // ComputeClusterPolicyTypeMaxAvailability is [insert doc]. ComputeClusterPolicyTypeMaxAvailability = ComputeClusterPolicyType("max_availability") // ComputeClusterPolicyTypeLowLatency is [insert doc]. ComputeClusterPolicyTypeLowLatency = ComputeClusterPolicyType("low_latency") )
const ( // GetServerTypesAvailabilityResponseAvailabilityAvailable is [insert doc]. GetServerTypesAvailabilityResponseAvailabilityAvailable = GetServerTypesAvailabilityResponseAvailability("available") // GetServerTypesAvailabilityResponseAvailabilityScarce is [insert doc]. GetServerTypesAvailabilityResponseAvailabilityScarce = GetServerTypesAvailabilityResponseAvailability("scarce") // GetServerTypesAvailabilityResponseAvailabilityShortage is [insert doc]. GetServerTypesAvailabilityResponseAvailabilityShortage = GetServerTypesAvailabilityResponseAvailability("shortage") )
const ( // ImageStateAvailable is [insert doc]. ImageStateAvailable = ImageState("available") // ImageStateCreating is [insert doc]. ImageStateCreating = ImageState("creating") // ImageStateError is [insert doc]. ImageStateError = ImageState("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") )
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 ( // 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") )
const ( // ServerBootTypeLocal is [insert doc]. ServerBootTypeLocal = ServerBootType("local") )
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) CreateComputeCluster ¶
func (s *API) CreateComputeCluster(req *CreateComputeClusterRequest, opts ...scw.RequestOption) (*CreateComputeClusterResponse, error)
CreateComputeCluster create compute-cluster
Create a new compute-cluster
func (*API) CreateIP ¶
func (s *API) CreateIP(req *CreateIPRequest, opts ...scw.RequestOption) (*CreateIPResponse, error)
CreateIP reseve an IP
func (*API) CreateImage ¶
func (s *API) CreateImage(req *CreateImageRequest, opts ...scw.RequestOption) (*CreateImageResponse, error)
CreateImage create image
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) DeleteComputeCluster ¶
func (s *API) DeleteComputeCluster(req *DeleteComputeClusterRequest, opts ...scw.RequestOption) error
DeleteComputeCluster delete the given compute-cluster
Delete the given compute-cluster
func (*API) DeleteComputeClusterServers ¶
func (s *API) DeleteComputeClusterServers(req *DeleteComputeClusterServersRequest, opts ...scw.RequestOption) error
DeleteComputeClusterServers delete compute-cluster servers
Delete all servers from the given compute-cluster
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) 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) GetComputeCluster ¶
func (s *API) GetComputeCluster(req *GetComputeClusterRequest, opts ...scw.RequestOption) (*GetComputeClusterResponse, error)
GetComputeCluster get compute-cluster
Get the given compute-cluster
func (*API) GetComputeClusterServers ¶
func (s *API) GetComputeClusterServers(req *GetComputeClusterServersRequest, opts ...scw.RequestOption) (*GetComputeClusterServersResponse, error)
GetComputeClusterServers get compute-cluster servers
Get all servers belonging to the given compute-cluster
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
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) 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) ListComputeClusters ¶
func (s *API) ListComputeClusters(req *ListComputeClustersRequest, opts ...scw.RequestOption) (*ListComputeClustersResponse, error)
ListComputeClusters list compute-clusters
List all compute-clusters
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) 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
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) SetComputeCluster ¶
func (s *API) SetComputeCluster(req *SetComputeClusterRequest, opts ...scw.RequestOption) (*SetComputeClusterResponse, error)
SetComputeCluster set compute-cluster
Set all parameters of the given compute-cluster
func (*API) SetComputeClusterServers ¶
func (s *API) SetComputeClusterServers(req *SetComputeClusterServersRequest, opts ...scw.RequestOption) (*SetComputeClusterServersResponse, error)
SetComputeClusterServers set compute-cluster servers
Set all servers belonging to the given compute-cluster
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) UpdateComputeCluster ¶
func (s *API) UpdateComputeCluster(req *UpdateComputeClusterRequest, opts ...scw.RequestOption) (*UpdateComputeClusterResponse, error)
UpdateComputeCluster update compute-cluster
Update one or more parameter of the given compute-cluster
func (*API) UpdateComputeClusterServers ¶
func (s *API) UpdateComputeClusterServers(req *UpdateComputeClusterServersRequest, opts ...scw.RequestOption) (*UpdateComputeClusterServersResponse, error)
UpdateComputeClusterServers update compute-cluster servers
Update all servers belonging to the given compute-cluster
func (*API) UpdateIP ¶
func (s *API) UpdateIP(req *UpdateIPRequest, opts ...scw.RequestOption) (*UpdateIPResponse, error)
UpdateIP updates an IP
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.
type AttachIPRequest ¶
type AttachIPRequest struct { Zone scw.Zone `json:"-"` IPID 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"` }
type ComputeCluster ¶
type ComputeCluster struct { // ID display compute-cluster unique ID ID string `json:"id"` // Name display compute-cluster name Name string `json:"name"` // Organization display compute-cluster organization Organization string `json:"organization"` // PolicyMode select the failling mode when the placement cannot be respected, either optional or enforced // // Default value: optional PolicyMode ComputeClusterPolicyMode `json:"policy_mode"` // PolicyType select the behavior of the compute-cluster, either low_latency (group) or max_availability (spread) // // Default value: max_availability PolicyType ComputeClusterPolicyType `json:"policy_type"` // PolicyRespected returns true if the policy is respected, false otherwise PolicyRespected bool `json:"policy_respected"` }
type ComputeClusterPolicyMode ¶
type ComputeClusterPolicyMode string
func (ComputeClusterPolicyMode) MarshalJSON ¶
func (enum ComputeClusterPolicyMode) MarshalJSON() ([]byte, error)
func (ComputeClusterPolicyMode) String ¶
func (enum ComputeClusterPolicyMode) String() string
func (*ComputeClusterPolicyMode) UnmarshalJSON ¶
func (enum *ComputeClusterPolicyMode) UnmarshalJSON(data []byte) error
type ComputeClusterPolicyType ¶
type ComputeClusterPolicyType string
func (ComputeClusterPolicyType) MarshalJSON ¶
func (enum ComputeClusterPolicyType) MarshalJSON() ([]byte, error)
func (ComputeClusterPolicyType) String ¶
func (enum ComputeClusterPolicyType) String() string
func (*ComputeClusterPolicyType) UnmarshalJSON ¶
func (enum *ComputeClusterPolicyType) UnmarshalJSON(data []byte) error
type ComputeClusterServer ¶
type CreateComputeClusterRequest ¶
type CreateComputeClusterRequest struct { Zone scw.Zone `json:"-"` Name string `json:"name,omitempty"` Organization string `json:"organization,omitempty"` // PolicyMode // // Default value: optional PolicyMode ComputeClusterPolicyMode `json:"policy_mode"` // PolicyType // // Default value: max_availability PolicyType ComputeClusterPolicyType `json:"policy_type"` }
type CreateComputeClusterResponse ¶
type CreateComputeClusterResponse struct {
ComputeCluster *ComputeCluster `json:"compute_cluster"`
}
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 CreateSecurityGroupRequest ¶
type CreateSecurityGroupRequest struct { Zone scw.Zone `json:"-"` Name string `json:"name,omitempty"` Description string `json:"description,omitempty"` Organization string `json:"organization,omitempty"` OrganizationDefault bool `json:"organization_default,omitempty"` 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 string `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 createServerRequest
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 GetComputeClusterResponse ¶
type GetComputeClusterResponse struct {
ComputeCluster *ComputeCluster `json:"compute_cluster"`
}
type GetComputeClusterServersResponse ¶
type GetComputeClusterServersResponse struct {
Servers []*ComputeClusterServer `json:"servers"`
}
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 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 string
func (GetServerTypesAvailabilityResponseAvailability) MarshalJSON ¶
func (enum GetServerTypesAvailabilityResponseAvailability) MarshalJSON() ([]byte, error)
func (GetServerTypesAvailabilityResponseAvailability) String ¶
func (enum GetServerTypesAvailabilityResponseAvailability) String() string
func (*GetServerTypesAvailabilityResponseAvailability) UnmarshalJSON ¶
func (enum *GetServerTypesAvailabilityResponseAvailability) UnmarshalJSON(data []byte) error
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 *ServerSummary `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{}) (int, scw.SdkError)
UnsafeAppend should not be used Internal usage only
func (*ListBootscriptsResponse) UnsafeGetTotalCount ¶
func (r *ListBootscriptsResponse) UnsafeGetTotalCount() int
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 ListComputeClustersRequest ¶
type ListComputeClustersRequest 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 *int32 `json:"-"` // Page a positive integer to choose the page to display Page *int32 `json:"-"` // Organization list only compute-clusters of this organization Organization *string `json:"-"` // Name filter compute-clusters by name (for eg. "cluster1" will return "cluster100" and "cluster1" but not "foo") Name *string `json:"-"` }
type ListComputeClustersResponse ¶
type ListComputeClustersResponse struct { ComputeClusters []*ComputeCluster `json:"compute_clusters"` TotalCount uint32 `json:"total_count"` }
func (*ListComputeClustersResponse) UnsafeAppend ¶
func (r *ListComputeClustersResponse) UnsafeAppend(res interface{}) (int, scw.SdkError)
UnsafeAppend should not be used Internal usage only
func (*ListComputeClustersResponse) UnsafeGetTotalCount ¶
func (r *ListComputeClustersResponse) UnsafeGetTotalCount() int
UnsafeGetTotalCount should not be used Internal usage only
type ListIPsRequest ¶
type ListIPsResponse ¶
func (*ListIPsResponse) UnsafeAppend ¶
func (r *ListIPsResponse) UnsafeAppend(res interface{}) (int, scw.SdkError)
UnsafeAppend should not be used Internal usage only
func (*ListIPsResponse) UnsafeGetTotalCount ¶
func (r *ListIPsResponse) UnsafeGetTotalCount() int
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{}) (int, scw.SdkError)
UnsafeAppend should not be used Internal usage only
func (*ListImagesResponse) UnsafeGetTotalCount ¶
func (r *ListImagesResponse) UnsafeGetTotalCount() int
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{}) (int, scw.SdkError)
UnsafeAppend should not be used Internal usage only
func (*ListSecurityGroupRulesResponse) UnsafeGetTotalCount ¶
func (r *ListSecurityGroupRulesResponse) UnsafeGetTotalCount() int
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{}) (int, scw.SdkError)
UnsafeAppend should not be used Internal usage only
func (*ListSecurityGroupsResponse) UnsafeGetTotalCount ¶
func (r *ListSecurityGroupsResponse) UnsafeGetTotalCount() int
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 *int32 `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 *string `json:"-"` // WithoutIP list servers that are not attached to a public IP WithoutIP *string `json:"-"` // CommercialType list servers of this commercial type CommercialType *string `json:"-"` }
type ListServersResponse ¶
type ListServersResponse struct { Servers []*Server `json:"servers"` TotalCount uint32 `json:"total_count"` }
func (*ListServersResponse) UnsafeAppend ¶
func (r *ListServersResponse) UnsafeAppend(res interface{}) (int, scw.SdkError)
UnsafeAppend should not be used Internal usage only
func (*ListServersResponse) UnsafeGetTotalCount ¶
func (r *ListServersResponse) UnsafeGetTotalCount() int
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{}) (int, scw.SdkError)
UnsafeAppend should not be used Internal usage only
func (*ListServersTypesResponse) UnsafeGetTotalCount ¶
func (r *ListServersTypesResponse) UnsafeGetTotalCount() int
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{}) (int, scw.SdkError)
UnsafeAppend should not be used Internal usage only
func (*ListSnapshotsResponse) UnsafeGetTotalCount ¶
func (r *ListSnapshotsResponse) UnsafeGetTotalCount() int
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 *int32 `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{}) (int, scw.SdkError)
UnsafeAppend should not be used Internal usage only
func (*ListVolumesResponse) UnsafeGetTotalCount ¶
func (r *ListVolumesResponse) UnsafeGetTotalCount() int
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 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"` }
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 string `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"` // ExtraNetworks display information about additional network interfaces ExtraNetworks []string `json:"extra_networks"` // 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 the server public IP address 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 ServerBootType `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"` // ComputeCluster display the server ComputeCluster ComputeCluster *ComputeCluster `json:"compute_cluster"` }
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 ServerBootType ¶
type ServerBootType string
func (ServerBootType) MarshalJSON ¶
func (enum ServerBootType) MarshalJSON() ([]byte, error)
func (ServerBootType) String ¶
func (enum ServerBootType) String() string
func (*ServerBootType) UnmarshalJSON ¶
func (enum *ServerBootType) UnmarshalJSON(data []byte) error
type ServerIPv6 ¶
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 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 SetComputeClusterRequest ¶
type SetComputeClusterRequest struct { Zone scw.Zone `json:"-"` ComputeClusterID string `json:"-"` Name string `json:"name"` Organization string `json:"organization"` // PolicyMode // // Default value: optional PolicyMode ComputeClusterPolicyMode `json:"policy_mode"` // PolicyType // // Default value: max_availability PolicyType ComputeClusterPolicyType `json:"policy_type"` }
type SetComputeClusterResponse ¶
type SetComputeClusterResponse struct {
ComputeClusterID string `json:"compute_cluster_id"`
}
type SetComputeClusterServersResponse ¶
type SetComputeClusterServersResponse struct {
Servers []*ComputeClusterServer `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 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"` }
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 UpdateComputeClusterRequest ¶
type UpdateComputeClusterRequest struct { Zone scw.Zone `json:"-"` ComputeClusterID string `json:"-"` Name *string `json:"name,omitempty"` Organization *string `json:"organization,omitempty"` // PolicyMode // // Default value: optional PolicyMode ComputeClusterPolicyMode `json:"policy_mode"` // PolicyType // // Default value: max_availability PolicyType ComputeClusterPolicyType `json:"policy_type"` }
type UpdateComputeClusterResponse ¶
type UpdateComputeClusterResponse struct {
ComputeClusterID string `json:"compute_cluster_id"`
}
type UpdateComputeClusterServersResponse ¶
type UpdateComputeClusterServersResponse struct {
Servers []*ComputeClusterServer `json:"servers"`
}
type UpdateIPRequest ¶
type UpdateIPRequest struct { Zone scw.Zone `json:"-"` IPID 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 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 *string `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 updateServerRequest
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"` }
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"` }
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