Documentation
¶
Index ¶
- type BackendServer
- type Client
- func (c *Client) APIToken() string
- func (c *Client) APIURL() string
- func (c *Client) CloneStorage(ctx context.Context, id string) (CreateResponse, error)
- func (c *Client) CreateFirewall(ctx context.Context, body FirewallCreateRequest) (FirewallCreateResponse, error)
- func (c *Client) CreateIP(ctx context.Context, body IPCreateRequest) (IPCreateResponse, error)
- func (c *Client) CreateISOImage(ctx context.Context, body ISOImageCreateRequest) (ISOImageCreateResponse, error)
- func (c *Client) CreateLoadBalancer(ctx context.Context, body LoadBalancerCreateRequest) (LoadBalancerCreateResponse, error)
- func (c *Client) CreateMarketplaceApplication(ctx context.Context, body MarketplaceApplicationCreateRequest) (MarketplaceApplicationCreateResponse, error)
- func (c *Client) CreateNetwork(ctx context.Context, body NetworkCreateRequest) (NetworkCreateResponse, error)
- func (c *Client) CreateObjectStorageAccessKey(ctx context.Context) (ObjectStorageAccessKeyCreateResponse, error)
- func (c *Client) CreatePaaSSecurityZone(ctx context.Context, body PaaSSecurityZoneCreateRequest) (PaaSSecurityZoneCreateResponse, error)
- func (c *Client) CreatePaaSService(ctx context.Context, body PaaSServiceCreateRequest) (PaaSServiceCreateResponse, error)
- func (c *Client) CreateServer(ctx context.Context, body ServerCreateRequest) (ServerCreateResponse, error)
- func (c *Client) CreateServerIP(ctx context.Context, id string, body ServerIPRelationCreateRequest) error
- func (c *Client) CreateServerIsoImage(ctx context.Context, id string, body ServerIsoImageRelationCreateRequest) error
- func (c *Client) CreateServerNetwork(ctx context.Context, id string, body ServerNetworkRelationCreateRequest) error
- func (c *Client) CreateServerStorage(ctx context.Context, id string, body ServerStorageRelationCreateRequest) error
- func (c *Client) CreateSshkey(ctx context.Context, body SshkeyCreateRequest) (CreateResponse, error)
- func (c *Client) CreateStorage(ctx context.Context, body StorageCreateRequest) (CreateResponse, error)
- func (c *Client) CreateStorageBackupSchedule(ctx context.Context, id string, body StorageBackupScheduleCreateRequest) (StorageBackupScheduleCreateResponse, error)
- func (c *Client) CreateStorageSnapshot(ctx context.Context, id string, body StorageSnapshotCreateRequest) (StorageSnapshotCreateResponse, error)
- func (c *Client) CreateStorageSnapshotSchedule(ctx context.Context, id string, body StorageSnapshotScheduleCreateRequest) (StorageSnapshotScheduleCreateResponse, error)
- func (c *Client) CreateTemplate(ctx context.Context, body TemplateCreateRequest) (CreateResponse, error)
- func (c *Client) DelayInterval() time.Duration
- func (c *Client) DeleteFirewall(ctx context.Context, id string) error
- func (c *Client) DeleteIP(ctx context.Context, id string) error
- func (c *Client) DeleteISOImage(ctx context.Context, id string) error
- func (c *Client) DeleteLoadBalancer(ctx context.Context, id string) error
- func (c *Client) DeleteMarketplaceApplication(ctx context.Context, id string) error
- func (c *Client) DeleteNetwork(ctx context.Context, id string) error
- func (c *Client) DeleteObjectStorageAccessKey(ctx context.Context, id string) error
- func (c *Client) DeletePaaSSecurityZone(ctx context.Context, id string) error
- func (c *Client) DeletePaaSService(ctx context.Context, id string) error
- func (c *Client) DeleteServer(ctx context.Context, id string) error
- func (c *Client) DeleteServerIP(ctx context.Context, serverID, ipID string) error
- func (c *Client) DeleteServerIsoImage(ctx context.Context, serverID, isoImageID string) error
- func (c *Client) DeleteServerNetwork(ctx context.Context, serverID, networkID string) error
- func (c *Client) DeleteServerStorage(ctx context.Context, serverID, storageID string) error
- func (c *Client) DeleteSshkey(ctx context.Context, id string) error
- func (c *Client) DeleteStorage(ctx context.Context, id string) error
- func (c *Client) DeleteStorageBackup(ctx context.Context, storageID, backupID string) error
- func (c *Client) DeleteStorageBackupSchedule(ctx context.Context, storageID, scheduleID string) error
- func (c *Client) DeleteStorageSnapshot(ctx context.Context, storageID, snapshotID string) error
- func (c *Client) DeleteStorageSnapshotSchedule(ctx context.Context, storageID, scheduleID string) error
- func (c *Client) DeleteTemplate(ctx context.Context, id string) error
- func (c *Client) ExportStorageSnapshotToS3(ctx context.Context, storageID, snapshotID string, ...) error
- func (c *Client) GetDeletedIPs(ctx context.Context) ([]IP, error)
- func (c *Client) GetDeletedISOImages(ctx context.Context) ([]ISOImage, error)
- func (c *Client) GetDeletedNetworks(ctx context.Context) ([]Network, error)
- func (c *Client) GetDeletedPaaSServices(ctx context.Context) ([]PaaSService, error)
- func (c *Client) GetDeletedServers(ctx context.Context) ([]Server, error)
- func (c *Client) GetDeletedSnapshots(ctx context.Context) ([]StorageSnapshot, error)
- func (c *Client) GetDeletedStorages(ctx context.Context) ([]Storage, error)
- func (c *Client) GetDeletedTemplates(ctx context.Context) ([]Template, error)
- func (c *Client) GetEventList(ctx context.Context) ([]Event, error)
- func (c *Client) GetFirewall(ctx context.Context, id string) (Firewall, error)
- func (c *Client) GetFirewallEventList(ctx context.Context, id string) ([]Event, error)
- func (c *Client) GetFirewallList(ctx context.Context) ([]Firewall, error)
- func (c *Client) GetIP(ctx context.Context, id string) (IP, error)
- func (c *Client) GetIPEventList(ctx context.Context, id string) ([]Event, error)
- func (c *Client) GetIPList(ctx context.Context) ([]IP, error)
- func (c *Client) GetIPVersion(ctx context.Context, id string) int
- func (c *Client) GetIPsByLocation(ctx context.Context, id string) ([]IP, error)
- func (c *Client) GetISOImage(ctx context.Context, id string) (ISOImage, error)
- func (c *Client) GetISOImageEventList(ctx context.Context, id string) ([]Event, error)
- func (c *Client) GetISOImageList(ctx context.Context) ([]ISOImage, error)
- func (c *Client) GetISOImagesByLocation(ctx context.Context, id string) ([]ISOImage, error)
- func (c *Client) GetLabelList(ctx context.Context) ([]Label, error)
- func (c *Client) GetLoadBalancer(ctx context.Context, id string) (LoadBalancer, error)
- func (c *Client) GetLoadBalancerEventList(ctx context.Context, id string) ([]Event, error)
- func (c *Client) GetLoadBalancerList(ctx context.Context) ([]LoadBalancer, error)
- func (c *Client) GetLocation(ctx context.Context, id string) (Location, error)
- func (c *Client) GetLocationList(ctx context.Context) ([]Location, error)
- func (c *Client) GetMarketplaceApplication(ctx context.Context, id string) (MarketplaceApplication, error)
- func (c *Client) GetMarketplaceApplicationEventList(ctx context.Context, id string) ([]Event, error)
- func (c *Client) GetMarketplaceApplicationList(ctx context.Context) ([]MarketplaceApplication, error)
- func (c *Client) GetNetwork(ctx context.Context, id string) (Network, error)
- func (c *Client) GetNetworkEventList(ctx context.Context, id string) ([]Event, error)
- func (c *Client) GetNetworkList(ctx context.Context) ([]Network, error)
- func (c *Client) GetNetworkPublic(ctx context.Context) (Network, error)
- func (c *Client) GetNetworksByLocation(ctx context.Context, id string) ([]Network, error)
- func (c *Client) GetObjectStorageAccessKey(ctx context.Context, id string) (ObjectStorageAccessKey, error)
- func (c *Client) GetObjectStorageAccessKeyList(ctx context.Context) ([]ObjectStorageAccessKey, error)
- func (c *Client) GetObjectStorageBucketList(ctx context.Context) ([]ObjectStorageBucket, error)
- func (c *Client) GetPaaSSecurityZone(ctx context.Context, id string) (PaaSSecurityZone, error)
- func (c *Client) GetPaaSSecurityZoneList(ctx context.Context) ([]PaaSSecurityZone, error)
- func (c *Client) GetPaaSService(ctx context.Context, id string) (PaaSService, error)
- func (c *Client) GetPaaSServiceList(ctx context.Context) ([]PaaSService, error)
- func (c *Client) GetPaaSServiceMetrics(ctx context.Context, id string) ([]PaaSServiceMetric, error)
- func (c *Client) GetPaaSTemplateList(ctx context.Context) ([]PaaSTemplate, error)
- func (c *Client) GetServer(ctx context.Context, id string) (Server, error)
- func (c *Client) GetServerEventList(ctx context.Context, id string) ([]Event, error)
- func (c *Client) GetServerIP(ctx context.Context, serverID, ipID string) (ServerIPRelationProperties, error)
- func (c *Client) GetServerIPList(ctx context.Context, id string) ([]ServerIPRelationProperties, error)
- func (c *Client) GetServerIsoImage(ctx context.Context, serverID, isoImageID string) (ServerIsoImageRelationProperties, error)
- func (c *Client) GetServerIsoImageList(ctx context.Context, id string) ([]ServerIsoImageRelationProperties, error)
- func (c *Client) GetServerList(ctx context.Context) ([]Server, error)
- func (c *Client) GetServerMetricList(ctx context.Context, id string) ([]ServerMetric, error)
- func (c *Client) GetServerNetwork(ctx context.Context, serverID, networkID string) (ServerNetworkRelationProperties, error)
- func (c *Client) GetServerNetworkList(ctx context.Context, id string) ([]ServerNetworkRelationProperties, error)
- func (c *Client) GetServerStorage(ctx context.Context, serverID, storageID string) (ServerStorageRelationProperties, error)
- func (c *Client) GetServerStorageList(ctx context.Context, id string) ([]ServerStorageRelationProperties, error)
- func (c *Client) GetServersByLocation(ctx context.Context, id string) ([]Server, error)
- func (c *Client) GetSnapshotsByLocation(ctx context.Context, id string) ([]StorageSnapshot, error)
- func (c *Client) GetSshkey(ctx context.Context, id string) (Sshkey, error)
- func (c *Client) GetSshkeyEventList(ctx context.Context, id string) ([]Event, error)
- func (c *Client) GetSshkeyList(ctx context.Context) ([]Sshkey, error)
- func (c *Client) GetStorage(ctx context.Context, id string) (Storage, error)
- func (c *Client) GetStorageBackupList(ctx context.Context, id string) ([]StorageBackup, error)
- func (c *Client) GetStorageBackupSchedule(ctx context.Context, storageID, scheduleID string) (StorageBackupSchedule, error)
- func (c *Client) GetStorageBackupScheduleList(ctx context.Context, id string) ([]StorageBackupSchedule, error)
- func (c *Client) GetStorageEventList(ctx context.Context, id string) ([]Event, error)
- func (c *Client) GetStorageList(ctx context.Context) ([]Storage, error)
- func (c *Client) GetStorageSnapshot(ctx context.Context, storageID, snapshotID string) (StorageSnapshot, error)
- func (c *Client) GetStorageSnapshotList(ctx context.Context, id string) ([]StorageSnapshot, error)
- func (c *Client) GetStorageSnapshotSchedule(ctx context.Context, storageID, scheduleID string) (StorageSnapshotSchedule, error)
- func (c *Client) GetStorageSnapshotScheduleList(ctx context.Context, id string) ([]StorageSnapshotSchedule, error)
- func (c *Client) GetStoragesByLocation(ctx context.Context, id string) ([]Storage, error)
- func (c *Client) GetTemplate(ctx context.Context, id string) (Template, error)
- func (c *Client) GetTemplateByName(ctx context.Context, name string) (Template, error)
- func (c *Client) GetTemplateEventList(ctx context.Context, id string) ([]Event, error)
- func (c *Client) GetTemplateList(ctx context.Context) ([]Template, error)
- func (c *Client) GetTemplatesByLocation(ctx context.Context, id string) ([]Template, error)
- func (c *Client) HttpClient() *http.Client
- func (c *Client) ImportMarketplaceApplication(ctx context.Context, body MarketplaceApplicationImportRequest) (MarketplaceApplicationCreateResponse, error)
- func (c *Client) IsServerOn(ctx context.Context, id string) (bool, error)
- func (c *Client) LinkIP(ctx context.Context, serverID string, ipID string) error
- func (c *Client) LinkIsoImage(ctx context.Context, serverID string, isoimageID string) error
- func (c *Client) LinkNetwork(ctx context.Context, serverID, networkID, firewallTemplate string, ...) error
- func (c *Client) LinkStorage(ctx context.Context, serverID string, storageID string, bootdevice bool) error
- func (c *Client) MaxNumberOfRetries() int
- func (c *Client) RenewK8sCredentials(ctx context.Context, id string) error
- func (c *Client) RollbackStorage(ctx context.Context, storageID, snapshotID string, body StorageRollbackRequest) error
- func (c *Client) RollbackStorageBackup(ctx context.Context, storageID, backupID string, body StorageRollbackRequest) error
- func (c *Client) ShutdownServer(ctx context.Context, id string) error
- func (c *Client) StartServer(ctx context.Context, id string) error
- func (c *Client) StopServer(ctx context.Context, id string) error
- func (c *Client) Synchronous() bool
- func (c *Client) UnlinkIP(ctx context.Context, serverID string, ipID string) error
- func (c *Client) UnlinkIsoImage(ctx context.Context, serverID string, isoimageID string) error
- func (c *Client) UnlinkNetwork(ctx context.Context, serverID string, networkID string) error
- func (c *Client) UnlinkStorage(ctx context.Context, serverID string, storageID string) error
- func (c *Client) UpdateFirewall(ctx context.Context, id string, body FirewallUpdateRequest) error
- func (c *Client) UpdateIP(ctx context.Context, id string, body IPUpdateRequest) error
- func (c *Client) UpdateISOImage(ctx context.Context, id string, body ISOImageUpdateRequest) error
- func (c *Client) UpdateLoadBalancer(ctx context.Context, id string, body LoadBalancerUpdateRequest) error
- func (c *Client) UpdateMarketplaceApplication(ctx context.Context, id string, body MarketplaceApplicationUpdateRequest) error
- func (c *Client) UpdateNetwork(ctx context.Context, id string, body NetworkUpdateRequest) error
- func (c *Client) UpdatePaaSSecurityZone(ctx context.Context, id string, body PaaSSecurityZoneUpdateRequest) error
- func (c *Client) UpdatePaaSService(ctx context.Context, id string, body PaaSServiceUpdateRequest) error
- func (c *Client) UpdateServer(ctx context.Context, id string, body ServerUpdateRequest) error
- func (c *Client) UpdateServerIsoImage(ctx context.Context, serverID, isoImageID string, ...) error
- func (c *Client) UpdateServerNetwork(ctx context.Context, serverID, networkID string, ...) error
- func (c *Client) UpdateServerStorage(ctx context.Context, serverID, storageID string, ...) error
- func (c *Client) UpdateSshkey(ctx context.Context, id string, body SshkeyUpdateRequest) error
- func (c *Client) UpdateStorage(ctx context.Context, id string, body StorageUpdateRequest) error
- func (c *Client) UpdateStorageBackupSchedule(ctx context.Context, storageID, scheduleID string, ...) error
- func (c *Client) UpdateStorageSnapshot(ctx context.Context, storageID, snapshotID string, ...) error
- func (c *Client) UpdateStorageSnapshotSchedule(ctx context.Context, storageID, scheduleID string, ...) error
- func (c *Client) UpdateTemplate(ctx context.Context, id string, body TemplateUpdateRequest) error
- func (c *Client) UserAgent() string
- func (c *Client) UserUUID() string
- func (c *Client) WithHTTPHeaders(headers map[string]string)
- type Config
- type CreateResponse
- type Credential
- type DeletedIPList
- type DeletedISOImageList
- type DeletedNetworkList
- type DeletedPaaSServices
- type DeletedServerList
- type DeletedStorageList
- type DeletedStorageSnapshotList
- type DeletedTemplateList
- type Event
- type EventList
- type EventOperator
- type EventProperties
- type Firewall
- type FirewallCreateRequest
- type FirewallCreateResponse
- type FirewallList
- type FirewallOperator
- type FirewallProperties
- type FirewallRelation
- type FirewallRuleProperties
- type FirewallRules
- type FirewallUpdateRequest
- type ForwardingRule
- type GSTime
- type IP
- type IPAddressType
- type IPCreateRequest
- type IPCreateResponse
- type IPList
- type IPLoadbalancer
- type IPOperator
- type IPProperties
- type IPRelations
- type IPServer
- type IPUpdateRequest
- type ISOImage
- type ISOImageCreateRequest
- type ISOImageCreateResponse
- type ISOImageList
- type ISOImageOperator
- type ISOImageProperties
- type ISOImageRelation
- type ISOImageUpdateRequest
- type Label
- type LabelCreateRequest
- type LabelList
- type LabelOperator
- type LabelProperties
- type LoadBalancer
- type LoadBalancerCreateRequest
- type LoadBalancerCreateResponse
- type LoadBalancerOperator
- type LoadBalancerProperties
- type LoadBalancerUpdateRequest
- type LoadBalancers
- type LoadbalancerAlgorithm
- type Location
- type LocationList
- type LocationOperator
- type LocationProperties
- type MarketplaceApplication
- type MarketplaceApplicationCategory
- type MarketplaceApplicationCreateRequest
- type MarketplaceApplicationCreateResponse
- type MarketplaceApplicationImportRequest
- type MarketplaceApplicationList
- type MarketplaceApplicationMetadata
- type MarketplaceApplicationOperator
- type MarketplaceApplicationProperties
- type MarketplaceApplicationSetup
- type MarketplaceApplicationUpdateRequest
- type Network
- type NetworkCreateRequest
- type NetworkCreateResponse
- type NetworkInFirewall
- type NetworkList
- type NetworkOperator
- type NetworkPaaSSecurityZone
- type NetworkProperties
- type NetworkRelations
- type NetworkServer
- type NetworkUpdateRequest
- type NetworkVlan
- type ObjectStorageAccessKey
- type ObjectStorageAccessKeyCreateResponse
- type ObjectStorageAccessKeyList
- type ObjectStorageAccessKeyProperties
- type ObjectStorageBucket
- type ObjectStorageBucketList
- type ObjectStorageBucketProperties
- type ObjectStorageOperator
- type PaaSMetricProperties
- type PaaSMetricValue
- type PaaSOperator
- type PaaSRelationService
- type PaaSSecurityZone
- type PaaSSecurityZoneCreateRequest
- type PaaSSecurityZoneCreateResponse
- type PaaSSecurityZoneProperties
- type PaaSSecurityZoneUpdateRequest
- type PaaSSecurityZones
- type PaaSService
- type PaaSServiceCreateRequest
- type PaaSServiceCreateResponse
- type PaaSServiceMetric
- type PaaSServiceMetrics
- type PaaSServiceProperties
- type PaaSServiceUpdateRequest
- type PaaSServices
- type PaaSTemplate
- type PaaSTemplateProperties
- type PaaSTemplates
- type Parameter
- type PasswordType
- type RequestError
- type RequestStatus
- type RequestStatusProperties
- type Resource
- type ResourceLimit
- type S3auth
- type S3data
- type SSHKeyOperator
- type Server
- type ServerCreateRequest
- type ServerCreateRequestIP
- type ServerCreateRequestIsoimage
- type ServerCreateRequestNetwork
- type ServerCreateRequestRelations
- type ServerCreateRequestStorage
- type ServerCreateResponse
- type ServerHardwareProfile
- type ServerIPRelation
- type ServerIPRelationCreateRequest
- type ServerIPRelationList
- type ServerIPRelationOperator
- type ServerIPRelationProperties
- type ServerIsoImageRelation
- type ServerIsoImageRelationCreateRequest
- type ServerIsoImageRelationList
- type ServerIsoImageRelationOperator
- type ServerIsoImageRelationProperties
- type ServerIsoImageRelationUpdateRequest
- type ServerList
- type ServerMetric
- type ServerMetricList
- type ServerMetricProperties
- type ServerNetworkRelation
- type ServerNetworkRelationCreateRequest
- type ServerNetworkRelationList
- type ServerNetworkRelationOperator
- type ServerNetworkRelationProperties
- type ServerNetworkRelationUpdateRequest
- type ServerOperator
- type ServerPowerUpdateRequest
- type ServerProperties
- type ServerRelations
- type ServerStorageRelationCreateRequest
- type ServerStorageRelationList
- type ServerStorageRelationOperator
- type ServerStorageRelationProperties
- type ServerStorageRelationSingle
- type ServerStorageRelationUpdateRequest
- type ServerUpdateRequest
- type ServerinISOImage
- type ServiceObject
- type Sshkey
- type SshkeyCreateRequest
- type SshkeyList
- type SshkeyProperties
- type SshkeyUpdateRequest
- type Storage
- type StorageAndSnapshotScheduleRelation
- type StorageBackup
- type StorageBackupList
- type StorageBackupOperator
- type StorageBackupProperties
- type StorageBackupSchedule
- type StorageBackupScheduleCreateRequest
- type StorageBackupScheduleCreateResponse
- type StorageBackupScheduleList
- type StorageBackupScheduleOperator
- type StorageBackupScheduleProperties
- type StorageBackupScheduleRelation
- type StorageBackupScheduleRelations
- type StorageBackupScheduleUpdateRequest
- type StorageCreateRequest
- type StorageList
- type StorageOperator
- type StorageProperties
- type StorageRelations
- type StorageRollbackRequest
- type StorageServerRelation
- type StorageSnapshot
- type StorageSnapshotCreateRequest
- type StorageSnapshotCreateResponse
- type StorageSnapshotExportToS3Request
- type StorageSnapshotList
- type StorageSnapshotOperator
- type StorageSnapshotProperties
- type StorageSnapshotRelation
- type StorageSnapshotSchedule
- type StorageSnapshotScheduleCreateRequest
- type StorageSnapshotScheduleCreateResponse
- type StorageSnapshotScheduleList
- type StorageSnapshotScheduleOperator
- type StorageSnapshotScheduleProperties
- type StorageSnapshotScheduleRelation
- type StorageSnapshotScheduleRelations
- type StorageSnapshotScheduleUpdateRequest
- type StorageSnapshotUpdateRequest
- type StorageTemplate
- type StorageType
- type StorageUpdateRequest
- type Template
- type TemplateCreateRequest
- type TemplateList
- type TemplateOperator
- type TemplateProperties
- type TemplateUpdateRequest
- type TransportLayerProtocol
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackendServer ¶
type BackendServer struct { //Weight of the server Weight int `json:"weight"` //Host of the server. Can be URL or IP address. Host string `json:"host"` }
BackendServer is the JSON struct of backend server
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client struct of a gridscale golang client
func (*Client) CloneStorage ¶
CloneStorage clones a specific storage
func (*Client) CreateFirewall ¶
func (c *Client) CreateFirewall(ctx context.Context, body FirewallCreateRequest) (FirewallCreateResponse, error)
CreateFirewall creates a new firewall
See: https://gridscale.io/en//api-documentation/index.html#operation/createFirewall
func (*Client) CreateIP ¶
func (c *Client) CreateIP(ctx context.Context, body IPCreateRequest) (IPCreateResponse, error)
CreateIP creates an IP
Note: IP address family can only be either `IPv4Type` or `IPv6Type`
See: https://gridscale.io/en//api-documentation/index.html#operation/createIp
func (*Client) CreateISOImage ¶
func (c *Client) CreateISOImage(ctx context.Context, body ISOImageCreateRequest) (ISOImageCreateResponse, error)
CreateISOImage creates an ISO image
See: https://gridscale.io/en//api-documentation/index.html#operation/createIsoimage
func (*Client) CreateLoadBalancer ¶
func (c *Client) CreateLoadBalancer(ctx context.Context, body LoadBalancerCreateRequest) (LoadBalancerCreateResponse, error)
CreateLoadBalancer creates a new loadbalancer
Note: loadbalancer's algorithm can only be either `LoadbalancerRoundrobinAlg` or `LoadbalancerLeastConnAlg`
See: https://gridscale.io/en//api-documentation/index.html#operation/createLoadbalancer
func (*Client) CreateMarketplaceApplication ¶ added in v3.2.0
func (c *Client) CreateMarketplaceApplication(ctx context.Context, body MarketplaceApplicationCreateRequest) (MarketplaceApplicationCreateResponse, error)
CreateMarketplaceApplication create a marketplace application
NOTE:
- Allowed value for `Category`: nil, MarketplaceApplicationCMSCategory, MarketplaceApplicationProjectManagementCategory, MarketplaceApplicationAdminpanelCategory, MarketplaceApplicationCollaborationCategory, MarketplaceApplicationCloudStorageCategory, MarketplaceApplicationArchivingCategory.
See: https://gridscale.io/en//api-documentation/index.html#operation/createMarketplaceApplication
func (*Client) CreateNetwork ¶
func (c *Client) CreateNetwork(ctx context.Context, body NetworkCreateRequest) (NetworkCreateResponse, error)
CreateNetwork creates a network
See: https://gridscale.io/en//api-documentation/index.html#tag/network
func (*Client) CreateObjectStorageAccessKey ¶
func (c *Client) CreateObjectStorageAccessKey(ctx context.Context) (ObjectStorageAccessKeyCreateResponse, error)
CreateObjectStorageAccessKey creates an object storage access key
See: https://gridscale.io/en//api-documentation/index.html#operation/createAccessKey
func (*Client) CreatePaaSSecurityZone ¶
func (c *Client) CreatePaaSSecurityZone(ctx context.Context, body PaaSSecurityZoneCreateRequest) (PaaSSecurityZoneCreateResponse, error)
CreatePaaSSecurityZone creates a new PaaS security zone
See: https://gridscale.io/en//api-documentation/index.html#operation/createPaasSecurityZone
func (*Client) CreatePaaSService ¶
func (c *Client) CreatePaaSService(ctx context.Context, body PaaSServiceCreateRequest) (PaaSServiceCreateResponse, error)
CreatePaaSService creates a new PaaS service
See: https://gridscale.io/en//api-documentation/index.html#operation/createPaasService
func (*Client) CreateServer ¶
func (c *Client) CreateServer(ctx context.Context, body ServerCreateRequest) (ServerCreateResponse, error)
CreateServer create a server
NOTE: Allowed values of `HardwareProfile`: nil, DefaultServerHardware, NestedServerHardware, LegacyServerHardware, CiscoCSRServerHardware, SophosUTMServerHardware, F5BigipServerHardware, Q35ServerHardware, Q35NestedServerHardware.
See: https://gridscale.io/en//api-documentation/index.html#operation/createServer
func (*Client) CreateServerIP ¶
func (c *Client) CreateServerIP(ctx context.Context, id string, body ServerIPRelationCreateRequest) error
CreateServerIP create a link between a server and an IP
See: https://gridscale.io/en//api-documentation/index.html#operation/linkIpToServer
func (*Client) CreateServerIsoImage ¶
func (c *Client) CreateServerIsoImage(ctx context.Context, id string, body ServerIsoImageRelationCreateRequest) error
CreateServerIsoImage creates a link between a server and an ISO image
See: https://gridscale.io/en//api-documentation/index.html#operation/linkIsoimageToServer
func (*Client) CreateServerNetwork ¶
func (c *Client) CreateServerNetwork(ctx context.Context, id string, body ServerNetworkRelationCreateRequest) error
CreateServerNetwork creates a link between a network and a storage
See: https://gridscale.io/en//api-documentation/index.html#operation/linkNetworkToServer
func (*Client) CreateServerStorage ¶
func (c *Client) CreateServerStorage(ctx context.Context, id string, body ServerStorageRelationCreateRequest) error
CreateServerStorage create a link between a server and a storage
See: https://gridscale.io/en//api-documentation/index.html#operation/linkStorageToServer
func (*Client) CreateSshkey ¶
func (c *Client) CreateSshkey(ctx context.Context, body SshkeyCreateRequest) (CreateResponse, error)
CreateSshkey creates a ssh key
See: https://gridscale.io/en//api-documentation/index.html#operation/createSshKey
func (*Client) CreateStorage ¶
func (c *Client) CreateStorage(ctx context.Context, body StorageCreateRequest) (CreateResponse, error)
CreateStorage create a storage
NOTE:
- Allowed value for `StorageType`: nil, DefaultStorageType, HighStorageType, InsaneStorageType.
- Allowed value for `PasswordType`: nil, PlainPasswordType, CryptPasswordType.
See: https://gridscale.io/en//api-documentation/index.html#operation/createStorage
func (*Client) CreateStorageBackupSchedule ¶ added in v3.2.0
func (c *Client) CreateStorageBackupSchedule(ctx context.Context, id string, body StorageBackupScheduleCreateRequest) ( StorageBackupScheduleCreateResponse, error)
CreateStorageBackupSchedule create a storage backup schedule based on a given storage UUID
See: https://gridscale.io/en//api-documentation/index.html#operation/getStorageBackupSchedule
func (*Client) CreateStorageSnapshot ¶
func (c *Client) CreateStorageSnapshot(ctx context.Context, id string, body StorageSnapshotCreateRequest) (StorageSnapshotCreateResponse, error)
CreateStorageSnapshot creates a new storage's snapshot
See: https://gridscale.io/en//api-documentation/index.html#operation/createSnapshot
func (*Client) CreateStorageSnapshotSchedule ¶
func (c *Client) CreateStorageSnapshotSchedule(ctx context.Context, id string, body StorageSnapshotScheduleCreateRequest) ( StorageSnapshotScheduleCreateResponse, error)
CreateStorageSnapshotSchedule create a storage's snapshot scheduler
See: https://gridscale.io/en//api-documentation/index.html#operation/createSnapshotSchedule
func (*Client) CreateTemplate ¶
func (c *Client) CreateTemplate(ctx context.Context, body TemplateCreateRequest) (CreateResponse, error)
CreateTemplate creates a template
See: https://gridscale.io/en//api-documentation/index.html#operation/createTemplate
func (*Client) DelayInterval ¶
DelayInterval returns request delay interval
func (*Client) DeleteFirewall ¶
DeleteFirewall delete a specific firewall
See: https://gridscale.io/en//api-documentation/index.html#operation/deleteFirewall
func (*Client) DeleteIP ¶
DeleteIP deletes a specific IP based on given id
See: https://gridscale.io/en//api-documentation/index.html#operation/deleteIp
func (*Client) DeleteISOImage ¶
DeleteISOImage deletes a specific ISO image
See: https://gridscale.io/en//api-documentation/index.html#operation/deleteIsoimage
func (*Client) DeleteLoadBalancer ¶
DeleteLoadBalancer deletes a loadbalancer
See: https://gridscale.io/en//api-documentation/index.html#operation/deleteLoadbalancer
func (*Client) DeleteMarketplaceApplication ¶ added in v3.2.0
DeleteMarketplaceApplication delete a marketplace application
See: https://gridscale.io/en//api-documentation/index.html#operation/deleteMarketplaceApplication
func (*Client) DeleteNetwork ¶
DeleteNetwork deletes a specific network based on given id
See: https://gridscale.io/en//api-documentation/index.html#operation/deleteNetwork
func (*Client) DeleteObjectStorageAccessKey ¶
DeleteObjectStorageAccessKey deletes a specific object storage access key based on given id
See: https://gridscale.io/en//api-documentation/index.html#operation/deleteAccessKey
func (*Client) DeletePaaSSecurityZone ¶
DeletePaaSSecurityZone delete a specific PaaS Security Zone based on given id
See: https://gridscale.io/en//api-documentation/index.html#operation/deletePaasSecurityZone
func (*Client) DeletePaaSService ¶
DeletePaaSService deletes a PaaS service
See: https://gridscale.io/en//api-documentation/index.html#operation/deletePaasService
func (*Client) DeleteServer ¶
DeleteServer deletes a specific server
See: https://gridscale.io/en//api-documentation/index.html#operation/deleteServer
func (*Client) DeleteServerIP ¶
DeleteServerIP delete a link between a server and an IP
See: https://gridscale.io/en//api-documentation/index.html#operation/unlinkIpFromServer
func (*Client) DeleteServerIsoImage ¶
DeleteServerIsoImage deletes a link between an ISO image and a server
See: https://gridscale.io/en//api-documentation/index.html#operation/unlinkIsoimageFromServer
func (*Client) DeleteServerNetwork ¶
DeleteServerNetwork deletes a link between a network and a server
See: https://gridscale.io/en//api-documentation/index.html#operation/unlinkNetworkFromServer
func (*Client) DeleteServerStorage ¶
DeleteServerStorage delete a link between a storage and a server
See: https://gridscale.io/en//api-documentation/index.html#operation/unlinkStorageFromServer
func (*Client) DeleteSshkey ¶
DeleteSshkey deletes a ssh key
See: https://gridscale.io/en//api-documentation/index.html#operation/deleteSshKey
func (*Client) DeleteStorage ¶
DeleteStorage delete a storage
See: https://gridscale.io/en//api-documentation/index.html#operation/deleteStorage
func (*Client) DeleteStorageBackup ¶ added in v3.2.0
DeleteStorageBackup deletes a specific storage's backup
See: https://gridscale.io/en//api-documentation/index.html#operation/deleteStorageBackup
func (*Client) DeleteStorageBackupSchedule ¶ added in v3.2.0
func (c *Client) DeleteStorageBackupSchedule(ctx context.Context, storageID, scheduleID string) error
DeleteStorageBackupSchedule deletes a specific storage backup scheduler based on a given storage's id and a backup schedule's id
See: https://gridscale.io/en//api-documentation/index.html#operation/deleteStorageBackupSchedule
func (*Client) DeleteStorageSnapshot ¶
DeleteStorageSnapshot deletes a specific storage's snapshot
See: https://gridscale.io/en//api-documentation/index.html#operation/deleteSnapshot
func (*Client) DeleteStorageSnapshotSchedule ¶
func (c *Client) DeleteStorageSnapshotSchedule(ctx context.Context, storageID, scheduleID string) error
DeleteStorageSnapshotSchedule deletes specific Storage's snapshot scheduler based on a given storage's id and scheduler's id
See: https://gridscale.io/en//api-documentation/index.html#operation/deleteSnapshotSchedule
func (*Client) DeleteTemplate ¶
DeleteTemplate deletes a template
See: https://gridscale.io/en//api-documentation/index.html#operation/deleteTemplate
func (*Client) ExportStorageSnapshotToS3 ¶
func (c *Client) ExportStorageSnapshotToS3(ctx context.Context, storageID, snapshotID string, body StorageSnapshotExportToS3Request) error
ExportStorageSnapshotToS3 export a storage's snapshot to S3
See: https://gridscale.io/en//api-documentation/index.html#operation/SnapshotExportToS3
func (*Client) GetDeletedIPs ¶
GetDeletedIPs gets a list of deleted IPs
See: https://gridscale.io/en//api-documentation/index.html#operation/getDeletedIps
func (*Client) GetDeletedISOImages ¶
GetDeletedISOImages gets a list of deleted ISO images
See: https://gridscale.io/en//api-documentation/index.html#operation/getDeletedIsoimages
func (*Client) GetDeletedNetworks ¶
GetDeletedNetworks gets a list of deleted networks
See: https://gridscale.io/en//api-documentation/index.html#operation/getDeletedNetworks
func (*Client) GetDeletedPaaSServices ¶
func (c *Client) GetDeletedPaaSServices(ctx context.Context) ([]PaaSService, error)
GetDeletedPaaSServices returns a list of deleted PaaS Services
See: https://gridscale.io/en//api-documentation/index.html#operation/getDeletedPaasServices
func (*Client) GetDeletedServers ¶
GetDeletedServers gets a list of deleted servers
See: https://gridscale.io/en//api-documentation/index.html#operation/getDeletedServers
func (*Client) GetDeletedSnapshots ¶
func (c *Client) GetDeletedSnapshots(ctx context.Context) ([]StorageSnapshot, error)
GetDeletedSnapshots gets a list of deleted storage snapshots
See: https://gridscale.io/en//api-documentation/index.html#operation/getDeletedSnapshots
func (*Client) GetDeletedStorages ¶
GetDeletedStorages gets a list of deleted storages
See: https://gridscale.io/en//api-documentation/index.html#operation/getDeletedStorages
func (*Client) GetDeletedTemplates ¶
GetDeletedTemplates gets a list of deleted templates
See: https://gridscale.io/en//api-documentation/index.html#operation/getDeletedTemplates
func (*Client) GetEventList ¶
GetEventList gets a list of events
See: https://gridscale.io/en//api-documentation/index.html#operation/EventGetAll
func (*Client) GetFirewall ¶
GetFirewall gets a specific firewall based on given id
See: https://gridscale.io/en//api-documentation/index.html#operation/getFirewall
func (*Client) GetFirewallEventList ¶
GetFirewallEventList get list of a firewall's events
See: https://gridscale.io/en//api-documentation/index.html#operation/getFirewallEvents
func (*Client) GetFirewallList ¶
GetFirewallList gets a list of available firewalls
See: https://gridscale.io/en//api-documentation/index.html#operation/getFirewalls
func (*Client) GetIP ¶
GetIP get a specific IP based on given id
See: https://gridscale.io/en//api-documentation/index.html#operation/getIp
func (*Client) GetIPEventList ¶
GetIPEventList gets a list of an IP's events
See: https://gridscale.io/en//api-documentation/index.html#operation/getIpEvents
func (*Client) GetIPList ¶
GetIPList gets a list of available IPs
https://gridscale.io/en//api-documentation/index.html#operation/getIps
func (*Client) GetIPVersion ¶
GetIPVersion gets IP's version, returns 0 if an error was encountered
func (*Client) GetIPsByLocation ¶
GetIPsByLocation gets a list of IPs by location
See: https://gridscale.io/en//api-documentation/index.html#operation/getLocationIps
func (*Client) GetISOImage ¶
GetISOImage returns a specific ISO image based on given id
See: https://gridscale.io/en//api-documentation/index.html#operation/getIsoimage
func (*Client) GetISOImageEventList ¶
GetISOImageEventList returns a list of events of an ISO image
See: https://gridscale.io/en//api-documentation/index.html#operation/getIsoimageEvents
func (*Client) GetISOImageList ¶
GetISOImageList returns a list of available ISO images
See: https://gridscale.io/en//api-documentation/index.html#operation/getIsoimages
func (*Client) GetISOImagesByLocation ¶
GetISOImagesByLocation gets a list of ISO images by location
See: https://gridscale.io/en//api-documentation/index.html#operation/getLocationIsoimages
func (*Client) GetLabelList ¶
GetLabelList gets a list of available labels
See: https://gridscale.io/en//api-documentation/index.html#operation/GetLabels
func (*Client) GetLoadBalancer ¶
GetLoadBalancer returns a loadbalancer of a given uuid
See: https://gridscale.io/en//api-documentation/index.html#operation/getLoadbalancer
func (*Client) GetLoadBalancerEventList ¶
GetLoadBalancerEventList retrieves events of a given uuid
See: https://gridscale.io/en//api-documentation/index.html#operation/getLoadbalancerEvents
func (*Client) GetLoadBalancerList ¶
func (c *Client) GetLoadBalancerList(ctx context.Context) ([]LoadBalancer, error)
GetLoadBalancerList returns a list of loadbalancers
See: https://gridscale.io/en//api-documentation/index.html#operation/getLoadbalancers
func (*Client) GetLocation ¶
GetLocation gets a specific location
See: https://gridscale.io/en//api-documentation/index.html#operation/getLocation
func (*Client) GetLocationList ¶
GetLocationList gets a list of available locations]
See: https://gridscale.io/en//api-documentation/index.html#operation/getLocations
func (*Client) GetMarketplaceApplication ¶ added in v3.2.0
func (c *Client) GetMarketplaceApplication(ctx context.Context, id string) (MarketplaceApplication, error)
GetMarketplaceApplication get a marketplace application
See: https://gridscale.io/en//api-documentation/index.html#operation/getMarketplaceApplication
func (*Client) GetMarketplaceApplicationEventList ¶ added in v3.2.0
func (c *Client) GetMarketplaceApplicationEventList(ctx context.Context, id string) ([]Event, error)
GetMarketplaceApplicationEventList get list of a marketplace application's events
See: https://gridscale.io/en//api-documentation/index.html#operation/getStorageEvents
func (*Client) GetMarketplaceApplicationList ¶ added in v3.2.0
func (c *Client) GetMarketplaceApplicationList(ctx context.Context) ([]MarketplaceApplication, error)
GetMarketplaceApplicationList gets a list of available marketplace applications
See: https://gridscale.io/en//api-documentation/index.html#operation/getMarketplaceApplications
func (*Client) GetNetwork ¶
GetNetwork get a specific network based on given id
See: https://gridscale.io/en//api-documentation/index.html#operation/getNetwork
func (*Client) GetNetworkEventList ¶
GetNetworkEventList gets a list of a network's events
See: https://gridscale.io/en//api-documentation/index.html#tag/network
func (*Client) GetNetworkList ¶
GetNetworkList gets a list of available networks
See: https://gridscale.io/en//api-documentation/index.html#operation/getNetworks
func (*Client) GetNetworkPublic ¶
GetNetworkPublic gets public network
func (*Client) GetNetworksByLocation ¶
GetNetworksByLocation gets a list of networks by location
See: https://gridscale.io/en//api-documentation/index.html#operation/getDeletedNetworks
func (*Client) GetObjectStorageAccessKey ¶
func (c *Client) GetObjectStorageAccessKey(ctx context.Context, id string) (ObjectStorageAccessKey, error)
GetObjectStorageAccessKey gets a specific object storage access key based on given id
See: https://gridscale.io/en//api-documentation/index.html#operation/getAccessKey
func (*Client) GetObjectStorageAccessKeyList ¶
func (c *Client) GetObjectStorageAccessKeyList(ctx context.Context) ([]ObjectStorageAccessKey, error)
GetObjectStorageAccessKeyList gets a list of available object storage access keys
See: https://gridscale.io/en//api-documentation/index.html#operation/getAccessKeys
func (*Client) GetObjectStorageBucketList ¶
func (c *Client) GetObjectStorageBucketList(ctx context.Context) ([]ObjectStorageBucket, error)
GetObjectStorageBucketList gets a list of object storage buckets
See: https://gridscale.io/en//api-documentation/index.html#operation/getBuckets
func (*Client) GetPaaSSecurityZone ¶
GetPaaSSecurityZone get a specific PaaS Security Zone based on given id
See: https://gridscale.io/en//api-documentation/index.html#operation/getPaasSecurityZone
func (*Client) GetPaaSSecurityZoneList ¶
func (c *Client) GetPaaSSecurityZoneList(ctx context.Context) ([]PaaSSecurityZone, error)
GetPaaSSecurityZoneList get available security zones
See: https://gridscale.io/en//api-documentation/index.html#operation/getPaasSecurityZones
func (*Client) GetPaaSService ¶
GetPaaSService returns a specific PaaS Service based on given id
See: https://gridscale.io/en//api-documentation/index.html#operation/getPaasService
func (*Client) GetPaaSServiceList ¶
func (c *Client) GetPaaSServiceList(ctx context.Context) ([]PaaSService, error)
GetPaaSServiceList returns a list of PaaS Services
See: https://gridscale.io/en//api-documentation/index.html#operation/getPaasServices
func (*Client) GetPaaSServiceMetrics ¶
GetPaaSServiceMetrics get a specific PaaS Service's metrics based on a given id
See: https://gridscale.io/en//api-documentation/index.html#operation/getPaasServiceMetrics
func (*Client) GetPaaSTemplateList ¶
func (c *Client) GetPaaSTemplateList(ctx context.Context) ([]PaaSTemplate, error)
GetPaaSTemplateList returns a list of PaaS service templates
See: https://gridscale.io/en//api-documentation/index.html#operation/getPaasServiceTemplates
func (*Client) GetServer ¶
GetServer gets a specific server based on given list
See: https://gridscale.io/en//api-documentation/index.html#operation/getServer
func (*Client) GetServerEventList ¶
GetServerEventList gets a list of a specific server's events
See: https://gridscale.io/en//api-documentation/index.html#operation/getServerEvents
func (*Client) GetServerIP ¶
func (c *Client) GetServerIP(ctx context.Context, serverID, ipID string) (ServerIPRelationProperties, error)
GetServerIP gets an IP of a specific server
See: https://gridscale.io/en//api-documentation/index.html#operation/getServerLinkedIp
func (*Client) GetServerIPList ¶
func (c *Client) GetServerIPList(ctx context.Context, id string) ([]ServerIPRelationProperties, error)
GetServerIPList gets a list of a specific server's IPs
See: https://gridscale.io/en//api-documentation/index.html#operation/getServerLinkedIps
func (*Client) GetServerIsoImage ¶
func (c *Client) GetServerIsoImage(ctx context.Context, serverID, isoImageID string) (ServerIsoImageRelationProperties, error)
GetServerIsoImage gets an ISO image of a specific server
See: https://gridscale.io/en//api-documentation/index.html#operation/getServerLinkedIsoimage
func (*Client) GetServerIsoImageList ¶
func (c *Client) GetServerIsoImageList(ctx context.Context, id string) ([]ServerIsoImageRelationProperties, error)
GetServerIsoImageList gets a list of a specific server's ISO images
See: https://gridscale.io/en//api-documentation/index.html#operation/getServerLinkedIsoimages
func (*Client) GetServerList ¶
GetServerList gets a list of available servers
See: https://gridscale.io/en//api-documentation/index.html#operation/getServers
func (*Client) GetServerMetricList ¶
GetServerMetricList gets a list of a specific server's metrics
See: https://gridscale.io/en//api-documentation/index.html#operation/getServerMetrics
func (*Client) GetServerNetwork ¶
func (c *Client) GetServerNetwork(ctx context.Context, serverID, networkID string) (ServerNetworkRelationProperties, error)
GetServerNetwork gets a network of a specific server
See: https://gridscale.io/en//api-documentation/index.html#operation/getServerLinkedNetwork
func (*Client) GetServerNetworkList ¶
func (c *Client) GetServerNetworkList(ctx context.Context, id string) ([]ServerNetworkRelationProperties, error)
GetServerNetworkList gets a list of a specific server's networks
See: https://gridscale.io/en//api-documentation/index.html#operation/getServerLinkedNetworks
func (*Client) GetServerStorage ¶
func (c *Client) GetServerStorage(ctx context.Context, serverID, storageID string) (ServerStorageRelationProperties, error)
GetServerStorage gets a storage of a specific server
See: https://gridscale.io/en//api-documentation/index.html#operation/getServerLinkedStorage
func (*Client) GetServerStorageList ¶
func (c *Client) GetServerStorageList(ctx context.Context, id string) ([]ServerStorageRelationProperties, error)
GetServerStorageList gets a list of a specific server's storages
See: https://gridscale.io/en//api-documentation/index.html#operation/getServerLinkedStorages
func (*Client) GetServersByLocation ¶
GetServersByLocation gets a list of servers by location
See: https://gridscale.io/en//api-documentation/index.html#operation/getLocationServers
func (*Client) GetSnapshotsByLocation ¶
GetSnapshotsByLocation gets a list of storage snapshots by location
See: https://gridscale.io/en//api-documentation/index.html#operation/getLocationSnapshots
func (*Client) GetSshkey ¶
GetSshkey gets a ssh key
See: https://gridscale.io/en//api-documentation/index.html#operation/getSshKey
func (*Client) GetSshkeyEventList ¶
GetSshkeyEventList gets a ssh key's events
See: https://gridscale.io/en//api-documentation/index.html#operation/getSshKeyEvents
func (*Client) GetSshkeyList ¶
GetSshkeyList gets a list of ssh keys
See: https://gridscale.io/en//api-documentation/index.html#operation/getSshKeys
func (*Client) GetStorage ¶
GetStorage get a storage
See: https://gridscale.io/en//api-documentation/index.html#operation/getStorage
func (*Client) GetStorageBackupList ¶ added in v3.2.0
GetStorageBackupList gets a list of available storage backups
See: https://gridscale.io/en//api-documentation/index.html#operation/getStorageBackups
func (*Client) GetStorageBackupSchedule ¶ added in v3.2.0
func (c *Client) GetStorageBackupSchedule(ctx context.Context, storageID, scheduleID string) (StorageBackupSchedule, error)
GetStorageBackupSchedule gets a specific storage backup schedule based on a given storage's id and a backup schedule's id
See: https://gridscale.io/en//api-documentation/index.html#operation/getStorageBackupSchedules
func (*Client) GetStorageBackupScheduleList ¶ added in v3.2.0
func (c *Client) GetStorageBackupScheduleList(ctx context.Context, id string) ([]StorageBackupSchedule, error)
GetStorageBackupScheduleList gets a list of available storage backup schedules based on a given storage's id
See: https://gridscale.io/en//api-documentation/index.html#operation/getStorageBackupSchedules
func (*Client) GetStorageEventList ¶
GetStorageEventList get list of a storage's event
See: https://gridscale.io/en//api-documentation/index.html#operation/getStorageEvents
func (*Client) GetStorageList ¶
GetStorageList gets a list of available storages
See: https://gridscale.io/en//api-documentation/index.html#operation/getStorages
func (*Client) GetStorageSnapshot ¶
func (c *Client) GetStorageSnapshot(ctx context.Context, storageID, snapshotID string) (StorageSnapshot, error)
GetStorageSnapshot gets a specific storage's snapshot based on given storage id and snapshot id.
See: https://gridscale.io/en//api-documentation/index.html#operation/getSnapshot
func (*Client) GetStorageSnapshotList ¶
GetStorageSnapshotList gets a list of storage snapshots
See: https://gridscale.io/en//api-documentation/index.html#operation/getSnapshots
func (*Client) GetStorageSnapshotSchedule ¶
func (c *Client) GetStorageSnapshotSchedule(ctx context.Context, storageID, scheduleID string) (StorageSnapshotSchedule, error)
GetStorageSnapshotSchedule gets a specific storage snapshot scheduler based on a given storage's id and scheduler's id
See: https://gridscale.io/en//api-documentation/index.html#operation/getSnapshotSchedule
func (*Client) GetStorageSnapshotScheduleList ¶
func (c *Client) GetStorageSnapshotScheduleList(ctx context.Context, id string) ([]StorageSnapshotSchedule, error)
GetStorageSnapshotScheduleList gets a list of available storage snapshot schedules based on a given storage's id
See: https://gridscale.io/en//api-documentation/index.html#operation/getSnapshotSchedules
func (*Client) GetStoragesByLocation ¶
GetStoragesByLocation gets a list of storages by location
See: https://gridscale.io/en//api-documentation/index.html#operation/getLocationStorages
func (*Client) GetTemplate ¶
GetTemplate gets a template
See: https://gridscale.io/en//api-documentation/index.html#operation/getTemplate
func (*Client) GetTemplateByName ¶
GetTemplateByName gets a template by its name
func (*Client) GetTemplateEventList ¶
GetTemplateEventList gets a list of a template's events
See: https://gridscale.io/en//api-documentation/index.html#operation/getTemplateEvents
func (*Client) GetTemplateList ¶
GetTemplateList gets a list of templates
See: https://gridscale.io/en//api-documentation/index.html#operation/getTemplates
func (*Client) GetTemplatesByLocation ¶
GetTemplatesByLocation gets a list of templates by location
See: https://gridscale.io/en//api-documentation/index.html#operation/getLocationTemplates
func (*Client) HttpClient ¶
HttpClient returns http client
func (*Client) ImportMarketplaceApplication ¶ added in v3.2.0
func (c *Client) ImportMarketplaceApplication(ctx context.Context, body MarketplaceApplicationImportRequest) (MarketplaceApplicationCreateResponse, error)
ImportMarketplaceApplication import a marketplace application
NOTE:
- Allowed value for `Category`: nil, MarketplaceApplicationCMSCategory, MarketplaceApplicationProjectManagementCategory, MarketplaceApplicationAdminpanelCategory, MarketplaceApplicationCollaborationCategory, MarketplaceApplicationCloudStorageCategory, MarketplaceApplicationArchivingCategory.
See: https://gridscale.io/en//api-documentation/index.html#operation/createMarketplaceApplication
func (*Client) IsServerOn ¶
IsServerOn returns true if the server's power is on, otherwise returns false
func (*Client) LinkIsoImage ¶
LinkIsoImage attaches an ISO image to a server
func (*Client) LinkNetwork ¶
func (c *Client) LinkNetwork(ctx context.Context, serverID, networkID, firewallTemplate string, bootdevice bool, order int, l3security []string, firewall *FirewallRules) error
LinkNetwork attaches a network to a server
func (*Client) LinkStorage ¶
func (c *Client) LinkStorage(ctx context.Context, serverID string, storageID string, bootdevice bool) error
LinkStorage attaches a storage to a server
func (*Client) MaxNumberOfRetries ¶
MaxNumberOfRetries returns max number of retries
func (*Client) RenewK8sCredentials ¶ added in v3.0.1
RenewK8sCredentials renew credentials of a k8s cluster. If the PaaS is not a k8s cluster, the function will return an error.
See:
func (*Client) RollbackStorage ¶
func (c *Client) RollbackStorage(ctx context.Context, storageID, snapshotID string, body StorageRollbackRequest) error
RollbackStorage rollbacks a storage
See: https://gridscale.io/en//api-documentation/index.html#operation/StorageRollback
func (*Client) RollbackStorageBackup ¶ added in v3.2.0
func (c *Client) RollbackStorageBackup(ctx context.Context, storageID, backupID string, body StorageRollbackRequest) error
RollbackStorageBackup rollbacks a storage's backup
See: https://gridscale.io/en//api-documentation/index.html#operation/rollbackStorageBackup
func (*Client) ShutdownServer ¶
ShutdownServer shutdowns a specific server
func (*Client) StartServer ¶
StartServer starts a server
func (*Client) StopServer ¶
StopServer stops a server
func (*Client) Synchronous ¶
Synchronous returns if the client is sync or not
func (*Client) UnlinkIsoImage ¶
UnlinkIsoImage removes the link between an ISO image and a server
func (*Client) UnlinkNetwork ¶
UnlinkNetwork removes the link between a network and a server
func (*Client) UnlinkStorage ¶
UnlinkStorage remove a storage from a server
func (*Client) UpdateFirewall ¶
UpdateFirewall update a specific firewall
See: https://gridscale.io/en//api-documentation/index.html#operation/updateFirewall
func (*Client) UpdateIP ¶
UpdateIP updates a specific IP based on given id
See: https://gridscale.io/en//api-documentation/index.html#operation/updateIp
func (*Client) UpdateISOImage ¶
UpdateISOImage updates a specific ISO Image
See: https://gridscale.io/en//api-documentation/index.html#operation/updateIsoimage
func (*Client) UpdateLoadBalancer ¶
func (c *Client) UpdateLoadBalancer(ctx context.Context, id string, body LoadBalancerUpdateRequest) error
UpdateLoadBalancer update configuration of a loadbalancer
Note: loadbalancer's algorithm can only be either `LoadbalancerRoundrobinAlg` or `LoadbalancerLeastConnAlg`
See: https://gridscale.io/en//api-documentation/index.html#operation/updateLoadbalancer
func (*Client) UpdateMarketplaceApplication ¶ added in v3.2.0
func (c *Client) UpdateMarketplaceApplication(ctx context.Context, id string, body MarketplaceApplicationUpdateRequest) error
UpdateMarketplaceApplication update a marketplace application
See: https://gridscale.io/en//api-documentation/index.html#operation/updateMarketplaceApplication
func (*Client) UpdateNetwork ¶
UpdateNetwork updates a specific network based on given id
See: https://gridscale.io/en//api-documentation/index.html#operation/updateNetwork
func (*Client) UpdatePaaSSecurityZone ¶
func (c *Client) UpdatePaaSSecurityZone(ctx context.Context, id string, body PaaSSecurityZoneUpdateRequest) error
UpdatePaaSSecurityZone update a specific PaaS security zone based on given id
See: https://gridscale.io/en//api-documentation/index.html#operation/updatePaasSecurityZone
func (*Client) UpdatePaaSService ¶
func (c *Client) UpdatePaaSService(ctx context.Context, id string, body PaaSServiceUpdateRequest) error
UpdatePaaSService updates a specific PaaS Service based on a given id
See: https://gridscale.io/en//api-documentation/index.html#operation/updatePaasService
func (*Client) UpdateServer ¶
UpdateServer updates a specific server
See: https://gridscale.io/en//api-documentation/index.html#operation/updateServer
func (*Client) UpdateServerIsoImage ¶
func (c *Client) UpdateServerIsoImage(ctx context.Context, serverID, isoImageID string, body ServerIsoImageRelationUpdateRequest) error
UpdateServerIsoImage updates a link between a storage and an ISO image
See: https://gridscale.io/en//api-documentation/index.html#operation/updateServerLinkedIsoimage
func (*Client) UpdateServerNetwork ¶
func (c *Client) UpdateServerNetwork(ctx context.Context, serverID, networkID string, body ServerNetworkRelationUpdateRequest) error
UpdateServerNetwork updates a link between a network and a server
See: https://gridscale.io/en//api-documentation/index.html#operation/updateServerLinkedNetwork
func (*Client) UpdateServerStorage ¶
func (c *Client) UpdateServerStorage(ctx context.Context, serverID, storageID string, body ServerStorageRelationUpdateRequest) error
UpdateServerStorage updates a link between a storage and a server
See: https://gridscale.io/en//api-documentation/index.html#operation/updateServerLinkedStorage
func (*Client) UpdateSshkey ¶
UpdateSshkey updates a ssh key
See: https://gridscale.io/en//api-documentation/index.html#operation/updateSshKey
func (*Client) UpdateStorage ¶
UpdateStorage update a storage
See: https://gridscale.io/en//api-documentation/index.html#operation/updateStorage
func (*Client) UpdateStorageBackupSchedule ¶ added in v3.2.0
func (c *Client) UpdateStorageBackupSchedule(ctx context.Context, storageID, scheduleID string, body StorageBackupScheduleUpdateRequest) error
UpdateStorageBackupSchedule updates a specific storage backup schedule based on a given storage's id and a backup schedule's id
See: https://gridscale.io/en//api-documentation/index.html#operation/updateStorageBackupSchedule
func (*Client) UpdateStorageSnapshot ¶
func (c *Client) UpdateStorageSnapshot(ctx context.Context, storageID, snapshotID string, body StorageSnapshotUpdateRequest) error
UpdateStorageSnapshot updates a specific storage's snapshot
See: https://gridscale.io/en//api-documentation/index.html#operation/updateSnapshot
func (*Client) UpdateStorageSnapshotSchedule ¶
func (c *Client) UpdateStorageSnapshotSchedule(ctx context.Context, storageID, scheduleID string, body StorageSnapshotScheduleUpdateRequest) error
UpdateStorageSnapshotSchedule updates specific Storage's snapshot scheduler based on a given storage's id and scheduler's id
See: https://gridscale.io/en//api-documentation/index.html#operation/updateSnapshotSchedule
func (*Client) UpdateTemplate ¶
UpdateTemplate updates a template
See: https://gridscale.io/en//api-documentation/index.html#operation/updateTemplate
func (*Client) WithHTTPHeaders ¶ added in v3.1.0
WithHTTPHeaders adds custom HTTP headers to Client
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config config for client
func DefaultConfiguration ¶
DefaultConfiguration creates a default configuration
func NewConfiguration ¶
func NewConfiguration(apiURL string, uuid string, token string, debugMode, sync bool, delayIntervalMilliSecs, maxNumberOfRetries int) *Config
NewConfiguration creates a new config
- Parameters:
- apiURL string: base URL of API.
- uuid string: UUID of user.
- token string: API token.
- debugMode bool: true => run client in debug mode.
- sync bool: true => client is in synchronous mode. The client will block until Create/Update/Delete processes are completely finished. It is safer to set this parameter to `true`.
- delayIntervalMilliSecs int: delay (in milliseconds) between requests when checking request (or retry 5xx, 424 error code)
- maxNumberOfRetries int: number of retries when server returns 5xx, 424 error code.
type CreateResponse ¶
type CreateResponse struct { //UUID of the object being created ObjectUUID string `json:"object_uuid"` //UUID of the request RequestUUID string `json:"request_uuid"` }
CreateResponse common struct of a response for creation
type Credential ¶
type Credential struct { //The initial username to authenticate the Service. Username string `json:"username"` //The initial password to authenticate the Service. Password string `json:"password"` //The type of Service. Type string `json:"type"` //If the PaaS service is a k8s cluster, this field will be set. KubeConfig string `json:"kubeconfig"` //Expiration time of k8s credential ExpirationTime GSTime `json:"expiration_time"` }
Credential is JSON struct of credential
type DeletedIPList ¶
type DeletedIPList struct { //Array of deleted IP addresses List map[string]IPProperties `json:"deleted_ips"` }
DeletedIPList is JSON struct of a list of deleted IPs
type DeletedISOImageList ¶
type DeletedISOImageList struct { //List of deleted ISO-images List map[string]ISOImageProperties `json:"deleted_isoimages"` }
DeletedISOImageList is JSON struct of a list of deleted SO images
type DeletedNetworkList ¶
type DeletedNetworkList struct { //Array of deleted networks List map[string]NetworkProperties `json:"deleted_networks"` }
DeletedNetworkList is JSON struct of a list of deleted networks
type DeletedPaaSServices ¶
type DeletedPaaSServices struct { //Array of deleted PaaS services List map[string]PaaSServiceProperties `json:"deleted_paas_services"` }
DeletedPaaSServices is the JSON struct of a list of deleted PaaS services
type DeletedServerList ¶
type DeletedServerList struct { //Array of deleted servers List map[string]ServerProperties `json:"deleted_servers"` }
DeletedServerList JSON struct of a list of deleted servers
type DeletedStorageList ¶
type DeletedStorageList struct { //Array of deleted storages List map[string]StorageProperties `json:"deleted_storages"` }
DeletedStorageList JSON struct of a list of storages
type DeletedStorageSnapshotList ¶
type DeletedStorageSnapshotList struct { //Array of deleted snapshots List map[string]StorageSnapshotProperties `json:"deleted_snapshots"` }
DeletedStorageSnapshotList is JSON structure of a list of deleted storage snapshots
type DeletedTemplateList ¶
type DeletedTemplateList struct { //Array of deleted templates List map[string]TemplateProperties `json:"deleted_templates"` }
DeletedTemplateList JSON struct of a list of deleted templates
type Event ¶
type Event struct { //Properties of an event Properties EventProperties `json:"event"` }
Event is JSOn struct of a single firewall's event
type EventList ¶
type EventList struct { //Array of events List []EventProperties `json:"events"` }
EventList is JSON struct of a list of events
type EventOperator ¶ added in v3.2.0
EventOperator is an interface defining API of an event operator
type EventProperties ¶
type EventProperties struct { //Type of object (server, storage, IP) etc ObjectType string `json:"object_type"` //The UUID of the event RequestUUID string `json:"request_uuid"` //The UUID of the objects the event was executed on ObjectUUID string `json:"object_uuid"` //The type of change Activity string `json:"activity"` //The type of request RequestType string `json:"request_type"` //True or false, whether the request was successful or not RequestStatus string `json:"request_status"` //A detailed description of the change. Change string `json:"change"` //Time the event was triggered Timestamp GSTime `json:"timestamp"` //The UUID of the user that triggered the event UserUUID string `json:"user_uuid"` }
EventProperties is JSON struct of an event properties
type Firewall ¶
type Firewall struct { //Properties of a firewall Properties FirewallProperties `json:"firewall"` }
Firewall is JSON structure of a single firewall
type FirewallCreateRequest ¶
type FirewallCreateRequest struct { //Name of firewall being created Name string `json:"name"` //Labels. Can be nil Labels []string `json:"labels,omitempty"` //FirewallRules Rules FirewallRules `json:"rules"` }
FirewallCreateRequest is JSON struct of a request for creating a firewall
type FirewallCreateResponse ¶
type FirewallCreateResponse struct { //Request UUID RequestUUID string `json:"request_uuid"` //The UUID of the firewall being created ObjectUUID string `json:"object_uuid"` }
FirewallCreateResponse is JSON struct of a response for creating a firewall
type FirewallList ¶
type FirewallList struct { //Array of firewalls List map[string]FirewallProperties `json:"firewalls"` }
FirewallList is JSON structure of a list of firewalls
type FirewallOperator ¶ added in v3.2.0
type FirewallOperator interface { GetFirewallList(ctx context.Context) ([]Firewall, error) GetFirewall(ctx context.Context, id string) (Firewall, error) CreateFirewall(ctx context.Context, body FirewallCreateRequest) (FirewallCreateResponse, error) UpdateFirewall(ctx context.Context, id string, body FirewallUpdateRequest) error DeleteFirewall(ctx context.Context, id string) error GetFirewallEventList(ctx context.Context, id string) ([]Event, error) }
FirewallOperator is an interface defining API of a firewall operator
type FirewallProperties ¶
type FirewallProperties struct { //Status indicates the status of the object Status string `json:"status"` //List of labels Labels []string `json:"labels"` //The UUID of an object is always unique, and refers to a specific object ObjectUUID string `json:"object_uuid"` //Defines the date and time of the last object change ChangeTime GSTime `json:"change_time"` //FirewallRules Rules FirewallRules `json:"rules"` //Defines the date and time the object was initially created CreateTime GSTime `json:"create_time"` //If this is a private or public Firewall-Template Private bool `json:"private"` //The information about other object which are related to this Firewall. The object could be Network. Relations FirewallRelation `json:"relations"` //Description of the ISO-Image release Description string `json:"description"` //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. LocationName string `json:"location_name"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` }
FirewallProperties is JSON struct of a firewall's properties
type FirewallRelation ¶
type FirewallRelation struct { //Array of object (NetworkinFirewall) Networks []NetworkInFirewall `json:"networks"` }
FirewallRelation is a JSON struct of a list of firewall's relations
type FirewallRuleProperties ¶
type FirewallRuleProperties struct { //Enum:"udp" "tcp". Allowed values: `TCPTransport`, `UDPTransport` Protocol TransportLayerProtocol `json:"protocol"` //A Number between 1 and 65535, port ranges are seperated by a colon for FTP. DstPort string `json:"dst_port,omitempty"` //A Number between 1 and 65535, port ranges are seperated by a colon for FTP. SrcPort string `json:"src_port,omitempty"` //A Number between 1 and 65535, port ranges are seperated by a colon for FTP. SrcCidr string `json:"src_cidr,omitempty"` //Enum:"accept" "drop". This defines what the firewall will do. Either accept or drop. Action string `json:"action"` //Description Comment string `json:"comment,omitempty"` //Either an IPv4/6 address or and IP Network in CIDR format. If this field is empty then all IPs have access to this service. DstCidr string `json:"dst_cidr,omitempty"` //The order at which the firewall will compare packets against its rules, // a packet will be compared against the first rule, it will either allow it to pass // or block it and it won t be matched against any other rules. // However, if it does no match the rule, then it will proceed onto rule 2. // Packets that do not match any rules are blocked by default. Order int `json:"order"` }
FirewallRuleProperties is JSON struct of a firewall's rule properties
type FirewallRules ¶
type FirewallRules struct { //Firewall template rules for inbound traffic - covers ipv6 addresses. RulesV6In []FirewallRuleProperties `json:"rules-v6-in,omitempty"` //Firewall template tules for outbound traffic - covers ipv6 addresses. RulesV6Out []FirewallRuleProperties `json:"rules-v6-out,omitempty"` //Firewall template rules for inbound traffic - covers ipv4 addresses. RulesV4In []FirewallRuleProperties `json:"rules-v4-in,omitempty"` //Firewall template rules for outbound traffic - covers ipv4 addresses. RulesV4Out []FirewallRuleProperties `json:"rules-v4-out,omitempty"` }
FirewallRules is JSON struct of a list of firewall's rules
type FirewallUpdateRequest ¶
type FirewallUpdateRequest struct { //New name. Leave it if you do not want to update the name Name string `json:"name,omitempty"` //New list of labels. Leave it if you do not want to update the Labels Labels *[]string `json:"labels,omitempty"` //FirewallRules. Leave it if you do not want to update the firewall rules Rules *FirewallRules `json:"rules,omitempty"` }
FirewallUpdateRequest is JSON struct of a request for updating a firewall
type ForwardingRule ¶
type ForwardingRule struct { //SSL from Letsencrypt LetsencryptSSL interface{} `json:"letsencrypt_ssl"` //Listen port ListenPort int `json:"listen_port"` //Mode of forwarding Mode string `json:"mode"` //Target port TargetPort int `json:"target_port"` }
ForwardingRule is the JSON struct of forwarding rule
type GSTime ¶
GSTime is custom time type of gridscale
func (GSTime) MarshalJSON ¶
MarshalJSON custom marshaller for GSTime
func (*GSTime) UnmarshalJSON ¶
UnmarshalJSON custom unmarshaller for GSTime
type IP ¶
type IP struct { //Properties of an IP address Properties IPProperties `json:"ip"` }
IP is JSON struct if a single IP
type IPAddressType ¶ added in v3.2.0
type IPAddressType int
const ( IPv4Type IPAddressType = 4 IPv6Type IPAddressType = 6 )
Allowed IP address versions
type IPCreateRequest ¶
type IPCreateRequest struct { //Name of an IP address being created. Can be an empty string Name string `json:"name,omitempty"` //IP address family. Can only be either `IPv4Type` or `IPv6Type` Family IPAddressType `json:"family"` //Sets failover mode for this IP. If true, then this IP is no longer available for DHCP and can no longer be related to any server. Failover bool `json:"failover,omitempty"` //Defines the reverse DNS entry for the IP Address (PTR Resource Record). ReverseDNS string `json:"reverse_dns,omitempty"` //List of labels. Labels []string `json:"labels,omitempty"` }
IPCreateRequest is JSON struct of a request for creating an IP
type IPCreateResponse ¶
type IPCreateResponse struct { //Request's UUID RequestUUID string `json:"request_uuid"` //UUID of the IP address being created ObjectUUID string `json:"object_uuid"` //The IP prefix. Prefix string `json:"prefix"` //The IP Address (v4 or v6). IP string `json:"ip"` }
IPCreateResponse is JSON struct of a response for creating an IP
type IPList ¶
type IPList struct { //Array of IP addresses List map[string]IPProperties `json:"ips"` }
IPList is JSON struct of a list of IPs
type IPLoadbalancer ¶
type IPLoadbalancer struct { //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. LoadbalancerName string `json:"loadbalancer_name"` //The UUID of loadbalancer. LoadbalancerUUID string `json:"loadbalancer_uuid"` }
IPLoadbalancer is JSON struct of the relation between an IP and a Load Balancer
type IPOperator ¶ added in v3.2.0
type IPOperator interface { GetIP(ctx context.Context, id string) (IP, error) GetIPList(ctx context.Context) ([]IP, error) CreateIP(ctx context.Context, body IPCreateRequest) (IPCreateResponse, error) DeleteIP(ctx context.Context, id string) error UpdateIP(ctx context.Context, id string, body IPUpdateRequest) error GetIPEventList(ctx context.Context, id string) ([]Event, error) GetIPVersion(ctx context.Context, id string) int GetIPsByLocation(ctx context.Context, id string) ([]IP, error) GetDeletedIPs(ctx context.Context) ([]IP, error) }
IPOperator is an interface defining API of an IP operator
type IPProperties ¶
type IPProperties struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. LocationCountry string `json:"location_country"` //Helps to identify which datacenter an object belongs to. LocationUUID string `json:"location_uuid"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //Defines the reverse DNS entry for the IP Address (PTR Resource Record). ReverseDNS string `json:"reverse_dns"` //Enum:4 6. The IP Address family (v4 or v6) Family int `json:"family"` //Status indicates the status of the object. Status string `json:"status"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //Sets failover mode for this IP. If true, then this IP is no longer available for DHCP and can no longer be related to any server. Failover bool `json:"failover"` //Defines the date and time of the last object change. ChangeTime GSTime `json:"change_time"` //Uses IATA airport code, which works as a location identifier. LocationIata string `json:"location_iata"` //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. LocationName string `json:"location_name"` //The IP prefix. Prefix string `json:"prefix"` //Defines the IP Address (v4 or v6). IP string `json:"ip"` //Defines if the object is administratively blocked. If true, it can not be deleted by the user. DeleteBlock bool `json:"delete_block"` //Total minutes the object has been running. UsagesInMinutes float64 `json:"usage_in_minutes"` //The price for the current period since the last bill. CurrentPrice float64 `json:"current_price"` //List of labels. Labels []string `json:"labels"` //The information about other object which are related to this IP. the object could be servers and/or loadbalancer. Relations IPRelations `json:"relations"` }
IPProperties is JSON struct of an IP's properties
type IPRelations ¶
type IPRelations struct { //Array of object (IPLoadbalancer) Loadbalancers []IPLoadbalancer `json:"loadbalancers"` //Array of object (IPServer) Servers []IPServer `json:"servers"` //Array of object (ServerIPRelationProperties) PublicIPs []ServerIPRelationProperties `json:"public_ips"` //Array of object (ServerStorageRelationProperties) Storages []ServerStorageRelationProperties `json:"storages"` }
IPRelations is JSON struct of a list of an IP's relations
type IPServer ¶
type IPServer struct { //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. ServerName string `json:"server_name"` //The UUID of the server. ServerUUID string `json:"server_uuid"` }
IPServer is JSON struct of the relation between an IP and a Server
type IPUpdateRequest ¶
type IPUpdateRequest struct { //New name. Leave it if you do not want to update the name Name string `json:"name,omitempty"` //Sets failover mode for this IP. If true, then this IP is no longer available for DHCP and can no longer be related to any server. Failover bool `json:"failover"` //Defines the reverse DNS entry for the IP Address (PTR Resource Record). Leave it if you do not want to update the reverse DNS. ReverseDNS string `json:"reverse_dns,omitempty"` //List of labels. Leave it if you do not want to update the labels. Labels *[]string `json:"labels,omitempty"` }
IPUpdateRequest is JSON struct of a request for updating an IP
type ISOImage ¶
type ISOImage struct { //Properties of an ISO-image Properties ISOImageProperties `json:"isoimage"` }
ISOImage is JSON struct of a list an ISO image
type ISOImageCreateRequest ¶
type ISOImageCreateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //The source URL from which the ISO-Image should be downloaded. SourceURL string `json:"source_url"` //List of labels. Can be leave empty. Labels []string `json:"labels,omitempty"` }
ISOImageCreateRequest is JSON struct of a request for creating an ISO-Image
type ISOImageCreateResponse ¶
type ISOImageCreateResponse struct { //Request's UUID RequestUUID string `json:"request_uuid"` //UUID of an ISO-image being created ObjectUUID string `json:"object_uuid"` }
ISOImageCreateResponse is JSON struct of a response for creating an ISO-Image
type ISOImageList ¶
type ISOImageList struct { //List of ISO-images List map[string]ISOImageProperties `json:"isoimages"` }
ISOImageList is JSON struct of a list of ISO images
type ISOImageOperator ¶ added in v3.2.0
type ISOImageOperator interface { GetISOImageList(ctx context.Context) ([]ISOImage, error) GetISOImage(ctx context.Context, id string) (ISOImage, error) CreateISOImage(ctx context.Context, body ISOImageCreateRequest) (ISOImageCreateResponse, error) UpdateISOImage(ctx context.Context, id string, body ISOImageUpdateRequest) error DeleteISOImage(ctx context.Context, id string) error GetISOImageEventList(ctx context.Context, id string) ([]Event, error) GetISOImagesByLocation(ctx context.Context, id string) ([]ISOImage, error) GetDeletedISOImages(ctx context.Context) ([]ISOImage, error) }
ISOImageOperator is an interface defining API of an ISO-image operator
type ISOImageProperties ¶
type ISOImageProperties struct { //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //The information about other object which are related to this isoimage. Relations ISOImageRelation `json:"relations"` //Description of the ISO-Image release. Description string `json:"description"` //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. LocationName string `json:"location_name"` //Contains the source URL of the ISO-Image that it was originally fetched from. SourceURL string `json:"source_url"` //List of labels Labels []string `json:"labels"` //Uses IATA airport code, which works as a location identifier. LocationIata string `json:"location_iata"` //Helps to identify which datacenter an object belongs to. LocationUUID string `json:"location_uuid"` //Status indicates the status of the object. Status string `json:"status"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //Upstream version of the ISO-Image release Version string `json:"version"` //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. LocationCountry string `json:"location_country"` //Total minutes the object has been running. UsageInMinutes int `json:"usage_in_minutes"` //Whether the ISO-Image is private or not. Private bool `json:"private"` //Defines the date and time of the last object change. ChangeTime GSTime `json:"change_time"` //The capacity of an ISO-Image in GB. Capacity int `json:"capacity"` //The price for the current period since the last bill. CurrentPrice float64 `json:"current_price"` }
ISOImageProperties is JSON struct of properties of an ISO image
type ISOImageRelation ¶
type ISOImageRelation struct { //Array of object (ServerinIsoimage) Servers []ServerinISOImage `json:"servers"` }
ISOImageRelation is JSON struct of a list of an ISO-Image's relations
type ISOImageUpdateRequest ¶
type ISOImageUpdateRequest struct { //New name. Leave it if you do not want to update the name. Name string `json:"name,omitempty"` //List of labels. Leave it if you do not want to update the list of labels. Labels *[]string `json:"labels,omitempty"` }
ISOImageUpdateRequest is JSON struct of a request for updating an ISO-Image
type Label ¶
type Label struct { //Properties of a label Properties LabelProperties `json:"label"` }
Label JSON struct of a single label
type LabelCreateRequest ¶
type LabelCreateRequest struct { //Name of the new label Label string `json:"label"` }
LabelCreateRequest JSON struct of a request for creating a label
type LabelList ¶
type LabelList struct { //List of labels List map[string]LabelProperties `json:"labels"` }
LabelList JSON struct of a list of labels
type LabelOperator ¶ added in v3.2.0
LabelOperator is an interface defining API of a label operator
type LabelProperties ¶
type LabelProperties struct { //Label's name Label string `json:"label"` //Create time of a label CreateTime GSTime `json:"create_time"` //Time of the last change of a label ChangeTime GSTime `json:"change_time"` //Relations of a label Relations []interface{} `json:"relations"` //Status indicates the status of a label. Status string `json:"status"` }
LabelProperties JSON struct of properties of a label
type LoadBalancer ¶
type LoadBalancer struct { //Properties of a loadbalancer Properties LoadBalancerProperties `json:"loadbalancer"` }
LoadBalancer is the JSON struct of a loadbalancer
type LoadBalancerCreateRequest ¶
type LoadBalancerCreateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. ListenIPv6UUID string `json:"listen_ipv6_uuid"` //The UUID of the IPv4 address the loadbalancer will listen to for incoming requests. ListenIPv4UUID string `json:"listen_ipv4_uuid"` //The algorithm used to process requests. Allowed values: `LoadbalancerRoundrobinAlg`, `LoadbalancerLeastConnAlg` Algorithm LoadbalancerAlgorithm `json:"algorithm"` //An array of ForwardingRule objects containing the forwarding rules for the loadbalancer ForwardingRules []ForwardingRule `json:"forwarding_rules"` //The servers that this loadbalancer can communicate with BackendServers []BackendServer `json:"backend_servers"` //List of labels. Labels []string `json:"labels"` //Whether the Load balancer is forced to redirect requests from HTTP to HTTPS RedirectHTTPToHTTPS bool `json:"redirect_http_to_https"` //Status indicates the status of the object. Status string `json:"status,omitempty"` }
LoadBalancerCreateRequest is the JSON struct for creating a loadbalancer request
type LoadBalancerCreateResponse ¶
type LoadBalancerCreateResponse struct { //Request's UUID RequestUUID string `json:"request_uuid"` //UUID of the loadbalancer being created ObjectUUID string `json:"object_uuid"` }
LoadBalancerCreateResponse is the JSON struct for a loadbalancer response
type LoadBalancerOperator ¶ added in v3.2.0
type LoadBalancerOperator interface { GetLoadBalancerList(ctx context.Context) ([]LoadBalancer, error) GetLoadBalancer(ctx context.Context, id string) (LoadBalancer, error) CreateLoadBalancer(ctx context.Context, body LoadBalancerCreateRequest) (LoadBalancerCreateResponse, error) UpdateLoadBalancer(ctx context.Context, id string, body LoadBalancerUpdateRequest) error DeleteLoadBalancer(ctx context.Context, id string) error GetLoadBalancerEventList(ctx context.Context, id string) ([]Event, error) }
LoadBalancerOperator an interface defining API of a loadbalancer operator
type LoadBalancerProperties ¶
type LoadBalancerProperties struct { //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //Defines the numbering of the Data Centers on a given IATA location (e.g. where fra is the location_iata, the site is then 1, 2, 3, ...). LocationSite string `json:"location_site"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //Forwarding rules of a loadbalancer ForwardingRules []ForwardingRule `json:"forwarding_rules"` //Uses IATA airport code, which works as a location identifier. LocationIata string `json:"location_iata"` //Helps to identify which datacenter an object belongs to. LocationUUID string `json:"location_uuid"` //The servers that this Load balancer can communicate with. BackendServers []BackendServer `json:"backend_servers"` //Defines the date and time of the last object change. ChangeTime GSTime `json:"change_time"` //Status indicates the status of the object. Status string `json:"status"` //The price for the current period since the last bill. CurrentPrice float64 `json:"current_price"` //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. LocationCountry string `json:"location_country"` //Whether the Load balancer is forced to redirect requests from HTTP to HTTPS. RedirectHTTPToHTTPS bool `json:"redirect_http_to_https"` //List of labels. Labels []string `json:"labels"` //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. LocationName string `json:"location_name"` //Total minutes of cores used UsageInMinutes int `json:"usage_in_minutes"` //The algorithm used to process requests. Accepted values: roundrobin / leastconn. Algorithm string `json:"algorithm"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //The UUID of the IPv6 address the Load balancer will listen to for incoming requests. ListenIPv6UUID string `json:"listen_ipv6_uuid"` //The UUID of the IPv4 address the Load balancer will listen to for incoming requests. ListenIPv4UUID string `json:"listen_ipv4_uuid"` }
LoadBalancerProperties is the properties of a loadbalancer
type LoadBalancerUpdateRequest ¶
type LoadBalancerUpdateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. ListenIPv6UUID string `json:"listen_ipv6_uuid"` //The UUID of the IPv4 address the loadbalancer will listen to for incoming requests. ListenIPv4UUID string `json:"listen_ipv4_uuid"` //The algorithm used to process requests. Allowed values: `LoadbalancerRoundrobinAlg`, `LoadbalancerLeastConnAlg` Algorithm LoadbalancerAlgorithm `json:"algorithm"` //An array of ForwardingRule objects containing the forwarding rules for the loadbalancer ForwardingRules []ForwardingRule `json:"forwarding_rules"` //The servers that this loadbalancer can communicate with BackendServers []BackendServer `json:"backend_servers"` //List of labels. Labels []string `json:"labels"` //Whether the Load balancer is forced to redirect requests from HTTP to HTTPS RedirectHTTPToHTTPS bool `json:"redirect_http_to_https"` //Status indicates the status of the object. Status string `json:"status,omitempty"` }
LoadBalancerUpdateRequest is the JSON struct for updating a loadbalancer request
type LoadBalancers ¶
type LoadBalancers struct { //Array of loadbalancers List map[string]LoadBalancerProperties `json:"loadbalancers"` }
LoadBalancers is the JSON struct of a list of loadbalancers
type LoadbalancerAlgorithm ¶ added in v3.2.0
type LoadbalancerAlgorithm string
var ( LoadbalancerRoundrobinAlg LoadbalancerAlgorithm = "roundrobin" LoadbalancerLeastConnAlg LoadbalancerAlgorithm = "leastconn" )
All available loadbalancer algorithms
type Location ¶
type Location struct { //Properties of a location Properties LocationProperties `json:"location"` }
Location JSON struct of a single location
type LocationList ¶
type LocationList struct { //Array of locations List map[string]LocationProperties `json:"locations"` }
LocationList JSON struct of a list of locations
type LocationOperator ¶ added in v3.2.0
type LocationOperator interface { GetLocationList(ctx context.Context) ([]Location, error) GetLocation(ctx context.Context, id string) (Location, error) }
LocationOperator an interface defining API of a location operator
type LocationProperties ¶
type LocationProperties struct { //Uses IATA airport code, which works as a location identifier. Iata string `json:"iata"` //Status indicates the status of the object. Status string `json:"status"` //List of labels. Labels []string `json:"labels"` //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. Country string `json:"country"` }
LocationProperties JSON struct of properties of a location
type MarketplaceApplication ¶ added in v3.2.0
type MarketplaceApplication struct { //Properties of a market application Properties MarketplaceApplicationProperties `json:"application"` }
MarketplaceApplication JSON struct of a single market application
type MarketplaceApplicationCategory ¶ added in v3.2.0
type MarketplaceApplicationCategory string
var ( MarketplaceApplicationCMSCategory MarketplaceApplicationCategory = "CMS" MarketplaceApplicationProjectManagementCategory MarketplaceApplicationCategory = "project management" MarketplaceApplicationAdminpanelCategory MarketplaceApplicationCategory = "Adminpanel" MarketplaceApplicationCollaborationCategory MarketplaceApplicationCategory = "Collaboration" MarketplaceApplicationCloudStorageCategory MarketplaceApplicationCategory = "Cloud Storage" MarketplaceApplicationArchivingCategory MarketplaceApplicationCategory = "Archiving" )
All allowed Marketplace application category's values
type MarketplaceApplicationCreateRequest ¶ added in v3.2.0
type MarketplaceApplicationCreateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //Path to the images for the application, must be in .gz format and started with s3// ObjectStoragePath string `json:"object_storage_path"` //Category of the marketplace application. Allowed values: not-set, MarketplaceApplicationCMSCategory, MarketplaceApplicationProjectManagementCategory, MarketplaceApplicationAdminpanelCategory, //MarketplaceApplicationCollaborationCategory, MarketplaceApplicationCloudStorageCategory, MarketplaceApplicationArchivingCategory. Optional. Category MarketplaceApplicationCategory `json:"category,omitempty"` //whether you want to publish your application or not. Optional Publish *bool `json:"publish,omitempty"` //Application's setup, consist the number of resource for creating the application Setup MarketplaceApplicationSetup `json:"setup"` //Metadata of application Metadata *MarketplaceApplicationMetadata `json:"metadata,omitempty"` }
MarketplaceApplicationCreateRequest JSON struct of a request for creating a marketplace application
type MarketplaceApplicationCreateResponse ¶ added in v3.2.0
type MarketplaceApplicationCreateResponse struct { //UUID of the object being created ObjectUUID string `json:"object_uuid"` //UUID of the request RequestUUID string `json:"request_uuid"` //Unique hash for importing this marketplace application UniqueHash string `json:"unique_hash"` }
MarketplaceApplicationCreateResponse JSON struct of a response for a marketplace application's creation
type MarketplaceApplicationImportRequest ¶ added in v3.2.0
type MarketplaceApplicationImportRequest struct { //Unique hash for importing this marketplace application UniqueHash string `json:"unique_hash"` }
MarketplaceApplicationImportRequest JSON struct of a request for importing a marketplace application
type MarketplaceApplicationList ¶ added in v3.2.0
type MarketplaceApplicationList struct { //Array of market applications List map[string]MarketplaceApplicationProperties `json:"applications"` }
MarketplaceApplicationList JSON struct of a list of market applications
type MarketplaceApplicationMetadata ¶ added in v3.2.0
type MarketplaceApplicationMetadata struct { License string `json:"license"` OS string `json:"os"` Components []string `json:"components"` Overview string `json:"overview"` Hints string `json:"hints"` Icon string `json:"icon"` Features string `json:"features"` TermsOfUse string `json:"terms_of_use"` Authors string `json:"authors"` Advices string `json:"advices"` }
MarketplaceApplicationMetadata JSON struct of metadata of marketplace application
type MarketplaceApplicationOperator ¶ added in v3.2.0
type MarketplaceApplicationOperator interface { GetMarketplaceApplicationList(ctx context.Context) ([]MarketplaceApplication, error) GetMarketplaceApplication(ctx context.Context, id string) (MarketplaceApplication, error) CreateMarketplaceApplication(ctx context.Context, body MarketplaceApplicationCreateRequest) (MarketplaceApplicationCreateResponse, error) ImportMarketplaceApplication(ctx context.Context, body MarketplaceApplicationImportRequest) (MarketplaceApplicationCreateResponse, error) UpdateMarketplaceApplication(ctx context.Context, id string, body MarketplaceApplicationUpdateRequest) error DeleteMarketplaceApplication(ctx context.Context, id string) error GetMarketplaceApplicationEventList(ctx context.Context, id string) ([]Event, error) }
MarketplaceApplicationOperator an interface defining API of a marketplace application operator
type MarketplaceApplicationProperties ¶ added in v3.2.0
type MarketplaceApplicationProperties struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //Unique hash to allow user to import the self-created marketplace application UniqueHash string `json:"unique_hash"` //Path to the images of the application ObjectStoragePath string `json:"object_storage_path"` //Whether the you are the owner of application or not. IsApplicationOwner bool `json:"application_owner"` //Setup of the application Setup MarketplaceApplicationSetup `json:"setup"` //Whether the template is published by the partner to their tenant. Published bool `json:"published"` //The date when the template is published into other tenant in the same partner. PublishedDate GSTime `json:"published_date"` //Whether the tenants want their template to be published or not. PublishRequested bool `json:"publish_requested"` //The date when the tenant requested their template to be published. PublishRequestedDate GSTime `json:"publish_requested_date"` //Whether a partner wants their tenant template published to other partners. PublishGlobalRequested bool `json:"publish_global_requested"` //The date when a partner requested their tenants template to be published. PublishGlobalRequestedDate GSTime `json:"publish_global_requested_date"` //Whether a template is published to other partner or not. PublishedGlobal bool `json:"published_global"` //The date when a template is published to other partner. PublishedGlobalDate GSTime `json:"published_global_date"` //Enum:"CMS", "project management", "Adminpanel", "Collaboration", "Cloud Storage", "Archiving" //Category of marketplace application Category string `json:"category"` //Metadata of the Application Metadata MarketplaceApplicationMetadata `json:"metadata"` //Defines the date and time of the last object change. ChangeTime GSTime `json:"change_time"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //Status indicates the status of the object. Status string `json:"status"` //The type of template ApplicationType string `json:"application_type"` }
MarketplaceApplicationProperties JSON struct of properties of a market application
type MarketplaceApplicationSetup ¶ added in v3.2.0
type MarketplaceApplicationSetup struct { //Number of server cores. Cores int `json:"cores"` //The capacity of server memory in GB. Memory int `json:"memory"` //The capacity of a storage in GB. Capacity int `json:"capacity"` }
MarketplaceApplicationSetup JSON struct of marketplace application's setup
type MarketplaceApplicationUpdateRequest ¶ added in v3.2.0
type MarketplaceApplicationUpdateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Optional. Name string `json:"name,omitempty"` //Path to the images for the application, must be in .gz format and started with s3// . Optional. ObjectStoragePath string `json:"object_storage_path,omitempty"` //Category of the marketplace application. Allowed values: not-set, MarketplaceApplicationCMSCategory, MarketplaceApplicationProjectManagementCategory, MarketplaceApplicationAdminpanelCategory, //MarketplaceApplicationCollaborationCategory, MarketplaceApplicationCloudStorageCategory, MarketplaceApplicationArchivingCategory. Optional. Category MarketplaceApplicationCategory `json:"category,omitempty"` //whether you want to publish your application or not. Optional Publish *bool `json:"publish,omitempty"` //Application's setup, consist the number of resource for creating the application Setup *MarketplaceApplicationSetup `json:"setup,omitempty"` //Metadata of application Metadata *MarketplaceApplicationMetadata `json:"metadata,omitempty"` }
MarketplaceApplicationUpdateRequest JSON struct of a request for updating a marketplace application
type Network ¶
type Network struct { //Properties of a network Properties NetworkProperties `json:"network"` }
Network is JSON struct of a single network
type NetworkCreateRequest ¶
type NetworkCreateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //List of labels. Can be empty. Labels []string `json:"labels,omitempty"` //Defines information about MAC spoofing protection (filters layer2 and ARP traffic based on MAC source). //It can only be (de-)activated on a private network - the public network always has l2security enabled. //It will be true if the network is public, and false if the network is private. L2Security bool `json:"l2security,omitempty"` }
NetworkCreateRequest is JSON of a request for creating a network
type NetworkCreateResponse ¶
type NetworkCreateResponse struct { //UUID of the network being created ObjectUUID string `json:"object_uuid"` //UUID of the request RequestUUID string `json:"request_uuid"` }
NetworkCreateResponse is JSON of a response for creating a network
type NetworkInFirewall ¶
type NetworkInFirewall struct { //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //The UUID of the network you're requesting. NetworkUUID string `json:"network_uuid"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. NetworkName string `json:"network_name"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. ObjectName string `json:"object_name"` }
NetworkInFirewall is a JSON struct of a firewall's relation
type NetworkList ¶
type NetworkList struct { //Array of networks List map[string]NetworkProperties `json:"networks"` }
NetworkList is JSON struct of a list of networks
type NetworkOperator ¶ added in v3.2.0
type NetworkOperator interface { GetNetwork(ctx context.Context, id string) (Network, error) GetNetworkList(ctx context.Context) ([]Network, error) CreateNetwork(ctx context.Context, body NetworkCreateRequest) (NetworkCreateResponse, error) DeleteNetwork(ctx context.Context, id string) error UpdateNetwork(ctx context.Context, id string, body NetworkUpdateRequest) error GetNetworkEventList(ctx context.Context, id string) ([]Event, error) GetNetworkPublic(ctx context.Context) (Network, error) GetNetworksByLocation(ctx context.Context, id string) ([]Network, error) GetDeletedNetworks(ctx context.Context) ([]Network, error) }
NetworkOperator an interface defining API of a network operator
type NetworkPaaSSecurityZone ¶
type NetworkPaaSSecurityZone struct { //IPv6 prefix of the PaaS service IPv6Prefix string `json:"ipv6_prefix"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. ObjectName string `json:"object_name"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` }
type NetworkProperties ¶
type NetworkProperties struct { //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. LocationCountry string `json:"location_country"` //Helps to identify which datacenter an object belongs to. LocationUUID string `json:"location_uuid"` //True if the network is public. If private it will be false. PublicNet bool `json:"public_net"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //One of 'network', 'network_high' or 'network_insane'. NetworkType string `json:"network_type"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //Status indicates the status of the object. Status string `json:"status"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //Defines information about MAC spoofing protection (filters layer2 and ARP traffic based on MAC source). //It can only be (de-)activated on a private network - the public network always has l2security enabled. //It will be true if the network is public, and false if the network is private. L2Security bool `json:"l2security"` //Defines the date and time of the last object change. ChangeTime GSTime `json:"change_time"` //Uses IATA airport code, which works as a location identifier. LocationIata string `json:"location_iata"` //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. LocationName string `json:"location_name"` //Defines if the object is administratively blocked. If true, it can not be deleted by the user. DeleteBlock bool `json:"delete_block"` //List of labels. Labels []string `json:"labels"` //The information about other object which are related to this network. the object could be servers and/or vlans Relations NetworkRelations `json:"relations"` }
NetworkProperties is JSON struct of a network's properties
type NetworkRelations ¶
type NetworkRelations struct { //Array of object (NetworkVlan) Vlans []NetworkVlan `json:"vlans"` //Array of object (NetworkServer) Servers []NetworkServer `json:"servers"` //Array of object (NetworkPaaSSecurityZone) PaaSSecurityZones []NetworkPaaSSecurityZone `json:"paas_security_zones"` }
NetworkRelations is JSON struct of a list of a network's relations
type NetworkServer ¶
type NetworkServer struct { //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //Network_mac defines the MAC address of the network interface. Mac string `json:"mac"` //Whether the server boots from this iso image or not. Bootdevice bool `json:"bootdevice"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //Defines information about IP prefix spoof protection (it allows source traffic only from the IPv4/IPv4 network prefixes). //If empty, it allow no IPv4/IPv6 source traffic. If set to null, l3security is disabled (default). L3security []string `json:"l3security"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. ObjectName string `json:"object_name"` //The UUID of the network you're requesting. NetworkUUID string `json:"network_uuid"` //The ordering of the network interfaces. Lower numbers have lower PCI-IDs. Ordering int `json:"ordering"` }
NetworkServer is JSON struct of a relation between a network and a server
type NetworkUpdateRequest ¶
type NetworkUpdateRequest struct { //New name. Leave it if you do not want to update the name Name string `json:"name,omitempty"` //L2Security. Leave it if you do not want to update the l2 security L2Security bool `json:"l2security"` //List of labels. Can be empty. Labels *[]string `json:"labels,omitempty"` }
NetworkUpdateRequest is JSON of a request for updating a network
type NetworkVlan ¶
type NetworkVlan struct { //Vlan Vlan int `json:"vlan"` //Name of tenant TenantName string `json:"tenant_name"` //UUID of tenant TenantUUID string `json:"tenant_uuid"` }
NetworkVlan is JSON struct of a relation between a network and a VLAN
type ObjectStorageAccessKey ¶
type ObjectStorageAccessKey struct { //Properties of an object storage access key Properties ObjectStorageAccessKeyProperties `json:"access_key"` }
ObjectStorageAccessKey is JSON structure of a single Object Storage Access Key
type ObjectStorageAccessKeyCreateResponse ¶
type ObjectStorageAccessKeyCreateResponse struct { AccessKey struct { ////The object storage secret_key. SecretKey string `json:"secret_key"` //The object storage secret_key. AccessKey string `json:"access_key"` } `json:"access_key"` //UUID of the request RequestUUID string `json:"request_uuid"` }
ObjectStorageAccessKeyCreateResponse is JSON struct of a response for creating an object storage access key
type ObjectStorageAccessKeyList ¶
type ObjectStorageAccessKeyList struct { //Array of Object Storages' access keys List []ObjectStorageAccessKeyProperties `json:"access_keys"` }
ObjectStorageAccessKeyList is JSON structure of a list of Object Storage Access Keys
type ObjectStorageAccessKeyProperties ¶
type ObjectStorageAccessKeyProperties struct { //The object storage secret_key. SecretKey string `json:"secret_key"` //The object storage access_key. AccessKey string `json:"access_key"` //Account this credentials belong to. User string `json:"user"` }
ObjectStorageAccessKeyProperties is JSON struct of properties of an object storage access key
type ObjectStorageBucket ¶
type ObjectStorageBucket struct { //Properties of a bucket Properties ObjectStorageBucketProperties `json:"bucket"` }
ObjectStorageBucket is JSON struct of a single bucket
type ObjectStorageBucketList ¶
type ObjectStorageBucketList struct { //Array of Buckets List []ObjectStorageBucketProperties `json:"buckets"` }
ObjectStorageBucketList is JSON struct of a list of buckets
type ObjectStorageBucketProperties ¶
type ObjectStorageBucketProperties struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //The current usage of the bucket. Usage struct { //The size of the the bucket (in kb). SizeKb int `json:"size_kb"` //The number of files in the bucket. NumObjects int `json:"num_objects"` } `json:"usage"` }
ObjectStorageBucketProperties is JSON struct of properties of a bucket
type ObjectStorageOperator ¶ added in v3.2.0
type ObjectStorageOperator interface { GetObjectStorageAccessKeyList(ctx context.Context) ([]ObjectStorageAccessKey, error) GetObjectStorageAccessKey(ctx context.Context, id string) (ObjectStorageAccessKey, error) CreateObjectStorageAccessKey(ctx context.Context) (ObjectStorageAccessKeyCreateResponse, error) DeleteObjectStorageAccessKey(ctx context.Context, id string) error GetObjectStorageBucketList(ctx context.Context) ([]ObjectStorageBucket, error) }
ObjectStorageOperator is an interface defining API of an object storage operator
type PaaSMetricProperties ¶
type PaaSMetricProperties struct { //Defines the begin of the time range. BeginTime GSTime `json:"begin_time"` //Defines the end of the time range. EndTime GSTime `json:"end_time"` //The UUID of an object is always unique, and refers to a specific object. PaaSServiceUUID string `json:"paas_service_uuid"` //CPU core usage CoreUsage PaaSMetricValue `json:"core_usage"` //Storage usage StorageSize PaaSMetricValue `json:"storage_size"` }
PaaSMetricProperties JSON of properties of a PaaS metric
type PaaSMetricValue ¶
type PaaSMetricValue struct { //Value Value float64 `json:"value"` //Unit of the value Unit string `json:"unit"` }
PaaSMetricValue JSON of a metric value
type PaaSOperator ¶ added in v3.2.0
type PaaSOperator interface { GetPaaSServiceList(ctx context.Context) ([]PaaSService, error) GetPaaSService(ctx context.Context, id string) (PaaSService, error) CreatePaaSService(ctx context.Context, body PaaSServiceCreateRequest) (PaaSServiceCreateResponse, error) UpdatePaaSService(ctx context.Context, id string, body PaaSServiceUpdateRequest) error DeletePaaSService(ctx context.Context, id string) error GetPaaSServiceMetrics(ctx context.Context, id string) ([]PaaSServiceMetric, error) GetPaaSTemplateList(ctx context.Context) ([]PaaSTemplate, error) GetDeletedPaaSServices(ctx context.Context) ([]PaaSService, error) RenewK8sCredentials(ctx context.Context, id string) error GetPaaSSecurityZoneList(ctx context.Context) ([]PaaSSecurityZone, error) GetPaaSSecurityZone(ctx context.Context, id string) (PaaSSecurityZone, error) CreatePaaSSecurityZone(ctx context.Context, body PaaSSecurityZoneCreateRequest) (PaaSSecurityZoneCreateResponse, error) UpdatePaaSSecurityZone(ctx context.Context, id string, body PaaSSecurityZoneUpdateRequest) error DeletePaaSSecurityZone(ctx context.Context, id string) error }
PaaSOperator is an interface defining API of a PaaS-related resource operator
type PaaSRelationService ¶
type PaaSRelationService struct { //Array of object (ServiceObject) Services []ServiceObject `json:"services"` }
PaaSRelationService JSON struct of a relation between a PaaS service and a service
type PaaSSecurityZone ¶
type PaaSSecurityZone struct { //Properties of a security zone Properties PaaSSecurityZoneProperties `json:"paas_security_zone"` }
PaaSSecurityZone JSON struct of a single PaaS security zone
type PaaSSecurityZoneCreateRequest ¶
type PaaSSecurityZoneCreateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` }
PaaSSecurityZoneCreateRequest JSON struct of a request for creating a PaaS security zone
type PaaSSecurityZoneCreateResponse ¶
type PaaSSecurityZoneCreateResponse struct { //UUID of the request RequestUUID string `json:"request_uuid"` //UUID of the security zone being created PaaSSecurityZoneUUID string `json:"paas_security_zone_uuid"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` }
PaaSSecurityZoneCreateResponse JSON struct of a response for creating a PaaS security zone
type PaaSSecurityZoneProperties ¶
type PaaSSecurityZoneProperties struct { //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. LocationCountry string `json:"location_country"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //Uses IATA airport code, which works as a location identifier. LocationIata string `json:"location_iata"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //List of labels. Labels []string `json:"labels"` //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. LocationName string `json:"location_name"` //Status indicates the status of the object. Status string `json:"status"` //Helps to identify which datacenter an object belongs to. LocationUUID string `json:"location_uuid"` //Defines the date and time of the last object change. ChangeTime GSTime `json:"change_time"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //object (PaaSRelationService) Relation PaaSRelationService `json:"relation"` }
PaaSSecurityZoneProperties JSOn struct of properties of a PaaS security zone
type PaaSSecurityZoneUpdateRequest ¶
type PaaSSecurityZoneUpdateRequest struct { //The new name you give to the security zone. Leave it if you do not want to update the name Name string `json:"name,omitempty"` //The UUID for the security zone you would like to update. Leave it if you do not want to update the security zone PaaSSecurityZoneUUID string `json:"paas_security_zone_uuid,omitempty"` }
PaaSSecurityZoneUpdateRequest JSON struct of a request for updating a PaaS security zone
type PaaSSecurityZones ¶
type PaaSSecurityZones struct { //Array of security zones List map[string]PaaSSecurityZoneProperties `json:"paas_security_zones"` }
PaaSSecurityZones JSON struct of a list of PaaS security zones
type PaaSService ¶
type PaaSService struct { //Properties of a PaaS service Properties PaaSServiceProperties `json:"paas_service"` }
PaaSService is the JSON struct of a single PaaS service
type PaaSServiceCreateRequest ¶
type PaaSServiceCreateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //The template used to create the service, you can find an available list at the /service_templates endpoint. PaaSServiceTemplateUUID string `json:"paas_service_template_uuid"` //The template used to create the service, you can find an available list at the /service_templates endpoint. Labels []string `json:"labels,omitempty"` //The UUID of the security zone that the service is running in. PaaSSecurityZoneUUID string `json:"paas_security_zone_uuid,omitempty"` //A list of service resource limits. ResourceLimits []ResourceLimit `json:"resource_limits,omitempty"` //Contains the service parameters for the service. Parameters map[string]interface{} `json:"parameters,omitempty"` }
PaaSServiceCreateRequest is JSON struct of a request for creating a PaaS service
type PaaSServiceCreateResponse ¶
type PaaSServiceCreateResponse struct { //UUID of the request RequestUUID string `json:"request_uuid"` //Contains the IPv6 address and port that the Service will listen to, you can use these details to connect internally to a service. ListenPorts map[string]map[string]int `json:"listen_ports"` //The template used to create the service, you can find an available list at the /service_templates endpoint. PaaSServiceUUID string `json:"paas_service_uuid"` //Contains the initial setup credentials for Service. Credentials []Credential `json:"credentials"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //A list of service resource limits. ResourceLimits []ResourceLimit `json:"resource_limits"` //Contains the service parameters for the service. Parameters map[string]interface{} `json:"parameters"` }
PaaSServiceCreateResponse is JSON struct of a response for creating a PaaS service
type PaaSServiceMetric ¶
type PaaSServiceMetric struct { //Properties of a PaaS service metric Properties PaaSMetricProperties `json:"paas_service_metric"` }
PaaSServiceMetric JSON of a single PaaS metric
type PaaSServiceMetrics ¶
type PaaSServiceMetrics struct { //Array of a PaaS service's metrics List []PaaSMetricProperties `json:"paas_service_metrics"` }
PaaSServiceMetrics JSON of a list of PaaS metrics
type PaaSServiceProperties ¶
type PaaSServiceProperties struct { //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //List of labels. Labels []string `json:"labels"` //Contains the initial setup credentials for Service. Credentials []Credential `json:"credentials"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //Contains the IPv6 address and port that the Service will listen to, //you can use these details to connect internally to a service. ListenPorts map[string]map[string]int `json:"listen_ports"` //The UUID of the security zone that the service is running in. SecurityZoneUUID string `json:"security_zone_uuid"` //The template used to create the service, you can find an available list at the /service_templates endpoint. ServiceTemplateUUID string `json:"service_template_uuid"` //Total minutes the object has been running. UsageInMinutes int `json:"usage_in_minutes"` //The price for the current period since the last bill. CurrentPrice float64 `json:"current_price"` //Defines the date and time of the last object change. ChangeTime GSTime `json:"change_time"` //Status indicates the status of the object. Status string `json:"status"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //A list of service resource limits. ResourceLimits []ResourceLimit `json:"resource_limits"` //Contains the service parameters for the service. Parameters map[string]interface{} `json:"parameters"` }
PaaSServiceProperties is the properties of a single PaaS service
type PaaSServiceUpdateRequest ¶
type PaaSServiceUpdateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. //Leave it if you do not want to update the name Name string `json:"name,omitempty"` //List of labels. Leave it if you do not want to update the list of labels Labels *[]string `json:"labels,omitempty"` //Contains the service parameters for the service. Leave it if you do not want to update the parameters Parameters map[string]interface{} `json:"parameters,omitempty"` //A list of service resource limits. Leave it if you do not want to update the resource limits ResourceLimits []ResourceLimit `json:"resource_limits,omitempty"` }
PaaSServiceUpdateRequest JSON of a request for updating a PaaS service
type PaaSServices ¶
type PaaSServices struct { //Array of PaaS services List map[string]PaaSServiceProperties `json:"paas_services"` }
PaaSServices is the JSON struct of a list of PaaS services
type PaaSTemplate ¶
type PaaSTemplate struct { //Properties of a PaaS template Properties PaaSTemplateProperties `json:"paas_service_template"` }
PaaSTemplate is JSON struct for a single PaaS Template
type PaaSTemplateProperties ¶
type PaaSTemplateProperties struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //Describes the category of the service. Category string `json:"category"` //Product No ProductNo int `json:"product_no"` //List of labels. Labels []string `json:"labels"` //The amount of concurrent connections for the service. Resources Resource `json:"resources"` //Status indicates the status of the object. Status string `json:"status"` //A definition of possible service template parameters (python-cerberus compatible). ParametersSchema map[string]Parameter `json:"parameters_schema"` }
PaaSTemplateProperties is JSOn struct of properties of a PaaS template
type PaaSTemplates ¶
type PaaSTemplates struct { //Array of PaaS templates List map[string]PaaSTemplateProperties `json:"paas_service_templates"` }
PaaSTemplates is JSON struct of a list of PaaS Templates
type Parameter ¶
type Parameter struct { //Is required Required bool `json:"required"` //Is empty Empty bool `json:"empty"` //Description of parameter Description string `json:"description"` //Maximum Max int `json:"max"` //Minimum Min int `json:"min"` //Default value Default interface{} `json:"default"` //Type of parameter Type string `json:"type"` //Allowed values Allowed []string `json:"allowed"` //Regex Regex string `json:"regex"` }
Parameter JSON of a parameter
type PasswordType ¶ added in v3.2.0
type PasswordType string
const ( PlainPasswordType PasswordType = "plain" CryptPasswordType PasswordType = "crypt" )
All allowed password type's values
type RequestError ¶
type RequestError struct { Title string `json:"title"` Description string `json:"description"` StatusCode int RequestUUID string }
RequestError error of a request
type RequestStatus ¶
type RequestStatus map[string]RequestStatusProperties
RequestStatus status of a request
type RequestStatusProperties ¶
type RequestStatusProperties struct { Status string `json:"status"` Message string `json:"message"` CreateTime GSTime `json:"create_time"` }
RequestStatusProperties JSON struct of properties of a request's status
type Resource ¶
type Resource struct { //The amount of memory required by the service, either RAM(MB) or SSD Storage(GB). Memory int `json:"memory"` //The amount of concurrent connections for the service. Connections int `json:"connections"` }
Resource JSON of a resource
type ResourceLimit ¶
type ResourceLimit struct { //The name of the resource you would like to cap. Resource string `json:"resource"` //The maximum number of the specific resource your service can use. Limit int `json:"limit"` }
ResourceLimit is JSON struct of resource limit
type S3auth ¶
type S3auth struct { //Host of S3 Host string `json:"host"` //Access key of S3 AccessKey string `json:"access_key"` //Secret key of S3 SecretKey string `json:"secret_key"` }
S3auth JSON struct of S3 authentication data
type S3data ¶
type S3data struct { //Host of S3 Host string `json:"host"` //Bucket that file will be uploaded to Bucket string `json:"bucket"` //Name of the file being uploaded Filename string `json:"filename"` //Is the file private? Private bool `json:"private"` }
S3data JSON struct of info about snapshot being uploaded
type SSHKeyOperator ¶ added in v3.2.0
type SSHKeyOperator interface { GetSshkey(ctx context.Context, id string) (Sshkey, error) GetSshkeyList(ctx context.Context) ([]Sshkey, error) CreateSshkey(ctx context.Context, body SshkeyCreateRequest) (CreateResponse, error) DeleteSshkey(ctx context.Context, id string) error UpdateSshkey(ctx context.Context, id string, body SshkeyUpdateRequest) error GetSshkeyEventList(ctx context.Context, id string) ([]Event, error) }
SSHKeyOperator is an interface defining API of a SSH-key operator
type Server ¶
type Server struct { //Properties of a server Properties ServerProperties `json:"server"` }
Server JSON struct of a single server
type ServerCreateRequest ¶
type ServerCreateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //The amount of server memory in GB. Memory int `json:"memory"` //The number of server cores. Cores int `json:"cores"` //Specifies the hardware settings for the virtual machine. //Allowed values: DefaultServerHardware, NestedServerHardware, LegacyServerHardware, CiscoCSRServerHardware, //SophosUTMServerHardware, F5BigipServerHardware, Q35ServerHardware, Q35NestedServerHardware. //HardwareProfile is not set => server hardware is normal type HardwareProfile ServerHardwareProfile `json:"hardware_profile,omitempty"` //Defines which Availability-Zone the Server is placed. Can be empty AvailablityZone string `json:"availability_zone,omitempty"` //List of labels. Can be empty. Labels []string `json:"labels,omitempty"` //Status indicates the status of the object. Can be empty Status string `json:"status,omitempty"` //If the server should be auto-started in case of a failure (default=true when AutoRecovery=nil). AutoRecovery *bool `json:"auto_recovery,omitempty"` //The information about other object which are related to this server. the object could be ip, storage, network, and isoimage. //*Caution: This field will be deprecated. Relations *ServerCreateRequestRelations `json:"relations,omitempty"` }
ServerCreateRequest JSON struct of a request for creating a server
type ServerCreateRequestIP ¶
type ServerCreateRequestIP struct { //UUID of the IP address being attached to the server IPaddrUUID string `json:"ipaddr_uuid"` }
ServerCreateRequestIP JSON struct of a relation between a server and an IP address
type ServerCreateRequestIsoimage ¶
type ServerCreateRequestIsoimage struct { //UUID of the ISO-image being attached to the server IsoimageUUID string `json:"isoimage_uuid"` }
ServerCreateRequestIsoimage JSON struct of a relation between a server and an ISO-Image
type ServerCreateRequestNetwork ¶
type ServerCreateRequestNetwork struct { //UUID of the networks being attached to the server NetworkUUID string `json:"network_uuid"` //Is the network a boot device? BootDevice bool `json:"bootdevice,omitempty"` }
ServerCreateRequestNetwork JSON struct of a relation between a server and a network
type ServerCreateRequestRelations ¶
type ServerCreateRequestRelations struct { //Array of objects (ServerCreateRequestIsoimage) IsoImages []ServerCreateRequestIsoimage `json:"isoimages"` //Array of objects (ServerCreateRequestNetwork) Networks []ServerCreateRequestNetwork `json:"networks"` //Array of objects (ServerCreateRequestIP) PublicIPs []ServerCreateRequestIP `json:"public_ips"` //Array of objects (ServerCreateRequestStorage) Storages []ServerCreateRequestStorage `json:"storages"` }
ServerCreateRequestRelations JSOn struct of a list of a server's relations
type ServerCreateRequestStorage ¶
type ServerCreateRequestStorage struct { //UUID of the storage being attached to the server StorageUUID string `json:"storage_uuid"` //Is the storage a boot device? BootDevice bool `json:"bootdevice,omitempty"` }
ServerCreateRequestStorage JSON struct of a relation between a server and a storage
type ServerCreateResponse ¶
type ServerCreateResponse struct { //UUID of object being created. Same as ServerUUID. ObjectUUID string `json:"object_uuid"` //UUID of the request RequestUUID string `json:"request_uuid"` //UUID of server being created. Same as ObjectUUID. ServerUUID string `json:"server_uuid"` //UUIDs of attached networks NetworkUUIDs []string `json:"network_uuids"` //UUIDs of attached storages StorageUUIDs []string `json:"storage_uuids"` //UUIDs of attached IP addresses IPaddrUUIDs []string `json:"ipaddr_uuids"` }
ServerCreateResponse JSON struct of a response for creating a server
type ServerHardwareProfile ¶ added in v3.2.0
type ServerHardwareProfile string
const ( DefaultServerHardware ServerHardwareProfile = "default" NestedServerHardware ServerHardwareProfile = "nested" LegacyServerHardware ServerHardwareProfile = "legacy" CiscoCSRServerHardware ServerHardwareProfile = "cisco_csr" SophosUTMServerHardware ServerHardwareProfile = "sophos_utm" F5BigipServerHardware ServerHardwareProfile = "f5_bigip" Q35ServerHardware ServerHardwareProfile = "q35" Q35NestedServerHardware ServerHardwareProfile = "q35_nested" )
All available server's hardware types
type ServerIPRelation ¶
type ServerIPRelation struct { //Properties of a relation between a server and IP addresses Properties ServerIPRelationProperties `json:"ip_relation"` }
ServerIPRelation JSON struct of a single relation between a server and a IP address
type ServerIPRelationCreateRequest ¶
type ServerIPRelationCreateRequest struct { //You can only attach 1 IPv4 and/or IPv6 to a server based on the IP address's UUID ObjectUUID string `json:"object_uuid"` }
ServerIPRelationCreateRequest JSON struct of request for creating a relation between a server and a IP address
type ServerIPRelationList ¶
type ServerIPRelationList struct { //Array of relations between a server and IP addresses List []ServerIPRelationProperties `json:"ip_relations"` }
ServerIPRelationList JSON struct of a list of relations between a server and IP addresses
type ServerIPRelationOperator ¶ added in v3.2.0
type ServerIPRelationOperator interface { GetServerIPList(ctx context.Context, id string) ([]ServerIPRelationProperties, error) GetServerIP(ctx context.Context, serverID, ipID string) (ServerIPRelationProperties, error) CreateServerIP(ctx context.Context, id string, body ServerIPRelationCreateRequest) error DeleteServerIP(ctx context.Context, serverID, ipID string) error LinkIP(ctx context.Context, serverID string, ipID string) error UnlinkIP(ctx context.Context, serverID string, ipID string) error }
ServerIPRelationOperator is an interface defining API of a Server-IP relation operator
type ServerIPRelationProperties ¶
type ServerIPRelationProperties struct { //The UUID of the server that this IP is attached to. ServerUUID string `json:"server_uuid"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //The prefix of the IP Address. Prefix string `json:"prefix"` //Either 4 or 6 Family int `json:"family"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //The IP Address (v4 or v6) IP string `json:"ip"` }
ServerIPRelationProperties JSON struct of properties of a relation between a server and a IP address
type ServerIsoImageRelation ¶
type ServerIsoImageRelation struct { //Properties of a relation between a server and an ISO-Image Properties ServerIsoImageRelationProperties `json:"isoimage_relation"` }
ServerIsoImageRelation JSON struct of a single relation between a server and an ISO-Image
type ServerIsoImageRelationCreateRequest ¶
type ServerIsoImageRelationCreateRequest struct { //The UUID of the ISO-image you are requesting. ObjectUUID string `json:"object_uuid"` }
ServerIsoImageRelationCreateRequest JSON struct of a request for creating a relation between a server and an ISO-Image
type ServerIsoImageRelationList ¶
type ServerIsoImageRelationList struct { //Array of relations between a server and ISO-Images List []ServerIsoImageRelationProperties `json:"isoimage_relations"` }
ServerIsoImageRelationList JSON struct of a list of relations between a server and ISO-Images
type ServerIsoImageRelationOperator ¶ added in v3.2.0
type ServerIsoImageRelationOperator interface { GetServerIsoImageList(ctx context.Context, id string) ([]ServerIsoImageRelationProperties, error) GetServerIsoImage(ctx context.Context, serverID, isoImageID string) (ServerIsoImageRelationProperties, error) CreateServerIsoImage(ctx context.Context, id string, body ServerIsoImageRelationCreateRequest) error UpdateServerIsoImage(ctx context.Context, serverID, isoImageID string, body ServerIsoImageRelationUpdateRequest) error DeleteServerIsoImage(ctx context.Context, serverID, isoImageID string) error LinkIsoImage(ctx context.Context, serverID string, isoimageID string) error UnlinkIsoImage(ctx context.Context, serverID string, isoimageID string) error }
ServerIsoImageRelationOperator is an interface defining API of a server-isoimage relation operator
type ServerIsoImageRelationProperties ¶
type ServerIsoImageRelationProperties struct { //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. ObjectName string `json:"object_name"` //Whether the ISO-Image is private or not. Private bool `json:"private"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //Whether the server boots from this iso image or not. Bootdevice bool `json:"bootdevice"` }
ServerIsoImageRelationProperties JSON struct of properties of a relation between a server and an ISO-Image
type ServerIsoImageRelationUpdateRequest ¶
type ServerIsoImageRelationUpdateRequest struct { //Whether the server boots from this ISO-image or not. BootDevice bool `json:"bootdevice"` Name string `json:"name"` }
ServerIsoImageRelationUpdateRequest JSON struct of a request for updating a relation between a server and an ISO-Image
type ServerList ¶
type ServerList struct { //Array of servers List map[string]ServerProperties `json:"servers"` }
ServerList JSON struct of a list of servers
type ServerMetric ¶
type ServerMetric struct { //Properties of a server metric Properties ServerMetricProperties `json:"server_metric"` }
ServerMetric JSON struct of a single metric of a server
type ServerMetricList ¶
type ServerMetricList struct { //Array of a server's metrics List []ServerMetricProperties `json:"server_metrics"` }
ServerMetricList JSON struct of a list of a server's metrics
type ServerMetricProperties ¶
type ServerMetricProperties struct { //Defines the begin of the time range. BeginTime GSTime `json:"begin_time"` //Defines the end of the time range. EndTime GSTime `json:"end_time"` //The UUID of an object is always unique, and refers to a specific object. PaaSServiceUUID string `json:"paas_service_uuid"` //Core usage CoreUsage struct { //Value Value float64 `json:"value"` //Unit of value Unit string `json:"unit"` } `json:"core_usage"` //Storage usage StorageSize struct { //Value Value float64 `json:"value"` //Unit of value Unit string `json:"unit"` } `json:"storage_size"` }
ServerMetricProperties JSON struct
type ServerNetworkRelation ¶
type ServerNetworkRelation struct { //Properties of a relation between a server and a network Properties ServerNetworkRelationProperties `json:"network_relation"` }
ServerNetworkRelation JSON struct of a single relation between a server and a network
type ServerNetworkRelationCreateRequest ¶
type ServerNetworkRelationCreateRequest struct { //The uuid of network you wish to add. Only 7 private networks are allowed to be attached to a server ObjectUUID string `json:"object_uuid"` //The ordering of the network interfaces. Lower numbers have lower PCI-IDs. Can be empty. Ordering int `json:"ordering,omitempty"` //Whether the server boots from this network or not. Can be empty. BootDevice bool `json:"bootdevice,omitempty"` //Defines information about IP prefix spoof protection (it allows source traffic only from the IPv4/IPv4 network prefixes). //If empty, it allow no IPv4/IPv6 source traffic. If set to null, l3security is disabled (default). //Can be empty L3security []string `json:"l3security,omitempty"` //All rules of Firewall. Can be empty Firewall *FirewallRules `json:"firewall,omitempty"` //Instead of setting firewall rules manually, you can use a firewall template by setting UUID of the firewall template. //Can be empty. FirewallTemplateUUID string `json:"firewall_template_uuid,omitempty"` }
ServerNetworkRelationCreateRequest JSON struct of a request for creating a relation between a server and a network
type ServerNetworkRelationList ¶
type ServerNetworkRelationList struct { //Array of relations between a server and networks List []ServerNetworkRelationProperties `json:"network_relations"` }
ServerNetworkRelationList JSON struct of a list of relations between a server and networks
type ServerNetworkRelationOperator ¶ added in v3.2.0
type ServerNetworkRelationOperator interface { GetServerNetworkList(ctx context.Context, id string) ([]ServerNetworkRelationProperties, error) GetServerNetwork(ctx context.Context, serverID, networkID string) (ServerNetworkRelationProperties, error) CreateServerNetwork(ctx context.Context, id string, body ServerNetworkRelationCreateRequest) error UpdateServerNetwork(ctx context.Context, serverID, networkID string, body ServerNetworkRelationUpdateRequest) error DeleteServerNetwork(ctx context.Context, serverID, networkID string) error LinkNetwork(ctx context.Context, serverID, networkID, firewallTemplate string, bootdevice bool, order int, l3security []string, firewall *FirewallRules) error UnlinkNetwork(ctx context.Context, serverID string, networkID string) error }
ServerNetworkRelationOperator is an interface defining API of a server-network relation operator
type ServerNetworkRelationProperties ¶
type ServerNetworkRelationProperties struct { //Defines information about MAC spoofing protection (filters layer2 and ARP traffic based on MAC source). //It can only be (de-)activated on a private network - the public network always has l2security enabled. //It will be true if the network is public, and false if the network is private. L2security bool `json:"l2security"` //The UUID of the Server. ServerUUID string `json:"server_uuid"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //True if the network is public. If private it will be false. //Each private network is a secure and fully transparent 2-Layer network between servers. //There is no limit on how many servers can be connected to the same private network. PublicNet bool `json:"public_net"` //The UUID of firewall template. FirewallTemplateUUID string `json:"firewall_template_uuid"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. ObjectName string `json:"object_name"` //network_mac defines the MAC address of the network interface. Mac string `json:"mac"` //Defines if this object is the bootdevice. Storages, Networks and ISO-Images can have a bootdevice configured, //but only one bootdevice per Storage, Network or ISO-Image. //The boot order is as follows => Network > ISO-Image > Storage. BootDevice bool `json:"bootdevice"` //PartnerUUID PartnerUUID string `json:"partner_uuid"` //Defines the ordering of the network interfaces. Lower numbers have lower PCI-IDs. Ordering int `json:"ordering"` //Firewall that is used to this server network relation Firewall FirewallRules `json:"firewall"` //(one of network, network_high, network_insane) NetworkType string `json:"network_type"` //The UUID of the network you're requesting. NetworkUUID string `json:"network_uuid"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //Defines information about IP prefix spoof protection (it allows source traffic only from the IPv4/IPv4 network prefixes). //If empty, it allow no IPv4/IPv6 source traffic. If set to null, l3security is disabled (default). L3security []string `json:"l3security"` }
ServerNetworkRelationProperties JSON struct of properties of a relation between a server and a network
type ServerNetworkRelationUpdateRequest ¶
type ServerNetworkRelationUpdateRequest struct { //The ordering of the network interfaces. Lower numbers have lower PCI-IDs. Optional. Ordering int `json:"ordering,omitempty"` //The ordering of the network interfaces. Lower numbers have lower PCI-IDs. Optional. BootDevice bool `json:"bootdevice,omitempty"` //Defines information about IP prefix spoof protection (it allows source traffic only from the IPv4/IPv4 network prefixes). //If empty, it allow no IPv4/IPv6 source traffic. If set to null, l3security is disabled (default). //Can be empty L3security []string `json:"l3security,omitempty"` //All rules of Firewall. Optional. Firewall *FirewallRules `json:"firewall,omitempty"` //Instead of setting firewall rules manually, you can use a firewall template by setting UUID of the firewall template. //Optional. FirewallTemplateUUID string `json:"firewall_template_uuid,omitempty"` }
ServerNetworkRelationUpdateRequest JSON struct of a request for updating a relation between a server and a network
type ServerOperator ¶ added in v3.2.0
type ServerOperator interface { GetServer(ctx context.Context, id string) (Server, error) GetServerList(ctx context.Context) ([]Server, error) GetServersByLocation(ctx context.Context, id string) ([]Server, error) CreateServer(ctx context.Context, body ServerCreateRequest) (ServerCreateResponse, error) UpdateServer(ctx context.Context, id string, body ServerUpdateRequest) error DeleteServer(ctx context.Context, id string) error StartServer(ctx context.Context, id string) error StopServer(ctx context.Context, id string) error ShutdownServer(ctx context.Context, id string) error IsServerOn(ctx context.Context, id string) (bool, error) GetServerMetricList(ctx context.Context, id string) ([]ServerMetric, error) GetServerEventList(ctx context.Context, id string) ([]Event, error) GetDeletedServers(ctx context.Context) ([]Server, error) }
ServerOperator is an interface defining API of a server operator
type ServerPowerUpdateRequest ¶
type ServerPowerUpdateRequest struct { //Power=true => server is on //Power=false => server if off Power bool `json:"power"` }
ServerPowerUpdateRequest JSON struct of a request for updating server's power state
type ServerProperties ¶
type ServerProperties struct { //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //Indicates the amount of memory in GB. Memory int `json:"memory"` //Number of server cores. Cores int `json:"cores"` //Specifies the hardware settings for the virtual machine. HardwareProfile string `json:"hardware_profile"` //Status indicates the status of the object. it could be in-provisioning or active Status string `json:"status"` //Helps to identify which datacenter an object belongs to. LocationUUID string `json:"location_uuid"` //The power status of the server. Power bool `json:"power"` //The price for the current period since the last bill. CurrentPrice float64 `json:"current_price"` //Which Availability-Zone the Server is placed. AvailabilityZone string `json:"availability_zone"` //If the server should be auto-started in case of a failure (default=true). AutoRecovery bool `json:"auto_recovery"` //Legacy-Hardware emulation instead of virtio hardware. //If enabled, hotplugging cores, memory, storage, network, etc. will not work, //but the server will most likely run every x86 compatible operating system. //This mode comes with a performance penalty, as emulated hardware does not benefit from the virtio driver infrastructure. Legacy bool `json:"legacy"` //The token used by the panel to open the websocket VNC connection to the server console. ConsoleToken string `json:"console_token"` //Total minutes of memory used. UsageInMinutesMemory int `json:"usage_in_minutes_memory"` //Total minutes of cores used. UsageInMinutesCores int `json:"usage_in_minutes_cores"` //List of labels. Labels []string `json:"labels"` //The information about other object which are related to this server. the object could be ip, storage, network, and isoimage Relations ServerRelations `json:"relations"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //Defines the date and time of the last object change. ChangeTime GSTime `json:"change_time"` }
ServerProperties JSON struct of properties of a server
type ServerRelations ¶
type ServerRelations struct { //Array of object (ServerIsoImageRelationProperties) IsoImages []ServerIsoImageRelationProperties `json:"isoimages"` //Array of object (ServerNetworkRelationProperties) Networks []ServerNetworkRelationProperties `json:"networks"` //Array of object (ServerIPRelationProperties) PublicIPs []ServerIPRelationProperties `json:"public_ips"` //Array of object (ServerStorageRelationProperties) Storages []ServerStorageRelationProperties `json:"storages"` }
ServerRelations JSON struct of a list of server relations
type ServerStorageRelationCreateRequest ¶
type ServerStorageRelationCreateRequest struct { //The UUID of the storage you are requesting. If server's hardware profile is default, nested, q35 or q35_nested, //you are allowed to attached 8 servers. Only 2 storage are allowed to be attached to server with other hardware profile ObjectUUID string `json:"object_uuid"` //Whether the server will boot from this storage device or not. Optional. BootDevice bool `json:"bootdevice,omitempty"` }
ServerStorageRelationCreateRequest JSON struct of a request for creating a relation between a server and a storage
type ServerStorageRelationList ¶
type ServerStorageRelationList struct { //Array of relations between a server and storages List []ServerStorageRelationProperties `json:"storage_relations"` }
ServerStorageRelationList JSON struct of a list of relations between a server and storages
type ServerStorageRelationOperator ¶ added in v3.2.0
type ServerStorageRelationOperator interface { GetServerStorageList(ctx context.Context, id string) ([]ServerStorageRelationProperties, error) GetServerStorage(ctx context.Context, serverID, storageID string) (ServerStorageRelationProperties, error) CreateServerStorage(ctx context.Context, id string, body ServerStorageRelationCreateRequest) error UpdateServerStorage(ctx context.Context, serverID, storageID string, body ServerStorageRelationUpdateRequest) error DeleteServerStorage(ctx context.Context, serverID, storageID string) error LinkStorage(ctx context.Context, serverID string, storageID string, bootdevice bool) error UnlinkStorage(ctx context.Context, serverID string, storageID string) error }
ServerStorageRelationOperator is an interface defining API of a server-storage relation operator
type ServerStorageRelationProperties ¶
type ServerStorageRelationProperties struct { //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. ObjectName string `json:"object_name"` //The capacity of a storage/ISO-Image/template/snapshot in GB. Capacity int `json:"capacity"` //Indicates the speed of the storage. This may be (storage, storage_high or storage_insane). StorageType string `json:"storage_type"` //Defines the SCSI target ID. The SCSI defines transmission routes like Serial Attached SCSI (SAS), Fibre Channel and iSCSI. //The target ID is a device (e.g. disk). Target int `json:"target"` //Is the common SCSI abbreviation of the Logical Unit Number. A LUN is a unique identifier for a single disk or a composite of disks. Lun int `json:"lun"` //Defines the SCSI controller id. The SCSI defines transmission routes such as Serial Attached SCSI (SAS), Fibre Channel and iSCSI. Controller int `json:"controller"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //Defines if this object is the bootdevice. Storages, Networks and ISO-Images can have a bootdevice configured, //but only one bootdevice per Storage, Network or ISO-Image. //The boot order is as follows => Network > ISO-Image > Storage. BootDevice bool `json:"bootdevice"` //The SCSI bus id. The SCSI defines transmission routes like Serial Attached SCSI (SAS), Fibre Channel and iSCSI. //Each SCSI device is addressed via a specific number. Each SCSI bus can have multiple SCSI devices connected to it. Bus int `json:"bus"` //Indicates the UUID of the last used template on this storage (inherited from snapshots). LastUsedTemplate string `json:"last_used_template"` //If a template has been used that requires a license key (e.g. Windows Servers) //this shows the product_no of the license (see the /prices endpoint for more details). LicenseProductNo int `json:"license_product_no"` //The same as the object_uuid. ServerUUID string `json:"server_uuid"` }
ServerStorageRelationProperties JSON struct of properties of a relation between a server and a storage
type ServerStorageRelationSingle ¶
type ServerStorageRelationSingle struct { //Properties of a relation between a server and a storage Properties ServerStorageRelationProperties `json:"storage_relation"` }
ServerStorageRelationSingle JSON struct of a single relation between a server and a storage
type ServerStorageRelationUpdateRequest ¶
type ServerStorageRelationUpdateRequest struct { //The ordering of the network interfaces. Lower numbers have lower PCI-IDs. Optional. Ordering int `json:"ordering,omitempty"` //Whether the server boots from this network or not. Optional. BootDevice bool `json:"bootdevice,omitempty"` //Defines information about IP prefix spoof protection (it allows source traffic only from the IPv4/IPv4 network prefixes). //If empty, it allow no IPv4/IPv6 source traffic. If set to null, l3security is disabled (default). Optional. L3security []string `json:"l3security,omitempty"` }
ServerStorageRelationUpdateRequest JSON struct of a request for updating a relation between a server and a storage
type ServerUpdateRequest ¶
type ServerUpdateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. //Leave it if you do not want to update the name. Name string `json:"name,omitempty"` //Defines which Availability-Zone the Server is placed. Leave it if you do not want to update the zone. AvailablityZone string `json:"availability_zone,omitempty"` //The amount of server memory in GB. Leave it if you do not want to update the memory Memory int `json:"memory,omitempty"` //The number of server cores. Leave it if you do not want to update the number of the cpu cores. Cores int `json:"cores,omitempty"` //List of labels. Leave it if you do not want to update the list of labels Labels *[]string `json:"labels,omitempty"` //If the server should be auto-started in case of a failure (default=true). //Leave it if you do not want to update this feature of the server. AutoRecovery *bool `json:"auto_recovery,omitempty"` }
ServerUpdateRequest JSON of a request for updating a server
type ServerinISOImage ¶
type ServerinISOImage struct { //Whether the server boots from this iso image or not. Bootdevice bool `json:"bootdevice"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. ObjectName string `json:"object_name"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` }
ServerinISOImage is JSON struct of a relation between an ISO-Image and a Server
type ServiceObject ¶
type ServiceObject struct { //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` }
ServiceObject JSON struct of a service object
type Sshkey ¶
type Sshkey struct { //Properties of a SSH-key Properties SshkeyProperties `json:"sshkey"` }
Sshkey JSON struct of a single SSH-key
type SshkeyCreateRequest ¶
type SshkeyCreateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //The OpenSSH public key string (all key types are supported => ed25519, ecdsa, dsa, rsa, rsa1). Sshkey string `json:"sshkey"` //List of labels. Optional. Labels []string `json:"labels,omitempty"` }
SshkeyCreateRequest JSON struct of a request for creating a SSH-key
type SshkeyList ¶
type SshkeyList struct { //Array of SSH-keys List map[string]SshkeyProperties `json:"sshkeys"` }
SshkeyList JSON struct of a list of SSH-keys
type SshkeyProperties ¶
type SshkeyProperties struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //Status indicates the status of the object. Status string `json:"status"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //Defines the date and time of the last object change. ChangeTime GSTime `json:"change_time"` //The OpenSSH public key string (all key types are supported => ed25519, ecdsa, dsa, rsa, rsa1). Sshkey string `json:"sshkey"` //List of labels. Labels []string `json:"labels"` //The User-UUID of the account which created this SSH Key. UserUUID string `json:"user_uuid"` }
SshkeyProperties JSON struct of properties of a single SSH-key
type SshkeyUpdateRequest ¶
type SshkeyUpdateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. //Optional. Name string `json:"name,omitempty"` //The OpenSSH public key string (all key types are supported => ed25519, ecdsa, dsa, rsa, rsa1). Optional. Sshkey string `json:"sshkey,omitempty"` //List of labels. Optional. Labels *[]string `json:"labels,omitempty"` }
SshkeyUpdateRequest JSON struct of a request for updating a SSH-key
type Storage ¶
type Storage struct { //Properties of a storage Properties StorageProperties `json:"storage"` }
Storage JSON struct of a single storage
type StorageAndSnapshotScheduleRelation ¶
type StorageAndSnapshotScheduleRelation struct { //The interval at which the schedule will run (in minutes) RunInterval int `json:"run_interval"` //The amount of Snapshots to keep before overwriting the last created Snapshot. KeepSnapshots int `json:"keep_snapshots"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. ObjectName string `json:"object_name"` //The date and time that the snapshot schedule will be run. NextRuntime GSTime `json:"next_runtime"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` }
StorageAndSnapshotScheduleRelation JSON struct of a relation between a storage and a snapshot schedule
type StorageBackup ¶ added in v3.2.0
type StorageBackup struct { //Properties of a backup Properties StorageBackupProperties `json:"backup"` }
StorageBackup is JSON structure of a single storage backup
type StorageBackupList ¶ added in v3.2.0
type StorageBackupList struct { //Array of backups List map[string]StorageBackupProperties `json:"backups"` }
StorageBackupList is JSON structure of a list of storage backups
type StorageBackupOperator ¶ added in v3.2.0
type StorageBackupOperator interface { GetStorageBackupList(ctx context.Context, id string) ([]StorageBackup, error) DeleteStorageBackup(ctx context.Context, storageID, backupID string) error RollbackStorageBackup(ctx context.Context, storageID, backupID string, body StorageRollbackRequest) error }
StorageBackupOperator is an interface defining API of a storage backup operator
type StorageBackupProperties ¶ added in v3.2.0
type StorageBackupProperties struct { //The UUID of a backup is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //The name of the backup equals schedule name plus backup uuid. Name string `json:"name"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //The size of a backup in GB. Capacity int `json:"capacity"` }
type StorageBackupSchedule ¶ added in v3.2.0
type StorageBackupSchedule struct {
Properties StorageBackupScheduleProperties `json:"schedule_storage_backup"`
}
type StorageBackupScheduleCreateRequest ¶ added in v3.2.0
type StorageBackupScheduleCreateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //The interval at which the schedule will run (in minutes) //Allowed value >= 60 RunInterval int `json:"run_interval"` //The amount of backups to keep before overwriting the last created backup. //value >= 1 KeepBackups int `json:"keep_backups"` //The date and time that the storage backup schedule will be run. NextRuntime GSTime `json:"next_runtime"` //Status of the schedule Active bool `json:"active"` }
StorageBackupScheduleCreateRequest JSON struct of a request for creating a storage backup schedule
type StorageBackupScheduleCreateResponse ¶ added in v3.2.0
type StorageBackupScheduleCreateResponse struct { //UUID of the request RequestUUID string `json:"request_uuid"` //UUID of the storage backup schedule being created ObjectUUID string `json:"object_uuid"` }
StorageBackupScheduleCreateResponse JSON struct of a response for creating a storage backup schedule
type StorageBackupScheduleList ¶ added in v3.2.0
type StorageBackupScheduleList struct {
List map[string]StorageBackupScheduleProperties `json:"schedule_storage_backups"`
}
type StorageBackupScheduleOperator ¶ added in v3.2.0
type StorageBackupScheduleOperator interface { GetStorageBackupScheduleList(ctx context.Context, id string) ([]StorageBackupSchedule, error) GetStorageBackupSchedule(ctx context.Context, storageID, scheduleID string) (StorageBackupSchedule, error) CreateStorageBackupSchedule(ctx context.Context, id string, body StorageBackupScheduleCreateRequest) UpdateStorageBackupSchedule(ctx context.Context, storageID, scheduleID string, body StorageBackupScheduleUpdateRequest) error DeleteStorageBackupSchedule(ctx context.Context, storageID, scheduleID string) error }
StorageBackupScheduleOperator is an interface defining API of a backup schedule operator
type StorageBackupScheduleProperties ¶ added in v3.2.0
type StorageBackupScheduleProperties struct { //Defines the date and time of the last object change. ChangeTime GSTime `json:"change_time"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //The amount of backups to keep before overwriting the last created backup. //value >= 1 KeepBackups int `json:"keep_backups"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //The date and time that the storage backup schedule will be run. NextRuntime GSTime `json:"next_runtime"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //Related backups (backups taken by this storage backup schedule) Relations StorageBackupScheduleRelations `json:"relations"` //The interval at which the schedule will run (in minutes) //value >= 60 RunInterval int `json:"run_interval"` //Status indicates the status of the object. Status string `json:"status"` //UUID of the storage that will be used for making taking backups StorageUUID string `json:"storage_uuid"` //Status of the schedule Active bool `json:"active"` }
type StorageBackupScheduleRelation ¶ added in v3.2.0
type StorageBackupScheduleRelation struct { //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` }
StorageBackupScheduleRelation JSON struct of a relation of a storage backup schedule
type StorageBackupScheduleRelations ¶ added in v3.2.0
type StorageBackupScheduleRelations struct { //Array of all related backups (backups taken by this storage backup schedule) StorageBackups []StorageBackupScheduleRelation `json:"storages_backups"` }
StorageBackupScheduleRelations JSON struct of a list of relations of a storage backup schedule
type StorageBackupScheduleUpdateRequest ¶ added in v3.2.0
type StorageBackupScheduleUpdateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. //Optional. Name string `json:"name,omitempty"` //The interval at which the schedule will run (in minutes). Optional. //Allowed value >= 60 RunInterval int `json:"run_interval,omitempty"` //The amount of backups to keep before overwriting the last created backup. Optional. //value >= 1 KeepBackups int `json:"keep_backups,omitempty"` //The date and time that the storage backup schedule will be run. Optional. NextRuntime *GSTime `json:"next_runtime,omitempty"` //Status of the schedule. Optional Active *bool `json:"active,omitempty"` }
StorageBackupScheduleUpdateRequest JSON struct of a request for updating a storage backup schedule
type StorageCreateRequest ¶
type StorageCreateRequest struct { //Required (integer - minimum: 1 - maximum: 4096). Capacity int `json:"capacity"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //Storage type. Allowed values: nil, DefaultStorageType, HighStorageType, InsaneStorageType. Optional. StorageType StorageType `json:"storage_type,omitempty"` //An object holding important values such as hostnames, passwords, and SSH keys. //Creating a storage with a template is required either sshkey or password. //Optional Template *StorageTemplate `json:"template,omitempty"` //List of labels. Optional. Labels []string `json:"labels,omitempty"` }
StorageCreateRequest JSON struct of a request for creating a storage
type StorageList ¶
type StorageList struct { //Array of storages List map[string]StorageProperties `json:"storages"` }
StorageList JSON struct of a list of storages
type StorageOperator ¶ added in v3.2.0
type StorageOperator interface { GetStorage(ctx context.Context, id string) (Storage, error) GetStorageList(ctx context.Context) ([]Storage, error) GetStoragesByLocation(ctx context.Context, id string) ([]Storage, error) CreateStorage(ctx context.Context, body StorageCreateRequest) (CreateResponse, error) UpdateStorage(ctx context.Context, id string, body StorageUpdateRequest) error CloneStorage(ctx context.Context, id string) (CreateResponse, error) DeleteStorage(ctx context.Context, id string) error GetDeletedStorages(ctx context.Context) ([]Storage, error) GetStorageEventList(ctx context.Context, id string) ([]Event, error) }
StorageOperator is an interface defining API of a storage operator
type StorageProperties ¶
type StorageProperties struct { //Defines the date and time of the last object change. ChangeTime GSTime `json:"change_time"` //Uses IATA airport code, which works as a location identifier. LocationIata string `json:"location_iata"` //Status indicates the status of the object. Status string `json:"status"` //If a template has been used that requires a license key (e.g. Windows Servers) //this shows the product_no of the license (see the /prices endpoint for more details). LicenseProductNo int `json:"license_product_no"` //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. LocationCountry string `json:"location_country"` //Total minutes the object has been running. UsageInMinutes int `json:"usage_in_minutes"` //Indicates the UUID of the last used template on this storage. LastUsedTemplate string `json:"last_used_template"` //The price for the current period since the last bill. CurrentPrice float64 `json:"current_price"` //The capacity of a storage/ISO-Image/template/snapshot in GB. Capacity int `json:"capacity"` //Helps to identify which datacenter an object belongs to. LocationUUID string `json:"location_uuid"` //(one of storage, storage_high, storage_insane). StorageType string `json:"storage_type"` //The UUID of the Storage used to create this Snapshot. ParentUUID string `json:"parent_uuid"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. LocationName string `json:"location_name"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //Snapshots list in this storage. Snapshots []StorageSnapshotRelation `json:"snapshots"` //The information about other object which are related to this storage. //The object could be servers and/or snapshot schedules. Relations StorageRelations `json:"relations"` //List of labels. Labels []string `json:"labels"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` }
StorageProperties JSON struct of properties of a storage
type StorageRelations ¶
type StorageRelations struct { //Array of related servers Servers []StorageServerRelation `json:"servers"` //Array if related snapshot schedules SnapshotSchedules []StorageAndSnapshotScheduleRelation `json:"snapshot_schedules"` }
StorageRelations JSON struct of a list of a storage's relations
type StorageRollbackRequest ¶
type StorageRollbackRequest struct { //Rollback=true => storage will be restored Rollback bool `json:"rollback,omitempty"` }
StorageRollbackRequest JSON struct of a request for rolling back
type StorageServerRelation ¶
type StorageServerRelation struct { //Whether the server boots from this iso image or not. Bootdevice bool `json:"bootdevice"` //Defines the SCSI target ID. The SCSI defines transmission routes like Serial Attached SCSI (SAS), //Fibre Channel and iSCSI. The target ID is a device (e.g. disk). Target int `json:"target"` //Defines the SCSI controller id. The SCSI defines transmission routes such as Serial Attached SCSI (SAS), Fibre Channel and iSCSI. Controller int `json:"controller"` //The SCSI bus id. The SCSI defines transmission routes like Serial Attached SCSI (SAS), Fibre Channel and iSCSI. //Each SCSI device is addressed via a specific number. Each SCSI bus can have multiple SCSI devices connected to it. Bus int `json:"bus"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //Is the common SCSI abbreviation of the Logical Unit Number. A lun is a unique identifier for a single disk or a composite of disks. Lun int `json:"lun"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. ObjectName string `json:"object_name"` }
StorageServerRelation JSON struct of a relation between a storage and a server
type StorageSnapshot ¶
type StorageSnapshot struct { //Properties of a snapshot Properties StorageSnapshotProperties `json:"snapshot"` }
StorageSnapshot is JSON structure of a single storage snapshot
type StorageSnapshotCreateRequest ¶
type StorageSnapshotCreateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. //Optional Name string `json:"name,omitempty"` //List of labels. Optional. Labels []string `json:"labels,omitempty"` }
StorageSnapshotCreateRequest JSON struct of a request for creating a storage snapshot
type StorageSnapshotCreateResponse ¶
type StorageSnapshotCreateResponse struct { //UUID of the request RequestUUID string `json:"request_uuid"` //UUID of the snapshot being created ObjectUUID string `json:"object_uuid"` }
StorageSnapshotCreateResponse JSON struct of a response for creating a storage snapshot
type StorageSnapshotExportToS3Request ¶
type StorageSnapshotExportToS3Request struct { //S3 authentication data S3auth `json:"s3auth"` //S3 info about snapshot being uploaded S3data `json:"s3data"` }
StorageSnapshotExportToS3Request JSON struct of a request for exporting a storage snapshot to S3
type StorageSnapshotList ¶
type StorageSnapshotList struct { //Array of snapshots List map[string]StorageSnapshotProperties `json:"snapshots"` }
StorageSnapshotList is JSON structure of a list of storage snapshots
type StorageSnapshotOperator ¶ added in v3.2.0
type StorageSnapshotOperator interface { GetStorageSnapshotList(ctx context.Context, id string) ([]StorageSnapshot, error) GetSnapshotsByLocation(ctx context.Context, id string) ([]StorageSnapshot, error) GetStorageSnapshot(ctx context.Context, storageID, snapshotID string) (StorageSnapshot, error) CreateStorageSnapshot(ctx context.Context, id string, body StorageSnapshotCreateRequest) (StorageSnapshotCreateResponse, error) UpdateStorageSnapshot(ctx context.Context, storageID, snapshotID string, body StorageSnapshotUpdateRequest) error DeleteStorageSnapshot(ctx context.Context, storageID, snapshotID string) error GetDeletedSnapshots(ctx context.Context) ([]StorageSnapshot, error) RollbackStorage(ctx context.Context, storageID, snapshotID string, body StorageRollbackRequest) error ExportStorageSnapshotToS3(ctx context.Context, storageID, snapshotID string, body StorageSnapshotExportToS3Request) error }
StorageSnapshotOperator is an interface defining API of a storage snapshot operator
type StorageSnapshotProperties ¶
type StorageSnapshotProperties struct { //List of labels. Labels []string `json:"labels"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //Status indicates the status of the object. Status string `json:"status"` //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. LocationCountry string `json:"location_country"` //Total minutes the object has been running. UsageInMinutes int `json:"usage_in_minutes"` //Helps to identify which datacenter an object belongs to. LocationUUID string `json:"location_uuid"` //Defines the date and time of the last object change. ChangeTime GSTime `json:"change_time"` //If a template has been used that requires a license key (e.g. Windows Servers) //this shows the product_no of the license (see the /prices endpoint for more details). LicenseProductNo int `json:"license_product_no"` //The price for the current period since the last bill. CurrentPrice float64 `json:"current_price"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //The capacity of a storage/ISO-Image/template/snapshot in GB. Capacity int `json:"capacity"` //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. LocationName string `json:"location_name"` //Uses IATA airport code, which works as a location identifier. LocationIata string `json:"location_iata"` //Uuid of the storage used to create this snapshot ParentUUID string `json:"parent_uuid"` }
StorageSnapshotProperties JSON struct of properties of a storage snapshot
type StorageSnapshotRelation ¶
type StorageSnapshotRelation struct { //Indicates the UUID of the last used template on this storage. LastUsedTemplate string `json:"last_used_template"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //The UUID of an object is always unique, and refers to a specific object. StorageUUID string `json:"storage_uuid"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. SchedulesSnapshotName string `json:"schedules_snapshot_name"` //The UUID of an object is always unique, and refers to a specific object. SchedulesSnapshotUUID string `json:"schedules_snapshot_uuid"` //Capacity of the snapshot (in GB) ObjectCapacity int `json:"object_capacity"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. ObjectName string `json:"object_name"` }
StorageSnapshotRelation JSON struct of a relation between a storage and a snapshot
type StorageSnapshotSchedule ¶
type StorageSnapshotSchedule struct { //Properties of a storage snapshot schedule Properties StorageSnapshotScheduleProperties `json:"snapshot_schedule"` }
StorageSnapshotSchedule JSON struct of a single storage snapshot scheduler
type StorageSnapshotScheduleCreateRequest ¶
type StorageSnapshotScheduleCreateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //List of labels. Optional. Labels []string `json:"labels,omitempty"` //The interval at which the schedule will run (in minutes) //Allowed value >= 60 RunInterval int `json:"run_interval"` //The amount of Snapshots to keep before overwriting the last created Snapshot. //Allowed value >= 1 KeepSnapshots int `json:"keep_snapshots"` //The date and time that the snapshot schedule will be run. Optional. NextRuntime *GSTime `json:"next_runtime,omitempty"` }
StorageSnapshotScheduleCreateRequest JSON struct of a request for creating a storage snapshot schedule
type StorageSnapshotScheduleCreateResponse ¶
type StorageSnapshotScheduleCreateResponse struct { //UUID of the request RequestUUID string `json:"request_uuid"` //UUID of the snapshot schedule being created ObjectUUID string `json:"object_uuid"` }
StorageSnapshotScheduleCreateResponse JSON struct of a response for creating a storage snapshot schedule
type StorageSnapshotScheduleList ¶
type StorageSnapshotScheduleList struct { //Array of storage snapshot schedules List map[string]StorageSnapshotScheduleProperties `json:"snapshot_schedules"` }
StorageSnapshotScheduleList JSON of a list of storage snapshot schedules
type StorageSnapshotScheduleOperator ¶ added in v3.2.0
type StorageSnapshotScheduleOperator interface { GetStorageSnapshotScheduleList(ctx context.Context, id string) ([]StorageSnapshotSchedule, error) GetStorageSnapshotSchedule(ctx context.Context, storageID, scheduleID string) (StorageSnapshotSchedule, error) CreateStorageSnapshotSchedule(ctx context.Context, id string, body StorageSnapshotScheduleCreateRequest) UpdateStorageSnapshotSchedule(ctx context.Context, storageID, scheduleID string, body StorageSnapshotScheduleUpdateRequest) DeleteStorageSnapshotSchedule(ctx context.Context, storageID, scheduleID string) error }
StorageSnapshotScheduleOperator is an interface defining API of a snapshot schedule operator
type StorageSnapshotScheduleProperties ¶
type StorageSnapshotScheduleProperties struct { //Defines the date and time of the last object change. ChangeTime GSTime `json:"change_time"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //The amount of Snapshots to keep before overwriting the last created Snapshot. //value >= 1 KeepSnapshots int `json:"keep_snapshots"` //List of labels. Labels []string `json:"labels"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //The date and time that the snapshot schedule will be run. NextRuntime GSTime `json:"next_runtime"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //Related snapshots (snapshots taken by this snapshot schedule) Relations StorageSnapshotScheduleRelations `json:"relations"` //The interval at which the schedule will run (in minutes) //value >= 60 RunInterval int `json:"run_interval"` //Status indicates the status of the object. Status string `json:"status"` //UUID of the storage that will be used for taking snapshots StorageUUID string `json:"storage_uuid"` }
StorageSnapshotScheduleProperties JSON struct of properties of a single storage snapshot schedule
type StorageSnapshotScheduleRelation ¶
type StorageSnapshotScheduleRelation struct { //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` }
StorageSnapshotScheduleRelation JSON struct of a relation of a storage snapshot schedule
type StorageSnapshotScheduleRelations ¶
type StorageSnapshotScheduleRelations struct { //Array of all related snapshots (snapshots taken by this snapshot schedule) Snapshots []StorageSnapshotScheduleRelation `json:"snapshots"` }
StorageSnapshotScheduleRelations JSON struct of a list of relations of a storage snapshot schedule
type StorageSnapshotScheduleUpdateRequest ¶
type StorageSnapshotScheduleUpdateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. //Optional. Name string `json:"name,omitempty"` //List of labels. Optional. Labels *[]string `json:"labels,omitempty"` //The interval at which the schedule will run (in minutes). Optional. //Allowed value >= 60 RunInterval int `json:"run_interval,omitempty"` //The amount of Snapshots to keep before overwriting the last created Snapshot. Optional. //Allowed value >= 1 KeepSnapshots int `json:"keep_snapshots,omitempty"` //The date and time that the snapshot schedule will be run. Optional. NextRuntime *GSTime `json:"next_runtime,omitempty"` }
StorageSnapshotScheduleUpdateRequest JSON struct of a request for updating a storage snapshot schedule
type StorageSnapshotUpdateRequest ¶
type StorageSnapshotUpdateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. //Optional Name string `json:"name,omitempty"` //List of labels. Optional. Labels *[]string `json:"labels,omitempty"` }
StorageSnapshotUpdateRequest JSON struct of a request for updating a storage snapshot
type StorageTemplate ¶
type StorageTemplate struct { //List of SSH Keys uuid. Optional Sshkeys []string `json:"sshkeys,omitempty"` //The UUID of a template (public or private). TemplateUUID string `json:"template_uuid"` //The root (Linux) or Administrator (Windows) password to set for the installed storage. Valid only for public templates. //The password has to be either plaintext or a crypt string (modular crypt format - MCF). Optional. Password string `json:"password,omitempty"` //Password type. Allowed values: not-set, PlainPasswordType, CryptPasswordType. Optional. PasswordType PasswordType `json:"password_type,omitempty"` //Hostname to set for the installed storage. The running server will use this as its hostname. //Valid only for public Linux and Windows templates. Optional. Hostname string `json:"hostname,omitempty"` }
StorageTemplate JSON struct of a storage template
type StorageType ¶ added in v3.2.0
type StorageType string
const ( DefaultStorageType StorageType = "storage" HighStorageType StorageType = "storage_high" InsaneStorageType StorageType = "storage_insane" )
All allowed storage type's values
type StorageUpdateRequest ¶
type StorageUpdateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Optional. Name string `json:"name,omitempty"` //List of labels. Optional. Labels *[]string `json:"labels,omitempty"` //The Capacity of the Storage in GB. Optional. Capacity int `json:"capacity,omitempty"` //Storage type. Allowed values: nil, DefaultStorageType, HighStorageType, InsaneStorageType. Optional. Downgrading is not supported StorageType StorageType `json:"storage_type,omitempty"` }
StorageUpdateRequest JSON struct of a request for updating a storage
type Template ¶
type Template struct { //Properties of a template Properties TemplateProperties `json:"template"` }
Template JSON struct of a single template
type TemplateCreateRequest ¶
type TemplateCreateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //snapshot uuid for template SnapshotUUID string `json:"snapshot_uuid"` //List of labels. Optional. Labels []string `json:"labels,omitempty"` }
TemplateCreateRequest JSON struct of a request for creating a template
type TemplateList ¶
type TemplateList struct { //Array of templates List map[string]TemplateProperties `json:"templates"` }
TemplateList JSON struct of a list of templates
type TemplateOperator ¶ added in v3.2.0
type TemplateOperator interface { GetTemplate(ctx context.Context, id string) (Template, error) GetTemplateByName(ctx context.Context, name string) (Template, error) GetTemplateList(ctx context.Context) ([]Template, error) CreateTemplate(ctx context.Context, body TemplateCreateRequest) (CreateResponse, error) UpdateTemplate(ctx context.Context, id string, body TemplateUpdateRequest) error DeleteTemplate(ctx context.Context, id string) error GetDeletedTemplates(ctx context.Context) ([]Template, error) GetTemplateEventList(ctx context.Context, id string) ([]Event, error) }
TemplateOperator is an interface defining API of a template operator
type TemplateProperties ¶
type TemplateProperties struct { //Status indicates the status of the object. Status string `json:"status"` //Status indicates the status of the object. Ostype string `json:"ostype"` //Helps to identify which datacenter an object belongs to. LocationUUID string `json:"location_uuid"` //Description of the Template. Version string `json:"version"` //Description of the Template. LocationIata string `json:"location_iata"` //Defines the date and time of the last object change. ChangeTime GSTime `json:"change_time"` //the object is private, the value will be true. Otherwise the value will be false. Private bool `json:"private"` //The UUID of an object is always unique, and refers to a specific object. ObjectUUID string `json:"object_uuid"` //If a template has been used that requires a license key (e.g. Windows Servers) //this shows the product_no of the license (see the /prices endpoint for more details). LicenseProductNo int `json:"license_product_no"` //Defines the date and time the object was initially created. CreateTime GSTime `json:"create_time"` //Total minutes the object has been running. UsageInMinutes int `json:"usage_in_minutes"` //The capacity of a storage/ISO-Image/template/snapshot in GB. Capacity int `json:"capacity"` //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. LocationName string `json:"location_name"` //The OS distrobution that the Template contains. Distro string `json:"distro"` //Description of the Template. Description string `json:"description"` //The price for the current period since the last bill. CurrentPrice float64 `json:"current_price"` //The human-readable name of the location. It supports the full UTF-8 charset, with a maximum of 64 characters. LocationCountry string `json:"location_country"` //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. Name string `json:"name"` //List of labels. Labels []string `json:"labels"` }
TemplateProperties JSOn struct of properties of a template
type TemplateUpdateRequest ¶
type TemplateUpdateRequest struct { //The human-readable name of the object. It supports the full UTF-8 charset, with a maximum of 64 characters. //Optional. Name string `json:"name,omitempty"` //List of labels. Optional. Labels *[]string `json:"labels,omitempty"` }
TemplateUpdateRequest JSON struct of a request for updating a template
type TransportLayerProtocol ¶ added in v3.2.0
type TransportLayerProtocol string
var ( TCPTransport TransportLayerProtocol = "tcp" UDPTransport TransportLayerProtocol = "udp" )
All available transport protocol
Source Files
¶
- client.go
- common.go
- config.go
- event.go
- firewall.go
- ip.go
- isoimage.go
- label.go
- loadbalancer.go
- location.go
- marketplace_application.go
- network.go
- objectstorage.go
- paas.go
- request.go
- server.go
- serverip.go
- serverisoimage.go
- servernetwork.go
- serverstorage.go
- snapshot.go
- snapshotscheduler.go
- sshkey.go
- storage.go
- storage_backup.go
- storage_backup_schedule.go
- template.go
- testcommon.go
- types.go