Documentation
¶
Overview ¶
Package instance provides methods and message types of the instance v2alpha1 API.
Index ¶
- Constants
- type API
- func (s *API) AddSecurityGroupRules(req *AddSecurityGroupRulesRequest, opts ...scw.RequestOption) (*AddSecurityGroupRulesResponse, error)
- func (s *API) AttachServerFileSystem(req *AttachServerFileSystemRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) AttachServerIP(req *AttachServerIPRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) AttachServerPrivateNetworkInterface(req *AttachServerPrivateNetworkInterfaceRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) AttachServerVolume(req *AttachServerVolumeRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) CheckTemplate(req *CheckTemplateRequest, opts ...scw.RequestOption) error
- func (s *API) CreatePlacementGroup(req *CreatePlacementGroupRequest, opts ...scw.RequestOption) (*PlacementGroup, error)
- func (s *API) CreatePrivateNetworkInterface(req *CreatePrivateNetworkInterfaceRequest, opts ...scw.RequestOption) (*PrivateNetworkInterface, error)
- func (s *API) CreateSecurityGroup(req *CreateSecurityGroupRequest, opts ...scw.RequestOption) (*SecurityGroup, error)
- func (s *API) CreateServer(req *CreateServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) CreateServerFromTemplate(req *CreateServerFromTemplateRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) CreateTemplate(req *CreateTemplateRequest, opts ...scw.RequestOption) (*Template, error)
- func (s *API) DeletePlacementGroup(req *DeletePlacementGroupRequest, opts ...scw.RequestOption) error
- func (s *API) DeletePrivateNetworkInterface(req *DeletePrivateNetworkInterfaceRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteSecurityGroup(req *DeleteSecurityGroupRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteSecurityGroupRules(req *DeleteSecurityGroupRulesRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteServer(req *DeleteServerRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteTemplate(req *DeleteTemplateRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteTemplateUserData(req *DeleteTemplateUserDataRequest, opts ...scw.RequestOption) error
- func (s *API) DeleteUserData(req *DeleteUserDataRequest, opts ...scw.RequestOption) error
- func (s *API) DetachServerFileSystem(req *DetachServerFileSystemRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) DetachServerIP(req *DetachServerIPRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) DetachServerPrivateNetworkInterface(req *DetachServerPrivateNetworkInterfaceRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) DetachServerVolume(req *DetachServerVolumeRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) GetPlacementGroup(req *GetPlacementGroupRequest, opts ...scw.RequestOption) (*PlacementGroup, error)
- func (s *API) GetPrivateNetworkInterface(req *GetPrivateNetworkInterfaceRequest, opts ...scw.RequestOption) (*PrivateNetworkInterface, error)
- func (s *API) GetResourceCounts(req *GetResourceCountsRequest, opts ...scw.RequestOption) (*ResourceCounts, error)
- func (s *API) GetSecurityGroup(req *GetSecurityGroupRequest, opts ...scw.RequestOption) (*SecurityGroup, error)
- func (s *API) GetServer(req *GetServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) GetServerCloudInit(req *GetServerCloudInitRequest, opts ...scw.RequestOption) (*UserData, error)
- func (s *API) GetTemplate(req *GetTemplateRequest, opts ...scw.RequestOption) (*Template, error)
- func (s *API) GetTemplateCloudInit(req *GetTemplateCloudInitRequest, opts ...scw.RequestOption) (*UserData, error)
- func (s *API) GetTemplateUserData(req *GetTemplateUserDataRequest, opts ...scw.RequestOption) (*UserData, error)
- func (s *API) GetUserData(req *GetUserDataRequest, opts ...scw.RequestOption) (*UserData, error)
- func (s *API) ListPlacementGroups(req *ListPlacementGroupsRequest, opts ...scw.RequestOption) (*ListPlacementGroupsResponse, error)
- func (s *API) ListPrivateNetworkInterfaces(req *ListPrivateNetworkInterfacesRequest, opts ...scw.RequestOption) (*ListPrivateNetworkInterfacesResponse, error)
- func (s *API) ListSecurityGroups(req *ListSecurityGroupsRequest, opts ...scw.RequestOption) (*ListSecurityGroupsResponse, error)
- func (s *API) ListServerTypes(req *ListServerTypesRequest, opts ...scw.RequestOption) (*ListServerTypesResponse, error)
- func (s *API) ListServers(req *ListServersRequest, opts ...scw.RequestOption) (*ListServersResponse, error)
- func (s *API) ListTemplateUserDataKeys(req *ListTemplateUserDataKeysRequest, opts ...scw.RequestOption) (*ListTemplateUserDataKeysResponse, error)
- func (s *API) ListTemplates(req *ListTemplatesRequest, opts ...scw.RequestOption) (*ListTemplatesResponse, error)
- func (s *API) ListUserDataKeys(req *ListUserDataKeysRequest, opts ...scw.RequestOption) (*ListUserDataKeysResponse, error)
- func (s *API) PauseServer(req *PauseServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) RebootServer(req *RebootServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) SetSecurityGroupRules(req *SetSecurityGroupRulesRequest, opts ...scw.RequestOption) (*SecurityGroup, error)
- func (s *API) SetServerCloudInit(req *SetServerCloudInitRequest, opts ...scw.RequestOption) error
- func (s *API) SetServerDefaultIP(req *SetServerDefaultIPRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) SetTemplateCloudInit(req *SetTemplateCloudInitRequest, opts ...scw.RequestOption) error
- func (s *API) SetTemplateUserData(req *SetTemplateUserDataRequest, opts ...scw.RequestOption) error
- func (s *API) SetUserData(req *SetUserDataRequest, opts ...scw.RequestOption) error
- func (s *API) StartServer(req *StartServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) StopAndDeleteServer(req *StopAndDeleteServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) StopServer(req *StopServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) UpdatePlacementGroup(req *UpdatePlacementGroupRequest, opts ...scw.RequestOption) (*PlacementGroup, error)
- func (s *API) UpdatePrivateNetworkInterface(req *UpdatePrivateNetworkInterfaceRequest, opts ...scw.RequestOption) (*PrivateNetworkInterface, error)
- func (s *API) UpdateSecurityGroup(req *UpdateSecurityGroupRequest, opts ...scw.RequestOption) (*SecurityGroup, error)
- func (s *API) UpdateSecurityGroupRule(req *UpdateSecurityGroupRuleRequest, opts ...scw.RequestOption) (*SecurityGroup, error)
- func (s *API) UpdateServer(req *UpdateServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) UpdateTemplate(req *UpdateTemplateRequest, opts ...scw.RequestOption) (*Template, error)
- func (s *API) WaitForPrivateNetworkInterface(req *WaitForPrivateNetworkInterfaceRequest, opts ...scw.RequestOption) (*PrivateNetworkInterface, error)
- func (s *API) WaitForServer(req *WaitForServerRequest, opts ...scw.RequestOption) (*Server, error)
- func (s *API) Zones() []scw.Zone
- type AddSecurityGroupRulesRequest
- type AddSecurityGroupRulesResponse
- type AttachServerFileSystemRequest
- type AttachServerIPRequest
- type AttachServerPrivateNetworkInterfaceRequest
- type AttachServerVolumeRequest
- type CheckTemplateRequest
- type CreatePlacementGroupRequest
- type CreatePrivateNetworkInterfaceRequest
- type CreateSecurityGroupRequest
- type CreateServerFromTemplateRequest
- type CreateServerRequest
- type CreateServerRequestBookIP
- type CreateServerRequestBookIPIPType
- type CreateServerRequestCreateVolume
- type CreateServerRequestPublicNetworkInterface
- type CreateServerRequestServerIP
- type CreateServerRequestServerVolume
- type CreateServerRequestServerVolumeVolumeType
- func (enum CreateServerRequestServerVolumeVolumeType) MarshalJSON() ([]byte, error)
- func (enum CreateServerRequestServerVolumeVolumeType) String() string
- func (enum *CreateServerRequestServerVolumeVolumeType) UnmarshalJSON(data []byte) error
- func (enum CreateServerRequestServerVolumeVolumeType) Values() []CreateServerRequestServerVolumeVolumeType
- type CreateTemplateRequest
- type CreateTemplateRequestPrivateNetworkTemplate
- type CreateTemplateRequestVolumeTemplate
- type CreateVolumeRequestVolumeType
- type DeletePlacementGroupRequest
- type DeletePrivateNetworkInterfaceRequest
- type DeleteSecurityGroupRequest
- type DeleteSecurityGroupRulesRequest
- type DeleteServerRequest
- type DeleteTemplateRequest
- type DeleteTemplateUserDataRequest
- type DeleteUserDataRequest
- type DetachServerFileSystemRequest
- type DetachServerIPRequest
- type DetachServerPrivateNetworkInterfaceRequest
- type DetachServerVolumeRequest
- type GetPlacementGroupRequest
- type GetPrivateNetworkInterfaceRequest
- type GetResourceCountsRequest
- type GetSecurityGroupRequest
- type GetServerCloudInitRequest
- type GetServerRequest
- type GetTemplateCloudInitRequest
- type GetTemplateRequest
- type GetTemplateUserDataRequest
- type GetUserDataRequest
- type ListPlacementGroupsRequest
- type ListPlacementGroupsRequestOrderBy
- func (enum ListPlacementGroupsRequestOrderBy) MarshalJSON() ([]byte, error)
- func (enum ListPlacementGroupsRequestOrderBy) String() string
- func (enum *ListPlacementGroupsRequestOrderBy) UnmarshalJSON(data []byte) error
- func (enum ListPlacementGroupsRequestOrderBy) Values() []ListPlacementGroupsRequestOrderBy
- type ListPlacementGroupsResponse
- type ListPrivateNetworkInterfacesRequest
- type ListPrivateNetworkInterfacesRequestOrderBy
- func (enum ListPrivateNetworkInterfacesRequestOrderBy) MarshalJSON() ([]byte, error)
- func (enum ListPrivateNetworkInterfacesRequestOrderBy) String() string
- func (enum *ListPrivateNetworkInterfacesRequestOrderBy) UnmarshalJSON(data []byte) error
- func (enum ListPrivateNetworkInterfacesRequestOrderBy) Values() []ListPrivateNetworkInterfacesRequestOrderBy
- type ListPrivateNetworkInterfacesResponse
- type ListSecurityGroupsRequest
- type ListSecurityGroupsRequestOrderBy
- func (enum ListSecurityGroupsRequestOrderBy) MarshalJSON() ([]byte, error)
- func (enum ListSecurityGroupsRequestOrderBy) String() string
- func (enum *ListSecurityGroupsRequestOrderBy) UnmarshalJSON(data []byte) error
- func (enum ListSecurityGroupsRequestOrderBy) Values() []ListSecurityGroupsRequestOrderBy
- type ListSecurityGroupsResponse
- type ListServerTypesRequest
- type ListServerTypesResponse
- type ListServersRequest
- type ListServersRequestOrderBy
- type ListServersResponse
- type ListSnapshotsRequestOrderBy
- type ListSnapshotsResponse
- type ListTemplateUserDataKeysRequest
- type ListTemplateUserDataKeysResponse
- type ListTemplatesRequest
- type ListTemplatesRequestOrderBy
- type ListTemplatesResponse
- type ListUserDataKeysRequest
- type ListUserDataKeysResponse
- type ListVolumeTypesResponse
- type ListVolumesRequestOrderBy
- type ListVolumesResponse
- type PauseServerRequest
- type PlacementGroup
- type PlacementGroupPolicyType
- type PrivateNetworkInterface
- type PrivateNetworkInterfaceStatus
- type PrivateNetworkInterfaceSummary
- type RebootServerRequest
- type ResourceCounts
- type SecurityGroup
- type SecurityGroupAction
- type SecurityGroupRule
- type SecurityGroupRuleAction
- type SecurityGroupRuleConfig
- type SecurityGroupRuleDirection
- type SecurityGroupRulePortRange
- type SecurityGroupRuleProtocol
- type SecurityGroupSummary
- type Server
- type ServerArchitecture
- type ServerFilesystem
- type ServerFilesystemStatus
- type ServerIP
- type ServerIPStatus
- type ServerPrivateNetworkInterface
- type ServerPrivateNetworkInterfaceStatus
- func (enum ServerPrivateNetworkInterfaceStatus) MarshalJSON() ([]byte, error)
- func (enum ServerPrivateNetworkInterfaceStatus) String() string
- func (enum *ServerPrivateNetworkInterfaceStatus) UnmarshalJSON(data []byte) error
- func (enum ServerPrivateNetworkInterfaceStatus) Values() []ServerPrivateNetworkInterfaceStatus
- type ServerPublicNetworkInterface
- type ServerPublicNetworkInterfaceStatus
- func (enum ServerPublicNetworkInterfaceStatus) MarshalJSON() ([]byte, error)
- func (enum ServerPublicNetworkInterfaceStatus) String() string
- func (enum *ServerPublicNetworkInterfaceStatus) UnmarshalJSON(data []byte) error
- func (enum ServerPublicNetworkInterfaceStatus) Values() []ServerPublicNetworkInterfaceStatus
- type ServerRDPPassword
- type ServerStatus
- type ServerSummary
- type ServerType
- type ServerTypeArchitecture
- type ServerTypeAvailability
- type ServerTypeGpuInfo
- type ServerTypeLimits
- type ServerVolume
- type ServerVolumeVolumeType
- type SetSecurityGroupRulesRequest
- type SetServerCloudInitRequest
- type SetServerDefaultIPRequest
- type SetTemplateCloudInitRequest
- type SetTemplateUserDataRequest
- type SetUserDataRequest
- type Snapshot
- type SnapshotStatus
- type SnapshotVolumeType
- type StartServerRequest
- type StopAndDeleteServerRequest
- type StopServerRequest
- type Template
- type TemplateSummary
- type UpdatePlacementGroupRequest
- type UpdatePrivateNetworkInterfaceRequest
- type UpdateSecurityGroupRequest
- type UpdateSecurityGroupRuleRequest
- type UpdateServerRequest
- type UpdateServerRequestPublicNetworkInterface
- type UpdateTemplateRequest
- type UpdateTemplateRequestUpdatePrivateNetworks
- type UpdateTemplateRequestUpdateVolumes
- type UserData
- type Volume
- type VolumeAPI
- func (s *VolumeAPI) CreateSnapshot(req *VolumeAPICreateSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
- func (s *VolumeAPI) CreateVolume(req *VolumeAPICreateVolumeRequest, opts ...scw.RequestOption) (*Volume, error)
- func (s *VolumeAPI) DeleteSnapshot(req *VolumeAPIDeleteSnapshotRequest, opts ...scw.RequestOption) error
- func (s *VolumeAPI) DeleteVolume(req *VolumeAPIDeleteVolumeRequest, opts ...scw.RequestOption) error
- func (s *VolumeAPI) ExportSnapshotToObjectStorage(req *VolumeAPIExportSnapshotToObjectStorageRequest, opts ...scw.RequestOption) (*Snapshot, error)
- func (s *VolumeAPI) GetSnapshot(req *VolumeAPIGetSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
- func (s *VolumeAPI) GetVolume(req *VolumeAPIGetVolumeRequest, opts ...scw.RequestOption) (*Volume, error)
- func (s *VolumeAPI) ImportSnapshotFromObjectStorage(req *VolumeAPIImportSnapshotFromObjectStorageRequest, ...) (*Snapshot, error)
- func (s *VolumeAPI) ListSnapshots(req *VolumeAPIListSnapshotsRequest, opts ...scw.RequestOption) (*ListSnapshotsResponse, error)
- func (s *VolumeAPI) ListVolumeTypes(req *VolumeAPIListVolumeTypesRequest, opts ...scw.RequestOption) (*ListVolumeTypesResponse, error)
- func (s *VolumeAPI) ListVolumes(req *VolumeAPIListVolumesRequest, opts ...scw.RequestOption) (*ListVolumesResponse, error)
- func (s *VolumeAPI) UpdateSnapshot(req *VolumeAPIUpdateSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
- func (s *VolumeAPI) UpdateVolume(req *VolumeAPIUpdateVolumeRequest, opts ...scw.RequestOption) (*Volume, error)
- func (s *VolumeAPI) WaitForSnapshot(req *WaitForSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
- func (s *VolumeAPI) WaitForVolume(req *WaitForVolumeRequest, opts ...scw.RequestOption) (*Volume, error)
- func (s *VolumeAPI) Zones() []scw.Zone
- type VolumeAPICreateSnapshotRequest
- type VolumeAPICreateVolumeRequest
- type VolumeAPIDeleteSnapshotRequest
- type VolumeAPIDeleteVolumeRequest
- type VolumeAPIExportSnapshotToObjectStorageRequest
- type VolumeAPIGetSnapshotRequest
- type VolumeAPIGetVolumeRequest
- type VolumeAPIImportSnapshotFromObjectStorageRequest
- type VolumeAPIListSnapshotsRequest
- type VolumeAPIListVolumeTypesRequest
- type VolumeAPIListVolumesRequest
- type VolumeAPIUpdateSnapshotRequest
- type VolumeAPIUpdateVolumeRequest
- type VolumeStatus
- type VolumeType
- type VolumeVolumeType
- type WaitForPrivateNetworkInterfaceRequest
- type WaitForServerRequest
- type WaitForSnapshotRequest
- type WaitForVolumeRequest
Constants ¶
const ( CreateServerRequestBookIPIPTypeUnknownIPType = CreateServerRequestBookIPIPType("unknown_ip_type") CreateServerRequestBookIPIPTypeZonalIPv4 = CreateServerRequestBookIPIPType("zonal_ipv4") CreateServerRequestBookIPIPTypeZonalIPv6 = CreateServerRequestBookIPIPType("zonal_ipv6") )
const ( CreateServerRequestServerVolumeVolumeTypeUnknownVolumeType = CreateServerRequestServerVolumeVolumeType("unknown_volume_type") CreateServerRequestServerVolumeVolumeTypeLSSD = CreateServerRequestServerVolumeVolumeType("l_ssd") CreateServerRequestServerVolumeVolumeTypeSbs = CreateServerRequestServerVolumeVolumeType("sbs") CreateServerRequestServerVolumeVolumeTypeScratch = CreateServerRequestServerVolumeVolumeType("scratch") )
const ( CreateVolumeRequestVolumeTypeUnknownVolumeType = CreateVolumeRequestVolumeType("unknown_volume_type") CreateVolumeRequestVolumeTypeLSSD = CreateVolumeRequestVolumeType("l_ssd") CreateVolumeRequestVolumeTypeScratch = CreateVolumeRequestVolumeType("scratch") )
const ( // Created at descending. ListPlacementGroupsRequestOrderByCreatedAtDesc = ListPlacementGroupsRequestOrderBy("created_at_desc") // Created at ascending. ListPlacementGroupsRequestOrderByCreatedAtAsc = ListPlacementGroupsRequestOrderBy("created_at_asc") // Updated at descending. ListPlacementGroupsRequestOrderByUpdatedAtDesc = ListPlacementGroupsRequestOrderBy("updated_at_desc") // Updated at ascending. ListPlacementGroupsRequestOrderByUpdatedAtAsc = ListPlacementGroupsRequestOrderBy("updated_at_asc") )
const ( // Created at descending. ListPrivateNetworkInterfacesRequestOrderByCreatedAtDesc = ListPrivateNetworkInterfacesRequestOrderBy("created_at_desc") // Created at ascending. ListPrivateNetworkInterfacesRequestOrderByCreatedAtAsc = ListPrivateNetworkInterfacesRequestOrderBy("created_at_asc") // Updated at descending. ListPrivateNetworkInterfacesRequestOrderByUpdatedAtDesc = ListPrivateNetworkInterfacesRequestOrderBy("updated_at_desc") // Updated at ascending. ListPrivateNetworkInterfacesRequestOrderByUpdatedAtAsc = ListPrivateNetworkInterfacesRequestOrderBy("updated_at_asc") )
const ( // Created at descending. ListSecurityGroupsRequestOrderByCreatedAtDesc = ListSecurityGroupsRequestOrderBy("created_at_desc") // Created at ascending. ListSecurityGroupsRequestOrderByCreatedAtAsc = ListSecurityGroupsRequestOrderBy("created_at_asc") // Updated at descending. ListSecurityGroupsRequestOrderByUpdatedAtDesc = ListSecurityGroupsRequestOrderBy("updated_at_desc") // Updated at ascending. ListSecurityGroupsRequestOrderByUpdatedAtAsc = ListSecurityGroupsRequestOrderBy("updated_at_asc") )
const ( ListServersRequestOrderByCreatedAtDesc = ListServersRequestOrderBy("created_at_desc") ListServersRequestOrderByCreatedAtAsc = ListServersRequestOrderBy("created_at_asc") ListServersRequestOrderByUpdatedAtDesc = ListServersRequestOrderBy("updated_at_desc") ListServersRequestOrderByUpdatedAtAsc = ListServersRequestOrderBy("updated_at_asc") )
const ( ListSnapshotsRequestOrderByCreatedAtDesc = ListSnapshotsRequestOrderBy("created_at_desc") ListSnapshotsRequestOrderByCreatedAtAsc = ListSnapshotsRequestOrderBy("created_at_asc") ListSnapshotsRequestOrderByUpdatedAtDesc = ListSnapshotsRequestOrderBy("updated_at_desc") ListSnapshotsRequestOrderByUpdatedAtAsc = ListSnapshotsRequestOrderBy("updated_at_asc") )
const ( ListTemplatesRequestOrderByCreatedAtDesc = ListTemplatesRequestOrderBy("created_at_desc") ListTemplatesRequestOrderByCreatedAtAsc = ListTemplatesRequestOrderBy("created_at_asc") ListTemplatesRequestOrderByUpdatedAtDesc = ListTemplatesRequestOrderBy("updated_at_desc") ListTemplatesRequestOrderByUpdatedAtAsc = ListTemplatesRequestOrderBy("updated_at_asc") )
const ( ListVolumesRequestOrderByCreatedAtDesc = ListVolumesRequestOrderBy("created_at_desc") ListVolumesRequestOrderByCreatedAtAsc = ListVolumesRequestOrderBy("created_at_asc") ListVolumesRequestOrderByUpdatedAtDesc = ListVolumesRequestOrderBy("updated_at_desc") ListVolumesRequestOrderByUpdatedAtAsc = ListVolumesRequestOrderBy("updated_at_asc") )
const ( // Unknown policy type. PlacementGroupPolicyTypeUnknownPolicyType = PlacementGroupPolicyType("unknown_policy_type") // Ensures that all servers in the placement group are placed on the same physical host to minimize latency. PlacementGroupPolicyTypeLowLatency = PlacementGroupPolicyType("low_latency") // Distributes servers across multiple physical hosts to maximize availability. PlacementGroupPolicyTypeMaxAvailability = PlacementGroupPolicyType("max_availability") )
const ( // Unknown status. PrivateNetworkInterfaceStatusUnknownStatus = PrivateNetworkInterfaceStatus("unknown_status") // Interface is available. PrivateNetworkInterfaceStatusAvailable = PrivateNetworkInterfaceStatus("available") // Interface is being attached. PrivateNetworkInterfaceStatusAttaching = PrivateNetworkInterfaceStatus("attaching") // Interface is being detached. PrivateNetworkInterfaceStatusDetaching = PrivateNetworkInterfaceStatus("detaching") // Interface is being synchronized. PrivateNetworkInterfaceStatusSyncing = PrivateNetworkInterfaceStatus("syncing") )
const ( // Unknown action. SecurityGroupActionUnknownAction = SecurityGroupAction("unknown_action") // Accept the traffic. SecurityGroupActionAccept = SecurityGroupAction("accept") // Drop the traffic. SecurityGroupActionDrop = SecurityGroupAction("drop") )
const ( // Unknown action. SecurityGroupRuleActionUnknownAction = SecurityGroupRuleAction("unknown_action") // Accept the traffic. SecurityGroupRuleActionAccept = SecurityGroupRuleAction("accept") // Drop the traffic. SecurityGroupRuleActionDrop = SecurityGroupRuleAction("drop") )
const ( // Unknown direction. SecurityGroupRuleDirectionUnknownDirection = SecurityGroupRuleDirection("unknown_direction") // Inbound traffic. SecurityGroupRuleDirectionInbound = SecurityGroupRuleDirection("inbound") // Outbound traffic. SecurityGroupRuleDirectionOutbound = SecurityGroupRuleDirection("outbound") // Both inbound and outbound traffic. SecurityGroupRuleDirectionBoth = SecurityGroupRuleDirection("both") )
const ( // Unknown protocol. SecurityGroupRuleProtocolUnknownProtocol = SecurityGroupRuleProtocol("unknown_protocol") // TCP protocol. SecurityGroupRuleProtocolTCP = SecurityGroupRuleProtocol("tcp") // UDP protocol. SecurityGroupRuleProtocolUDP = SecurityGroupRuleProtocol("udp") // ICMP protocol. SecurityGroupRuleProtocolIcmp = SecurityGroupRuleProtocol("icmp") // Any protocol. SecurityGroupRuleProtocolAny = SecurityGroupRuleProtocol("any") )
const ( // Architecture is unknown. ServerArchitectureUnknownArchitecture = ServerArchitecture("unknown_architecture") // X86_64 architecture. ServerArchitectureX86_64 = ServerArchitecture("x86_64") // AArch64 architecture. ServerArchitectureAarch64 = ServerArchitecture("aarch64") )
const ( ServerFilesystemStatusUnknownStatus = ServerFilesystemStatus("unknown_status") ServerFilesystemStatusAttaching = ServerFilesystemStatus("attaching") ServerFilesystemStatusAvailable = ServerFilesystemStatus("available") ServerFilesystemStatusDetaching = ServerFilesystemStatus("detaching") )
const ( // Status is unknown. ServerIPStatusUnknownStatus = ServerIPStatus("unknown_status") // IP is detached. ServerIPStatusDetached = ServerIPStatus("detached") // IP is attached. ServerIPStatusAttached = ServerIPStatus("attached") // IP is pending. ServerIPStatusPending = ServerIPStatus("pending") // IP is in error state. ServerIPStatusError = ServerIPStatus("error") )
const ( // Status is unknown. ServerPrivateNetworkInterfaceStatusUnknownStatus = ServerPrivateNetworkInterfaceStatus("unknown_status") // Interface is available. ServerPrivateNetworkInterfaceStatusAvailable = ServerPrivateNetworkInterfaceStatus("available") // Interface is being attached. ServerPrivateNetworkInterfaceStatusAttaching = ServerPrivateNetworkInterfaceStatus("attaching") // Interface is being detached. ServerPrivateNetworkInterfaceStatusDetaching = ServerPrivateNetworkInterfaceStatus("detaching") // Interface is syncing. ServerPrivateNetworkInterfaceStatusSyncing = ServerPrivateNetworkInterfaceStatus("syncing") )
const ( // Status is unknown. ServerPublicNetworkInterfaceStatusUnknownStatus = ServerPublicNetworkInterfaceStatus("unknown_status") // Interface is available. ServerPublicNetworkInterfaceStatusAvailable = ServerPublicNetworkInterfaceStatus("available") // Interface is syncing. ServerPublicNetworkInterfaceStatusSyncing = ServerPublicNetworkInterfaceStatus("syncing") )
const ( // Status is unknown. ServerStatusUnknownStatus = ServerStatus("unknown_status") // Server is running. ServerStatusStarted = ServerStatus("started") // Server is stopped. ServerStatusStopped = ServerStatus("stopped") // Server is paused. ServerStatusPaused = ServerStatus("paused") // Server is starting. ServerStatusStarting = ServerStatus("starting") // Server is stopping. ServerStatusStopping = ServerStatus("stopping") // Server is pausing. ServerStatusPausing = ServerStatus("pausing") // Server is locked. ServerStatusLocked = ServerStatus("locked") // Server is rebooting. ServerStatusRebooting = ServerStatus("rebooting") )
const ( // Architecture is unknown. ServerTypeArchitectureUnknownArchitecture = ServerTypeArchitecture("unknown_architecture") // X86_64 architecture. ServerTypeArchitectureX86_64 = ServerTypeArchitecture("x86_64") // AArch64 architecture. ServerTypeArchitectureAarch64 = ServerTypeArchitecture("aarch64") )
const ( // Availability is unknown. ServerTypeAvailabilityUnknownAvailability = ServerTypeAvailability("unknown_availability") // Server type is available. ServerTypeAvailabilityAvailable = ServerTypeAvailability("available") // Server type is in low stock. ServerTypeAvailabilityLowStock = ServerTypeAvailability("low_stock") // Server type is out of stock. ServerTypeAvailabilityOutOfStock = ServerTypeAvailability("out_of_stock") )
const ( // Volume type is unknown. ServerVolumeVolumeTypeUnknownVolumeType = ServerVolumeVolumeType("unknown_volume_type") // Local SSD volume. ServerVolumeVolumeTypeLSSD = ServerVolumeVolumeType("l_ssd") // Scaleway Block Storage volume. ServerVolumeVolumeTypeSbs = ServerVolumeVolumeType("sbs") // Scratch volume. ServerVolumeVolumeTypeScratch = ServerVolumeVolumeType("scratch") )
const ( // Status is unknown. SnapshotStatusUnknownStatus = SnapshotStatus("unknown_status") // Snapshot is available. SnapshotStatusAvailable = SnapshotStatus("available") // Snapshot is being created. SnapshotStatusCreating = SnapshotStatus("creating") // Snapshot is in error state. SnapshotStatusError = SnapshotStatus("error") // Snapshot has invalid data. SnapshotStatusInvalidData = SnapshotStatus("invalid_data") // Snapshot is being exported. SnapshotStatusExporting = SnapshotStatus("exporting") )
const ( // Volume type is unknown. SnapshotVolumeTypeUnknownVolumeType = SnapshotVolumeType("unknown_volume_type") // Local SSD volume. SnapshotVolumeTypeLSSD = SnapshotVolumeType("l_ssd") )
const ( // Status is unknown. VolumeStatusUnknownStatus = VolumeStatus("unknown_status") // Volume is available. VolumeStatusAvailable = VolumeStatus("available") // Volume is being snapshotted. VolumeStatusSnapshotting = VolumeStatus("snapshotting") // Volume is being attached. VolumeStatusAttaching = VolumeStatus("attaching") // Volume is being detached. VolumeStatusDetaching = VolumeStatus("detaching") // Volume is being created. VolumeStatusCreating = VolumeStatus("creating") // Volume is being migrated. VolumeStatusMigrating = VolumeStatus("migrating") // Volume is in error state. VolumeStatusError = VolumeStatus("error") )
const ( // Volume type is unknown. VolumeVolumeTypeUnknownVolumeType = VolumeVolumeType("unknown_volume_type") // Local SSD volume. VolumeVolumeTypeLSSD = VolumeVolumeType("l_ssd") // Scratch volume. VolumeVolumeTypeScratch = VolumeVolumeType("scratch") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
This API allows you to manage your CPU and GPU Instances.
func (*API) AddSecurityGroupRules ¶
func (s *API) AddSecurityGroupRules(req *AddSecurityGroupRulesRequest, opts ...scw.RequestOption) (*AddSecurityGroupRulesResponse, error)
AddSecurityGroupRules: Add one or more rules to a security group.
func (*API) AttachServerFileSystem ¶
func (s *API) AttachServerFileSystem(req *AttachServerFileSystemRequest, opts ...scw.RequestOption) (*Server, error)
AttachServerFileSystem: Attach a filesystem volume to an Instance.
func (*API) AttachServerIP ¶
func (s *API) AttachServerIP(req *AttachServerIPRequest, opts ...scw.RequestOption) (*Server, error)
AttachServerIP: Attach an IP to an Instance.
func (*API) AttachServerPrivateNetworkInterface ¶
func (s *API) AttachServerPrivateNetworkInterface(req *AttachServerPrivateNetworkInterfaceRequest, opts ...scw.RequestOption) (*Server, error)
AttachServerPrivateNetworkInterface: Attach a private network interface to an Instance.
func (*API) AttachServerVolume ¶
func (s *API) AttachServerVolume(req *AttachServerVolumeRequest, opts ...scw.RequestOption) (*Server, error)
AttachServerVolume: Attach a l_ssd or SBS volume to an Instance.
func (*API) CheckTemplate ¶
func (s *API) CheckTemplate(req *CheckTemplateRequest, opts ...scw.RequestOption) error
CheckTemplate: Validate that a template is usable.
func (*API) CreatePlacementGroup ¶
func (s *API) CreatePlacementGroup(req *CreatePlacementGroupRequest, opts ...scw.RequestOption) (*PlacementGroup, error)
CreatePlacementGroup: Create a new placement group.
func (*API) CreatePrivateNetworkInterface ¶
func (s *API) CreatePrivateNetworkInterface(req *CreatePrivateNetworkInterfaceRequest, opts ...scw.RequestOption) (*PrivateNetworkInterface, error)
CreatePrivateNetworkInterface: Create a private network interface linked to a Private Network. It can be attached to an Instance.
func (*API) CreateSecurityGroup ¶
func (s *API) CreateSecurityGroup(req *CreateSecurityGroupRequest, opts ...scw.RequestOption) (*SecurityGroup, error)
CreateSecurityGroup: Create a security group with a specified name and description.
func (*API) CreateServer ¶
func (s *API) CreateServer(req *CreateServerRequest, opts ...scw.RequestOption) (*Server, error)
CreateServer: Create a new Instance of a specified server_type.
func (*API) CreateServerFromTemplate ¶
func (s *API) CreateServerFromTemplate(req *CreateServerFromTemplateRequest, opts ...scw.RequestOption) (*Server, error)
CreateServerFromTemplate: Create a new Instance using a specified template.
func (*API) CreateTemplate ¶
func (s *API) CreateTemplate(req *CreateTemplateRequest, opts ...scw.RequestOption) (*Template, error)
CreateTemplate: Create a new template from an Instance.
func (*API) DeletePlacementGroup ¶
func (s *API) DeletePlacementGroup(req *DeletePlacementGroupRequest, opts ...scw.RequestOption) error
DeletePlacementGroup: Delete a specified placement group.
func (*API) DeletePrivateNetworkInterface ¶
func (s *API) DeletePrivateNetworkInterface(req *DeletePrivateNetworkInterfaceRequest, opts ...scw.RequestOption) error
DeletePrivateNetworkInterface: Delete a specified private network interface.
func (*API) DeleteSecurityGroup ¶
func (s *API) DeleteSecurityGroup(req *DeleteSecurityGroupRequest, opts ...scw.RequestOption) error
DeleteSecurityGroup: Delete a specified security group.
func (*API) DeleteSecurityGroupRules ¶
func (s *API) DeleteSecurityGroupRules(req *DeleteSecurityGroupRulesRequest, opts ...scw.RequestOption) error
DeleteSecurityGroupRules: Delete specified security groups.
func (*API) DeleteServer ¶
func (s *API) DeleteServer(req *DeleteServerRequest, opts ...scw.RequestOption) error
DeleteServer: Delete a specified Instance.
func (*API) DeleteTemplate ¶
func (s *API) DeleteTemplate(req *DeleteTemplateRequest, opts ...scw.RequestOption) error
DeleteTemplate: Delete a specified template.
func (*API) DeleteTemplateUserData ¶
func (s *API) DeleteTemplateUserData(req *DeleteTemplateUserDataRequest, opts ...scw.RequestOption) error
DeleteTemplateUserData: Delete a specific user data key of a template.
func (*API) DeleteUserData ¶
func (s *API) DeleteUserData(req *DeleteUserDataRequest, opts ...scw.RequestOption) error
DeleteUserData: Delete a specified key from an Instance's user data.
func (*API) DetachServerFileSystem ¶
func (s *API) DetachServerFileSystem(req *DetachServerFileSystemRequest, opts ...scw.RequestOption) (*Server, error)
DetachServerFileSystem: Detach a filesystem volume from an Instance.
func (*API) DetachServerIP ¶
func (s *API) DetachServerIP(req *DetachServerIPRequest, opts ...scw.RequestOption) (*Server, error)
DetachServerIP: Detach an IP from an Instance.
func (*API) DetachServerPrivateNetworkInterface ¶
func (s *API) DetachServerPrivateNetworkInterface(req *DetachServerPrivateNetworkInterfaceRequest, opts ...scw.RequestOption) (*Server, error)
DetachServerPrivateNetworkInterface: Detach a private network interface from an Instance.
func (*API) DetachServerVolume ¶
func (s *API) DetachServerVolume(req *DetachServerVolumeRequest, opts ...scw.RequestOption) (*Server, error)
DetachServerVolume: Detach a volume from an Instance.
func (*API) GetPlacementGroup ¶
func (s *API) GetPlacementGroup(req *GetPlacementGroupRequest, opts ...scw.RequestOption) (*PlacementGroup, error)
GetPlacementGroup: Get a specified placement group.
func (*API) GetPrivateNetworkInterface ¶
func (s *API) GetPrivateNetworkInterface(req *GetPrivateNetworkInterfaceRequest, opts ...scw.RequestOption) (*PrivateNetworkInterface, error)
GetPrivateNetworkInterface: Get details of a specified private network interface.
func (*API) GetResourceCounts ¶
func (s *API) GetResourceCounts(req *GetResourceCountsRequest, opts ...scw.RequestOption) (*ResourceCounts, error)
GetResourceCounts: Get counts of various resources (e.g. servers, volumes).
func (*API) GetSecurityGroup ¶
func (s *API) GetSecurityGroup(req *GetSecurityGroupRequest, opts ...scw.RequestOption) (*SecurityGroup, error)
GetSecurityGroup: Get the details of a specified security group.
func (*API) GetServer ¶
func (s *API) GetServer(req *GetServerRequest, opts ...scw.RequestOption) (*Server, error)
GetServer: Get the details of a specified Instance.
func (*API) GetServerCloudInit ¶
func (s *API) GetServerCloudInit(req *GetServerCloudInitRequest, opts ...scw.RequestOption) (*UserData, error)
GetServerCloudInit: Get the cloud-init configuration of a specified Instance.
func (*API) GetTemplate ¶
func (s *API) GetTemplate(req *GetTemplateRequest, opts ...scw.RequestOption) (*Template, error)
GetTemplate: Get details of a specified template.
func (*API) GetTemplateCloudInit ¶
func (s *API) GetTemplateCloudInit(req *GetTemplateCloudInitRequest, opts ...scw.RequestOption) (*UserData, error)
GetTemplateCloudInit: Get the cloud-init configuration of a template.
func (*API) GetTemplateUserData ¶
func (s *API) GetTemplateUserData(req *GetTemplateUserDataRequest, opts ...scw.RequestOption) (*UserData, error)
GetTemplateUserData: Get a specific user data key of a template.
func (*API) GetUserData ¶
func (s *API) GetUserData(req *GetUserDataRequest, opts ...scw.RequestOption) (*UserData, error)
GetUserData: Get the content of a user data with a specified key on an Instance.
func (*API) ListPlacementGroups ¶
func (s *API) ListPlacementGroups(req *ListPlacementGroupsRequest, opts ...scw.RequestOption) (*ListPlacementGroupsResponse, error)
ListPlacementGroups: List all placement groups.
func (*API) ListPrivateNetworkInterfaces ¶
func (s *API) ListPrivateNetworkInterfaces(req *ListPrivateNetworkInterfacesRequest, opts ...scw.RequestOption) (*ListPrivateNetworkInterfacesResponse, error)
ListPrivateNetworkInterfaces: List all private network interfaces.
func (*API) ListSecurityGroups ¶
func (s *API) ListSecurityGroups(req *ListSecurityGroupsRequest, opts ...scw.RequestOption) (*ListSecurityGroupsResponse, error)
ListSecurityGroups: List all security groups.
func (*API) ListServerTypes ¶
func (s *API) ListServerTypes(req *ListServerTypesRequest, opts ...scw.RequestOption) (*ListServerTypesResponse, error)
ListServerTypes: List available Instance types and their technical details.
func (*API) ListServers ¶
func (s *API) ListServers(req *ListServersRequest, opts ...scw.RequestOption) (*ListServersResponse, error)
ListServers: List all Instances.
func (*API) ListTemplateUserDataKeys ¶
func (s *API) ListTemplateUserDataKeys(req *ListTemplateUserDataKeysRequest, opts ...scw.RequestOption) (*ListTemplateUserDataKeysResponse, error)
ListTemplateUserDataKeys: List all user data keys of a template.
func (*API) ListTemplates ¶
func (s *API) ListTemplates(req *ListTemplatesRequest, opts ...scw.RequestOption) (*ListTemplatesResponse, error)
ListTemplates: List all available templates.
func (*API) ListUserDataKeys ¶
func (s *API) ListUserDataKeys(req *ListUserDataKeysRequest, opts ...scw.RequestOption) (*ListUserDataKeysResponse, error)
ListUserDataKeys: List all user data keys registered on a specified Instance.
func (*API) PauseServer ¶
func (s *API) PauseServer(req *PauseServerRequest, opts ...scw.RequestOption) (*Server, error)
PauseServer: Pause a running Instance.
func (*API) RebootServer ¶
func (s *API) RebootServer(req *RebootServerRequest, opts ...scw.RequestOption) (*Server, error)
RebootServer: Reboot a running or paused Instance.
func (*API) SetSecurityGroupRules ¶
func (s *API) SetSecurityGroupRules(req *SetSecurityGroupRulesRequest, opts ...scw.RequestOption) (*SecurityGroup, error)
SetSecurityGroupRules: Replace all rules of a specified security group with the provided rules.
func (*API) SetServerCloudInit ¶
func (s *API) SetServerCloudInit(req *SetServerCloudInitRequest, opts ...scw.RequestOption) error
SetServerCloudInit: Set the cloud-init configuration for a specified Instance.
func (*API) SetServerDefaultIP ¶
func (s *API) SetServerDefaultIP(req *SetServerDefaultIPRequest, opts ...scw.RequestOption) (*Server, error)
SetServerDefaultIP: Set the default IP for an Instance.
func (*API) SetTemplateCloudInit ¶
func (s *API) SetTemplateCloudInit(req *SetTemplateCloudInitRequest, opts ...scw.RequestOption) error
SetTemplateCloudInit: Set the cloud-init configuration of a template.
func (*API) SetTemplateUserData ¶
func (s *API) SetTemplateUserData(req *SetTemplateUserDataRequest, opts ...scw.RequestOption) error
SetTemplateUserData: Set a user data key of a template.
func (*API) SetUserData ¶
func (s *API) SetUserData(req *SetUserDataRequest, opts ...scw.RequestOption) error
SetUserData: Add or update a user data with a specified key on an Instance.
func (*API) StartServer ¶
func (s *API) StartServer(req *StartServerRequest, opts ...scw.RequestOption) (*Server, error)
StartServer: Start a stopped or paused Instance.
func (*API) StopAndDeleteServer ¶
func (s *API) StopAndDeleteServer(req *StopAndDeleteServerRequest, opts ...scw.RequestOption) (*Server, error)
StopAndDeleteServer: Stop and delete a running or paused Instance.
func (*API) StopServer ¶
func (s *API) StopServer(req *StopServerRequest, opts ...scw.RequestOption) (*Server, error)
StopServer: Stop a running or paused Instance.
func (*API) UpdatePlacementGroup ¶
func (s *API) UpdatePlacementGroup(req *UpdatePlacementGroupRequest, opts ...scw.RequestOption) (*PlacementGroup, error)
UpdatePlacementGroup: Update the properties of a specified placement group.
func (*API) UpdatePrivateNetworkInterface ¶
func (s *API) UpdatePrivateNetworkInterface(req *UpdatePrivateNetworkInterfaceRequest, opts ...scw.RequestOption) (*PrivateNetworkInterface, error)
UpdatePrivateNetworkInterface: Update the properties of a specified private network interface.
func (*API) UpdateSecurityGroup ¶
func (s *API) UpdateSecurityGroup(req *UpdateSecurityGroupRequest, opts ...scw.RequestOption) (*SecurityGroup, error)
UpdateSecurityGroup: Update the properties of a security group.
func (*API) UpdateSecurityGroupRule ¶
func (s *API) UpdateSecurityGroupRule(req *UpdateSecurityGroupRuleRequest, opts ...scw.RequestOption) (*SecurityGroup, error)
UpdateSecurityGroupRule: Update the properties of a rule from a specified security group.
func (*API) UpdateServer ¶
func (s *API) UpdateServer(req *UpdateServerRequest, opts ...scw.RequestOption) (*Server, error)
UpdateServer: Update the properties of a specified Instance information, such as name, rescue_mode, or tags.
func (*API) UpdateTemplate ¶
func (s *API) UpdateTemplate(req *UpdateTemplateRequest, opts ...scw.RequestOption) (*Template, error)
UpdateTemplate: Update the properties of a template.
func (*API) WaitForPrivateNetworkInterface ¶
func (s *API) WaitForPrivateNetworkInterface(req *WaitForPrivateNetworkInterfaceRequest, opts ...scw.RequestOption) (*PrivateNetworkInterface, error)
WaitForPrivateNetworkInterface waits for the PrivateNetworkInterface to reach a terminal state.
func (*API) WaitForServer ¶
func (s *API) WaitForServer(req *WaitForServerRequest, opts ...scw.RequestOption) (*Server, error)
WaitForServer waits for the Server to reach a terminal state.
type AddSecurityGroupRulesRequest ¶
type AddSecurityGroupRulesRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// SecurityGroupID: ID of the security group to add rules to.
SecurityGroupID string `json:"security_group_id"`
// SecurityGroupRules: list of rules to add.
SecurityGroupRules []*SecurityGroupRuleConfig `json:"security_group_rules"`
}
AddSecurityGroupRulesRequest: add security group rules request.
type AddSecurityGroupRulesResponse ¶
type AddSecurityGroupRulesResponse struct {
// SecurityGroup: updated security group.
SecurityGroup *SecurityGroup `json:"security_group"`
// AddedRules: list of rules that were added.
AddedRules []*SecurityGroupRule `json:"added_rules"`
}
AddSecurityGroupRulesResponse: add security group rules response.
type AttachServerFileSystemRequest ¶
type AttachServerFileSystemRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: ID of the server to attach the filesystem to.
ServerID string `json:"-"`
// FilesystemID: ID of the filesystem to attach.
FilesystemID string `json:"filesystem_id"`
}
AttachServerFileSystemRequest: attach server file system request.
type AttachServerIPRequest ¶
type AttachServerIPRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: ID of the server to attach the IP to.
ServerID string `json:"-"`
// IPID: ID of the IP to attach.
IPID string `json:"ip_id"`
// Default: whether the IP should be the default IP.
Default bool `json:"default"`
// MoveAllowed: whether moving the IP is allowed.
MoveAllowed bool `json:"move_allowed"`
}
AttachServerIPRequest: attach server ip request.
type AttachServerPrivateNetworkInterfaceRequest ¶
type AttachServerPrivateNetworkInterfaceRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: ID of the server to attach the private network interface to.
ServerID string `json:"-"`
// PrivateNetworkInterfaceID: ID of the private network interface to attach.
PrivateNetworkInterfaceID string `json:"private_network_interface_id"`
}
AttachServerPrivateNetworkInterfaceRequest: attach server private network interface request.
type AttachServerVolumeRequest ¶
type AttachServerVolumeRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: ID of the server to attach the volume to.
ServerID string `json:"-"`
// VolumeID: ID of the volume to attach.
VolumeID string `json:"volume_id"`
// VolumeType: type of the volume.
// Default value: unknown_volume_type
VolumeType ServerVolumeVolumeType `json:"volume_type"`
// BootVolume: whether the volume should be used as the boot volume.
BootVolume bool `json:"boot_volume"`
}
AttachServerVolumeRequest: attach server volume request.
type CheckTemplateRequest ¶
type CheckTemplateRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// TemplateID: unique ID of the template to check.
TemplateID string `json:"-"`
}
CheckTemplateRequest: check template request.
type CreatePlacementGroupRequest ¶
type CreatePlacementGroupRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ProjectID: project ID of the placement group.
ProjectID string `json:"project_id"`
// Name: name of the placement group.
Name string `json:"name"`
// PolicyType: policy type of the placement group.
// Default value: unknown_policy_type
PolicyType PlacementGroupPolicyType `json:"policy_type"`
// Tags: tags of the placement group.
Tags []string `json:"tags"`
}
CreatePlacementGroupRequest: create placement group request.
type CreatePrivateNetworkInterfaceRequest ¶
type CreatePrivateNetworkInterfaceRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PrivateNetworkID: ID of the Private Network to attach to.
PrivateNetworkID string `json:"private_network_id"`
// ProjectID: project ID for the private network interface.
ProjectID string `json:"project_id"`
// ServerID: ID of the Instance to attach the interface to.
ServerID *string `json:"server_id,omitempty"`
// IPIDs: list of IP IDs to attach to the interface.
IPIDs []string `json:"ip_ids"`
// Tags: tags to assign to the private network interface.
Tags []string `json:"tags"`
}
CreatePrivateNetworkInterfaceRequest: create private network interface request.
type CreateSecurityGroupRequest ¶
type CreateSecurityGroupRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// Name: name of the security group.
Name string `json:"name"`
// Description: description of the security group.
Description string `json:"description"`
// DisableDefaultRules: whether to disable default rules.
DisableDefaultRules bool `json:"disable_default_rules"`
// ProjectID: project ID the security group belongs to.
ProjectID string `json:"project_id"`
// Tags: tags for the security group.
Tags []string `json:"tags"`
// ProjectDefault: whether this should be the default security group for the project.
ProjectDefault bool `json:"project_default"`
// InboundDefaultAction: default action for inbound rules.
// Default value: unknown_action
InboundDefaultAction SecurityGroupAction `json:"inbound_default_action"`
// OutboundDefaultAction: default action for outbound rules.
// Default value: unknown_action
OutboundDefaultAction SecurityGroupAction `json:"outbound_default_action"`
// Stateless: whether the security group should be stateless.
Stateless bool `json:"stateless"`
}
CreateSecurityGroupRequest: create security group request.
type CreateServerFromTemplateRequest ¶
type CreateServerFromTemplateRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// TemplateID: unique ID of the template to use.
TemplateID string `json:"-"`
// Name: name of the new server.
Name string `json:"name"`
}
CreateServerFromTemplateRequest: create server from template request.
type CreateServerRequest ¶
type CreateServerRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ProjectID: project ID for the server.
ProjectID string `json:"project_id"`
// Name: name of the server.
Name string `json:"name"`
// Tags: tags to associate with the server.
Tags []string `json:"tags"`
// ServerType: type of the server.
ServerType string `json:"server_type"`
// PlacementGroupID: ID of the placement group the server belongs to.
PlacementGroupID *string `json:"placement_group_id,omitempty"`
// Volumes: volumes to attach to the server.
Volumes []*CreateServerRequestServerVolume `json:"volumes"`
// WindowsRdpSSHKeyID: iAM ID of the SSH key used to encrypt the Windows `Administrator` password for RDP use.
WindowsRdpSSHKeyID *string `json:"windows_rdp_ssh_key_id,omitempty"`
// PublicNetworkInterface: public network interface configuration.
PublicNetworkInterface *CreateServerRequestPublicNetworkInterface `json:"public_network_interface,omitempty"`
}
CreateServerRequest: create server request.
type CreateServerRequestBookIP ¶
type CreateServerRequestBookIP struct {
// Type: type of IP to book.
// Default value: unknown_ip_type
Type CreateServerRequestBookIPIPType `json:"type"`
// Tags: tags to associate with the IP.
Tags []string `json:"tags"`
}
CreateServerRequestBookIP: create server request book ip.
type CreateServerRequestBookIPIPType ¶
type CreateServerRequestBookIPIPType string
func (CreateServerRequestBookIPIPType) MarshalJSON ¶
func (enum CreateServerRequestBookIPIPType) MarshalJSON() ([]byte, error)
func (CreateServerRequestBookIPIPType) String ¶
func (enum CreateServerRequestBookIPIPType) String() string
func (*CreateServerRequestBookIPIPType) UnmarshalJSON ¶
func (enum *CreateServerRequestBookIPIPType) UnmarshalJSON(data []byte) error
func (CreateServerRequestBookIPIPType) Values ¶
func (enum CreateServerRequestBookIPIPType) Values() []CreateServerRequestBookIPIPType
type CreateServerRequestCreateVolume ¶
type CreateServerRequestCreateVolume struct {
// Name: name of the volume.
Name string `json:"name"`
// Tags: tags to associate with the volume.
Tags []string `json:"tags"`
// Size: size of the volume.
Size *scw.Size `json:"size"`
// BaseSnapshotID: ID of the base snapshot for the volume.
// Precisely one of BaseSnapshotID, ImageLabel must be set.
BaseSnapshotID *string `json:"base_snapshot_id,omitempty"`
// ImageLabel: label of the image to use for the volume.
// Precisely one of BaseSnapshotID, ImageLabel must be set.
ImageLabel *string `json:"image_label,omitempty"`
// PerfIops: performance IOPS for the volume.
PerfIops *uint32 `json:"perf_iops"`
}
CreateServerRequestCreateVolume: create server request create volume.
type CreateServerRequestPublicNetworkInterface ¶
type CreateServerRequestPublicNetworkInterface struct {
// SecurityGroupID: ID of the security group for the interface.
SecurityGroupID *string `json:"security_group_id"`
// IPs: list of IPs to attach to the interface.
IPs []*CreateServerRequestServerIP `json:"ips"`
}
CreateServerRequestPublicNetworkInterface: create server request public network interface.
type CreateServerRequestServerIP ¶
type CreateServerRequestServerIP struct {
// IpamIPID: ID of the IPAM IP to attach.
// Precisely one of IpamIPID, NewIP must be set.
IpamIPID *string `json:"ipam_ip_id,omitempty"`
// NewIP: configuration for a new IP to book.
// Precisely one of IpamIPID, NewIP must be set.
NewIP *CreateServerRequestBookIP `json:"new_ip,omitempty"`
}
CreateServerRequestServerIP: create server request server ip.
type CreateServerRequestServerVolume ¶
type CreateServerRequestServerVolume struct {
// VolumeType: type of the volume.
// Default value: unknown_volume_type
VolumeType CreateServerRequestServerVolumeVolumeType `json:"volume_type"`
// VolumeID: ID of the volume to attach.
// Precisely one of VolumeID, NewVolume must be set.
VolumeID *string `json:"volume_id,omitempty"`
// NewVolume: configuration for a new volume to create.
// Precisely one of VolumeID, NewVolume must be set.
NewVolume *CreateServerRequestCreateVolume `json:"new_volume,omitempty"`
}
CreateServerRequestServerVolume: create server request server volume.
type CreateServerRequestServerVolumeVolumeType ¶
type CreateServerRequestServerVolumeVolumeType string
func (CreateServerRequestServerVolumeVolumeType) MarshalJSON ¶
func (enum CreateServerRequestServerVolumeVolumeType) MarshalJSON() ([]byte, error)
func (CreateServerRequestServerVolumeVolumeType) String ¶
func (enum CreateServerRequestServerVolumeVolumeType) String() string
func (*CreateServerRequestServerVolumeVolumeType) UnmarshalJSON ¶
func (enum *CreateServerRequestServerVolumeVolumeType) UnmarshalJSON(data []byte) error
func (CreateServerRequestServerVolumeVolumeType) Values ¶
func (enum CreateServerRequestServerVolumeVolumeType) Values() []CreateServerRequestServerVolumeVolumeType
type CreateTemplateRequest ¶
type CreateTemplateRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ProjectID: project ID for the template.
ProjectID string `json:"project_id"`
// Name: name of the template.
Name string `json:"name"`
// Tags: tags to associate with the template.
Tags []string `json:"tags"`
// ServerTags: tags to associate with servers created from the template.
ServerTags []string `json:"server_tags"`
// ServerType: commercial type of the server defined by the template.
ServerType string `json:"server_type"`
// SecurityGroupID: security group ID for the template.
SecurityGroupID *string `json:"security_group_id,omitempty"`
// PlacementGroupID: placement group ID for the template.
PlacementGroupID *string `json:"placement_group_id,omitempty"`
// Volumes: list of volume templates to define volumes for servers.
Volumes []*CreateTemplateRequestVolumeTemplate `json:"volumes"`
// PrivateNetworks: list of private networks to associate with the template.
PrivateNetworks []*CreateTemplateRequestPrivateNetworkTemplate `json:"private_networks"`
// FilesystemIDs: list of filesystem IDs to associate with the template.
FilesystemIDs []string `json:"filesystem_ids"`
// PublicIPV4Count: number of IPv4 public IPs to attach to servers created from this template.
PublicIPV4Count uint32 `json:"public_ip_v4_count"`
// PublicIPV6Count: number of IPv6 public IPs to attach to servers created from this template.
PublicIPV6Count uint32 `json:"public_ip_v6_count"`
// WindowsRdpSSHKeyID: iAM ID of the SSH key used to encrypt the Windows `Administrator` password for RDP use.
WindowsRdpSSHKeyID *string `json:"windows_rdp_ssh_key_id,omitempty"`
}
CreateTemplateRequest: create template request.
type CreateTemplateRequestPrivateNetworkTemplate ¶
type CreateTemplateRequestPrivateNetworkTemplate struct {
// PrivateNetworkID: ID of the private network.
PrivateNetworkID string `json:"private_network_id"`
}
CreateTemplateRequestPrivateNetworkTemplate: create template request private network template.
type CreateTemplateRequestVolumeTemplate ¶
type CreateTemplateRequestVolumeTemplate struct {
// VolumeType: type of the volume.
// Default value: unknown_volume_type
VolumeType CreateServerRequestServerVolumeVolumeType `json:"volume_type"`
// Name: name of the volume.
Name string `json:"name"`
// Tags: tags associated with the volume.
Tags []string `json:"tags"`
// Size: size of the volume in bytes.
Size *scw.Size `json:"size"`
// BaseSnapshotID: ID of the base snapshot for the volume.
// Precisely one of BaseSnapshotID, ImageLabel must be set.
BaseSnapshotID *string `json:"base_snapshot_id,omitempty"`
// ImageLabel: label of the image used as base for the volume.
// Precisely one of BaseSnapshotID, ImageLabel must be set.
ImageLabel *string `json:"image_label,omitempty"`
// PerfIops: performance IOPS for the volume.
PerfIops *uint32 `json:"perf_iops"`
}
CreateTemplateRequestVolumeTemplate: create template request volume template.
type CreateVolumeRequestVolumeType ¶
type CreateVolumeRequestVolumeType string
func (CreateVolumeRequestVolumeType) MarshalJSON ¶
func (enum CreateVolumeRequestVolumeType) MarshalJSON() ([]byte, error)
func (CreateVolumeRequestVolumeType) String ¶
func (enum CreateVolumeRequestVolumeType) String() string
func (*CreateVolumeRequestVolumeType) UnmarshalJSON ¶
func (enum *CreateVolumeRequestVolumeType) UnmarshalJSON(data []byte) error
func (CreateVolumeRequestVolumeType) Values ¶
func (enum CreateVolumeRequestVolumeType) Values() []CreateVolumeRequestVolumeType
type DeletePlacementGroupRequest ¶
type DeletePlacementGroupRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PlacementGroupID: UUID of the placement group you want to delete.
PlacementGroupID string `json:"-"`
}
DeletePlacementGroupRequest: delete placement group request.
type DeletePrivateNetworkInterfaceRequest ¶
type DeletePrivateNetworkInterfaceRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PrivateNetworkInterfaceID: ID of the private network interface to delete.
PrivateNetworkInterfaceID string `json:"-"`
}
DeletePrivateNetworkInterfaceRequest: delete private network interface request.
type DeleteSecurityGroupRequest ¶
type DeleteSecurityGroupRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// SecurityGroupID: ID of the security group to delete.
SecurityGroupID string `json:"-"`
}
DeleteSecurityGroupRequest: delete security group request.
type DeleteSecurityGroupRulesRequest ¶
type DeleteSecurityGroupRulesRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// SecurityGroupRuleIDs: list of rule IDs to delete.
SecurityGroupRuleIDs []string `json:"security_group_rule_ids"`
}
DeleteSecurityGroupRulesRequest: delete security group rules request.
type DeleteServerRequest ¶
type DeleteServerRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: ID of the server to delete.
ServerID string `json:"-"`
// DeleteAllIPs: whether to delete all IPs attached to the server.
// Precisely one of DeleteAllIPs, DeleteIPIDs must be set.
DeleteAllIPs *bool `json:"delete_all_ips,omitempty"`
// DeleteIPIDs: list of IP IDs to delete.
// Precisely one of DeleteAllIPs, DeleteIPIDs must be set.
DeleteIPIDs *[]string `json:"delete_ip_ids,omitempty"`
// DeleteAllVolumes: whether to delete all volumes attached to the server.
// Precisely one of DeleteAllVolumes, DeleteVolumeIDs must be set.
DeleteAllVolumes *bool `json:"delete_all_volumes,omitempty"`
// DeleteVolumeIDs: list of volume IDs to delete.
// Precisely one of DeleteAllVolumes, DeleteVolumeIDs must be set.
DeleteVolumeIDs *[]string `json:"delete_volume_ids,omitempty"`
// KeepAllPrivateNics: whether to keep all private network interfaces.
// Precisely one of KeepAllPrivateNics, DeletePrivateNicIDs must be set.
KeepAllPrivateNics *bool `json:"keep_all_private_nics,omitempty"`
// DeletePrivateNicIDs: list of private network interface IDs to delete.
// Precisely one of KeepAllPrivateNics, DeletePrivateNicIDs must be set.
DeletePrivateNicIDs *[]string `json:"delete_private_nic_ids,omitempty"`
}
DeleteServerRequest: delete server request.
type DeleteTemplateRequest ¶
type DeleteTemplateRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// TemplateID: unique ID of the template to delete.
TemplateID string `json:"-"`
}
DeleteTemplateRequest: delete template request.
type DeleteTemplateUserDataRequest ¶
type DeleteTemplateUserDataRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// TemplateID: unique ID of the template.
TemplateID string `json:"-"`
// Key: key of the user data to delete.
Key string `json:"-"`
}
DeleteTemplateUserDataRequest: delete template user data request.
type DeleteUserDataRequest ¶
type DeleteUserDataRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: the ID of the server.
ServerID string `json:"-"`
// Key: the key of the user data to delete.
Key string `json:"-"`
}
DeleteUserDataRequest: delete user data request.
type DetachServerFileSystemRequest ¶
type DetachServerFileSystemRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: ID of the server to detach the filesystem from.
ServerID string `json:"-"`
// FilesystemID: ID of the filesystem to detach.
FilesystemID string `json:"filesystem_id"`
}
DetachServerFileSystemRequest: detach server file system request.
type DetachServerIPRequest ¶
type DetachServerIPRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: ID of the server to detach the IP from.
ServerID string `json:"-"`
// IPID: ID of the IP to detach.
IPID string `json:"ip_id"`
}
DetachServerIPRequest: detach server ip request.
type DetachServerPrivateNetworkInterfaceRequest ¶
type DetachServerPrivateNetworkInterfaceRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: ID of the server to detach the private network interface from.
ServerID string `json:"-"`
// PrivateNetworkInterfaceID: ID of the private network interface to detach.
PrivateNetworkInterfaceID string `json:"private_network_interface_id"`
}
DetachServerPrivateNetworkInterfaceRequest: detach server private network interface request.
type DetachServerVolumeRequest ¶
type DetachServerVolumeRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: ID of the server to detach the volume from.
ServerID string `json:"-"`
// VolumeID: ID of the volume to detach.
VolumeID string `json:"volume_id"`
}
DetachServerVolumeRequest: detach server volume request.
type GetPlacementGroupRequest ¶
type GetPlacementGroupRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PlacementGroupID: UUID of the placement group you want to get.
PlacementGroupID string `json:"-"`
}
GetPlacementGroupRequest: get placement group request.
type GetPrivateNetworkInterfaceRequest ¶
type GetPrivateNetworkInterfaceRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PrivateNetworkInterfaceID: ID of the private network interface to retrieve.
PrivateNetworkInterfaceID string `json:"-"`
}
GetPrivateNetworkInterfaceRequest: get private network interface request.
type GetResourceCountsRequest ¶
type GetResourceCountsRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// OrganizationID: organization ID to filter resource counts.
// Precisely one of OrganizationID, ProjectID must be set.
OrganizationID *string `json:"organization_id,omitempty"`
// ProjectID: project ID to filter resource counts.
// Precisely one of OrganizationID, ProjectID must be set.
ProjectID *string `json:"project_id,omitempty"`
}
GetResourceCountsRequest: get resource counts request.
type GetSecurityGroupRequest ¶
type GetSecurityGroupRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// SecurityGroupID: ID of the security group to retrieve.
SecurityGroupID string `json:"-"`
}
GetSecurityGroupRequest: get security group request.
type GetServerCloudInitRequest ¶
type GetServerCloudInitRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: the ID of the server.
ServerID string `json:"-"`
}
GetServerCloudInitRequest: get server cloud init request.
type GetServerRequest ¶
type GetServerRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: ID of the server to retrieve.
ServerID string `json:"-"`
}
GetServerRequest: get server request.
type GetTemplateCloudInitRequest ¶
type GetTemplateCloudInitRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// TemplateID: unique ID of the template.
TemplateID string `json:"-"`
}
GetTemplateCloudInitRequest: get template cloud init request.
type GetTemplateRequest ¶
type GetTemplateRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// TemplateID: unique ID of the template to retrieve.
TemplateID string `json:"-"`
}
GetTemplateRequest: get template request.
type GetTemplateUserDataRequest ¶
type GetTemplateUserDataRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// TemplateID: unique ID of the template.
TemplateID string `json:"-"`
// Key: key of the user data to retrieve.
Key string `json:"-"`
}
GetTemplateUserDataRequest: get template user data request.
type GetUserDataRequest ¶
type GetUserDataRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: the ID of the server.
ServerID string `json:"-"`
// Key: the key of the user data to retrieve.
Key string `json:"-"`
}
GetUserDataRequest: get user data request.
type ListPlacementGroupsRequest ¶
type ListPlacementGroupsRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PageToken: the initial pagination token to start from.
PageToken *string `json:"-"`
// PageSize: the maximum number of placement groups to return.
PageSize *uint32 `json:"-"`
// OrderBy: the field by which to order the result list.
// Default value: created_at_desc
OrderBy ListPlacementGroupsRequestOrderBy `json:"-"`
// ProjectID: list only placement groups of this Project ID.
ProjectID string `json:"-"`
// PlacementGroupIDs: list only placement groups with these IDs.
PlacementGroupIDs []string `json:"-"`
// Name: filter placement groups by name.
Name *string `json:"-"`
// Tags: list placement groups with these exact tags.
Tags []string `json:"-"`
}
ListPlacementGroupsRequest: list placement groups request.
type ListPlacementGroupsRequestOrderBy ¶
type ListPlacementGroupsRequestOrderBy string
func (ListPlacementGroupsRequestOrderBy) MarshalJSON ¶
func (enum ListPlacementGroupsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListPlacementGroupsRequestOrderBy) String ¶
func (enum ListPlacementGroupsRequestOrderBy) String() string
func (*ListPlacementGroupsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListPlacementGroupsRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListPlacementGroupsRequestOrderBy) Values ¶
func (enum ListPlacementGroupsRequestOrderBy) Values() []ListPlacementGroupsRequestOrderBy
type ListPlacementGroupsResponse ¶
type ListPlacementGroupsResponse struct {
// PlacementGroups: list of placement groups.
PlacementGroups []*PlacementGroup `json:"placement_groups"`
// NextPageToken: the pagination token, use it to get the next page of results.
NextPageToken *string `json:"next_page_token"`
// TotalCount: total number of placement groups.
TotalCount uint64 `json:"total_count"`
}
ListPlacementGroupsResponse: list placement groups response.
func (*ListPlacementGroupsResponse) UnsafeAppend ¶
func (r *ListPlacementGroupsResponse) UnsafeAppend(res any) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListPlacementGroupsResponse) UnsafeGetTotalCount ¶
func (r *ListPlacementGroupsResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListPrivateNetworkInterfacesRequest ¶
type ListPrivateNetworkInterfacesRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PageToken: token for pagination.
PageToken *string `json:"-"`
// PageSize: number of items to return per page.
PageSize *uint32 `json:"-"`
// OrderBy: field to order results by.
// Default value: created_at_desc
OrderBy ListPrivateNetworkInterfacesRequestOrderBy `json:"-"`
// ProjectID: filter by Project ID.
ProjectID string `json:"-"`
// ServerIDs: filter by server IDs.
ServerIDs []string `json:"-"`
// PrivateNetworkIDs: filter by Private Network IDs.
PrivateNetworkIDs []string `json:"-"`
// Tags: filter by tags.
Tags []string `json:"-"`
}
ListPrivateNetworkInterfacesRequest: list private network interfaces request.
type ListPrivateNetworkInterfacesRequestOrderBy ¶
type ListPrivateNetworkInterfacesRequestOrderBy string
func (ListPrivateNetworkInterfacesRequestOrderBy) MarshalJSON ¶
func (enum ListPrivateNetworkInterfacesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListPrivateNetworkInterfacesRequestOrderBy) String ¶
func (enum ListPrivateNetworkInterfacesRequestOrderBy) String() string
func (*ListPrivateNetworkInterfacesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListPrivateNetworkInterfacesRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListPrivateNetworkInterfacesRequestOrderBy) Values ¶
func (enum ListPrivateNetworkInterfacesRequestOrderBy) Values() []ListPrivateNetworkInterfacesRequestOrderBy
type ListPrivateNetworkInterfacesResponse ¶
type ListPrivateNetworkInterfacesResponse struct {
// PrivateNetworkInterfaces: list of private network interfaces.
PrivateNetworkInterfaces []*PrivateNetworkInterfaceSummary `json:"private_network_interfaces"`
// NextPageToken: token for the next page.
NextPageToken *string `json:"next_page_token"`
// TotalCount: total number of items.
TotalCount uint64 `json:"total_count"`
}
ListPrivateNetworkInterfacesResponse: list private network interfaces response.
func (*ListPrivateNetworkInterfacesResponse) UnsafeAppend ¶
func (r *ListPrivateNetworkInterfacesResponse) UnsafeAppend(res any) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListPrivateNetworkInterfacesResponse) UnsafeGetTotalCount ¶
func (r *ListPrivateNetworkInterfacesResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListSecurityGroupsRequest ¶
type ListSecurityGroupsRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PageToken: token for pagination.
PageToken *string `json:"-"`
// PageSize: number of items to return per page.
PageSize *uint32 `json:"-"`
// OrderBy: field and direction to sort by.
// Default value: created_at_desc
OrderBy ListSecurityGroupsRequestOrderBy `json:"-"`
// ProjectID: filter by Project ID.
ProjectID string `json:"-"`
// Name: filter by name.
Name *string `json:"-"`
// Tags: filter by tags.
Tags []string `json:"-"`
// SecurityGroupIDs: filter by specific security group IDs.
SecurityGroupIDs []string `json:"-"`
}
ListSecurityGroupsRequest: list security groups request.
type ListSecurityGroupsRequestOrderBy ¶
type ListSecurityGroupsRequestOrderBy string
func (ListSecurityGroupsRequestOrderBy) MarshalJSON ¶
func (enum ListSecurityGroupsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListSecurityGroupsRequestOrderBy) String ¶
func (enum ListSecurityGroupsRequestOrderBy) String() string
func (*ListSecurityGroupsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListSecurityGroupsRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListSecurityGroupsRequestOrderBy) Values ¶
func (enum ListSecurityGroupsRequestOrderBy) Values() []ListSecurityGroupsRequestOrderBy
type ListSecurityGroupsResponse ¶
type ListSecurityGroupsResponse struct {
// SecurityGroups: list of security groups.
SecurityGroups []*SecurityGroupSummary `json:"security_groups"`
// NextPageToken: token for the next page.
NextPageToken *string `json:"next_page_token"`
// TotalCount: total number of items.
TotalCount uint64 `json:"total_count"`
}
ListSecurityGroupsResponse: list security groups response.
func (*ListSecurityGroupsResponse) UnsafeAppend ¶
func (r *ListSecurityGroupsResponse) UnsafeAppend(res any) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListSecurityGroupsResponse) UnsafeGetTotalCount ¶
func (r *ListSecurityGroupsResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListServerTypesRequest ¶
type ListServerTypesRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PageToken: token for pagination.
PageToken *string `json:"-"`
// PageSize: number of server types to return per page.
PageSize *uint32 `json:"-"`
}
ListServerTypesRequest: list server types request.
type ListServerTypesResponse ¶
type ListServerTypesResponse struct {
// ServerTypes: list of server types.
ServerTypes []*ServerType `json:"server_types"`
// NextPageToken: token for the next page.
NextPageToken *string `json:"next_page_token"`
// TotalCount: total number of server types.
TotalCount uint64 `json:"total_count"`
}
ListServerTypesResponse: list server types response.
func (*ListServerTypesResponse) UnsafeAppend ¶
func (r *ListServerTypesResponse) UnsafeAppend(res any) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListServerTypesResponse) UnsafeGetTotalCount ¶
func (r *ListServerTypesResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListServersRequest ¶
type ListServersRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PageToken: token for pagination.
PageToken *string `json:"-"`
// PageSize: number of servers to return per page.
PageSize *uint32 `json:"-"`
// OrderBy: order of the returned servers.
// Default value: created_at_desc
OrderBy ListServersRequestOrderBy `json:"-"`
// ProjectID: project ID to filter servers.
ProjectID string `json:"-"`
// ServerIDs: list of server IDs to filter.
ServerIDs []string `json:"-"`
// Name: name to filter servers.
Name *string `json:"-"`
// ServerType: server type to filter.
ServerType *string `json:"-"`
// Tags: tags to filter servers.
Tags []string `json:"-"`
// SecurityGroupIDs: security group IDs to filter servers.
SecurityGroupIDs []string `json:"-"`
// PlacementGroupIDs: placement group IDs to filter servers.
PlacementGroupIDs []string `json:"-"`
// PrivateNetworkIDs: private Network IDs to filter servers.
PrivateNetworkIDs []string `json:"-"`
// MacAddresses: mAC addresses to filter servers.
MacAddresses []string `json:"-"`
}
ListServersRequest: list servers request.
type ListServersRequestOrderBy ¶
type ListServersRequestOrderBy string
func (ListServersRequestOrderBy) MarshalJSON ¶
func (enum ListServersRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListServersRequestOrderBy) String ¶
func (enum ListServersRequestOrderBy) String() string
func (*ListServersRequestOrderBy) UnmarshalJSON ¶
func (enum *ListServersRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListServersRequestOrderBy) Values ¶
func (enum ListServersRequestOrderBy) Values() []ListServersRequestOrderBy
type ListServersResponse ¶
type ListServersResponse struct {
// Servers: list of servers.
Servers []*ServerSummary `json:"servers"`
// NextPageToken: token for the next page.
NextPageToken *string `json:"next_page_token"`
// TotalCount: total number of servers.
TotalCount uint64 `json:"total_count"`
}
ListServersResponse: list servers response.
func (*ListServersResponse) UnsafeAppend ¶
func (r *ListServersResponse) UnsafeAppend(res any) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListServersResponse) UnsafeGetTotalCount ¶
func (r *ListServersResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListSnapshotsRequestOrderBy ¶
type ListSnapshotsRequestOrderBy string
func (ListSnapshotsRequestOrderBy) MarshalJSON ¶
func (enum ListSnapshotsRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListSnapshotsRequestOrderBy) String ¶
func (enum ListSnapshotsRequestOrderBy) String() string
func (*ListSnapshotsRequestOrderBy) UnmarshalJSON ¶
func (enum *ListSnapshotsRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListSnapshotsRequestOrderBy) Values ¶
func (enum ListSnapshotsRequestOrderBy) Values() []ListSnapshotsRequestOrderBy
type ListSnapshotsResponse ¶
type ListSnapshotsResponse struct {
// Snapshots: list of snapshots.
Snapshots []*Snapshot `json:"snapshots"`
// NextPageToken: token for the next page.
NextPageToken *string `json:"next_page_token"`
// TotalCount: total number of items.
TotalCount uint64 `json:"total_count"`
}
ListSnapshotsResponse: list snapshots response.
func (*ListSnapshotsResponse) UnsafeAppend ¶
func (r *ListSnapshotsResponse) UnsafeAppend(res any) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListSnapshotsResponse) UnsafeGetTotalCount ¶
func (r *ListSnapshotsResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListTemplateUserDataKeysRequest ¶
type ListTemplateUserDataKeysRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// TemplateID: unique ID of the template.
TemplateID string `json:"-"`
// PageToken: token for pagination.
PageToken *string `json:"-"`
// PageSize: number of items to return per page.
PageSize *uint32 `json:"-"`
}
ListTemplateUserDataKeysRequest: list template user data keys request.
type ListTemplateUserDataKeysResponse ¶
type ListTemplateUserDataKeysResponse struct {
// Keys: list of user data keys associated with the template.
Keys []string `json:"keys"`
// NextPageToken: token for the next page.
NextPageToken *string `json:"next_page_token"`
// TotalCount: total number of items.
TotalCount uint64 `json:"total_count"`
}
ListTemplateUserDataKeysResponse: list template user data keys response.
func (*ListTemplateUserDataKeysResponse) UnsafeAppend ¶
func (r *ListTemplateUserDataKeysResponse) UnsafeAppend(res any) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListTemplateUserDataKeysResponse) UnsafeGetTotalCount ¶
func (r *ListTemplateUserDataKeysResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListTemplatesRequest ¶
type ListTemplatesRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PageToken: token for pagination.
PageToken *string `json:"-"`
// PageSize: number of items to return per page.
PageSize *uint32 `json:"-"`
// OrderBy: field to sort results by.
// Default value: created_at_desc
OrderBy ListTemplatesRequestOrderBy `json:"-"`
// ProjectID: filter by Project ID.
ProjectID string `json:"-"`
// TemplateIDs: filter by specific template IDs.
TemplateIDs []string `json:"-"`
// Name: filter by template name.
Name *string `json:"-"`
// Tags: filter by tags.
Tags []string `json:"-"`
// ServerTags: filter by server tags.
ServerTags []string `json:"-"`
// SecurityGroupIDs: filter by security group IDs.
SecurityGroupIDs []string `json:"-"`
// PlacementGroupIDs: filter by placement group IDs.
PlacementGroupIDs []string `json:"-"`
}
ListTemplatesRequest: list templates request.
type ListTemplatesRequestOrderBy ¶
type ListTemplatesRequestOrderBy string
func (ListTemplatesRequestOrderBy) MarshalJSON ¶
func (enum ListTemplatesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListTemplatesRequestOrderBy) String ¶
func (enum ListTemplatesRequestOrderBy) String() string
func (*ListTemplatesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListTemplatesRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListTemplatesRequestOrderBy) Values ¶
func (enum ListTemplatesRequestOrderBy) Values() []ListTemplatesRequestOrderBy
type ListTemplatesResponse ¶
type ListTemplatesResponse struct {
// Templates: list of template summaries.
Templates []*TemplateSummary `json:"templates"`
// NextPageToken: token for the next page.
NextPageToken *string `json:"next_page_token"`
// TotalCount: total number of items.
TotalCount uint64 `json:"total_count"`
}
ListTemplatesResponse: list templates response.
func (*ListTemplatesResponse) UnsafeAppend ¶
func (r *ListTemplatesResponse) UnsafeAppend(res any) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListTemplatesResponse) UnsafeGetTotalCount ¶
func (r *ListTemplatesResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListUserDataKeysRequest ¶
type ListUserDataKeysRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: the ID of the server.
ServerID string `json:"-"`
// PageToken: page token for pagination.
PageToken *string `json:"-"`
// PageSize: number of items to return per page.
PageSize *uint32 `json:"-"`
}
ListUserDataKeysRequest: list user data keys request.
type ListUserDataKeysResponse ¶
type ListUserDataKeysResponse struct {
// Keys: list of user data keys.
Keys []string `json:"keys"`
// NextPageToken: token for the next page.
NextPageToken *string `json:"next_page_token"`
// TotalCount: total number of items.
TotalCount uint64 `json:"total_count"`
}
ListUserDataKeysResponse: list user data keys response.
func (*ListUserDataKeysResponse) UnsafeAppend ¶
func (r *ListUserDataKeysResponse) UnsafeAppend(res any) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListUserDataKeysResponse) UnsafeGetTotalCount ¶
func (r *ListUserDataKeysResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListVolumeTypesResponse ¶
type ListVolumeTypesResponse struct {
// VolumeTypes: list of volume types.
VolumeTypes []*VolumeType `json:"volume_types"`
// NextPageToken: token for the next page.
NextPageToken *string `json:"next_page_token"`
// TotalCount: total number of items.
TotalCount uint64 `json:"total_count"`
}
ListVolumeTypesResponse: list volume types response.
func (*ListVolumeTypesResponse) UnsafeAppend ¶
func (r *ListVolumeTypesResponse) UnsafeAppend(res any) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListVolumeTypesResponse) UnsafeGetTotalCount ¶
func (r *ListVolumeTypesResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type ListVolumesRequestOrderBy ¶
type ListVolumesRequestOrderBy string
func (ListVolumesRequestOrderBy) MarshalJSON ¶
func (enum ListVolumesRequestOrderBy) MarshalJSON() ([]byte, error)
func (ListVolumesRequestOrderBy) String ¶
func (enum ListVolumesRequestOrderBy) String() string
func (*ListVolumesRequestOrderBy) UnmarshalJSON ¶
func (enum *ListVolumesRequestOrderBy) UnmarshalJSON(data []byte) error
func (ListVolumesRequestOrderBy) Values ¶
func (enum ListVolumesRequestOrderBy) Values() []ListVolumesRequestOrderBy
type ListVolumesResponse ¶
type ListVolumesResponse struct {
// Volumes: list of volumes.
Volumes []*Volume `json:"volumes"`
// NextPageToken: token for the next page.
NextPageToken *string `json:"next_page_token"`
// TotalCount: total number of items.
TotalCount uint64 `json:"total_count"`
}
ListVolumesResponse: list volumes response.
func (*ListVolumesResponse) UnsafeAppend ¶
func (r *ListVolumesResponse) UnsafeAppend(res any) (uint64, error)
UnsafeAppend should not be used Internal usage only
func (*ListVolumesResponse) UnsafeGetTotalCount ¶
func (r *ListVolumesResponse) UnsafeGetTotalCount() uint64
UnsafeGetTotalCount should not be used Internal usage only
type PauseServerRequest ¶
type PauseServerRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: ID of the server to pause.
ServerID string `json:"-"`
}
PauseServerRequest: pause server request.
type PlacementGroup ¶
type PlacementGroup struct {
// ID: placement group unique ID.
ID string `json:"id"`
// ProjectID: placement group Project ID.
ProjectID string `json:"project_id"`
// Name: placement group name.
Name string `json:"name"`
// PolicyType: select the behavior of the placement group, either low_latency (group) or max_availability (spread).
// Default value: unknown_policy_type
PolicyType PlacementGroupPolicyType `json:"policy_type"`
// Tags: placement group tags.
Tags []string `json:"tags"`
// CreatedAt: placement group creation date.
CreatedAt *time.Time `json:"created_at"`
// UpdatedAt: placement group modification date.
UpdatedAt *time.Time `json:"updated_at"`
// Zone: zone in which the placement group is located.
Zone scw.Zone `json:"zone"`
}
PlacementGroup: placement group.
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
func (PlacementGroupPolicyType) Values ¶
func (enum PlacementGroupPolicyType) Values() []PlacementGroupPolicyType
type PrivateNetworkInterface ¶
type PrivateNetworkInterface struct {
// ID: unique ID of the private network interface.
ID string `json:"id"`
// PrivateNetworkID: ID of the Private Network this interface is attached to.
PrivateNetworkID string `json:"private_network_id"`
// ProjectID: project ID the private network interface belongs to.
ProjectID string `json:"project_id"`
// ServerID: ID of the Instance this interface is attached to.
ServerID string `json:"server_id"`
// MacAddress: mAC address of the private network interface.
MacAddress string `json:"mac_address"`
// Status: current status of the private network interface.
// Default value: unknown_status
Status PrivateNetworkInterfaceStatus `json:"status"`
// IPIDs: list of IP IDs attached to this interface.
IPIDs []string `json:"ip_ids"`
// Tags: tags associated with the private network interface.
Tags []string `json:"tags"`
// CreatedAt: creation timestamp of the private network interface.
CreatedAt *time.Time `json:"created_at"`
// UpdatedAt: last update timestamp of the private network interface.
UpdatedAt *time.Time `json:"updated_at"`
}
PrivateNetworkInterface: private network interface.
type PrivateNetworkInterfaceStatus ¶
type PrivateNetworkInterfaceStatus string
func (PrivateNetworkInterfaceStatus) MarshalJSON ¶
func (enum PrivateNetworkInterfaceStatus) MarshalJSON() ([]byte, error)
func (PrivateNetworkInterfaceStatus) String ¶
func (enum PrivateNetworkInterfaceStatus) String() string
func (*PrivateNetworkInterfaceStatus) UnmarshalJSON ¶
func (enum *PrivateNetworkInterfaceStatus) UnmarshalJSON(data []byte) error
func (PrivateNetworkInterfaceStatus) Values ¶
func (enum PrivateNetworkInterfaceStatus) Values() []PrivateNetworkInterfaceStatus
type PrivateNetworkInterfaceSummary ¶
type PrivateNetworkInterfaceSummary struct {
// ID: unique ID of the private network interface.
ID string `json:"id"`
// PrivateNetworkID: ID of the Private Network this interface is attached to.
PrivateNetworkID string `json:"private_network_id"`
// ProjectID: project ID the private network interface belongs to.
ProjectID string `json:"project_id"`
// ServerID: ID of the Instance this interface is attached to.
ServerID string `json:"server_id"`
// MacAddress: mAC address of the private network interface.
MacAddress string `json:"mac_address"`
// Status: current status of the private network interface.
// Default value: unknown_status
Status PrivateNetworkInterfaceStatus `json:"status"`
// IPIDs: list of IP IDs attached to this interface.
IPIDs []string `json:"ip_ids"`
// Tags: tags associated with the private network interface.
Tags []string `json:"tags"`
// CreatedAt: creation timestamp of the private network interface.
CreatedAt *time.Time `json:"created_at"`
// UpdatedAt: last update timestamp of the private network interface.
UpdatedAt *time.Time `json:"updated_at"`
}
PrivateNetworkInterfaceSummary: private network interface summary.
type RebootServerRequest ¶
type RebootServerRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: ID of the server to reboot.
ServerID string `json:"-"`
}
RebootServerRequest: reboot server request.
type ResourceCounts ¶
type ResourceCounts struct {
// Servers: number of servers.
Servers uint32 `json:"servers"`
// GpuServers: number of GPU servers.
GpuServers uint32 `json:"gpu_servers"`
// ServersByType: map of server types with their counts.
ServersByType map[string]uint32 `json:"servers_by_type"`
// SecurityGroups: number of security groups.
SecurityGroups uint32 `json:"security_groups"`
// PlacementGroups: number of placement groups.
PlacementGroups uint32 `json:"placement_groups"`
// Snapshots: number of snapshots.
Snapshots uint32 `json:"snapshots"`
// Volumes: number of volumes.
Volumes uint32 `json:"volumes"`
// VolumesLSSD: number of local SSD volumes.
VolumesLSSD uint32 `json:"volumes_l_ssd"`
// VolumesLSSDTotalSize: total size of local SSD volumes in bytes.
VolumesLSSDTotalSize uint64 `json:"volumes_l_ssd_total_size"`
// VolumesScratch: number of scratch volumes.
VolumesScratch uint32 `json:"volumes_scratch"`
// PrivateNetworkInterfaces: number of private network interfaces.
PrivateNetworkInterfaces uint32 `json:"private_network_interfaces"`
}
ResourceCounts: resource counts.
type SecurityGroup ¶
type SecurityGroup struct {
// ID: unique ID of the security group.
ID string `json:"id"`
// Name: name of the security group.
Name string `json:"name"`
// Description: description of the security group.
Description string `json:"description"`
// ProjectID: project ID the security group belongs to.
ProjectID string `json:"project_id"`
// Tags: tags associated with the security group.
Tags []string `json:"tags"`
// DisableDefaultRules: true if default rules are disabled.
DisableDefaultRules bool `json:"disable_default_rules"`
// ProjectDefault: true if this is the default security group for the project.
ProjectDefault bool `json:"project_default"`
// InboundDefaultAction: default action for inbound rules.
// Default value: unknown_action
InboundDefaultAction SecurityGroupAction `json:"inbound_default_action"`
// OutboundDefaultAction: default action for outbound rules.
// Default value: unknown_action
OutboundDefaultAction SecurityGroupAction `json:"outbound_default_action"`
// Stateless: true if the security group is stateless.
Stateless bool `json:"stateless"`
// CreatedAt: creation timestamp of the security group.
CreatedAt *time.Time `json:"created_at"`
// UpdatedAt: last update timestamp of the security group.
UpdatedAt *time.Time `json:"updated_at"`
// DefaultRules: list of default rules applied to the security group.
DefaultRules []*SecurityGroupRule `json:"default_rules"`
// Rules: list of custom rules applied to the security group.
Rules []*SecurityGroupRule `json:"rules"`
// Zone: zone in which the security group is located.
Zone scw.Zone `json:"zone"`
}
SecurityGroup: security group.
type SecurityGroupAction ¶
type SecurityGroupAction string
func (SecurityGroupAction) MarshalJSON ¶
func (enum SecurityGroupAction) MarshalJSON() ([]byte, error)
func (SecurityGroupAction) String ¶
func (enum SecurityGroupAction) String() string
func (*SecurityGroupAction) UnmarshalJSON ¶
func (enum *SecurityGroupAction) UnmarshalJSON(data []byte) error
func (SecurityGroupAction) Values ¶
func (enum SecurityGroupAction) Values() []SecurityGroupAction
type SecurityGroupRule ¶
type SecurityGroupRule struct {
// ID: unique ID of the rule.
ID string `json:"id"`
// Protocol: protocol this rule applies to.
// Default value: unknown_protocol
Protocol SecurityGroupRuleProtocol `json:"protocol"`
// Direction: direction of traffic this rule applies to.
// Default value: unknown_direction
Direction SecurityGroupRuleDirection `json:"direction"`
// Action: action to take when the rule matches.
// Default value: unknown_action
Action SecurityGroupRuleAction `json:"action"`
// SourceIPRange: source IP range for the rule.
SourceIPRange scw.IPNet `json:"source_ip_range"`
// DestinationIPRange: destination IP range for the rule.
DestinationIPRange scw.IPNet `json:"destination_ip_range"`
// SourcePorts: source port range for the rule.
SourcePorts *SecurityGroupRulePortRange `json:"source_ports"`
// DestinationPorts: destination port range for the rule.
DestinationPorts *SecurityGroupRulePortRange `json:"destination_ports"`
// Position: position of the rule in the list.
Position uint32 `json:"position"`
}
SecurityGroupRule: security group rule.
type SecurityGroupRuleAction ¶
type SecurityGroupRuleAction string
func (SecurityGroupRuleAction) MarshalJSON ¶
func (enum SecurityGroupRuleAction) MarshalJSON() ([]byte, error)
func (SecurityGroupRuleAction) String ¶
func (enum SecurityGroupRuleAction) String() string
func (*SecurityGroupRuleAction) UnmarshalJSON ¶
func (enum *SecurityGroupRuleAction) UnmarshalJSON(data []byte) error
func (SecurityGroupRuleAction) Values ¶
func (enum SecurityGroupRuleAction) Values() []SecurityGroupRuleAction
type SecurityGroupRuleConfig ¶
type SecurityGroupRuleConfig struct {
// Protocol: protocol for the rule.
// Default value: unknown_protocol
Protocol SecurityGroupRuleProtocol `json:"protocol"`
// Direction: direction of traffic for the rule.
// Default value: unknown_direction
Direction SecurityGroupRuleDirection `json:"direction"`
// Action: action to take when the rule matches.
// Default value: unknown_action
Action SecurityGroupRuleAction `json:"action"`
// SourceIPRange: source IP range for the rule.
SourceIPRange scw.IPNet `json:"source_ip_range"`
// DestinationIPRange: destination IP range for the rule.
DestinationIPRange scw.IPNet `json:"destination_ip_range"`
// SourcePorts: source port range for the rule.
SourcePorts *SecurityGroupRulePortRange `json:"source_ports"`
// DestinationPorts: destination port range for the rule.
DestinationPorts *SecurityGroupRulePortRange `json:"destination_ports"`
// Position: position of the rule in the list.
Position int32 `json:"position"`
}
SecurityGroupRuleConfig: security group rule config.
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
func (SecurityGroupRuleDirection) Values ¶
func (enum SecurityGroupRuleDirection) Values() []SecurityGroupRuleDirection
type SecurityGroupRulePortRange ¶
type SecurityGroupRulePortRange struct {
// Start: start of the port range.
Start uint32 `json:"start"`
// End: end of the port range.
End uint32 `json:"end"`
}
SecurityGroupRulePortRange: security group rule port range.
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
func (SecurityGroupRuleProtocol) Values ¶
func (enum SecurityGroupRuleProtocol) Values() []SecurityGroupRuleProtocol
type SecurityGroupSummary ¶
type SecurityGroupSummary struct {
// ID: unique ID of the security group.
ID string `json:"id"`
// Name: name of the security group.
Name string `json:"name"`
// Description: description of the security group.
Description string `json:"description"`
// ProjectID: project ID the security group belongs to.
ProjectID string `json:"project_id"`
// Tags: tags associated with the security group.
Tags []string `json:"tags"`
// DisableDefaultRules: true if default rules are disabled.
DisableDefaultRules bool `json:"disable_default_rules"`
// ProjectDefault: true if this is the default security group for the project.
ProjectDefault bool `json:"project_default"`
// InboundDefaultAction: default action for inbound rules.
// Default value: unknown_action
InboundDefaultAction SecurityGroupAction `json:"inbound_default_action"`
// OutboundDefaultAction: default action for outbound rules.
// Default value: unknown_action
OutboundDefaultAction SecurityGroupAction `json:"outbound_default_action"`
// Stateless: true if the security group is stateless.
Stateless bool `json:"stateless"`
// CreatedAt: creation timestamp of the security group.
CreatedAt *time.Time `json:"created_at"`
// UpdatedAt: last update timestamp of the security group.
UpdatedAt *time.Time `json:"updated_at"`
}
SecurityGroupSummary: security group summary.
type Server ¶
type Server struct {
// ID: unique ID of the server.
ID string `json:"id"`
// Name: name of the server.
Name string `json:"name"`
// ProjectID: project ID to which the server belongs.
ProjectID string `json:"project_id"`
// Tags: tags associated with the server.
Tags []string `json:"tags"`
// ServerType: type of the server.
ServerType string `json:"server_type"`
// PlacementGroupID: ID of the placement group the server belongs to.
PlacementGroupID *string `json:"placement_group_id"`
// Status: current status of the server.
// Default value: unknown_status
Status ServerStatus `json:"status"`
// Volumes: list of volumes attached to the server.
Volumes []*ServerVolume `json:"volumes"`
// Filesystems: list of filesystems attached to the server.
Filesystems []*ServerFilesystem `json:"filesystems"`
// Architecture: architecture of the server.
// Default value: unknown_architecture
Architecture ServerArchitecture `json:"architecture"`
// CreatedAt: creation timestamp of the server.
CreatedAt *time.Time `json:"created_at"`
// UpdatedAt: last update timestamp of the server.
UpdatedAt *time.Time `json:"updated_at"`
// PrivateNetworkInterfaces: list of private network interfaces attached to the server.
PrivateNetworkInterfaces []*ServerPrivateNetworkInterface `json:"private_network_interfaces"`
// RescueMode: whether the server is in rescue mode.
RescueMode bool `json:"rescue_mode"`
// BootVolumeID: ID of the boot volume.
BootVolumeID *string `json:"boot_volume_id"`
// StatusDetail: detailed status information of the server.
StatusDetail string `json:"status_detail"`
// WindowsRdpPassword: encrypted RDP password for Windows servers. The encryption scheme is RSA-PKCS1-v1_5, using the public part of the SSH key supplied in `windows_rdp_ssh_key_id`.
WindowsRdpPassword *ServerRDPPassword `json:"windows_rdp_password"`
// PublicNetworkInterface: public network interface of the server.
PublicNetworkInterface *ServerPublicNetworkInterface `json:"public_network_interface"`
// Zone: zone in which the server is located.
Zone scw.Zone `json:"zone"`
}
Server: server.
type ServerArchitecture ¶
type ServerArchitecture string
func (ServerArchitecture) MarshalJSON ¶
func (enum ServerArchitecture) MarshalJSON() ([]byte, error)
func (ServerArchitecture) String ¶
func (enum ServerArchitecture) String() string
func (*ServerArchitecture) UnmarshalJSON ¶
func (enum *ServerArchitecture) UnmarshalJSON(data []byte) error
func (ServerArchitecture) Values ¶
func (enum ServerArchitecture) Values() []ServerArchitecture
type ServerFilesystem ¶
type ServerFilesystem struct {
ID string `json:"id"`
// Status: default value: unknown_status
Status ServerFilesystemStatus `json:"status"`
}
ServerFilesystem: server filesystem.
type ServerFilesystemStatus ¶
type ServerFilesystemStatus string
func (ServerFilesystemStatus) MarshalJSON ¶
func (enum ServerFilesystemStatus) MarshalJSON() ([]byte, error)
func (ServerFilesystemStatus) String ¶
func (enum ServerFilesystemStatus) String() string
func (*ServerFilesystemStatus) UnmarshalJSON ¶
func (enum *ServerFilesystemStatus) UnmarshalJSON(data []byte) error
func (ServerFilesystemStatus) Values ¶
func (enum ServerFilesystemStatus) Values() []ServerFilesystemStatus
type ServerIP ¶
type ServerIP struct {
ID string `json:"id"`
Dynamic bool `json:"dynamic"`
// Status: default value: unknown_status
Status ServerIPStatus `json:"status"`
Default bool `json:"default"`
}
ServerIP: server ip.
type ServerIPStatus ¶
type ServerIPStatus string
func (ServerIPStatus) MarshalJSON ¶
func (enum ServerIPStatus) MarshalJSON() ([]byte, error)
func (ServerIPStatus) String ¶
func (enum ServerIPStatus) String() string
func (*ServerIPStatus) UnmarshalJSON ¶
func (enum *ServerIPStatus) UnmarshalJSON(data []byte) error
func (ServerIPStatus) Values ¶
func (enum ServerIPStatus) Values() []ServerIPStatus
type ServerPrivateNetworkInterface ¶
type ServerPrivateNetworkInterface struct {
ID string `json:"id"`
PrivateNetworkID string `json:"private_network_id"`
MacAddress string `json:"mac_address"`
// Status: default value: unknown_status
Status ServerPrivateNetworkInterfaceStatus `json:"status"`
IPIDs []string `json:"ip_ids"`
SecurityGroupID string `json:"security_group_id"`
}
ServerPrivateNetworkInterface: server private network interface.
type ServerPrivateNetworkInterfaceStatus ¶
type ServerPrivateNetworkInterfaceStatus string
func (ServerPrivateNetworkInterfaceStatus) MarshalJSON ¶
func (enum ServerPrivateNetworkInterfaceStatus) MarshalJSON() ([]byte, error)
func (ServerPrivateNetworkInterfaceStatus) String ¶
func (enum ServerPrivateNetworkInterfaceStatus) String() string
func (*ServerPrivateNetworkInterfaceStatus) UnmarshalJSON ¶
func (enum *ServerPrivateNetworkInterfaceStatus) UnmarshalJSON(data []byte) error
func (ServerPrivateNetworkInterfaceStatus) Values ¶
func (enum ServerPrivateNetworkInterfaceStatus) Values() []ServerPrivateNetworkInterfaceStatus
type ServerPublicNetworkInterface ¶
type ServerPublicNetworkInterface struct {
// Status: default value: unknown_status
Status ServerPublicNetworkInterfaceStatus `json:"status"`
MacAddress string `json:"mac_address"`
SecurityGroupID string `json:"security_group_id"`
IPs []*ServerIP `json:"ips"`
DNS string `json:"dns"`
}
ServerPublicNetworkInterface: server public network interface.
type ServerPublicNetworkInterfaceStatus ¶
type ServerPublicNetworkInterfaceStatus string
func (ServerPublicNetworkInterfaceStatus) MarshalJSON ¶
func (enum ServerPublicNetworkInterfaceStatus) MarshalJSON() ([]byte, error)
func (ServerPublicNetworkInterfaceStatus) String ¶
func (enum ServerPublicNetworkInterfaceStatus) String() string
func (*ServerPublicNetworkInterfaceStatus) UnmarshalJSON ¶
func (enum *ServerPublicNetworkInterfaceStatus) UnmarshalJSON(data []byte) error
func (ServerPublicNetworkInterfaceStatus) Values ¶
func (enum ServerPublicNetworkInterfaceStatus) Values() []ServerPublicNetworkInterfaceStatus
type ServerRDPPassword ¶
type ServerRDPPassword struct {
EncryptedPassword string `json:"encrypted_password"`
RdpSSHKeyID string `json:"rdp_ssh_key_id"`
}
ServerRDPPassword: server rdp password.
type ServerStatus ¶
type ServerStatus string
func (ServerStatus) MarshalJSON ¶
func (enum ServerStatus) MarshalJSON() ([]byte, error)
func (ServerStatus) String ¶
func (enum ServerStatus) String() string
func (*ServerStatus) UnmarshalJSON ¶
func (enum *ServerStatus) UnmarshalJSON(data []byte) error
func (ServerStatus) Values ¶
func (enum ServerStatus) Values() []ServerStatus
type ServerSummary ¶
type ServerSummary struct {
// ID: unique ID of the server.
ID string `json:"id"`
// Name: name of the server.
Name string `json:"name"`
// ProjectID: project ID to which the server belongs.
ProjectID string `json:"project_id"`
// Tags: tags associated with the server.
Tags []string `json:"tags"`
// ServerType: type of the server.
ServerType string `json:"server_type"`
// PlacementGroupID: ID of the placement group the server belongs to.
PlacementGroupID *string `json:"placement_group_id"`
// Status: current status of the server.
// Default value: unknown_status
Status ServerStatus `json:"status"`
// Architecture: architecture of the server.
// Default value: unknown_architecture
Architecture ServerArchitecture `json:"architecture"`
// CreatedAt: creation timestamp of the server.
CreatedAt *time.Time `json:"created_at"`
// UpdatedAt: last update timestamp of the server.
UpdatedAt *time.Time `json:"updated_at"`
// RescueMode: whether the server is in rescue mode.
RescueMode bool `json:"rescue_mode"`
}
ServerSummary: server summary.
type ServerType ¶
type ServerType struct {
// Name: name of the server type.
Name string `json:"name"`
// VcpuCount: number of vCPUs.
VcpuCount uint32 `json:"vcpu_count"`
// GpuCount: number of GPUs.
GpuCount uint32 `json:"gpu_count"`
// Memory: amount of memory.
Memory scw.Size `json:"memory"`
// Architecture: architecture of the server type.
// Default value: unknown_architecture
Architecture ServerTypeArchitecture `json:"architecture"`
// Availability: availability status of the server type.
// Default value: unknown_availability
Availability ServerTypeAvailability `json:"availability"`
// Limits: limits for the server type.
Limits *ServerTypeLimits `json:"limits"`
// GpuInfo: gPU information for the server type.
GpuInfo *ServerTypeGpuInfo `json:"gpu_info"`
// EndOfService: whether the server type has reached end of service.
EndOfService bool `json:"end_of_service"`
}
ServerType: server type.
type ServerTypeArchitecture ¶
type ServerTypeArchitecture string
func (ServerTypeArchitecture) MarshalJSON ¶
func (enum ServerTypeArchitecture) MarshalJSON() ([]byte, error)
func (ServerTypeArchitecture) String ¶
func (enum ServerTypeArchitecture) String() string
func (*ServerTypeArchitecture) UnmarshalJSON ¶
func (enum *ServerTypeArchitecture) UnmarshalJSON(data []byte) error
func (ServerTypeArchitecture) Values ¶
func (enum ServerTypeArchitecture) Values() []ServerTypeArchitecture
type ServerTypeAvailability ¶
type ServerTypeAvailability string
func (ServerTypeAvailability) MarshalJSON ¶
func (enum ServerTypeAvailability) MarshalJSON() ([]byte, error)
func (ServerTypeAvailability) String ¶
func (enum ServerTypeAvailability) String() string
func (*ServerTypeAvailability) UnmarshalJSON ¶
func (enum *ServerTypeAvailability) UnmarshalJSON(data []byte) error
func (ServerTypeAvailability) Values ¶
func (enum ServerTypeAvailability) Values() []ServerTypeAvailability
type ServerTypeGpuInfo ¶
type ServerTypeGpuInfo struct {
// Manufacturer: manufacturer of the GPU.
Manufacturer string `json:"manufacturer"`
// Name: name of the GPU.
Name string `json:"name"`
// Memory: memory of the GPU.
Memory scw.Size `json:"memory"`
}
ServerTypeGpuInfo: server type gpu info.
type ServerTypeLimits ¶
type ServerTypeLimits struct {
// PrivateNetworkCount: maximum number of Private Networks.
PrivateNetworkCount uint32 `json:"private_network_count"`
// FileSystemCount: maximum number of filesystems.
FileSystemCount uint32 `json:"file_system_count"`
// PrivateNetworkBandwidth: maximum Private Network bandwidth.
PrivateNetworkBandwidth uint64 `json:"private_network_bandwidth"`
// BlockBandwidth: maximum block storage bandwidth.
BlockBandwidth uint64 `json:"block_bandwidth"`
// InternetBandwidth: maximum internet bandwidth.
InternetBandwidth uint64 `json:"internet_bandwidth"`
// LSSDSize: maximum size of local SSD.
LSSDSize scw.Size `json:"l_ssd_size"`
// ScratchSize: maximum size of scratch storage.
ScratchSize scw.Size `json:"scratch_size"`
// ScratchVolumesCount: maximum number of scratch volumes.
ScratchVolumesCount uint32 `json:"scratch_volumes_count"`
// IPCount: maximum number of IPs.
IPCount uint32 `json:"ip_count"`
// VolumeCount: maximum number of volumes.
VolumeCount uint32 `json:"volume_count"`
}
ServerTypeLimits: server type limits.
type ServerVolume ¶
type ServerVolume struct {
ID string `json:"id"`
// VolumeType: default value: unknown_volume_type
VolumeType ServerVolumeVolumeType `json:"volume_type"`
}
ServerVolume: server volume.
type ServerVolumeVolumeType ¶
type ServerVolumeVolumeType string
func (ServerVolumeVolumeType) MarshalJSON ¶
func (enum ServerVolumeVolumeType) MarshalJSON() ([]byte, error)
func (ServerVolumeVolumeType) String ¶
func (enum ServerVolumeVolumeType) String() string
func (*ServerVolumeVolumeType) UnmarshalJSON ¶
func (enum *ServerVolumeVolumeType) UnmarshalJSON(data []byte) error
func (ServerVolumeVolumeType) Values ¶
func (enum ServerVolumeVolumeType) Values() []ServerVolumeVolumeType
type SetSecurityGroupRulesRequest ¶
type SetSecurityGroupRulesRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// SecurityGroupID: ID of the security group to set rules for.
SecurityGroupID string `json:"security_group_id"`
// SecurityGroupRules: list of rules to set.
SecurityGroupRules []*SecurityGroupRuleConfig `json:"security_group_rules"`
}
SetSecurityGroupRulesRequest: set security group rules request.
type SetServerCloudInitRequest ¶
type SetServerCloudInitRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: the ID of the server.
ServerID string `json:"-"`
// Content: the cloud-init configuration content.
Content []byte `json:"content"`
}
SetServerCloudInitRequest: set server cloud init request.
type SetServerDefaultIPRequest ¶
type SetServerDefaultIPRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: ID of the server to set the default IP for.
ServerID string `json:"-"`
// IPID: ID of the IP to set as default.
IPID string `json:"ip_id"`
}
SetServerDefaultIPRequest: set server default ip request.
type SetTemplateCloudInitRequest ¶
type SetTemplateCloudInitRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// TemplateID: unique ID of the template.
TemplateID string `json:"-"`
// Content: cloud-init configuration content.
Content []byte `json:"content"`
}
SetTemplateCloudInitRequest: set template cloud init request.
type SetTemplateUserDataRequest ¶
type SetTemplateUserDataRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// TemplateID: unique ID of the template.
TemplateID string `json:"-"`
// Key: key of the user data to set.
Key string `json:"-"`
// Content: content of the user data.
Content []byte `json:"content"`
}
SetTemplateUserDataRequest: set template user data request.
type SetUserDataRequest ¶
type SetUserDataRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: the ID of the server.
ServerID string `json:"-"`
// Key: the key of the user data to set.
Key string `json:"-"`
// Content: the content to set for the user data.
Content []byte `json:"content"`
}
SetUserDataRequest: set user data request.
type Snapshot ¶
type Snapshot struct {
// ID: unique ID of the snapshot.
ID string `json:"id"`
// ProjectID: project ID of the snapshot.
ProjectID string `json:"project_id"`
// Name: name of the snapshot.
Name string `json:"name"`
// Tags: tags associated with the snapshot.
Tags []string `json:"tags"`
// Size: size of the snapshot in bytes.
Size scw.Size `json:"size"`
// Status: current status of the snapshot.
// Default value: unknown_status
Status SnapshotStatus `json:"status"`
// BaseVolumeID: ID of the base volume.
BaseVolumeID *string `json:"base_volume_id"`
// VolumeType: type of the volume.
// Default value: unknown_volume_type
VolumeType SnapshotVolumeType `json:"volume_type"`
// CreatedAt: creation date of the snapshot.
CreatedAt *time.Time `json:"created_at"`
// UpdatedAt: last update date of the snapshot.
UpdatedAt *time.Time `json:"updated_at"`
// Zone: zone in which the snapshot is located.
Zone scw.Zone `json:"zone"`
// Public: whether the snapshot is public.
Public bool `json:"public"`
}
Snapshot: snapshot.
type SnapshotStatus ¶
type SnapshotStatus string
func (SnapshotStatus) MarshalJSON ¶
func (enum SnapshotStatus) MarshalJSON() ([]byte, error)
func (SnapshotStatus) String ¶
func (enum SnapshotStatus) String() string
func (*SnapshotStatus) UnmarshalJSON ¶
func (enum *SnapshotStatus) UnmarshalJSON(data []byte) error
func (SnapshotStatus) Values ¶
func (enum SnapshotStatus) Values() []SnapshotStatus
type SnapshotVolumeType ¶
type SnapshotVolumeType string
func (SnapshotVolumeType) MarshalJSON ¶
func (enum SnapshotVolumeType) MarshalJSON() ([]byte, error)
func (SnapshotVolumeType) String ¶
func (enum SnapshotVolumeType) String() string
func (*SnapshotVolumeType) UnmarshalJSON ¶
func (enum *SnapshotVolumeType) UnmarshalJSON(data []byte) error
func (SnapshotVolumeType) Values ¶
func (enum SnapshotVolumeType) Values() []SnapshotVolumeType
type StartServerRequest ¶
type StartServerRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: ID of the server to start.
ServerID string `json:"-"`
}
StartServerRequest: start server request.
type StopAndDeleteServerRequest ¶
type StopAndDeleteServerRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: ID of the server to stop and delete.
ServerID string `json:"-"`
// DeleteAllIPs: whether to delete all IPs attached to the server.
// Precisely one of DeleteAllIPs, DeleteIPIDs must be set.
DeleteAllIPs *bool `json:"delete_all_ips,omitempty"`
// DeleteIPIDs: list of IP IDs to delete.
// Precisely one of DeleteAllIPs, DeleteIPIDs must be set.
DeleteIPIDs *[]string `json:"delete_ip_ids,omitempty"`
// DeleteAllVolumes: whether to delete all volumes attached to the server.
// Precisely one of DeleteAllVolumes, DeleteVolumeIDs must be set.
DeleteAllVolumes *bool `json:"delete_all_volumes,omitempty"`
// DeleteVolumeIDs: list of volume IDs to delete.
// Precisely one of DeleteAllVolumes, DeleteVolumeIDs must be set.
DeleteVolumeIDs *[]string `json:"delete_volume_ids,omitempty"`
// KeepAllPrivateNics: whether to keep all private network interfaces.
// Precisely one of KeepAllPrivateNics, DeletePrivateNicIDs must be set.
KeepAllPrivateNics *bool `json:"keep_all_private_nics,omitempty"`
// DeletePrivateNicIDs: list of private network interface IDs to delete.
// Precisely one of KeepAllPrivateNics, DeletePrivateNicIDs must be set.
DeletePrivateNicIDs *[]string `json:"delete_private_nic_ids,omitempty"`
}
StopAndDeleteServerRequest: stop and delete server request.
type StopServerRequest ¶
type StopServerRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: ID of the server to stop.
ServerID string `json:"-"`
}
StopServerRequest: stop server request.
type Template ¶
type Template struct {
// ProjectID: project ID associated with the template.
ProjectID string `json:"project_id"`
// ID: unique ID of the template.
ID string `json:"id"`
// Name: name of the template.
Name string `json:"name"`
// Tags: tags associated with the template.
Tags []string `json:"tags"`
// ServerTags: tags associated with servers created from this template.
ServerTags []string `json:"server_tags"`
// ServerType: commercial type of the server defined by the template.
ServerType string `json:"server_type"`
// SecurityGroupID: security group ID associated with the template.
SecurityGroupID *string `json:"security_group_id"`
// PlacementGroupID: placement group ID associated with the template.
PlacementGroupID *string `json:"placement_group_id"`
// PublicIPV4Count: number of IPv4 public IPs to attach to servers created from this template.
PublicIPV4Count uint32 `json:"public_ip_v4_count"`
// PublicIPV6Count: number of IPv6 public IPs to attach to servers created from this template.
PublicIPV6Count uint32 `json:"public_ip_v6_count"`
// Volumes: list of volume templates used to create volumes for servers.
Volumes []*CreateTemplateRequestVolumeTemplate `json:"volumes"`
// PrivateNetworks: list of private network associated with the template.
PrivateNetworks []*CreateTemplateRequestPrivateNetworkTemplate `json:"private_networks"`
// FilesystemIDs: list of filesystem IDs associated with the template.
FilesystemIDs []string `json:"filesystem_ids"`
// CreatedAt: creation timestamp of the template.
CreatedAt *time.Time `json:"created_at"`
// UpdatedAt: last update timestamp of the template.
UpdatedAt *time.Time `json:"updated_at"`
// WindowsRdpSSHKeyID: iAM ID of the SSH key used to encrypt the Windows `Administrator` password for RDP use.
WindowsRdpSSHKeyID *string `json:"windows_rdp_ssh_key_id"`
// Zone: zone in which the template is located.
Zone scw.Zone `json:"zone"`
}
Template: template.
type TemplateSummary ¶
type TemplateSummary struct {
// ProjectID: project ID associated with the template.
ProjectID string `json:"project_id"`
// ID: unique ID of the template.
ID string `json:"id"`
// Name: name of the template.
Name string `json:"name"`
// Tags: tags associated with the template.
Tags []string `json:"tags"`
// ServerTags: tags associated with servers created from this template.
ServerTags []string `json:"server_tags"`
// ServerType: commercial type of the server defined by the template.
ServerType string `json:"server_type"`
// SecurityGroupID: security group ID associated with the template.
SecurityGroupID *string `json:"security_group_id"`
// PlacementGroupID: placement group ID associated with the template.
PlacementGroupID *string `json:"placement_group_id"`
// PublicIPV4Count: number of IPv4 public IPs to attach to servers created from this template.
PublicIPV4Count uint32 `json:"public_ip_v4_count"`
// PublicIPV6Count: number of IPv6 public IPs to attach to servers created from this template.
PublicIPV6Count uint32 `json:"public_ip_v6_count"`
// FilesystemIDs: list of Filesystem IDs associated with the template.
FilesystemIDs []string `json:"filesystem_ids"`
// CreatedAt: creation timestamp of the template.
CreatedAt *time.Time `json:"created_at"`
// UpdatedAt: last update timestamp of the template.
UpdatedAt *time.Time `json:"updated_at"`
// Zone: zone in which the template is located.
Zone scw.Zone `json:"zone"`
}
TemplateSummary: template summary.
type UpdatePlacementGroupRequest ¶
type UpdatePlacementGroupRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PlacementGroupID: UUID of the placement group.
PlacementGroupID string `json:"-"`
// Name: name of the placement group.
Name *string `json:"name,omitempty"`
// PolicyType: policy type of the placement group.
// Default value: unknown_policy_type
PolicyType PlacementGroupPolicyType `json:"policy_type"`
// Tags: tags of the placement group.
Tags *[]string `json:"tags,omitempty"`
}
UpdatePlacementGroupRequest: update placement group request.
type UpdatePrivateNetworkInterfaceRequest ¶
type UpdatePrivateNetworkInterfaceRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PrivateNetworkInterfaceID: ID of the private network interface to update.
PrivateNetworkInterfaceID string `json:"-"`
// Tags: new tags to assign to the private network interface.
Tags *[]string `json:"tags,omitempty"`
}
UpdatePrivateNetworkInterfaceRequest: update private network interface request.
type UpdateSecurityGroupRequest ¶
type UpdateSecurityGroupRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// SecurityGroupID: ID of the security group to update.
SecurityGroupID string `json:"-"`
// Name: new name for the security group.
Name *string `json:"name,omitempty"`
// Description: new description for the security group.
Description *string `json:"description,omitempty"`
// DisableDefaultRules: whether to disable default rules.
DisableDefaultRules *bool `json:"disable_default_rules,omitempty"`
// Tags: new tags for the security group.
Tags *[]string `json:"tags,omitempty"`
// ProjectDefault: whether this should be the default security group for the project.
ProjectDefault *bool `json:"project_default,omitempty"`
// InboundDefaultAction: new default action for inbound rules.
// Default value: unknown_action
InboundDefaultAction SecurityGroupAction `json:"inbound_default_action"`
// OutboundDefaultAction: new default action for outbound rules.
// Default value: unknown_action
OutboundDefaultAction SecurityGroupAction `json:"outbound_default_action"`
// Stateless: whether the security group should be stateless.
Stateless *bool `json:"stateless,omitempty"`
}
UpdateSecurityGroupRequest: update security group request.
type UpdateSecurityGroupRuleRequest ¶
type UpdateSecurityGroupRuleRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// SecurityGroupRuleID: ID of the rule to update.
SecurityGroupRuleID string `json:"-"`
// Protocol: new protocol for the rule.
// Default value: unknown_protocol
Protocol SecurityGroupRuleProtocol `json:"protocol"`
// Direction: new direction for the rule.
// Default value: unknown_direction
Direction SecurityGroupRuleDirection `json:"direction"`
// Action: new action for the rule.
// Default value: unknown_action
Action SecurityGroupRuleAction `json:"action"`
// SourceIPRange: new source IP range for the rule.
SourceIPRange *scw.IPNet `json:"source_ip_range,omitempty"`
// DestinationIPRange: new destination IP range for the rule.
DestinationIPRange *scw.IPNet `json:"destination_ip_range,omitempty"`
// SourcePorts: new source port range for the rule.
SourcePorts *SecurityGroupRulePortRange `json:"source_ports,omitempty"`
// DestinationPorts: new destination port range for the rule.
DestinationPorts *SecurityGroupRulePortRange `json:"destination_ports,omitempty"`
// Position: new position for the rule.
Position *int32 `json:"position,omitempty"`
}
UpdateSecurityGroupRuleRequest: update security group rule request.
type UpdateServerRequest ¶
type UpdateServerRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ServerID: ID of the server to update.
ServerID string `json:"-"`
// Name: new name for the server.
Name *string `json:"name,omitempty"`
// Tags: new tags for the server.
Tags *[]string `json:"tags,omitempty"`
// ServerType: new server type.
ServerType *string `json:"server_type,omitempty"`
// PlacementGroupID: new placement group ID.
PlacementGroupID *string `json:"placement_group_id,omitempty"`
// RescueMode: new rescue mode setting.
RescueMode *bool `json:"rescue_mode,omitempty"`
// BootVolumeID: new boot volume ID.
BootVolumeID *string `json:"boot_volume_id,omitempty"`
// WindowsRdpSSHKeyID: new IAM ID of the SSH key used to encrypt the Windows `Administrator` password for RDP use.
WindowsRdpSSHKeyID *string `json:"windows_rdp_ssh_key_id,omitempty"`
// Protected: protection status of the server.
Protected *bool `json:"protected,omitempty"`
// PublicNetworkInterface: new public network interface configuration.
PublicNetworkInterface *UpdateServerRequestPublicNetworkInterface `json:"public_network_interface,omitempty"`
}
UpdateServerRequest: update server request.
type UpdateServerRequestPublicNetworkInterface ¶
type UpdateServerRequestPublicNetworkInterface struct {
// SecurityGroupID: ID of the security group for the interface.
SecurityGroupID *string `json:"security_group_id"`
}
UpdateServerRequestPublicNetworkInterface: update server request public network interface.
type UpdateTemplateRequest ¶
type UpdateTemplateRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// TemplateID: unique ID of the template to update.
TemplateID string `json:"-"`
// Name: new name for the template.
Name *string `json:"name,omitempty"`
// Tags: new tags for the template.
Tags *[]string `json:"tags,omitempty"`
// ServerTags: new server tags for the template.
ServerTags *[]string `json:"server_tags,omitempty"`
// ServerType: new server type for the template.
ServerType *string `json:"server_type,omitempty"`
// SecurityGroupID: new security group ID for the template.
SecurityGroupID *string `json:"security_group_id,omitempty"`
// PlacementGroupID: new placement group ID for the template.
PlacementGroupID *string `json:"placement_group_id,omitempty"`
// UpdateVolumes: updated volume templates for the template.
UpdateVolumes *UpdateTemplateRequestUpdateVolumes `json:"update_volumes,omitempty"`
// UpdatePrivateNetworks: updated private networks list for the template.
UpdatePrivateNetworks *UpdateTemplateRequestUpdatePrivateNetworks `json:"update_private_networks,omitempty"`
// FilesystemIDs: new list of filesystem IDs for the template.
FilesystemIDs *[]string `json:"filesystem_ids,omitempty"`
// PublicIPV4Count: new number of IPv4 public IPs to attach to servers.
PublicIPV4Count *uint32 `json:"public_ip_v4_count,omitempty"`
// PublicIPV6Count: new number of IPv6 public IPs to attach to servers.
PublicIPV6Count *uint32 `json:"public_ip_v6_count,omitempty"`
// WindowsRdpSSHKeyID: new IAM ID of the SSH key used to encrypt the Windows `Administrator` password for RDP use.
WindowsRdpSSHKeyID *string `json:"windows_rdp_ssh_key_id,omitempty"`
}
UpdateTemplateRequest: update template request.
type UpdateTemplateRequestUpdatePrivateNetworks ¶
type UpdateTemplateRequestUpdatePrivateNetworks struct {
// PrivateNetworks: list of updated private networks.
PrivateNetworks []*CreateTemplateRequestPrivateNetworkTemplate `json:"private_networks"`
}
UpdateTemplateRequestUpdatePrivateNetworks: update template request update private networks.
type UpdateTemplateRequestUpdateVolumes ¶
type UpdateTemplateRequestUpdateVolumes struct {
// Volumes: list of updated volume templates.
Volumes []*CreateTemplateRequestVolumeTemplate `json:"volumes"`
}
UpdateTemplateRequestUpdateVolumes: update template request update volumes.
type UserData ¶
type UserData struct {
// Key: the key of the user data.
Key string `json:"key"`
// Content: the content of the user data.
Content []byte `json:"content"`
}
UserData: user data.
type Volume ¶
type Volume struct {
// ID: unique ID of the volume.
ID string `json:"id"`
// ProjectID: project ID to which the volume belongs.
ProjectID string `json:"project_id"`
// Name: volume name.
Name string `json:"name"`
// Tags: tags associated with the volume.
Tags []string `json:"tags"`
// Size: volume size in bytes.
Size scw.Size `json:"size"`
// BaseSnapshotID: ID of the base snapshot used for this volume.
BaseSnapshotID *string `json:"base_snapshot_id"`
// Status: current status of the volume.
// Default value: unknown_status
Status VolumeStatus `json:"status"`
// VolumeType: type of the volume.
// Default value: unknown_volume_type
VolumeType VolumeVolumeType `json:"volume_type"`
// CreatedAt: creation date of the volume.
CreatedAt *time.Time `json:"created_at"`
// UpdatedAt: last update date of the volume.
UpdatedAt *time.Time `json:"updated_at"`
// ServerID: ID of the Instance to which the volume is attached.
ServerID *string `json:"server_id"`
// Zone: zone in which the volume is located.
Zone scw.Zone `json:"zone"`
}
Volume: volume.
type VolumeAPI ¶
type VolumeAPI struct {
// contains filtered or unexported fields
}
This API allows you to manage Instance local and scratch volumes.
func NewVolumeAPI ¶
NewVolumeAPI returns a VolumeAPI object from a Scaleway client.
func (*VolumeAPI) CreateSnapshot ¶
func (s *VolumeAPI) CreateSnapshot(req *VolumeAPICreateSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
CreateSnapshot: Create a snapshot from a specified l_ssd volume.
func (*VolumeAPI) CreateVolume ¶
func (s *VolumeAPI) CreateVolume(req *VolumeAPICreateVolumeRequest, opts ...scw.RequestOption) (*Volume, error)
CreateVolume: Create a volume of a specified type.
func (*VolumeAPI) DeleteSnapshot ¶
func (s *VolumeAPI) DeleteSnapshot(req *VolumeAPIDeleteSnapshotRequest, opts ...scw.RequestOption) error
DeleteSnapshot: Delete a specified snapshot.
func (*VolumeAPI) DeleteVolume ¶
func (s *VolumeAPI) DeleteVolume(req *VolumeAPIDeleteVolumeRequest, opts ...scw.RequestOption) error
DeleteVolume: Delete a specified volume.
func (*VolumeAPI) ExportSnapshotToObjectStorage ¶
func (s *VolumeAPI) ExportSnapshotToObjectStorage(req *VolumeAPIExportSnapshotToObjectStorageRequest, opts ...scw.RequestOption) (*Snapshot, error)
ExportSnapshotToObjectStorage: Export a snapshot to a specified Object Storage bucket in the same region.
func (*VolumeAPI) GetSnapshot ¶
func (s *VolumeAPI) GetSnapshot(req *VolumeAPIGetSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
GetSnapshot: Get details of a specified snapshot.
func (*VolumeAPI) GetVolume ¶
func (s *VolumeAPI) GetVolume(req *VolumeAPIGetVolumeRequest, opts ...scw.RequestOption) (*Volume, error)
GetVolume: Get a specified volume.
func (*VolumeAPI) ImportSnapshotFromObjectStorage ¶
func (s *VolumeAPI) ImportSnapshotFromObjectStorage(req *VolumeAPIImportSnapshotFromObjectStorageRequest, opts ...scw.RequestOption) (*Snapshot, error)
ImportSnapshotFromObjectStorage: Import a snapshot from a QCOW2 file stored in Object Storage.
func (*VolumeAPI) ListSnapshots ¶
func (s *VolumeAPI) ListSnapshots(req *VolumeAPIListSnapshotsRequest, opts ...scw.RequestOption) (*ListSnapshotsResponse, error)
ListSnapshots: List all snapshots of an Organization.
func (*VolumeAPI) ListVolumeTypes ¶
func (s *VolumeAPI) ListVolumeTypes(req *VolumeAPIListVolumeTypesRequest, opts ...scw.RequestOption) (*ListVolumeTypesResponse, error)
ListVolumeTypes: List all volume types and their technical details.
func (*VolumeAPI) ListVolumes ¶
func (s *VolumeAPI) ListVolumes(req *VolumeAPIListVolumesRequest, opts ...scw.RequestOption) (*ListVolumesResponse, error)
ListVolumes: List volumes.
func (*VolumeAPI) UpdateSnapshot ¶
func (s *VolumeAPI) UpdateSnapshot(req *VolumeAPIUpdateSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
UpdateSnapshot: Update the properties of a snapshot.
func (*VolumeAPI) UpdateVolume ¶
func (s *VolumeAPI) UpdateVolume(req *VolumeAPIUpdateVolumeRequest, opts ...scw.RequestOption) (*Volume, error)
UpdateVolume: Update the properties of a specified volume.
func (*VolumeAPI) WaitForSnapshot ¶
func (s *VolumeAPI) WaitForSnapshot(req *WaitForSnapshotRequest, opts ...scw.RequestOption) (*Snapshot, error)
WaitForSnapshot waits for the Snapshot to reach a terminal state.
func (*VolumeAPI) WaitForVolume ¶
func (s *VolumeAPI) WaitForVolume(req *WaitForVolumeRequest, opts ...scw.RequestOption) (*Volume, error)
WaitForVolume waits for the Volume to reach a terminal state.
type VolumeAPICreateSnapshotRequest ¶
type VolumeAPICreateSnapshotRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ProjectID: project ID of the snapshot.
ProjectID string `json:"project_id"`
// Name: name of the snapshot.
Name string `json:"name"`
// Tags: tags associated with the snapshot.
Tags []string `json:"tags"`
// BaseVolumeID: ID of the base volume.
BaseVolumeID string `json:"base_volume_id"`
// Public: whether the snapshot should be public.
Public bool `json:"public"`
}
VolumeAPICreateSnapshotRequest: volume api create snapshot request.
type VolumeAPICreateVolumeRequest ¶
type VolumeAPICreateVolumeRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ProjectID: project ID to which the volume belongs.
ProjectID string `json:"project_id"`
// Name: volume name.
Name string `json:"name"`
// Tags: tags associated with the volume.
Tags []string `json:"tags"`
// Size: volume size in bytes.
Size *scw.Size `json:"size,omitempty"`
// BaseSnapshotID: ID of the base snapshot used for this volume.
BaseSnapshotID *string `json:"base_snapshot_id,omitempty"`
// VolumeType: type of the volume.
// Default value: unknown_volume_type
VolumeType CreateVolumeRequestVolumeType `json:"volume_type"`
}
VolumeAPICreateVolumeRequest: volume api create volume request.
type VolumeAPIDeleteSnapshotRequest ¶
type VolumeAPIDeleteSnapshotRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// SnapshotID: ID of the snapshot to delete.
SnapshotID string `json:"-"`
}
VolumeAPIDeleteSnapshotRequest: volume api delete snapshot request.
type VolumeAPIDeleteVolumeRequest ¶
type VolumeAPIDeleteVolumeRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// VolumeID: ID of the volume to delete.
VolumeID string `json:"-"`
}
VolumeAPIDeleteVolumeRequest: volume api delete volume request.
type VolumeAPIExportSnapshotToObjectStorageRequest ¶
type VolumeAPIExportSnapshotToObjectStorageRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// SnapshotID: ID of the snapshot to export.
SnapshotID string `json:"-"`
// Bucket: object Storage bucket name.
Bucket string `json:"bucket"`
// ObjectKey: object key.
ObjectKey string `json:"object_key"`
}
VolumeAPIExportSnapshotToObjectStorageRequest: volume api export snapshot to object storage request.
type VolumeAPIGetSnapshotRequest ¶
type VolumeAPIGetSnapshotRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// SnapshotID: ID of the snapshot to retrieve.
SnapshotID string `json:"-"`
}
VolumeAPIGetSnapshotRequest: volume api get snapshot request.
type VolumeAPIGetVolumeRequest ¶
type VolumeAPIGetVolumeRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// VolumeID: ID of the volume to retrieve.
VolumeID string `json:"-"`
}
VolumeAPIGetVolumeRequest: volume api get volume request.
type VolumeAPIImportSnapshotFromObjectStorageRequest ¶
type VolumeAPIImportSnapshotFromObjectStorageRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// ProjectID: project ID of the snapshot.
ProjectID string `json:"project_id"`
// Name: name of the snapshot.
Name string `json:"name"`
// Tags: tags associated with the snapshot.
Tags []string `json:"tags"`
// Bucket: object Storage bucket name.
Bucket string `json:"bucket"`
// ObjectKey: object key.
ObjectKey string `json:"object_key"`
// Size: size of the imported snapshot in bytes.
Size *scw.Size `json:"size,omitempty"`
// VolumeType: volume type of the snapshot.
// Default value: unknown_volume_type
VolumeType SnapshotVolumeType `json:"volume_type"`
}
VolumeAPIImportSnapshotFromObjectStorageRequest: volume api import snapshot from object storage request.
type VolumeAPIListSnapshotsRequest ¶
type VolumeAPIListSnapshotsRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PageToken: token for pagination.
PageToken *string `json:"-"`
// PageSize: number of snapshots to return per page.
PageSize *uint32 `json:"-"`
// OrderBy: field to sort by.
// Default value: created_at_desc
OrderBy ListSnapshotsRequestOrderBy `json:"-"`
// ProjectID: filter by Project ID.
ProjectID string `json:"-"`
// SnapshotIDs: filter by specific snapshot IDs.
SnapshotIDs []string `json:"-"`
// Name: filter by name.
Name *string `json:"-"`
// Tags: filter by tags.
Tags []string `json:"-"`
// BaseVolumeID: filter by base volume ID.
BaseVolumeID *string `json:"-"`
}
VolumeAPIListSnapshotsRequest: volume api list snapshots request.
type VolumeAPIListVolumeTypesRequest ¶
type VolumeAPIListVolumeTypesRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PageToken: token for pagination.
PageToken *string `json:"-"`
// PageSize: number of items to return per page.
PageSize *uint32 `json:"-"`
}
VolumeAPIListVolumeTypesRequest: volume api list volume types request.
type VolumeAPIListVolumesRequest ¶
type VolumeAPIListVolumesRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// PageToken: token for pagination.
PageToken *string `json:"-"`
// PageSize: number of items to return per page.
PageSize *uint32 `json:"-"`
// OrderBy: field to order the results by.
// Default value: created_at_desc
OrderBy ListVolumesRequestOrderBy `json:"-"`
// ProjectID: filter by Project ID.
ProjectID string `json:"-"`
// VolumeIDs: filter by specific volume IDs.
VolumeIDs []string `json:"-"`
// Name: filter by volume name.
Name *string `json:"-"`
// Tags: filter by tags.
Tags []string `json:"-"`
// VolumeType: filter by volume type.
// Default value: unknown_volume_type
VolumeType *VolumeVolumeType `json:"-"`
}
VolumeAPIListVolumesRequest: volume api list volumes request.
type VolumeAPIUpdateSnapshotRequest ¶
type VolumeAPIUpdateSnapshotRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// SnapshotID: ID of the snapshot to update.
SnapshotID string `json:"-"`
// Name: new name for the snapshot.
Name *string `json:"name,omitempty"`
// Tags: new tags for the snapshot.
Tags *[]string `json:"tags,omitempty"`
// Public: whether the snapshot should be public.
Public *bool `json:"public,omitempty"`
}
VolumeAPIUpdateSnapshotRequest: volume api update snapshot request.
type VolumeAPIUpdateVolumeRequest ¶
type VolumeAPIUpdateVolumeRequest struct {
// Zone: zone to target. If none is passed will use default zone from the config.
Zone scw.Zone `json:"-"`
// VolumeID: ID of the volume to update.
VolumeID string `json:"-"`
// Name: new name for the volume.
Name *string `json:"name,omitempty"`
// Tags: new tags for the volume.
Tags *[]string `json:"tags,omitempty"`
// Size: new size for the volume.
Size *scw.Size `json:"size,omitempty"`
}
VolumeAPIUpdateVolumeRequest: volume api update volume request.
type VolumeStatus ¶
type VolumeStatus string
func (VolumeStatus) MarshalJSON ¶
func (enum VolumeStatus) MarshalJSON() ([]byte, error)
func (VolumeStatus) String ¶
func (enum VolumeStatus) String() string
func (*VolumeStatus) UnmarshalJSON ¶
func (enum *VolumeStatus) UnmarshalJSON(data []byte) error
func (VolumeStatus) Values ¶
func (enum VolumeStatus) Values() []VolumeStatus
type VolumeType ¶
type VolumeType struct {
// Name: name of the volume type.
// Default value: unknown_volume_type
Name VolumeVolumeType `json:"name"`
// MinSize: minimum size of the volume in bytes.
MinSize uint64 `json:"min_size"`
// MaxSize: maximum size of the volume in bytes.
MaxSize uint64 `json:"max_size"`
}
VolumeType: volume type.
type VolumeVolumeType ¶
type VolumeVolumeType string
func (VolumeVolumeType) MarshalJSON ¶
func (enum VolumeVolumeType) MarshalJSON() ([]byte, error)
func (VolumeVolumeType) String ¶
func (enum VolumeVolumeType) String() string
func (*VolumeVolumeType) UnmarshalJSON ¶
func (enum *VolumeVolumeType) UnmarshalJSON(data []byte) error
func (VolumeVolumeType) Values ¶
func (enum VolumeVolumeType) Values() []VolumeVolumeType
type WaitForPrivateNetworkInterfaceRequest ¶
type WaitForPrivateNetworkInterfaceRequest struct {
Zone scw.Zone
PrivateNetworkInterfaceID string
Timeout *time.Duration
RetryInterval *time.Duration
}
WaitForPrivateNetworkInterfaceRequest is used by WaitForPrivateNetworkInterface method.
type WaitForServerRequest ¶
type WaitForServerRequest struct {
Zone scw.Zone
ServerID string
Timeout *time.Duration
RetryInterval *time.Duration
}
WaitForServerRequest is used by WaitForServer method.