compute

package
v1.3.0-alpha1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2017 License: MIT Imports: 15 Imported by: 28

Documentation

Overview

Package compute contains the client for Dimension Data's cloud compute API.

Index

Constants

View Source
const (
	// AssetTypeServer is an asset type representing a server.
	AssetTypeServer = "SERVER"

	// AssetTypeNetworkDomain is an asset type representing a network domain.
	AssetTypeNetworkDomain = "NETWORK_DOMAIN"

	// AssetTypeVLAN is an asset type representing a virtual LAN (VLAN).
	AssetTypeVLAN = "VLAN"

	// AssetTypeCustomerImage is an asset type representing a customer image.
	AssetTypeCustomerImage = "VLAN"

	// AssetTypePublicIPBlock is an asset type representing a public IP block.
	AssetTypePublicIPBlock = "PUBLIC_IP_BLOCK"

	// AssetTypeUser is an asset type representing a user.
	AssetTypeUser = "PUBLIC_IP_BLOCK"
)
View Source
const (
	// ResourceStatusNormal indicates that a resource is active.
	ResourceStatusNormal = "NORMAL"

	// ResourceStatusPendingAdd indicates that an add operation is pending for the resource.
	ResourceStatusPendingAdd = "PENDING_ADD"

	// ResourceStatusPendingChange indicates that a change operation is pending for the resource.
	ResourceStatusPendingChange = "PENDING_CHANGE"

	// ResourceStatusPendingDelete indicates that a delete operation is pending for the resource.
	ResourceStatusPendingDelete = "PENDING_DELETE"
)
View Source
const (
	// FirewallRuleActionAccept indicates a firewall rule that, if it matches, will accept the packet and stop processing further rules.
	FirewallRuleActionAccept = "ACCEPT_DECISIVELY"

	// FirewallRuleActionDrop indicates a firewale rule that, if it matches, will drop the packet.
	FirewallRuleActionDrop = "DROP"

	// FirewallRuleIPVersion4 indicates a firewall rule that targets IPv4
	FirewallRuleIPVersion4 = "IPv4"

	// FirewallRuleIPVersion6 indicates a firewale rule that targets IPv6
	FirewallRuleIPVersion6 = "IPv6"

	// FirewallRuleProtocolIP indicates a firewall rule that targets the Internet Protocol (IP)
	FirewallRuleProtocolIP = "IP"

	// FirewallRuleProtocolTCP indicates a firewall rule that targets the Transmission Control Protocol (TCP)
	FirewallRuleProtocolTCP = "TCP"

	// FirewallRuleProtocolICMP indicates a firewall rule that targets the Internet Control Message Protocol (ICMP)
	FirewallRuleProtocolICMP = "ICMP"

	// FirewallRuleMatchAny indicates a firewall rule value that matches any other value in the same scope.
	FirewallRuleMatchAny = "ANY"
)
View Source
const (
	// ResultSuccess indicates that an operation completed successfully.
	ResultSuccess = "SUCCESS"

	// ResultResourceBusy indicates that an operation cannot be performed on a resource because the resource is busy.
	ResultResourceBusy = "RESOURCE_BUSY"
)
View Source
const (
	// ResponseCodeOK indicates that an operation completed successfully.
	ResponseCodeOK = "OK"

	// ResponseCodeInProgress indicates that an operation is in progress.
	ResponseCodeInProgress = "IN_PROGRESS"

	// ResponseCodeResourceNotFound indicates that an operation failed because a target resource was not found.
	ResponseCodeResourceNotFound = "RESOURCE_NOT_FOUND"

	// ResponseCodeAuthorizationFailure indicates that an operation failed because the caller was not authorised to perform that operation (e.g. target resource belongs to another organisation).
	ResponseCodeAuthorizationFailure = "AUTHORIZATION_FAILURE"

	// ResponseCodeInvalidInputData indicates that an operation failed due to invalid input data.
	ResponseCodeInvalidInputData = "INVALID_INPUT_DATA"

	// ResponseCodeResourceNameNotUnique indicates that an operation failed due to the use of a name that duplicates an existing name.
	ResponseCodeResourceNameNotUnique = "NAME_NOT_UNIQUE"

	// ResponseCodeIPAddressNotUnique indicates that an operation failed due to the use of an IP address that duplicates an existing IP address.
	ResponseCodeIPAddressNotUnique = "IP_ADDRESS_NOT_UNIQUE"

	// ResponseCodeIPAddressOutOfRange indicates that an operation failed due to the use of an IP address lies outside the supported range (e.g. outside of the target subnet).
	ResponseCodeIPAddressOutOfRange = "IP_ADDRESS_OUT_OF_RANGE"

	// ResponseCodeNoIPAddressAvailable indicates that there are no remaining unreserved IPv4 addresses in the target subnet.
	ResponseCodeNoIPAddressAvailable = "NO_IP_ADDRESS_AVAILABLE"

	// ResponseCodeResourceHasDependency indicates that an operation cannot be performed on a resource because of a resource that depends on it.
	ResponseCodeResourceHasDependency = "HAS_DEPENDENCY"

	// ResponseCodeResourceBusy indicates that an operation cannot be performed on a resource because the resource is busy.
	ResponseCodeResourceBusy = "RESOURCE_BUSY"

	// ResponseCodeResourceLocked indicates that an operation cannot be performed on a resource because the resource is locked.
	ResponseCodeResourceLocked = "RESOURCE_LOCKED"

	// ResponseCodeExceedsLimit indicates that an operation failed because a resource limit was exceeded.
	ResponseCodeExceedsLimit = "EXCEEDS_LIMIT"

	// ResponseCodeOutOfResources indicates that an operation failed because some type of resource (e.g. free IPv4 addresses) has been exhausted.
	ResponseCodeOutOfResources = "OUT_OF_RESOURCES"

	// ResponseCodeOperationNotSupported indicates that an operation is not supported.
	ResponseCodeOperationNotSupported = "OPERATION_NOT_SUPPORTED"

	// ResponseCodeInfrastructureInMaintenance indicates that an operation failed due to maintenance being performed on the supporting infrastructure.
	ResponseCodeInfrastructureInMaintenance = "INFRASTRUCTURE_IN_MAINTENANCE"

	// ResponseCodeUnexpectedError indicates that the CloudControl API encountered an unexpected error.
	ResponseCodeUnexpectedError = "UNEXPECTED_ERROR"
)
View Source
const (
	// NetworkAdapterTypeE1000 represents the E1000 network adapter type.
	NetworkAdapterTypeE1000 = "E1000"

	// NetworkAdapterTypeVMXNET3 represents the VMXNET3 network adapter type.
	NetworkAdapterTypeVMXNET3 = "VMXNET3"

	// NetworkAdapterTypeE1000E represents the E1000e network adapter type.
	NetworkAdapterTypeE1000E = "E1000E"

	// NetworkAdapterTypeENHANCED_VMXNET2 represents the VMXNET2/Enhanced network adapter type.
	NetworkAdapterTypeENHANCED_VMXNET2 = "ENHANCED_VMXNET2"

	// NetworkAdapterTypeFLEXIBLE_PCNET32 represents the PCNET32/Flexible network adapter type.
	NetworkAdapterTypeFLEXIBLE_PCNET32 = "FLEXIBLE_PCNET32"
)
View Source
const (
	// ServerDiskSpeedStandard represents the standard speed for server disks.
	ServerDiskSpeedStandard = "STANDARD"

	// ServerDiskSpeedHighPerformance represents the high-performance speed for server disks.
	ServerDiskSpeedHighPerformance = "HIGHPERFORMANCE"

	// ServerDiskSpeedEconomy represents the economy speed for server disks.
	ServerDiskSpeedEcomony = "ECONOMY"
)
View Source
const (
	// VIPNodeStatusEnabled represents a VIP node that is currently enabled.
	VIPNodeStatusEnabled = "ENABLED"

	// VIPNodeStatusDisabled represents a VIP node that is currently disabled.
	VIPNodeStatusDisabled = "DISABLED"

	// VIPNodeStatusForcedOffline represents a VIP node that has been forced offline.
	VIPNodeStatusForcedOffline = "FORCED_OFFLINE"
)
View Source
const (
	// ServiceDownActionNone indicates no action will be taken when a pool service is down.
	ServiceDownActionNone = "NONE"

	// ServiceDownActionDrop indicates that a pool service will be dropped when it is down.
	ServiceDownActionDrop = "DROP"

	// ServiceDownActionReselect indicates that a pool service will be reselected when it is down.
	ServiceDownActionReselect = "RESELECT"

	// LoadBalanceMethodRoundRobin indicates that requests will be directed to pool nodes in round-robin fashion.
	LoadBalanceMethodRoundRobin = "ROUND_ROBIN"

	// LoadBalanceMethodLeastConnectionsNode indicates that requests will be directed to the pool node that has the smallest number of active connections at the moment of connection.
	// All connections to the node are considered.
	LoadBalanceMethodLeastConnectionsNode = "LEAST_CONNECTIONS_NODE"

	// LoadBalanceMethodLeastConnectionsMember indicates that requests will be directed to the pool node that has the smallest number of active connections at the moment of connection.
	// Only connections to the node as a member of the current pool are considered.
	LoadBalanceMethodLeastConnectionsMember = "LEAST_CONNECTIONS_MEMBER"

	// LoadBalanceMethodObservedNode indicates that requests will be directed to the pool node that has the smallest number of active connections over time.
	// All connections to the node are considered.
	LoadBalanceMethodObservedNode = "OBSERVED_NODE"

	// LoadBalanceMethodObservedMember indicates that requests will be directed to the pool node that has the smallest number of active connections over time.
	// Only connections to the node as a member of the current pool are considered.
	LoadBalanceMethodObservedMember = "OBSERVED_MEMBER"

	// LoadBalanceMethodPredictiveNode indicates that requests will be directed to the pool node that is predicted to have the smallest number of active connections.
	// All connections to the pool are considered.
	LoadBalanceMethodPredictiveNode = "PREDICTIVE_NODE"

	// LoadBalanceMethodPredictiveMember indicates that requests will be directed to the pool node that is predicted to have the smallest number of active connections over time.
	// Only connections to the pool as a member of the current pool are considered.
	LoadBalanceMethodPredictiveMember = "PREDICTIVE_MEMBER"
)
View Source
const (
	// VirtualListenerTypeStandard represents a standard virtual listener.
	VirtualListenerTypeStandard = "STANDARD"

	// VirtualListenerTypePerformanceLayer4 represents a high-performance (layer 4) virtual listener.
	VirtualListenerTypePerformanceLayer4 = "PERFORMANCE_LAYER_4"
)

Virtual listener types

View Source
const (
	// Any protocol (as supported by a standard virtual listener).
	VirtualListenerStandardProtocolAny = "ANY"

	// Transmission Control Protocol (as supported by a standard virtual listener).
	VirtualListenerStandardProtocolTCP = "TCP"

	// Uniform Datagram Protocol (as supported by a standard virtual listener).
	VirtualListenerStandardProtocolUDP = "UDP"

	// Hypertext Transfer Protocol (as supported by a standard virtual listener).
	VirtualListenerStandardProtocolHTTP = "HTTP"

	// File Transfer Protocol (as supported by a standard virtual listener).
	VirtualListenerStandardProtocolFTP = "FTP"

	// Simple Mail Transfer Protocol (as supported by a standard virtual listener).
	VirtualListenerStandardProtocolSMTP = "SMTP"
)

Protocols supported by a standard virtual listener

View Source
const (
	// Any protocol (as supported by a high-performance layer 4 virtual listener).
	VirtualListenerPerformanceLayer4ProtocolAny = "ANY"

	// Transmission Control Protocol (as supported by a high-performance layer 4 virtual listener).
	VirtualListenerPerformanceLayer4ProtocolTCP = "TCP"

	// Uniform Datagram Protocol (as supported by a high-performance layer 4 virtual listener).
	VirtualListenerPerformanceLayer4ProtocolUDP = "UDP"

	// Hypertext Transfer Protocol (as supported by a high-performance layer 4 virtual listener).
	VirtualListenerPerformanceLayer4ProtocolHTTP = "HTTP"
)

Protocols supported by a high-performance (layer 4) virtual listener

View Source
const (
	// Source port preservation is enabled.
	SourcePortPreservationEnabled = "PRESERVE"

	// Source port preservation is enabled (strict mode).
	SourcePortPreservationEnabledStrict = "PRESERVE_STRICT"

	// Source port preservation is disabled.
	SourcePortPreservationDisabled = "CHANGE"
)

Options for source-port preservation on a virtual listener.

Variables

This section is empty.

Functions

func GetResourceDescription

func GetResourceDescription(resourceType ResourceType) (string, error)

GetResourceDescription retrieves a textual description of the specified resource type.

func ImageTypeName

func ImageTypeName(imageType ImageType) string

ImageTypeName gets the name of the specified image type.

func IsAPIErrorCode

func IsAPIErrorCode(err error, responseCode string) bool

IsAPIErrorCode determines whether the specified error represents a CloudControl API error with the specified response code.

func IsNoIPAddressAvailableError

func IsNoIPAddressAvailableError(err error) bool

IsNoIPAddressAvailableError determines whether the specified error represents a NO_IP_ADDRESS_AVAILABLE response from CloudControl.

func IsOperationCancelledError

func IsOperationCancelledError(err error) bool

IsOperationCancelledError determines if an error is an OperationCancelledError.

func IsResourceBusyError

func IsResourceBusyError(err error) bool

IsResourceBusyError determines whether the specified error represents a RESOURCE_BUSY response from CloudControl.

func IsResourceNotFoundError

func IsResourceNotFoundError(err error) bool

IsResourceNotFoundError determines whether the specified error represents a RESOURCE_NOT_FOUND response from CloudControl.

Types

type APIError

type APIError struct {
	Message  string
	Response APIResponse
}

APIError is an error representing an error response from an API.

func (*APIError) Error

func (apiError *APIError) Error() string

Error returns the error message associated with the APIError.

type APIResponse

type APIResponse interface {
	// GetMessage gets the message associated with the API response.
	GetMessage() string

	// GetResponseCode gets the response code associated with the API response.
	GetResponseCode() string

	// GetRequestID returns the request correlation ID.
	GetRequestID() string

	// GetAPIVersion gets the version of the API that returned the response.
	GetAPIVersion() string
}

APIResponse represents the response to an API call.

type APIResponseAdditionalInformationV1

type APIResponseAdditionalInformationV1 struct {
	Name  string `xml:"name,attr"`
	Value string `xml:"value"`
}

APIResponseAdditionalInformationV1 represents additional information in a V1 API response (in the form of a name / value pair).

type APIResponseV1

type APIResponseV1 struct {
	// The XML name for the "APIResponseV1" data contract
	XMLName xml.Name `xml:"Status"`

	// The operation for which status is being reported.
	Operation string `xml:"operation"`

	// The operation result.
	Result string `xml:"result"`

	// A brief message describing the operation result.
	Message string `xml:"resultDetail"`

	// The operation result code
	ResultCode string `xml:"resultCode"`

	// Additional information (if any).
	AdditionalInformation []APIResponseAdditionalInformationV1 `xml:"additionalInformation"`
}

APIResponseV1 represents a response from the CloudControl v1 API for an asynchronous operation.

func (*APIResponseV1) GetAPIVersion

func (response *APIResponseV1) GetAPIVersion() string

GetAPIVersion gets the response code associated with the API response.

func (*APIResponseV1) GetAdditionalInformation

func (response *APIResponseV1) GetAdditionalInformation(name string) *string

GetAdditionalInformation retrieves additional information (if available) by name from the API response.

Returns nil if no matching additional information is found with the specified name.

func (*APIResponseV1) GetMessage

func (response *APIResponseV1) GetMessage() string

GetMessage gets the message associated with the API response.

func (*APIResponseV1) GetRequestID

func (response *APIResponseV1) GetRequestID() string

GetRequestID gets the request correlation ID.

func (*APIResponseV1) GetResponseCode

func (response *APIResponseV1) GetResponseCode() string

GetResponseCode gets the response code associated with the API response.

func (*APIResponseV1) ToError

func (response *APIResponseV1) ToError(errorMessageOrFormat string, formatArgs ...interface{}) error

ToError creates an error representing the API response.

type APIResponseV2

type APIResponseV2 struct {
	// The operation that was performed.
	Operation string `json:"operation"`

	// The API response code.
	ResponseCode string `json:"responseCode"`

	// The API status message (if any).
	Message string `json:"message"`

	// Informational messages (if any) relating to request fields.
	FieldMessages []FieldMessage `json:"info"`

	// Warning messages (if any) relating to request fields.
	FieldWarnings []FieldMessage `json:"warning"`

	// Error messages (if any) relating to request fields.
	FieldErrors []FieldMessage `json:"error"`

	// The request ID (correlation identifier).
	RequestID string `json:"requestId"`
}

APIResponseV2 represents the basic response most commonly received when making v2 API calls.

func (*APIResponseV2) GetAPIVersion

func (response *APIResponseV2) GetAPIVersion() string

GetAPIVersion gets the response code associated with the API response.

func (*APIResponseV2) GetFieldError

func (response *APIResponseV2) GetFieldError(fieldName string) *string

GetFieldError retrieves the value of the specified field error message (if any). Returns nil if the no field error message with the specified name is present in the API response.

func (*APIResponseV2) GetFieldMessage

func (response *APIResponseV2) GetFieldMessage(fieldName string) *string

GetFieldMessage retrieves the value of the specified field message (if any). Returns nil if the no field message with the specified name is present in the API response.

func (*APIResponseV2) GetFieldWarning

func (response *APIResponseV2) GetFieldWarning(fieldName string) *string

GetFieldWarning retrieves the value of the specified field warning message (if any). Returns nil if the no field warning message with the specified name is present in the API response.

func (*APIResponseV2) GetMessage

func (response *APIResponseV2) GetMessage() string

GetMessage gets the message associated with the API response.

func (*APIResponseV2) GetRequestID

func (response *APIResponseV2) GetRequestID() string

GetRequestID gets the request correlation ID.

func (*APIResponseV2) GetResponseCode

func (response *APIResponseV2) GetResponseCode() string

GetResponseCode gets the response code associated with the API response.

func (*APIResponseV2) ToError

func (response *APIResponseV2) ToError(errorMessageOrFormat string, formatArgs ...interface{}) error

ToError creates an error representing the API response.

type Account

type Account struct {
	// The XML name for the "Account" data contract
	XMLName xml.Name `xml:"Account"`

	// The compute API user name.
	UserName string `xml:"userName"`

	// The user's full name.
	FullName string `xml:"fullName"`

	// The user's first name.
	FirstName string `xml:"firstName"`

	// The user's last name.
	LastName string `xml:"lastName"`

	// The user's email address.
	EmailAddress string `xml:"emailAddress"`

	// The user's department.
	Department string `xml:"department"`

	// The Id of the user's organisation.
	OrganizationID string `xml:"orgId"`

	// The user's assigned roles.
	AssignedRoles []Role `xml:"roles>role"`
}

Account represents the details for a compute account.

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the client for Dimension Data's cloud compute API.

func NewClient

func NewClient(region string, username string, password string) *Client

NewClient creates a new cloud compute API client. region is the cloud compute region identifier.

func NewClientWithBaseAddress

func NewClientWithBaseAddress(baseAddress string, username string, password string) *Client

NewClientWithBaseAddress creates a new cloud compute API client using a custom end-point base address. baseAddress is the base URL of the CloudControl API end-point.

func (*Client) AddDiskToServer

func (client *Client) AddDiskToServer(serverID string, scsiUnitID int, sizeGB int, speed string) (diskID string, err error)

AddDiskToServer adds a disk to an existing server.

func (*Client) AddNATRule

func (client *Client) AddNATRule(networkDomainID string, internalIPAddress string, externalIPAddress *string) (natRuleID string, err error)

AddNATRule creates a new NAT rule to forward traffic from the specified external IPv4 address to the specified internal IPv4 address. If externalIPAddress is not specified, an unallocated IPv4 address will be used (if available).

This operation is synchronous.

func (*Client) AddNicToServer

func (client *Client) AddNicToServer(serverID string, ipv4Address string, vlanID string) (nicID string, err error)

AddNicToServer adds a network adapter to a server

func (*Client) AddNicWithTypeToServer

func (client *Client) AddNicWithTypeToServer(serverID string, ipv4Address string, vlanID string, adapterType string) (nicID string, err error)

AddNicWithTypeToServer adds a network adapter of a specific type to a server

func (*Client) AddPublicIPBlock

func (client *Client) AddPublicIPBlock(networkDomainID string) (blockID string, err error)

AddPublicIPBlock adds a new block of public IPv4 addresses to the specified network domain.

func (*Client) AddVIPPoolMember

func (client *Client) AddVIPPoolMember(poolID string, nodeID string, status string, port *int) (poolMemberID string, err error)

AddVIPPoolMember adds a VIP node as a member of a VIP pool. State must be one of VIPNodeStatusEnabled, VIPNodeStatusDisabled, or VIPNodeStatusDisabled Returns the member ID (uniquely identifies this combination of node, pool, and port).

func (*Client) ApplyAssetTags

func (client *Client) ApplyAssetTags(assetID string, assetType string, tags ...Tag) (response *APIResponseV2, err error)

ApplyAssetTags applies the specified tags to an asset.

func (*Client) Cancel

func (client *Client) Cancel()

Cancel cancels all pending WaitForXXX or HTTP request operations.

func (*Client) ChangeNetworkAdapterType

func (client *Client) ChangeNetworkAdapterType(networkAdapterID string, networkAdapterType string) (err error)

ChangeNetworkAdapterType changes the type of a server's network adapter.

func (*Client) ChangeServerDiskSpeed

func (client *Client) ChangeServerDiskSpeed(serverID string, diskID string, newSpeed string) (response *APIResponseV1, err error)

ChangeServerDiskSpeed requests changing of a server disk's speed.

func (*Client) CloneServer

func (client *Client) CloneServer(serverID string, imageName string, imageDescription string, preventGuestOSCustomisation bool) (imageID string, err error)

CloneServer clones a server to create a customer image.

func (*Client) ConfigureRetry

func (client *Client) ConfigureRetry(maxRetryCount int, retryDelay time.Duration)

ConfigureRetry configures the client's retry facility. Set maxRetryCount to 0 (the default) to disable retry.

func (*Client) CreateFirewallRule

func (client *Client) CreateFirewallRule(configuration FirewallRuleConfiguration) (firewallRuleID string, err error)

CreateFirewallRule creates a new firewall rule.

func (*Client) CreateIPAddressList

func (client *Client) CreateIPAddressList(name string, description string, ipVersion string, networkDomainID string, addresses []IPAddressListEntry, childListIDs []string) (addressListID string, err error)

CreateIPAddressList creates a new IP address list. Returns the Id of the new IP address list.

This operation is synchronous.

func (*Client) CreatePortList

func (client *Client) CreatePortList(name string, description string, networkDomainID string, ports []PortListEntry, childListIDs []string) (portListID string, err error)

CreatePortList creates a new port list. Returns the Id of the new port list.

This operation is synchronous.

func (*Client) CreateServerAntiAffinityRule

func (client *Client) CreateServerAntiAffinityRule(server1Id string, server2Id string) (ruleID string, err error)

CreateServerAntiAffinityRule creates an anti-affinity rule for the 2 specified servers. server1Id is the Id of the first server. server2Id is the Id of the second server.

Returns the Id of the new anti-affinity rule.

func (*Client) CreateTagKey

func (client *Client) CreateTagKey(name string, description string, isValueRequired bool, displayOnReports bool) (tagKeyID string, err error)

CreateTagKey creates a new tag key.

func (*Client) CreateVIPNode

func (client *Client) CreateVIPNode(nodeConfiguration NewVIPNodeConfiguration) (nodeID string, err error)

CreateVIPNode creates a new VIP node. Returns the Id of the new node.

func (*Client) CreateVIPPool

func (client *Client) CreateVIPPool(poolConfiguration NewVIPPoolConfiguration) (poolID string, err error)

CreateVIPPool creates a new VIP pool. Returns the Id of the new pool.

func (*Client) CreateVirtualListener

func (client *Client) CreateVirtualListener(listenerConfiguration NewVirtualListenerConfiguration) (nodeID string, err error)

CreateVirtualListener creates a new VIP node. Returns the Id of the new node.

func (*Client) DeleteFirewallRule

func (client *Client) DeleteFirewallRule(id string) error

DeleteFirewallRule deletes the specified FirewallRule rule.

func (*Client) DeleteIPAddressList

func (client *Client) DeleteIPAddressList(id string) (err error)

DeleteIPAddressList deletes an existing IP address list. Returns an error if the operation was not successful.

This operation is synchronous.

func (*Client) DeleteNATRule

func (client *Client) DeleteNATRule(id string) error

DeleteNATRule deletes the specified NAT rule. This operation is synchronous.

func (*Client) DeleteNetworkDomain

func (client *Client) DeleteNetworkDomain(id string) (err error)

DeleteNetworkDomain deletes an existing network domain. Returns an error if the operation was not successful.

func (*Client) DeletePortList

func (client *Client) DeletePortList(id string) (err error)

DeletePortList deletes an existing port list. Returns an error if the operation was not successful.

This operation is synchronous.

func (*Client) DeleteServer

func (client *Client) DeleteServer(id string) (err error)

DeleteServer deletes an existing Server. Returns an error if the operation was not successful.

func (*Client) DeleteServerAntiAffinityRule

func (client *Client) DeleteServerAntiAffinityRule(ruleID string, networkDomainID string) error

DeleteServerAntiAffinityRule deletes the specified server anti-affinity rule.

func (*Client) DeleteTagKey

func (client *Client) DeleteTagKey(id string) error

DeleteTagKey deletes the specified TagKey rule.

func (*Client) DeleteVIPNode

func (client *Client) DeleteVIPNode(id string) (err error)

DeleteVIPNode deletes an existing VIP node. Returns an error if the operation was not successful.

func (*Client) DeleteVIPPool

func (client *Client) DeleteVIPPool(id string) (err error)

DeleteVIPPool deletes an existing VIP pool. Returns an error if the operation was not successful.

func (*Client) DeleteVLAN

func (client *Client) DeleteVLAN(id string) (err error)

DeleteVLAN deletes an existing VLAN. Returns an error if the operation was not successful.

func (*Client) DeleteVirtualListener

func (client *Client) DeleteVirtualListener(id string) (err error)

DeleteVirtualListener deletes an existing virtual listener. Returns an error if the operation was not successful.

func (*Client) DeployNetworkDomain

func (client *Client) DeployNetworkDomain(name string, description string, plan string, datacenter string) (networkDomainID string, err error)

DeployNetworkDomain deploys a new network domain. Returns the Id of the new network domain.

func (*Client) DeployServer

func (client *Client) DeployServer(serverConfiguration ServerDeploymentConfiguration) (serverID string, err error)

DeployServer deploys a new virtual machine.

func (*Client) DeployVLAN

func (client *Client) DeployVLAN(networkDomainID string, name string, description string, ipv4BaseAddress string, ipv4PrefixSize int) (vlanID string, err error)

DeployVLAN deploys a new VLAN into a network domain.

func (*Client) DisableExtendedLogging

func (client *Client) DisableExtendedLogging()

DisableExtendedLogging disables logging of HTTP requests and responses.

func (*Client) EditFirewallRule

func (client *Client) EditFirewallRule(id string, enabled bool) error

EditFirewallRule updates the configuration for a firewall rule (enable / disable). This operation is synchronous.

func (*Client) EditIPAddressList

func (client *Client) EditIPAddressList(edit EditIPAddressList) error

EditIPAddressList updates the configuration for a IP address list.

Note that this operation is not additive; it *replaces* the configuration for the IP address list. You can IPAddressList.BuildEditRequest() to create an EditIPAddressList request that copies the current state of the IPAddressList (and then apply customisations).

This operation is synchronous.

func (*Client) EditNetworkDomain

func (client *Client) EditNetworkDomain(id string, name *string, description *string, plan *string) (err error)

EditNetworkDomain updates an existing network domain. Pass an empty string for any field to retain its existing value. Returns an error if the operation was not successful.

func (*Client) EditPortList

func (client *Client) EditPortList(id string, edit EditPortList) error

EditPortList updates the configuration for a port list.

Note that this operation is not additive; it *replaces* the configuration for the port list. You can PortList.BuildEditRequest() to create an EditPortList request that copies the current state of the PortList (and then apply customisations).

This operation is synchronous.

func (*Client) EditServerMetadata

func (client *Client) EditServerMetadata(serverID string, name *string, description *string) error

EditServerMetadata modifies a server's name and / or description.

Pass nil for values you don't want to modify.

func (*Client) EditVIPNode

func (client *Client) EditVIPNode(id string, nodeConfiguration EditVIPNodeConfiguration) error

EditVIPNode updates an existing VIP node.

func (*Client) EditVIPPool

func (client *Client) EditVIPPool(id string, poolConfiguration EditVIPPoolConfiguration) error

EditVIPPool updates an existing VIP pool.

func (*Client) EditVIPPoolMember

func (client *Client) EditVIPPoolMember(id string, status string) error

EditVIPPoolMember updates the status of an existing VIP pool member. status can be VIPNodeStatusEnabled, VIPNodeStatusDisabled, or VIPNodeStatusForcedOffline

func (*Client) EditVLAN

func (client *Client) EditVLAN(id string, name *string, description *string) (err error)

EditVLAN updates an existing VLAN. Pass an empty string for any field to retain its existing value. Returns an error if the operation was not successful.

func (*Client) EditVirtualListener

func (client *Client) EditVirtualListener(id string, listenerConfiguration EditVirtualListenerConfiguration) error

EditVirtualListener updates an existing virtual listener.

func (*Client) EnableExtendedLogging

func (client *Client) EnableExtendedLogging()

EnableExtendedLogging enables logging of HTTP requests and responses.

func (*Client) ExportCustomerImage

func (client *Client) ExportCustomerImage(imageID string, ovfPackagePrefix string) (exportID string, err error)

ExportCustomerImage exports the specified customer image to an OVF package.

The OVF package can then be downloaded via FTPS.

The image's status will be ResourceStatusPendingChange while the export is in progress, then ResourceStatusNormal once the export is complete.

func (*Client) FindCustomerImage

func (client *Client) FindCustomerImage(name string, dataCenterID string) (image *CustomerImage, err error)

FindCustomerImage finds a customer image by name in a given data centre.

func (*Client) FindOSImage

func (client *Client) FindOSImage(name string, dataCenterID string) (image *OSImage, err error)

FindOSImage finds an OS image by name in a given data centre.

func (*Client) GetAccount

func (client *Client) GetAccount() (*Account, error)

GetAccount retrieves the current user's account information

func (*Client) GetAssetTags

func (client *Client) GetAssetTags(assetID string, assetType string, paging *Paging) (tags *TagDetails, err error)

GetAssetTags gets all tags applied to the specified asset.

Note that due to a bug in the CloudControl API, when you go past the last page if results, you'll receive an UNEXPECTED_ERROR response code.

func (*Client) GetAvailablePublicIPAddresses

func (client *Client) GetAvailablePublicIPAddresses(networkDomainID string) (availableIPs map[string]string, err error)

GetAvailablePublicIPAddresses retrieves all public IPv4 addresses in the specified network domain that are available for use.

Returns a map of IP block IDs, keyed by public IP address.

func (*Client) GetCustomerImage

func (client *Client) GetCustomerImage(id string) (image *CustomerImage, err error)

GetCustomerImage retrieves a specific customer image by Id.

func (*Client) GetDatacenter

func (client *Client) GetDatacenter(id string) (datacenter *Datacenter, err error)

GetDatacenter retrieves the datacenter with the specified Id. id is the Id of the datacenter to retrieve. Returns nil if no datacenter is found with the specified Id.

func (*Client) GetFirewallRule

func (client *Client) GetFirewallRule(id string) (rule *FirewallRule, err error)

GetFirewallRule retrieves the Firewall rule with the specified Id. Returns nil if no Firewall rule is found with the specified Id.

func (*Client) GetIPAddressList

func (client *Client) GetIPAddressList(id string) (addressList *IPAddressList, err error)

GetIPAddressList retrieves the IP address list with the specified Id. id is the Id of the IP address list to retrieve. Returns nil if no addressList is found with the specified Id.

func (*Client) GetNATRule

func (client *Client) GetNATRule(id string) (rule *NATRule, err error)

GetNATRule retrieves the NAT rule with the specified Id. Returns nil if no NAT rule is found with the specified Id.

func (*Client) GetNetworkDomain

func (client *Client) GetNetworkDomain(id string) (domain *NetworkDomain, err error)

GetNetworkDomain retrieves the network domain with the specified Id. id is the Id of the network domain to retrieve. Returns nil if no network domain is found with the specified Id.

func (*Client) GetNetworkDomainByName

func (client *Client) GetNetworkDomainByName(name string, dataCenterID string) (domain *NetworkDomain, err error)

GetNetworkDomainByName retrieves the network domain (if any) with the specified name in the specified data centre.

func (*Client) GetOSImage

func (client *Client) GetOSImage(id string) (image *OSImage, err error)

GetOSImage retrieves a specific OS image by Id.

func (*Client) GetPortList

func (client *Client) GetPortList(id string) (portList *PortList, err error)

GetPortList retrieves the port list with the specified Id. id is the Id of the port list to retrieve. Returns nil if no portList is found with the specified Id.

func (*Client) GetPublicIPBlock

func (client *Client) GetPublicIPBlock(id string) (block *PublicIPBlock, err error)

GetPublicIPBlock retrieves the public IPv4 address block with the specified Id. Returns nil if no IPv4 address block is found with the specified Id.

func (*Client) GetResource

func (client *Client) GetResource(id string, resourceType ResourceType) (Resource, error)

GetResource retrieves a compute resource of the specified type by Id. id is the resource Id. resourceType is the resource type (e.g. ResourceTypeNetworkDomain, ResourceTypeVLAN, etc).

func (*Client) GetServer

func (client *Client) GetServer(id string) (server *Server, err error)

GetServer retrieves the server with the specified Id. id is the Id of the server to retrieve. Returns nil if no server is found with the specified Id.

func (*Client) GetServerAntiAffinityRule

func (client *Client) GetServerAntiAffinityRule(ruleID string, networkDomainID string) (rule *ServerAntiAffinityRule, err error)

GetServerAntiAffinityRule retrieves the specified server anti-affinity rule (in the specified network domain).

func (*Client) GetTagKey

func (client *Client) GetTagKey(id string) (tagKey *TagKey, err error)

GetTagKey retrieves the tag key with the specified Id. Returns nil if no tag key is found with the specified Id.

func (*Client) GetVIPNode

func (client *Client) GetVIPNode(id string) (node *VIPNode, err error)

GetVIPNode retrieves the VIP node with the specified Id. Returns nil if no VIP node is found with the specified Id.

func (*Client) GetVIPPool

func (client *Client) GetVIPPool(id string) (pool *VIPPool, err error)

GetVIPPool retrieves the VIP pool with the specified Id. Returns nil if no VIP pool is found with the specified Id.

func (*Client) GetVIPPoolMember

func (client *Client) GetVIPPoolMember(id string) (member *VIPPoolMember, err error)

GetVIPPoolMember retrieves the VIP pool member with the specified Id. Returns nil if no VIP pool member is found with the specified Id.

func (*Client) GetVLAN

func (client *Client) GetVLAN(id string) (vlan *VLAN, err error)

GetVLAN retrieves the VLAN with the specified Id. id is the Id of the VLAN to retrieve. Returns nil if no VLAN is found with the specified Id.

func (*Client) GetVLANByName

func (client *Client) GetVLANByName(name string, networkDomainID string) (*VLAN, error)

GetVLANByName retrieves the VLAN (if any) with the specified name in the specified network domain.

func (*Client) GetVirtualListener

func (client *Client) GetVirtualListener(id string) (listener *VirtualListener, err error)

GetVirtualListener retrieves the virtual listener with the specified Id. Returns nil if no virtual listener is found with the specified Id.

func (*Client) ImportCustomerImage

func (client *Client) ImportCustomerImage(imageName string, imageDescription string, preventGuestOSCustomization bool, ovfPackagePrefix string, datacenterID string) (importID string, err error)

ImportCustomerImage imports the specified customer image from an OVF package.

The OVF package can be uploaded via FTPS (call GetDatacenter to determine the FTPS end-point for the target datacenter).

The image's status will be ResourceStatusPendingAdd while the import is in progress, then ResourceStatusNormal once the export is complete.

func (*Client) IsExtendedLoggingEnabled

func (client *Client) IsExtendedLoggingEnabled() bool

IsExtendedLoggingEnabled determines if logging of HTTP requests and responses is enabled.

func (*Client) ListCustomerImagesInDatacenter

func (client *Client) ListCustomerImagesInDatacenter(dataCenterID string, paging *Paging) (images *CustomerImages, err error)

ListCustomerImagesInDatacenter lists all customer images in a given data centre.

func (*Client) ListDatacenters

func (client *Client) ListDatacenters(paging *Paging) (datacenters *Datacenters, err error)

ListDatacenters retrieves a list of all datacenters. TODO: Support filtering and sorting.

func (*Client) ListDefaultHealthMonitors

func (client *Client) ListDefaultHealthMonitors(networkDomainID string, paging *Paging) (healthMonitors *HealthMonitors, err error)

ListDefaultHealthMonitors retrieves a list of all default load-balancing health monitors in the specified network domain.

func (*Client) ListDefaultIRules

func (client *Client) ListDefaultIRules(networkDomainID string, paging *Paging) (irules *IRules, err error)

ListDefaultIRules retrieves a list of all default load-balancing iRules in the specified network domain.

func (*Client) ListDefaultPersistenceProfiles

func (client *Client) ListDefaultPersistenceProfiles(networkDomainID string, paging *Paging) (persistenceProfiles *PersistenceProfiles, err error)

ListDefaultPersistenceProfiles retrieves a list of all default load-balancing persistence profiles in the specified network domain.

func (*Client) ListFirewallRules

func (client *Client) ListFirewallRules(networkDomainID string, paging *Paging) (rules *FirewallRules, err error)

ListFirewallRules lists all firewall rules that apply to the specified network domain.

func (*Client) ListIPAddressLists

func (client *Client) ListIPAddressLists(networkDomainID string) (addressLists *IPAddressLists, err error)

ListIPAddressLists retrieves all IP address lists associated with the specified network domain.

func (*Client) ListNATRules

func (client *Client) ListNATRules(networkDomainID string, paging *Paging) (rules *NATRules, err error)

ListNATRules retrieves all NAT rules defined for the specified network domain.

func (*Client) ListNetworkDomains

func (client *Client) ListNetworkDomains(paging *Paging) (domains *NetworkDomains, err error)

ListNetworkDomains retrieves a list of all network domains. TODO: Support filtering and sorting.

func (*Client) ListOSImagesInDatacenter

func (client *Client) ListOSImagesInDatacenter(dataCenterID string, paging *Paging) (images *OSImages, err error)

ListOSImagesInDatacenter lists all OS images in a given data centre.

func (*Client) ListPortLists

func (client *Client) ListPortLists(networkDomainID string) (portLists *PortLists, err error)

ListPortLists retrieves all port lists associated with the specified network domain.

func (*Client) ListPublicIPBlocks

func (client *Client) ListPublicIPBlocks(networkDomainID string, paging *Paging) (blocks *PublicIPBlocks, err error)

ListPublicIPBlocks retrieves all blocks of public IPv4 addresses that have been allocated to the specified network domain.

func (*Client) ListReservedIPv6AddressesInVLAN

func (client *Client) ListReservedIPv6AddressesInVLAN(vlanID string) (reservedIPAddresses *ReservedIPv6Addresses, err error)

ListReservedIPv6AddressesInVLAN retrieves all IPv6 addresses reserved in the specified VLAN.

func (*Client) ListReservedPrivateIPv4AddressesInVLAN

func (client *Client) ListReservedPrivateIPv4AddressesInVLAN(vlanID string) (reservedIPAddresses *ReservedIPv4Addresses, err error)

ListReservedPrivateIPv4AddressesInVLAN retrieves all private IPv4 addresses reserved in the specified VLAN.

func (*Client) ListReservedPublicIPAddresses

func (client *Client) ListReservedPublicIPAddresses(networkDomainID string, paging *Paging) (reservedPublicIPs *ReservedPublicIPs, err error)

ListReservedPublicIPAddresses retrieves all public IPv4 addresses in the specified network domain that have been reserved.

func (*Client) ListServerAntiAffinityRules

func (client *Client) ListServerAntiAffinityRules(networkDomainID string, paging *Paging) (rules *ServerAntiAffinityRules, err error)

ListServerAntiAffinityRules lists the server anti-affinity rules in a network domain.

func (*Client) ListServersInNetworkDomain

func (client *Client) ListServersInNetworkDomain(networkDomainID string, paging *Paging) (servers Servers, err error)

ListServersInNetworkDomain retrieves a page of servers in the specified network domain.

func (*Client) ListTagKeys

func (client *Client) ListTagKeys(paging *Paging) (tagKeys *TagKeys, err error)

ListTagKeys lists all tag keys that apply to the specified network domain.

func (*Client) ListVIPNodesInNetworkDomain

func (client *Client) ListVIPNodesInNetworkDomain(networkDomainID string, paging *Paging) (nodes *VIPNodes, err error)

ListVIPNodesInNetworkDomain retrieves a list of all VIP nodes in the specified network domain.

func (*Client) ListVIPPoolMembers

func (client *Client) ListVIPPoolMembers(poolID string, paging *Paging) (members *VIPPoolMembers, err error)

ListVIPPoolMembers retrieves a list of all members of the specified VIP pool.

func (*Client) ListVIPPoolMembershipsInNetworkDomain

func (client *Client) ListVIPPoolMembershipsInNetworkDomain(networkDomainID string, paging *Paging) (members *VIPPoolMembers, err error)

ListVIPPoolMembershipsInNetworkDomain retrieves a list of all VIP pool memberships of the specified network domain.

func (*Client) ListVIPPoolsInNetworkDomain

func (client *Client) ListVIPPoolsInNetworkDomain(networkDomainID string, paging *Paging) (pools *VIPPools, err error)

ListVIPPoolsInNetworkDomain retrieves a list of all VIP pools in the specified network domain.

func (*Client) ListVLANs

func (client *Client) ListVLANs(networkDomainID string, paging *Paging) (vlans *VLANs, err error)

ListVLANs retrieves a list of all VLANs in the specified network domain. TODO: Support filtering and sorting.

func (*Client) ListVirtualListenersInNetworkDomain

func (client *Client) ListVirtualListenersInNetworkDomain(networkDomainID string, paging *Paging) (listeners *VirtualListeners, err error)

ListVirtualListenersInNetworkDomain retrieves a list of all virtual listeners in the specified network domain.

func (*Client) NotifyServerIPAddressChange

func (client *Client) NotifyServerIPAddressChange(networkAdapterID string, newIPv4Address *string, newIPv6Address *string) error

NotifyServerIPAddressChange notifies the system that the IP address for a server's network adapter has changed. serverNetworkAdapterID is the Id of the server's network adapter. Must specify at least one of newIPv4Address / newIPv6Address.

func (*Client) PowerOffServer

func (client *Client) PowerOffServer(id string) error

PowerOffServer requests that the specified server be powered off (hard shut-down).

func (*Client) ReconfigureServer

func (client *Client) ReconfigureServer(serverID string, memoryGB *int, cpuCount *int, cpuCoresPerSocket *int, cpuSpeed *string) error

ReconfigureServer updates the configuration for a server. serverID is the Id of the server.

func (*Client) RemoveAssetTags

func (client *Client) RemoveAssetTags(assetID string, assetType string, tagNames ...string) (response *APIResponseV2, err error)

RemoveAssetTags removes the specified tags from an asset.

func (*Client) RemoveDiskFromServer

func (client *Client) RemoveDiskFromServer(diskID string) error

RemoveDiskFromServer removes an existing disk from a server.

func (*Client) RemoveNicFromServer

func (client *Client) RemoveNicFromServer(networkAdapterID string) (err error)

RemoveNicFromServer removes the Nic from the server

func (*Client) RemovePublicIPBlock

func (client *Client) RemovePublicIPBlock(id string) error

RemovePublicIPBlock removes the specified block of public IPv4 addresses from its network domain. This operation is synchronous.

func (*Client) RemoveVIPPoolMember

func (client *Client) RemoveVIPPoolMember(id string) error

RemoveVIPPoolMember removes a VIP pool member.

func (*Client) ReserveIPv6Address

func (client *Client) ReserveIPv6Address(vlanID string, ipAddress string) error

ReserveIPv6Address creates a reservation for an IPv6 address on a VLAN.

func (*Client) ReservePrivateIPv4Address

func (client *Client) ReservePrivateIPv4Address(vlanID string, ipAddress string) error

ReservePrivateIPv4Address creates a reservation for a private IPv4 address on a VLAN.

func (*Client) Reset

func (client *Client) Reset()

Reset clears all cached data from the Client and resets cancellation (if required).

func (*Client) ResizeServerDisk

func (client *Client) ResizeServerDisk(serverID string, diskID string, newSizeGB int) (response *APIResponseV1, err error)

ResizeServerDisk requests resizing of a server disk.

func (*Client) ShutdownServer

func (client *Client) ShutdownServer(id string) error

ShutdownServer requests that the specified server be shut down (gracefully, if possible).

func (*Client) StartServer

func (client *Client) StartServer(id string) error

StartServer requests that the specified server be started.

func (*Client) UnreserveIPv6Address

func (client *Client) UnreserveIPv6Address(vlanID string, ipAddress string) error

UnreserveIPv6Address removes the reservation (if any) for an IPv6 address on a VLAN.

func (*Client) UnreservePrivateIPv4Address

func (client *Client) UnreservePrivateIPv4Address(vlanID string, ipAddress string) error

UnreservePrivateIPv4Address removes the reservation (if any) for a private IPv4 address on a VLAN.

func (*Client) WaitForAdd

func (client *Client) WaitForAdd(resourceType ResourceType, id string, actionDescription string, timeout time.Duration) (resource Resource, err error)

WaitForAdd waits for a resource's pending add operation to complete.

func (*Client) WaitForChange

func (client *Client) WaitForChange(resourceType ResourceType, id string, actionDescription string, timeout time.Duration) (resource Resource, err error)

WaitForChange waits for a resource's pending change operation to complete.

func (*Client) WaitForDelete

func (client *Client) WaitForDelete(resourceType ResourceType, id string, timeout time.Duration) error

WaitForDelete waits for a resource's pending deletion to complete.

func (*Client) WaitForDeploy

func (client *Client) WaitForDeploy(resourceType ResourceType, id string, timeout time.Duration) (resource Resource, err error)

WaitForDeploy waits for a resource's pending deployment operation to complete.

func (*Client) WaitForEdit

func (client *Client) WaitForEdit(resourceType ResourceType, id string, timeout time.Duration) (resource Resource, err error)

WaitForEdit waits for a resource's pending edit operation to complete.

func (*Client) WaitForNestedDeleteChange

func (client *Client) WaitForNestedDeleteChange(resourceType ResourceType, id string, actionDescription string, timeout time.Duration) (resource Resource, err error)

WaitForNestedDeleteChange waits for a resource's pending change operation (actually the delete of a nested resource) to complete.

func (*Client) WaitForServerClone

func (client *Client) WaitForServerClone(customerImageID string, timeout time.Duration) (resource Resource, err error)

WaitForServerClone waits for a server's pending clone operation to complete.

Pass the customer image Id, not the server Id.

type CustomerImage

type CustomerImage struct {
	ID              string               `json:"id"`
	Name            string               `json:"name"`
	Description     string               `json:"description"`
	DataCenterID    string               `json:"datacenterId"`
	OperatingSystem OperatingSystem      `json:"operatingSystem"`
	CPU             VirtualMachineCPU    `json:"cpu"`
	MemoryGB        int                  `json:"memoryGb"`
	Disks           []VirtualMachineDisk `json:"disk"`
	CreateTime      string               `json:"createTime"`
	State           string               `json:"state"`
}

CustomerImage represents a custom virtual machine image.

func (*CustomerImage) ApplyTo

func (image *CustomerImage) ApplyTo(config *ServerDeploymentConfiguration)

ApplyTo applies the CustomerImage to the specified ServerDeploymentConfiguration.

func (*CustomerImage) GetDatacenterID

func (image *CustomerImage) GetDatacenterID() string

GetDatacenterID retrieves Id of the datacenter where the image is located.

func (*CustomerImage) GetID

func (image *CustomerImage) GetID() string

GetID retrieves the image ID.

func (*CustomerImage) GetName

func (image *CustomerImage) GetName() string

GetName retrieves the image name.

func (*CustomerImage) GetOS

func (image *CustomerImage) GetOS() OperatingSystem

GetOS retrieves information about the image's operating system.

func (*CustomerImage) GetResourceType

func (image *CustomerImage) GetResourceType() ResourceType

GetResourceType retrieves the resource type.

func (*CustomerImage) GetState

func (image *CustomerImage) GetState() string

GetState retrieves the resource's current state (e.g. ResourceStatusNormal, etc).

func (*CustomerImage) GetType

func (image *CustomerImage) GetType() ImageType

GetType determines the image type.

func (*CustomerImage) IsDeleted

func (image *CustomerImage) IsDeleted() bool

IsDeleted determines whether the resource been deleted (i.e. the underlying struct is nil)?

func (*CustomerImage) ToEntityReference

func (image *CustomerImage) ToEntityReference() EntityReference

ToEntityReference creates an EntityReference representing the CustomerImage.

type CustomerImages

type CustomerImages struct {
	// The current page of network domains.
	Images []CustomerImage `json:"customerImage"`

	// The current page number.
	PageNumber int `json:"pageNumber"`

	// The number of customer images in the current page of results.
	PageCount int `json:"pageCount"`

	// The total number of customer images that match the requested filter criteria (if any).
	TotalCount int `json:"totalCount"`

	// The maximum number of customer images per page.
	PageSize int `json:"pageSize"`
}

CustomerImages represents a page of CustomerImage results.

type Datacenter

type Datacenter struct {
	// The datacenter Id.
	ID string `json:"id"`

	// The datacenter type (for display purposes only).
	Type string `json:"type"`

	// The datacenter display name.
	DisplayName string `json:"displayName"`

	// The name of the city the datacenter is located in.
	City string `json:"city"`

	// The name of the state the datacenter is located in.
	State string `json:"state"`

	// The name of the country the datacenter is located in.
	Country string `json:"country"`

	// The URL of the datacenter's administrative SSL VPN.
	VPNURL string `json:"vpnUrl"`

	// The name of the FTPS host used to upload / download OVF packages to / from the datacenter.
	FTPSHost string `json:"ftpsHost"`

	// The datacenter's network configuration.
	Networking DatacenterNetworking `json:"networking"`
}

Datacenter represents an MCP datacenter.

type DatacenterNetworking

type DatacenterNetworking struct {
	// The networking infrastructure type of the data center for programmatic use.
	//
	// "1" means MCP 1.0
	// "2" means MCP 2.0
	Type string `json:"type"`

	// Indicates whether the networking infrastructure is under maintenance.
	MaintenanceStatus string `json:"maintenanceStatus"`
}

DatacenterNetworking represents the networking configuration for an MCP datacenter.

type Datacenters

type Datacenters struct {
	// The current page of datacenters.
	Items []Datacenter `json:"datacenter"`

	PagedResult
}

Datacenters represents the response to a "List Datacenters" API call.

type DeleteVLAN

type DeleteVLAN struct {
	// The VLAN Id.
	ID string `json:"id"`
}

DeleteVLAN represents a request to delete a compute VLAN.

type DeployVLAN

type DeployVLAN struct {
	// The Id of the network domain in which the VLAN will be deployed.
	VLANID string `json:"networkDomainId"`

	// The VLAN name.
	Name string `json:"name"`

	// The VLAN description.
	Description string `json:"description"`

	// The private IPv4 base address for the VLAN.
	IPv4BaseAddress string `json:"privateIpv4BaseAddress"`

	// The private IPv4 prefix size (i.e. netmask) for the VLAN.
	IPv4PrefixSize int `json:"privateIpv4PrefixSize"`
}

DeployVLAN represents the request body when deploying a cloud compute VLAN.

type EditIPAddressList

type EditIPAddressList struct {
	ID           string               `json:"id"`
	Description  string               `json:"description"`
	Addresses    []IPAddressListEntry `json:"ipAddress"`
	ChildListIDs []string             `json:"childIpAddressListId"`
}

EditIPAddressList represents the request body for editing an IP address list.

type EditPortList

type EditPortList struct {
	ID           string          `json:"id"`
	Description  string          `json:"description"`
	Ports        []PortListEntry `json:"port"`
	ChildListIDs []string        `json:"childPortListId"`
}

EditPortList represents the request body for editing a port list.

type EditVIPNodeConfiguration

type EditVIPNodeConfiguration struct {
	// The VIP node Id.
	ID string `json:"id"`

	// The VIP node description.
	Description *string `json:"description,omitempty"`

	// The node status (VIPNodeStatusEnabled, VIPNodeStatusDisabled, or VIPNodeStatusForcedOffline).
	Status *string `json:"status,omitempty"`

	// The Id of the node's associated health monitor (if any).
	HealthMonitorID *string `json:"healthMonitorId,omitempty"`

	// The node's connection limit (must be greater than 0).
	ConnectionLimit *int `json:"connectionLimit,omitempty"`

	// The node's connection rate limit (must be greater than 0).
	ConnectionRateLimit *int `json:"connectionRateLimit,omitempty"`
}

EditVIPNodeConfiguration represents the request body when editing a VIP node.

type EditVIPPoolConfiguration

type EditVIPPoolConfiguration struct {
	// The VIP pool Id.
	ID string `json:"id"`

	// The VIP pool description.
	Description *string `json:"description,omitempty"`

	// The load-balancing method used for pools in the pool.
	LoadBalanceMethod *string `json:"loadBalanceMethod"`

	// The Id of the pool's associated health monitors (if any).
	// Up to 2 health monitors can be specified per pool.
	HealthMonitorIDs *[]string `json:"healthMonitorId,omitempty"`

	// The action performed when a pool in the pool is down.
	ServiceDownAction *string `json:"serviceDownAction"`

	// The time, in seconds, over which the the pool will ramp new pools up to their full request rate.
	SlowRampTime *int `json:"slowRampTime"`
}

EditVIPPoolConfiguration represents the request body when editing a VIP pool.

type EditVLAN

type EditVLAN struct {
	// The ID of the VLAN to edit.
	ID string `json:"id"`

	// The VLAN name (optional).
	Name *string `json:"name,omitempty"`

	// The VLAN description (optional).
	Description *string `json:"description,omitempty"`
}

EditVLAN represents the request body when editing a cloud compute VLAN.

type EditVirtualListenerConfiguration

type EditVirtualListenerConfiguration struct {
	ID                     string    `json:"id"`
	Description            *string   `json:"description,omitempty"`
	Enabled                *bool     `json:"enabled,omitempty"`
	ConnectionLimit        *int      `json:"connectionLimit,omitempty"`
	ConnectionRateLimit    *int      `json:"connectionRateLimit,omitempty"`
	SourcePortPreservation *string   `json:"sourcePortPreservation,omitempty"`
	PoolID                 *string   `json:"poolId,omitempty"`
	PersistenceProfileID   *string   `json:"persistenceProfileId,omitempty"`
	IRuleIDs               *[]string `json:"iruleId,omitempty"`
	OptimizationProfiles   *[]string `json:"optimizationProfile,omitempty"`
}

EditVirtualListenerConfiguration represents the configuration for editing a virtual listener.

type Entity

type Entity interface {
	// GetID retrieves the entity's ID.
	GetID() string
}

Entity represents a Cloud Control entity.

type EntityReference

type EntityReference struct {
	// The entity Id.
	ID string `json:"id"`
	// The entity name.
	Name string `json:"name,omitempty"`
}

EntityReference is used to group an entity Id and name together for serialisation / deserialisation purposes.

type FieldMessage

type FieldMessage struct {
	// The field name.
	FieldName string `json:"name"`

	// The field message.
	Message string `json:"value"`
}

FieldMessage represents a field name together with an associated message.

type FirewallRule

type FirewallRule struct {
	ID              string            `json:"id"`
	Name            string            `json:"name"`
	Action          string            `json:"action"`
	IPVersion       string            `json:"ipVersion"`
	Protocol        string            `json:"protocol"`
	Source          FirewallRuleScope `json:"source"`
	Destination     FirewallRuleScope `json:"destination"`
	Enabled         bool              `json:"enabled"`
	State           string            `json:"state"`
	NetworkDomainID string            `json:"networkDomainId"`
	DataCenterID    string            `json:"datacenterId"`
	RuleType        string            `json:"ruleType"`
}

FirewallRule represents a firewall rule.

func (*FirewallRule) GetID

func (rule *FirewallRule) GetID() string

GetID returns the firewall rule's Id.

func (*FirewallRule) GetName

func (rule *FirewallRule) GetName() string

GetName returns the firewall rule's name.

func (*FirewallRule) GetResourceType

func (rule *FirewallRule) GetResourceType() ResourceType

GetResourceType returns the firewall rule's resource type.

func (*FirewallRule) GetState

func (rule *FirewallRule) GetState() string

GetState returns the firewall rule's current state.

func (*FirewallRule) IsDeleted

func (rule *FirewallRule) IsDeleted() bool

IsDeleted determines whether the firewall rule has been deleted (is nil).

func (*FirewallRule) ToEntityReference

func (rule *FirewallRule) ToEntityReference() EntityReference

ToEntityReference creates an EntityReference representing the CustomerImage.

type FirewallRuleConfiguration

type FirewallRuleConfiguration struct {
	Name            string                `json:"name"`
	Action          string                `json:"action"`
	Enabled         bool                  `json:"enabled"`
	Placement       FirewallRulePlacement `json:"placement"`
	IPVersion       string                `json:"ipVersion"`
	Protocol        string                `json:"protocol"`
	Source          FirewallRuleScope     `json:"source"`
	Destination     FirewallRuleScope     `json:"destination"`
	NetworkDomainID string                `json:"networkDomainId"`
}

FirewallRuleConfiguration represents the configuration for a new firewall rule.

func (*FirewallRuleConfiguration) Accept

func (configuration *FirewallRuleConfiguration) Accept() *FirewallRuleConfiguration

Accept sets the firewall rule action to FirewallRuleActionAccept.

func (*FirewallRuleConfiguration) Disable

func (configuration *FirewallRuleConfiguration) Disable() *FirewallRuleConfiguration

Disable disables the firewall rule.

func (*FirewallRuleConfiguration) Drop

Drop sets the firewall rule action to FirewallRuleActionDrop.

func (*FirewallRuleConfiguration) Enable

func (configuration *FirewallRuleConfiguration) Enable() *FirewallRuleConfiguration

Enable enables the firewall rule.

func (*FirewallRuleConfiguration) ICMP

ICMP sets the firewall rule's target protocol to ICMP.

func (*FirewallRuleConfiguration) IP

IP sets the firewall rule's target protocol to IP.

func (*FirewallRuleConfiguration) IPv4

IPv4 sets the firewall rule's target IP version to IPv4.

func (*FirewallRuleConfiguration) IPv6

IPv6 sets the firewall rule's target IP version to IPv6.

func (*FirewallRuleConfiguration) MatchAnyDestinationAddress

func (configuration *FirewallRuleConfiguration) MatchAnyDestinationAddress() *FirewallRuleConfiguration

MatchAnyDestinationAddress modifies the configuration so that the firewall rule will match any destination IP address.

func (*FirewallRuleConfiguration) MatchAnyDestinationPort

func (configuration *FirewallRuleConfiguration) MatchAnyDestinationPort() *FirewallRuleConfiguration

MatchAnyDestinationPort modifies the configuration so that the firewall rule will match any destination port.

func (*FirewallRuleConfiguration) MatchAnySourceAddress

func (configuration *FirewallRuleConfiguration) MatchAnySourceAddress() *FirewallRuleConfiguration

MatchAnySourceAddress modifies the configuration so that the firewall rule will match source IP address.

func (*FirewallRuleConfiguration) MatchAnySourcePort

func (configuration *FirewallRuleConfiguration) MatchAnySourcePort() *FirewallRuleConfiguration

MatchAnySourcePort modifies the configuration so that the firewall rule will match any source port.

func (*FirewallRuleConfiguration) MatchDestinationAddress

func (configuration *FirewallRuleConfiguration) MatchDestinationAddress(address string) *FirewallRuleConfiguration

MatchDestinationAddress modifies the configuration so that the firewall rule will match a specific destination IP address.

func (*FirewallRuleConfiguration) MatchDestinationAddressList

func (configuration *FirewallRuleConfiguration) MatchDestinationAddressList(addressListID string) *FirewallRuleConfiguration

MatchDestinationAddressList modifies the configuration so that the firewall rule will match a specific destination IP address list (and, optionally, port).

func (*FirewallRuleConfiguration) MatchDestinationNetwork

func (configuration *FirewallRuleConfiguration) MatchDestinationNetwork(baseAddress string, prefixSize int) *FirewallRuleConfiguration

MatchDestinationNetwork modifies the configuration so that the firewall rule will match any destination IP address on the specified network.

func (*FirewallRuleConfiguration) MatchDestinationPort

func (configuration *FirewallRuleConfiguration) MatchDestinationPort(port int) *FirewallRuleConfiguration

MatchDestinationPort modifies the configuration so that the firewall rule will match a specific destination port.

func (*FirewallRuleConfiguration) MatchDestinationPortList

func (configuration *FirewallRuleConfiguration) MatchDestinationPortList(portListID string) *FirewallRuleConfiguration

MatchDestinationPortList modifies the configuration so that the firewall rule will match any destination port appearing on the specified port list (or its children).

func (*FirewallRuleConfiguration) MatchDestinationPortRange

func (configuration *FirewallRuleConfiguration) MatchDestinationPortRange(beginPort int, endPort int) *FirewallRuleConfiguration

MatchDestinationPortRange modifies the configuration so that the firewall rule will match any destination port in the specified range.

func (*FirewallRuleConfiguration) MatchSourceAddress

func (configuration *FirewallRuleConfiguration) MatchSourceAddress(address string) *FirewallRuleConfiguration

MatchSourceAddress modifies the configuration so that the firewall rule will match a specific source IP address.

func (*FirewallRuleConfiguration) MatchSourceAddressList

func (configuration *FirewallRuleConfiguration) MatchSourceAddressList(addressListID string) *FirewallRuleConfiguration

MatchSourceAddressList modifies the configuration so that the firewall rule will match a specific source IP address list.

func (*FirewallRuleConfiguration) MatchSourceNetwork

func (configuration *FirewallRuleConfiguration) MatchSourceNetwork(baseAddress string, prefixSize int) *FirewallRuleConfiguration

MatchSourceNetwork modifies the configuration so that the firewall rule will match any source IP address on the specified network.

func (*FirewallRuleConfiguration) MatchSourcePort

func (configuration *FirewallRuleConfiguration) MatchSourcePort(port int) *FirewallRuleConfiguration

MatchSourcePort modifies the configuration so that the firewall rule will match a specific source port.

func (*FirewallRuleConfiguration) MatchSourcePortList

func (configuration *FirewallRuleConfiguration) MatchSourcePortList(portListID string) *FirewallRuleConfiguration

MatchSourcePortList modifies the configuration so that the firewall rule will match any source port appearing on the specified port list (or its children).

func (*FirewallRuleConfiguration) MatchSourcePortRange

func (configuration *FirewallRuleConfiguration) MatchSourcePortRange(beginPort int, endPort int) *FirewallRuleConfiguration

MatchSourcePortRange modifies the configuration so that the firewall rule will match any source port in the specified range.

func (*FirewallRuleConfiguration) PlaceAfter

func (configuration *FirewallRuleConfiguration) PlaceAfter(afterRuleName string) *FirewallRuleConfiguration

PlaceAfter modifies the configuration so that the firewall rule will be placed after the specified rule.

func (*FirewallRuleConfiguration) PlaceBefore

func (configuration *FirewallRuleConfiguration) PlaceBefore(beforeRuleName string) *FirewallRuleConfiguration

PlaceBefore modifies the configuration so that the firewall rule will be placed before the specified rule.

func (*FirewallRuleConfiguration) PlaceFirst

func (configuration *FirewallRuleConfiguration) PlaceFirst() *FirewallRuleConfiguration

PlaceFirst modifies the configuration so that the firewall rule will be placed in the first available position.

func (*FirewallRuleConfiguration) TCP

TCP sets the firewall rule's target protocol to TCP.

func (*FirewallRuleConfiguration) ToFirewallRule

func (configuration *FirewallRuleConfiguration) ToFirewallRule() FirewallRule

ToFirewallRule converts the FirewallRuleConfiguration to a FirewallRule (for use in test scenarios).

type FirewallRuleIPAddress

type FirewallRuleIPAddress struct {
	Address    string `json:"address"`
	PrefixSize *int   `json:"prefixSize,omitempty"`
}

FirewallRuleIPAddress represents represents an IP address for firewall configuration.

type FirewallRulePlacement

type FirewallRulePlacement struct {
	Position           string  `json:"position"`
	RelativeToRuleName *string `json:"relativeToRule,omitempty"`
}

FirewallRulePlacement describes the placement for a firewall rule.

type FirewallRulePort

type FirewallRulePort struct {
	Begin int  `json:"begin"`
	End   *int `json:"end"`
}

FirewallRulePort represents a firewall port configuration.

type FirewallRuleScope

type FirewallRuleScope struct {
	IPAddress     *FirewallRuleIPAddress `json:"ip,omitempty"`
	AddressList   *EntityReference       `json:"ipAddressList,omitempty"`
	AddressListID *string                `json:"ipAddressListId,omitempty"`
	Port          *FirewallRulePort      `json:"port,omitempty"`
	PortListID    *string                `json:"portListId,omitempty"`
}

FirewallRuleScope represents a scope (IP and / or port) for firewall configuration (source or destination).

func (FirewallRuleScope) Diff

func (scope FirewallRuleScope) Diff(other FirewallRuleScope) (differences []string)

Diff captures the differences (if any) between a FirewallRuleScope and another FirewallRuleScope.

func (*FirewallRuleScope) IsScopeAddressList

func (scope *FirewallRuleScope) IsScopeAddressList() bool

IsScopeAddressList determines whether the firewall rule scope matches an IP address list.

func (*FirewallRuleScope) IsScopeAny

func (scope *FirewallRuleScope) IsScopeAny() bool

IsScopeAny determines whether the firewall rule scope matches anything (i.e. the rule is unscoped).

func (*FirewallRuleScope) IsScopeHost

func (scope *FirewallRuleScope) IsScopeHost() bool

IsScopeHost determines whether the firewall rule scope matches a host.

func (*FirewallRuleScope) IsScopeNetwork

func (scope *FirewallRuleScope) IsScopeNetwork() bool

IsScopeNetwork determines whether the firewall rule scope matches a network.

func (*FirewallRuleScope) IsScopePort

func (scope *FirewallRuleScope) IsScopePort() bool

IsScopePort determines whether the firewall rule scope matches a single port.

func (*FirewallRuleScope) IsScopePortRange

func (scope *FirewallRuleScope) IsScopePortRange() bool

IsScopePortRange determines whether the firewall rule scope matches a port range.

type FirewallRules

type FirewallRules struct {
	Rules []FirewallRule `json:"firewallRule"`

	PagedResult
}

FirewallRules represents a page of FirewallRule results.

type HealthMonitor

type HealthMonitor struct {
	ID               string `json:"id"`
	Name             string `json:"name"`
	IsNodeCompatible bool   `json:"nodeCompatible"`
	IsPoolCompatible bool   `json:"poolCompatible"`
}

HealthMonitor represents a load-balancer persistence (stickiness) profile.

type HealthMonitors

type HealthMonitors struct {
	Items []HealthMonitor `json:"defaultHealthMonitor"`

	PagedResult
}

HealthMonitors represents a page of HealthMonitor results.

type IPAddressList

type IPAddressList struct {
	ID          string               `json:"id"`
	Name        string               `json:"name"`
	Description string               `json:"description"`
	IPVersion   string               `json:"ipVersion"`
	State       string               `json:"state"`
	CreateTime  string               `json:"createTime"`
	Addresses   []IPAddressListEntry `json:"ipAddress"`
	ChildLists  []EntityReference    `json:"childIpAddressList"`
}

IPAddressList represents an IP address list.

func (*IPAddressList) BuildEditRequest

func (addressList *IPAddressList) BuildEditRequest() EditIPAddressList

BuildEditRequest creates an EditIPAddressList using the existing addresses and child list references in the IP address list.

type IPAddressListEntry

type IPAddressListEntry struct {
	Begin      string  `json:"begin"`
	End        *string `json:"end,omitempty"`
	PrefixSize *int    `json:"prefixSize,omitempty"`
}

IPAddressListEntry represents an entry in an IP address list.

type IPAddressLists

type IPAddressLists struct {
	AddressLists []IPAddressList `json:"ipAddressList"`

	PagedResult
}

IPAddressLists represents a page of IPAddressList results.

type IPRange

type IPRange interface {
	// Convert the IPvX range to a display string.
	ToDisplayString() string
}

IPRange represents an IPvX range.

type IPv4Range

type IPv4Range struct {
	// The network base address.
	BaseAddress string `json:"address"`
	// The network prefix size.
	PrefixSize int `json:"prefixSize"`
}

IPv4Range represents an IPv4 network (base address and prefix size)

func (IPv4Range) ToDisplayString

func (network IPv4Range) ToDisplayString() string

ToDisplayString converts the IPv4 range to a display string.

type IPv6Range

type IPv6Range struct {
	// The network base address.
	BaseAddress string `json:"address"`
	// The network prefix size.
	PrefixSize int `json:"prefixSize"`
}

IPv6Range represents an IPv6 network (base address and prefix size)

func (IPv6Range) ToDisplayString

func (network IPv6Range) ToDisplayString() string

ToDisplayString converts the IPv6 range to a display string.

type IRule

type IRule struct {
	ID                      string `json:"id"`
	Name                    string `json:"name"`
	VirtualListenerType     string `json:"virtualListenerType"`
	VirtualListenerProtocol string `json:"virtualListenerProtocol"`
}

IRule represents a load-balancer iRule.

func (*IRule) GetID

func (iRule *IRule) GetID() string

GetID retrieves the iRule's ID.

func (*IRule) GetName

func (iRule *IRule) GetName() string

GetName retrieves the iRule's name.

func (*IRule) ToEntityReference

func (iRule *IRule) ToEntityReference() EntityReference

ToEntityReference creates an EntityReference representing the IRule.

type IRules

type IRules struct {
	Items []IRule `json:"defaultIRule"`

	PagedResult
}

IRules represents a page of IRule results.

type Image

type Image interface {
	Resource

	// GetType determines the image type.
	GetType() ImageType

	// GetDatacenterID retrieves Id of the datacenter where the image is located.
	GetDatacenterID() string

	// GetOS retrieves information about the image's operating system.
	GetOS() OperatingSystem

	// ApplyTo applies the Image to the specified ServerDeploymentConfiguration.
	ApplyTo(config *ServerDeploymentConfiguration)
}

Image represents an image used to create servers.

type ImageType

type ImageType int

ImageType represents a type of Image.

const (
	// ImageTypeUnknown represents an unknown image type.
	ImageTypeUnknown ImageType = iota

	// ImageTypeOS represents an OS (built-in) image.
	ImageTypeOS

	// ImageTypeCustomer represents a customer image.
	ImageTypeCustomer
)

type NATRule

type NATRule struct {
	ID                string `json:"id"`
	NetworkDomainID   string `json:"networkDomainId"`
	InternalIPAddress string `json:"internalIp"`
	ExternalIPAddress string `json:"externalIp"`
	CreateTime        string `json:"createTime"`
	State             string `json:"state"`
	DataCenterID      string `json:"datacenterId"`
}

NATRule represents a Network Address Translation (NAT) rule. NAT rules are used to forward IPv4 traffic from a public IP address to a server's private IP address.

type NATRules

type NATRules struct {
	Rules []NATRule `json:"natRule"`

	PagedResult
}

NATRules represents a page of NATRule results.

type NamedEntity

type NamedEntity interface {
	Entity

	// GetName retrieves the entity's name.
	GetName() string

	// ToEntityReference creates an EntityReference representing the entity.
	ToEntityReference() EntityReference
}

NamedEntity represents a named Cloud Control entity.

type NetworkDomain

type NetworkDomain struct {
	// The network domain Id.
	ID string `json:"id"`

	// The network domain name.
	Name string `json:"name"`

	// The network domain description.
	Description string `json:"description"`

	// The network domain type.
	Type string `json:"type"`

	// The network domain's NAT IPv4 address.
	NatIPv4Address string `json:"snatIpv4Address"`

	// The network domain's outside transit IPv4 subnet.
	OutsideTransitVLANIPv4Subnet IPv4Range `json:"outsideTransitVlanIpv4Subnet"`

	// The network domain's creation timestamp.
	CreateTime string `json:"createTime"`

	// The network domain's current state.
	State string `json:"state"`

	// The network domain's current progress (if any).
	Progress string `json:"progress"`

	// The Id of the data centre in which the network domain is located.
	DatacenterID string `json:"datacenterId"`
}

NetworkDomain represents a compute network domain.

func (*NetworkDomain) GetID

func (domain *NetworkDomain) GetID() string

GetID returns the network domain's Id.

func (*NetworkDomain) GetName

func (domain *NetworkDomain) GetName() string

GetName returns the network domain's name.

func (*NetworkDomain) GetResourceType

func (domain *NetworkDomain) GetResourceType() ResourceType

GetResourceType returns the network domain's resource type.

func (*NetworkDomain) GetState

func (domain *NetworkDomain) GetState() string

GetState returns the network domain's current state.

func (*NetworkDomain) IsDeleted

func (domain *NetworkDomain) IsDeleted() bool

IsDeleted determines whether the network domain has been deleted (is nil).

func (*NetworkDomain) ToEntityReference

func (domain *NetworkDomain) ToEntityReference() EntityReference

ToEntityReference creates an EntityReference representing the NetworkDomain.

type NetworkDomains

type NetworkDomains struct {
	// The current page of network domains.
	Domains []NetworkDomain `json:"networkDomain"`

	PagedResult
}

NetworkDomains represents the response to a "List Network Domains" API call.

type NewVIPNodeConfiguration

type NewVIPNodeConfiguration struct {
	// The VIP node name.
	Name string `json:"name"`

	// The VIP node description.
	Description string `json:"description"`

	// The node's IPv4 address (either IPv4 or IPv6 address must be specified).
	IPv4Address string `json:"ipv4Address,omitempty"`

	// The node's IPv6 address (either IPv4 or IPv6 address must be specified).
	IPv6Address string `json:"ipv6Address,omitempty"`

	// The node status (VIPNodeStatusEnabled, VIPNodeStatusDisabled, or VIPNodeStatusForcedOffline).
	Status string `json:"status"`

	// The Id of the node's associated health monitor (if any).
	HealthMonitorID string `json:"healthMonitorId,omitempty"`

	// The node's connection limit (must be greater than 0).
	ConnectionLimit int `json:"connectionLimit"`

	// The node's connection rate limit (must be greater than 0).
	ConnectionRateLimit int `json:"connectionRateLimit"`

	// The Id of the network domain where the node is located.
	NetworkDomainID string `json:"networkDomainId"`
}

NewVIPNodeConfiguration represents the configuration for a new VIP node.

type NewVIPPoolConfiguration

type NewVIPPoolConfiguration struct {
	// The VIP pool name.
	Name string `json:"name"`

	// The VIP pool description.
	Description string `json:"description"`

	// The load-balancing method used for pools in the pool.
	LoadBalanceMethod string `json:"loadBalanceMethod"`

	// The Id of the pool's associated health monitors (if any).
	// Up to 2 health monitors can be specified per pool.
	HealthMonitorIDs []string `json:"healthMonitorId,omitempty"`

	// The action performed when a pool in the pool is down.
	ServiceDownAction string `json:"serviceDownAction"`

	// The time, in seconds, over which the the pool will ramp new pools up to their full request rate.
	SlowRampTime int `json:"slowRampTime"`

	// The Id of the network domain where the pool is located.
	NetworkDomainID string `json:"networkDomainId"`

	// The Id of the data centre where the pool is located.
	DatacenterID string `json:"datacenterId,omitempty"`
}

NewVIPPoolConfiguration represents the configuration for a new VIP pool.

type NewVirtualListenerConfiguration

type NewVirtualListenerConfiguration struct {
	Name                         string   `json:"name"`
	Description                  string   `json:"description"`
	Type                         string   `json:"type"`
	Protocol                     string   `json:"protocol"`
	ListenerIPAddress            *string  `json:"listenerIpAddress,omitempty"`
	Port                         int      `json:"port,omitempty"`
	Enabled                      bool     `json:"enabled"`
	ConnectionLimit              int      `json:"connectionLimit"`
	ConnectionRateLimit          int      `json:"connectionRateLimit"`
	SourcePortPreservation       string   `json:"sourcePortPreservation"`
	PoolID                       *string  `json:"poolId,omitempty"`
	ClientClonePoolID            *string  `json:"clientClonePoolId,omitempty"`
	PersistenceProfileID         *string  `json:"persistenceProfileId,omitempty"`
	FallbackPersistenceProfileID *string  `json:"fallbackPersistenceProfileId,omitempty"`
	IRuleIDs                     []string `json:"iruleId"`
	OptimizationProfiles         []string `json:"optimizationProfile"`
	NetworkDomainID              string   `json:"networkDomainId"`
}

NewVirtualListenerConfiguration represents the configuration for a new virtual listener.

type OSImage

type OSImage struct {
	ID              string               `json:"id"`
	Name            string               `json:"name"`
	Description     string               `json:"description"`
	DataCenterID    string               `json:"datacenterId"`
	OperatingSystem OperatingSystem      `json:"operatingSystem"`
	CPU             VirtualMachineCPU    `json:"cpu"`
	MemoryGB        int                  `json:"memoryGb"`
	Disks           []VirtualMachineDisk `json:"disk"`
	State           string               `json:"state"`
	CreateTime      string               `json:"createTime"`
	OSImageKey      string               `json:"osImageKey"`
}

OSImage represents a DD-provided virtual machine image.

func (*OSImage) ApplyTo

func (image *OSImage) ApplyTo(config *ServerDeploymentConfiguration)

ApplyTo applies the OSImage to the specified ServerDeploymentConfiguration.

func (*OSImage) GetDatacenterID

func (image *OSImage) GetDatacenterID() string

GetDatacenterID retrieves Id of the datacenter where the image is located.

func (*OSImage) GetID

func (image *OSImage) GetID() string

GetID retrieves the image ID.

func (*OSImage) GetName

func (image *OSImage) GetName() string

GetName retrieves the image name.

func (*OSImage) GetOS

func (image *OSImage) GetOS() OperatingSystem

GetOS retrieves information about the image's operating system.

func (*OSImage) GetResourceType

func (image *OSImage) GetResourceType() ResourceType

GetResourceType retrieves the resource type.

func (*OSImage) GetState

func (image *OSImage) GetState() string

GetState retrieves the resource's current state (e.g. ResourceStatusNormal, etc).

func (*OSImage) GetType

func (image *OSImage) GetType() ImageType

GetType determines the image type.

func (*OSImage) IsDeleted

func (image *OSImage) IsDeleted() bool

IsDeleted determines whether the resource been deleted (i.e. the underlying struct is nil)?

func (*OSImage) ToEntityReference

func (image *OSImage) ToEntityReference() EntityReference

ToEntityReference creates an EntityReference representing the OSImage.

type OSImages

type OSImages struct {
	// The current page of network domains.
	Images []OSImage `json:"osImage"`

	// The current page number.
	PageNumber int `json:"pageNumber"`

	// The number of OS images in the current page of results.
	PageCount int `json:"pageCount"`

	// The total number of OS images that match the requested filter criteria (if any).
	TotalCount int `json:"totalCount"`

	// The maximum number of OS images per page.
	PageSize int `json:"pageSize"`
}

OSImages represents a page of OSImage results.

type OperatingSystem

type OperatingSystem struct {
	// The operating system Id.
	ID string `json:"id"`

	// The operating system type.
	Family string `json:"family"`

	// The operating system display-name.
	DisplayName string `json:"displayName"`
}

OperatingSystem represents a well-known operating system for virtual machines.

type OperationCancelledError

type OperationCancelledError struct {
	OperationDescription string
}

OperationCancelledError is the error returned when an operation cancelled.

func (OperationCancelledError) Error

func (err OperationCancelledError) Error() string

Get a string representation of the error.

type PagedResult

type PagedResult struct {
	// The current page number.
	PageNumber int `json:"pageNumber"`

	// The number of items in the current page of results.
	PageCount int `json:"pageCount"`

	// The total number of results that match the requested filter criteria (if any).
	TotalCount int `json:"totalCount"`

	// The maximum number of results per page.
	PageSize int `json:"pageSize"`
}

PagedResult represents the common fields for all paged results from the compute API.

func (*PagedResult) IsEmpty

func (page *PagedResult) IsEmpty() bool

IsEmpty determines whether the page contains no results.

func (*PagedResult) NextPage

func (page *PagedResult) NextPage() *Paging

NextPage creates a Paging for the next page of results.

type Paging

type Paging struct {
	PageNumber int
	PageSize   int
}

Paging contains the paging configuration for a compute API operation.

func DefaultPaging

func DefaultPaging() *Paging

DefaultPaging creates Paging with default settings (page 1, 50 records per page).

func (*Paging) EnsurePaging

func (paging *Paging) EnsurePaging() *Paging

EnsurePaging always returns a paging configuration (if the supplied Paging is nil, it returns the default configuration).

func (*Paging) First

func (paging *Paging) First()

First configures the Paging for the first page of results.

func (*Paging) Next

func (paging *Paging) Next()

Next configures the Paging for the next page of results.

type PersistenceProfile

type PersistenceProfile struct {
	ID                      string `json:"id"`
	Name                    string `json:"name"`
	IsFallbackCompatible    bool   `json:"fallbackCompatible"`
	VirtualListenerType     string `json:"virtualListenerType"`
	VirtualListenerProtocol string `json:"virtualListenerProtocol"`
}

PersistenceProfile represents a load-balancer persistence (stickiness) profile.

func (*PersistenceProfile) GetID

func (profile *PersistenceProfile) GetID() string

GetID retrieves the persistence profile's ID.

func (*PersistenceProfile) GetName

func (profile *PersistenceProfile) GetName() string

GetName retrieves the persistence profile's name.

func (*PersistenceProfile) ToEntityReference

func (profile *PersistenceProfile) ToEntityReference() EntityReference

ToEntityReference creates an EntityReference representing the PersistenceProfile.

type PersistenceProfiles

type PersistenceProfiles struct {
	Items []PersistenceProfile `json:"defaultPersistenceProfile"`

	PagedResult
}

PersistenceProfiles represents a page of PersistenceProfile results.

type PortList

type PortList struct {
	ID          string            `json:"id"`
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Ports       []PortListEntry   `json:"port"`
	ChildLists  []EntityReference `json:"childPortList"`
	State       string            `json:"state"`
	CreateTime  string            `json:"createTime"`
}

PortList represents a port list.

func (*PortList) BuildEditRequest

func (portList *PortList) BuildEditRequest() EditPortList

BuildEditRequest creates an EditPortList using the existing ports and child list references in the port list.

type PortListEntry

type PortListEntry struct {
	Begin int  `json:"begin"`
	End   *int `json:"end,omitempty"`
}

PortListEntry represents an entry in a port list.

type PortLists

type PortLists struct {
	PortLists []PortList `json:"portList"`

	PagedResult
}

PortLists represents a page of PortList results.

type PublicIPBlock

type PublicIPBlock struct {
	ID              string `json:"id"`
	NetworkDomainID string `json:"networkDomainId"`
	DataCenterID    string `json:"datacenterId"`
	BaseIP          string `json:"baseIp"`
	Size            int    `json:"size"`
	CreateTime      string `json:"createTime"`
	State           string `json:"state"`
}

PublicIPBlock represents an allocated block of public IPv4 addresses.

func (*PublicIPBlock) GetID

func (block *PublicIPBlock) GetID() string

GetID returns the public IPv4 address block's Id.

func (*PublicIPBlock) GetName

func (block *PublicIPBlock) GetName() string

GetName returns the public IPv4 address block's name.

func (*PublicIPBlock) GetResourceType

func (block *PublicIPBlock) GetResourceType() ResourceType

GetResourceType returns the public IP block's resource type.

func (*PublicIPBlock) GetState

func (block *PublicIPBlock) GetState() string

GetState returns the network block's current state.

func (*PublicIPBlock) IsDeleted

func (block *PublicIPBlock) IsDeleted() bool

IsDeleted determines whether the public IPv4 address block has been deleted (is nil).

func (*PublicIPBlock) ToEntityReference

func (block *PublicIPBlock) ToEntityReference() EntityReference

ToEntityReference creates an EntityReference representing the CustomerImage.

type PublicIPBlocks

type PublicIPBlocks struct {
	Blocks []PublicIPBlock `json:"publicIpBlock"`

	PagedResult
}

PublicIPBlocks represents a page of PublicIPBlock results.

type ReservedIPAddress

type ReservedIPAddress struct {
	IPAddress    string `json:"value"`
	VLANID       string `json:"vlanId"`
	DatacenterID string `json:"datacenterId"`
}

ReservedIPAddress represents a private IP address that has been reserved for use on a VLAN.

type ReservedIPv4Addresses

type ReservedIPv4Addresses struct {
	PagedResult

	Items []ReservedIPAddress `json:"ipv4"`
}

ReservedIPv4Addresses represents a page of ReservedIPAddress results for reserved IPv4 addresses.

type ReservedIPv6Addresses

type ReservedIPv6Addresses struct {
	PagedResult

	Items []ReservedIPAddress `json:"reservedIpv6Address"`
}

ReservedIPv6Addresses represents a page of ReservedIPAddress results for reserved IPv6 addresses.

type ReservedPublicIP

type ReservedPublicIP struct {
	IPBlockID       string `json:"ipBlockId"`
	DataCenterID    string `json:"datacenterId"`
	NetworkDomainID string `json:"networkDomainId"`
	Address         string `json:"value"`
}

ReservedPublicIP represents a public IPv4 address reserved for NAT or a VIP.

type ReservedPublicIPs

type ReservedPublicIPs struct {
	IPs []ReservedPublicIP `json:"ip"`

	PagedResult
}

ReservedPublicIPs represents a page of ReservedPublicIP results.

type Resource

type Resource interface {
	NamedEntity

	// The resource type.
	GetResourceType() ResourceType

	// The resource's current state (e.g. ResourceStatusNormal, etc).
	GetState() string

	// Has the resource been deleted (i.e. the underlying struct is nil)?
	IsDeleted() bool
}

Resource represents a compute resource.

type ResourceType

type ResourceType int

ResourceType represents a well-known DD compute resource type.

const (
	// ResourceTypeNetworkDomain represents a network domain.
	ResourceTypeNetworkDomain ResourceType = iota

	// ResourceTypeVLAN represents a VLAN.
	ResourceTypeVLAN

	// ResourceTypeServer represents a virtual machine.
	ResourceTypeServer

	// ResourceTypeServerAntiAffinityRule represents a server anti-affinity rule.
	ResourceTypeServerAntiAffinityRule

	// ResourceTypeNetworkAdapter represents a network adapter in a virtual machine.
	// Note that when calling methods such as WaitForChange, the Id must be of the form 'serverId/networkAdapterId'.
	ResourceTypeNetworkAdapter

	// ResourceTypePublicIPBlock represents a block of public IP addresses.
	ResourceTypePublicIPBlock

	// ResourceTypeFirewallRule represents a firewall rule.
	ResourceTypeFirewallRule

	// ResourceTypeVIPNode represents a VIP node.
	ResourceTypeVIPNode

	// ResourceTypeVIPPool represents a VIP pool.
	ResourceTypeVIPPool

	// ResourceTypeVirtualListener represents a virtual listener.
	ResourceTypeVirtualListener

	// ResourceTypeOSImage represents an OS image.
	ResourceTypeOSImage

	// ResourceTypeCustomerImage represents a customer image.
	ResourceTypeCustomerImage
)

type Role

type Role struct {
	// The XML name for the "Role" data contract
	XMLName xml.Name `xml:"role"`

	// The role name.
	Name string `xml:"name"`
}

Role represents a role assigned to a compute account.

type Server

type Server struct {
	ID              string                `json:"id"`
	Name            string                `json:"name"`
	Description     string                `json:"description"`
	OperatingSystem OperatingSystem       `json:"operatingSystem"`
	CPU             VirtualMachineCPU     `json:"cpu"`
	MemoryGB        int                   `json:"memoryGb"`
	Disks           []VirtualMachineDisk  `json:"disk"`
	Network         VirtualMachineNetwork `json:"networkInfo"`
	SourceImageID   string                `json:"sourceImageId"`
	State           string                `json:"state"`
	Deployed        bool                  `json:"deployed"`
	Started         bool                  `json:"started"`
}

Server represents a virtual machine.

func (*Server) GetID

func (server *Server) GetID() string

GetID returns the server's Id.

func (*Server) GetName

func (server *Server) GetName() string

GetName returns the server's name.

func (*Server) GetResourceType

func (server *Server) GetResourceType() ResourceType

GetResourceType returns the network domain's resource type.

func (*Server) GetState

func (server *Server) GetState() string

GetState returns the server's current state.

func (*Server) IsDeleted

func (server *Server) IsDeleted() bool

IsDeleted determines whether the server has been deleted (is nil).

func (*Server) ToEntityReference

func (server *Server) ToEntityReference() EntityReference

ToEntityReference creates an EntityReference representing the Server.

type ServerAntiAffinityRule

type ServerAntiAffinityRule struct {
	// The anti-affinity rule Id.
	ID string `json:"id"`

	// The 2 servers that the rule relates to.
	//
	// Only ever contains exactly 2 servers.
	//
	// This is only declared as an array because that's what the CloudControl API returns.
	Servers []ServerSummary `json:"serverSummary"`

	// The network domain's current state.
	State string `json:"state"`

	// The network domain's creation timestamp.
	CreateTime string `json:"created"`

	// The Id of the data centre in which the network domain is located.
	DatacenterID string `json:"datacenterId"`
}

ServerAntiAffinityRule represents an anti-affinity rule between 2 servers.

func (*ServerAntiAffinityRule) GetID

func (rule *ServerAntiAffinityRule) GetID() string

GetID returns the server anti-affinity rule's Id.

func (*ServerAntiAffinityRule) GetName

func (rule *ServerAntiAffinityRule) GetName() string

GetName returns the server anti-affinity rule's name.

func (*ServerAntiAffinityRule) GetResourceType

func (rule *ServerAntiAffinityRule) GetResourceType() ResourceType

GetResourceType returns the server anti-affinity rule's resource type.

func (*ServerAntiAffinityRule) GetState

func (rule *ServerAntiAffinityRule) GetState() string

GetState returns the server anti-affinity rule's current state.

func (*ServerAntiAffinityRule) IsDeleted

func (rule *ServerAntiAffinityRule) IsDeleted() bool

IsDeleted determines whether the server anti-affinity rule has been deleted (is nil).

func (*ServerAntiAffinityRule) ToEntityReference

func (rule *ServerAntiAffinityRule) ToEntityReference() EntityReference

ToEntityReference creates an EntityReference representing the CustomerImage.

type ServerAntiAffinityRules

type ServerAntiAffinityRules struct {
	Items []ServerAntiAffinityRule `json:"antiAffinityRule"`

	PagedResult
}

ServerAntiAffinityRules represents a page of ServerAntiAffinityRule results.

type ServerDeploymentConfiguration

type ServerDeploymentConfiguration struct {
	Name                  string                `json:"name"`
	Description           string                `json:"description"`
	ImageID               string                `json:"imageId"`
	AdministratorPassword string                `json:"administratorPassword"`
	CPU                   VirtualMachineCPU     `json:"cpu"`
	MemoryGB              int                   `json:"memoryGb,omitempty"`
	Disks                 []VirtualMachineDisk  `json:"disk"`
	Network               VirtualMachineNetwork `json:"networkInfo"`
	PrimaryDNS            string                `json:"primaryDns,omitempty"`
	SecondaryDNS          string                `json:"secondaryDns,omitempty"`
	Start                 bool                  `json:"start"`
}

ServerDeploymentConfiguration represents the configuration for deploying a virtual machine.

type ServerSummary

type ServerSummary struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

ServerSummary respresents summary information for a server.

func (*ServerSummary) ToEntityReference

func (serverSummary *ServerSummary) ToEntityReference() EntityReference

ToEntityReference creates an EntityReference representing the ServerSummary.

type Servers

type Servers struct {
	Items []Server `json:"server"`

	PagedResult
}

Servers represents a page of Server results.

type Tag

type Tag struct {
	Name  string `json:"tagKeyName"`
	Value string `json:"value"`
}

Tag represents a tag applied to an asset.

type TagDetail

type TagDetail struct {
	AssetType        string `json:"assetType"`
	AssetID          string `json:"assetId"`
	AssetName        string `json:"assetName"`
	DataCenterID     string `json:"datacenterId"`
	TagKeyID         string `json:"tagKeyId"`
	Name             string `json:"tagKeyName"`
	Value            string `json:"value"`
	IsValueRequired  bool   `json:"valueRequired"`
	DisplayOnReports bool   `json:"displayOnReport"`
}

TagDetail represents detailed information about a tag applied to an asset.

func (*TagDetail) ToTag

func (tagDetail *TagDetail) ToTag() Tag

ToTag converts the TagDetail to a Tag.

type TagDetails

type TagDetails struct {
	Items []TagDetail `json:"tag"`

	PagedResult
}

TagDetails represents a page of TagDetail results.

type TagKey

type TagKey struct {
	ID string `json:"id"`
	// contains filtered or unexported fields
}

TagKey represents a key for asset tags.

type TagKeys

type TagKeys struct {
	Items []TagKey `json:"tagKey"`

	PagedResult
}

TagKeys represents a page of TagKey results.

type VIPNode

type VIPNode struct {
	// The node Id.
	ID string `json:"id"`

	// The node name.
	Name string `json:"name"`

	// The node description.
	Description string `json:"description"`

	// VIPNode's IPv4 address (either IPv4 or IPv6 address must be specified).
	IPv4Address string `json:"ipv4Address,omitempty"`

	// VIPNode's IPv6 address (either IPv4 or IPv6 address must be specified).
	IPv6Address string `json:"ipv6Address,omitempty"`

	// The node status (VIPNodeStatusEnabled, VIPNodeStatusDisabled, or VIPNodeStatusForcedOffline).
	Status string `json:"status"`

	// The Id of the node's associated health monitor (if any).
	HealthMonitor VIPNodeHealthMonitor `json:"healthMonitor,omitempty"`

	// The node's connection limit (must be greater than 0).
	ConnectionLimit int `json:"connectionLimit"`

	// The node's connection rate limit (must be greater than 0).
	ConnectionRateLimit int `json:"connectionRateLimit"`

	// The Id of the network domain where the node is located.
	NetworkDomainID string `json:"networkDomainId"`

	// The Id of the data centre where the node is located.
	DataCenterID string `json:"datacenterId"`

	// The node's creation timestamp.
	CreateTime string `json:"createTime"`

	// The node's current state.
	State string `json:"state"`

	// The node's current progress (if any).
	Progress string `json:"progress"`
}

VIPNode represents a VIP node.

func (*VIPNode) GetID

func (node *VIPNode) GetID() string

GetID returns the node's Id.

func (*VIPNode) GetName

func (node *VIPNode) GetName() string

GetName returns the node's name.

func (*VIPNode) GetResourceType

func (node *VIPNode) GetResourceType() ResourceType

GetResourceType returns the node's resource type.

func (*VIPNode) GetState

func (node *VIPNode) GetState() string

GetState returns the node's current state.

func (*VIPNode) IsDeleted

func (node *VIPNode) IsDeleted() bool

IsDeleted determines whether the node has been deleted (is nil).

func (*VIPNode) ToEntityReference

func (node *VIPNode) ToEntityReference() EntityReference

ToEntityReference creates an EntityReference representing the VIPNode.

type VIPNodeHealthMonitor

type VIPNodeHealthMonitor struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

VIPNodeHealthMonitor represents a health Monitor to a VIP node.

type VIPNodeReference

type VIPNodeReference struct {
	EntityReference

	IPAddress string `json:"ipAddress"`
	Status    string `json:"status"`
}

VIPNodeReference represents a reference to a VIP node.

type VIPNodes

type VIPNodes struct {
	// The current page of node results.
	Items []VIPNode `json:"node"`

	PagedResult
}

VIPNodes represents a page of VIPNode results.

type VIPPool

type VIPPool struct {
	ID                string            `json:"id"`
	Name              string            `json:"name"`
	Description       string            `json:"description"`
	LoadBalanceMethod string            `json:"loadBalanceMethod"`
	HealthMonitors    []EntityReference `json:"healthMonitor"`
	ServiceDownAction string            `json:"serviceDownAction"`
	SlowRampTime      int               `json:"slowRampTime"`
	State             string            `json:"state"`
	NetworkDomainID   string            `json:"networkDomainID"`
	DataCenterID      string            `json:"datacenterId"`
	CreateTime        string            `json:"createTime"`
}

VIPPool represents a VIP pool.

func (*VIPPool) GetID

func (pool *VIPPool) GetID() string

GetID returns the pool's Id.

func (*VIPPool) GetName

func (pool *VIPPool) GetName() string

GetName returns the pool's name.

func (*VIPPool) GetResourceType

func (pool *VIPPool) GetResourceType() ResourceType

GetResourceType returns the pool's resource type.

func (*VIPPool) GetState

func (pool *VIPPool) GetState() string

GetState returns the pool's current state.

func (*VIPPool) IsDeleted

func (pool *VIPPool) IsDeleted() bool

IsDeleted determines whether the pool has been deleted (is nil).

func (*VIPPool) ToEntityReference

func (pool *VIPPool) ToEntityReference() EntityReference

ToEntityReference creates an EntityReference representing the VIPNode.

type VIPPoolMember

type VIPPoolMember struct {
	ID              string           `json:"id"`
	Pool            EntityReference  `json:"pool"`
	Node            VIPNodeReference `json:"node"`
	Port            *int             `json:"port,omitempty"`
	Status          string           `json:"status"`
	State           string           `json:"state"`
	NetworkDomainID string           `json:"networkDomainId"`
	DatacenterID    string           `json:"datacenterId"`
	CreateTime      string           `json:"createTime"`
}

VIPPoolMember represents a combination of node and port as a member of a VIP pool.

type VIPPoolMembers

type VIPPoolMembers struct {
	Items []VIPPoolMember `json:"poolMember"`

	PagedResult
}

VIPPoolMembers represents a page of VIPPoolMember results.

type VIPPools

type VIPPools struct {
	Items []VIPPool

	PagedResult
}

VIPPools represents a page of VIPPool results.

type VLAN

type VLAN struct {
	// The VLAN Id.
	ID string `json:"id"`

	// The VLAN name.
	Name string `json:"name"`

	// The VLAN description.
	Description string `json:"description"`

	// The network domain in which the VLAN is deployed associated.
	NetworkDomain EntityReference `json:"networkDomain"`

	// The VLAN's associated IPv4 network range.
	IPv4Range IPv4Range `json:"privateIpv4Range"`

	// The VLAN's IPv4 gateway address.
	IPv4GatewayAddress string `json:"ipv4GatewayAddress"`

	// The VLAN's associated IPv6 network range.
	IPv6Range IPv6Range `json:"ipv6Range"`

	// The VLAN's IPv6 gateway address.
	IPv6GatewayAddress string `json:"ipv6GatewayAddress"`

	// The date / time that the VLAN was first created.
	CreateTime string `json:"createTime"`

	// The VLAN's current state.
	State string `json:"state"`

	// The ID of the data center in which the VLAN and its containing network domain are deployed.
	DataCenterID string `json:"datacenterId"`
}

VLAN represents a compute VLAN.

func (*VLAN) GetID

func (vlan *VLAN) GetID() string

GetID returns the VLAN's Id.

func (*VLAN) GetName

func (vlan *VLAN) GetName() string

GetName returns the VLAN's name.

func (*VLAN) GetResourceType

func (vlan *VLAN) GetResourceType() ResourceType

GetResourceType returns the network domain's resource type.

func (*VLAN) GetState

func (vlan *VLAN) GetState() string

GetState returns the VLAN's current state.

func (*VLAN) IsDeleted

func (vlan *VLAN) IsDeleted() bool

IsDeleted determines whether the VLAN has been deleted (is nil).

func (*VLAN) ToEntityReference

func (vlan *VLAN) ToEntityReference() EntityReference

ToEntityReference creates an EntityReference representing the VLAN.

type VLANs

type VLANs struct {
	// The current page of network domains.
	VLANs []VLAN `json:"vlan"`

	PagedResult
}

VLANs represents the response to a "List VLANs" API call.

type VirtualListener

type VirtualListener struct {
	ID                         string                    `json:"id"`
	Name                       string                    `json:"name"`
	Description                string                    `json:"description"`
	Type                       string                    `json:"type"`
	Protocol                   string                    `json:"protocol"`
	ListenerIPAddress          string                    `json:"listenerIpAddress"`
	Port                       int                       `json:"port"`
	Enabled                    bool                      `json:"enabled"`
	ConnectionLimit            int                       `json:"connectionLimit"`
	ConnectionRateLimit        int                       `json:"connectionRateLimit"`
	SourcePortPreservation     string                    `json:"sourcePortPreservation"`
	Pool                       VirtualListenerVIPPoolRef `json:"pool"`
	ClientClonePool            VirtualListenerVIPPoolRef `json:"ClientClonePool"`
	PersistenceProfile         EntityReference           `json:"persistenceProfile"`
	FallbackPersistenceProfile EntityReference           `json:"fallbackPersistenceProfile"`
	OptimizationProfiles       []string                  `json:"optimizationProfile"`
	IRules                     []EntityReference         `json:"irule"`
	State                      string                    `json:"state"`
	CreateTime                 string                    `json:"createTime"`
	NetworkDomainID            string                    `json:"networkDomainId"`
	DataCenterID               string                    `json:"datacenterId"`
}

VirtualListener represents a virtual listener.

func (*VirtualListener) GetID

func (virtualListener *VirtualListener) GetID() string

GetID returns the virtual listener's Id.

func (*VirtualListener) GetName

func (virtualListener *VirtualListener) GetName() string

GetName returns the virtual listener's name.

func (*VirtualListener) GetResourceType

func (virtualListener *VirtualListener) GetResourceType() ResourceType

GetResourceType returns the virtual listener's resource type.

func (*VirtualListener) GetState

func (virtualListener *VirtualListener) GetState() string

GetState returns the virtual listener's current state.

func (*VirtualListener) IsDeleted

func (virtualListener *VirtualListener) IsDeleted() bool

IsDeleted determines whether the virtual listener has been deleted (is nil).

func (*VirtualListener) ToEntityReference

func (virtualListener *VirtualListener) ToEntityReference() EntityReference

ToEntityReference creates an EntityReference representing the CustomerImage.

type VirtualListenerVIPPoolRef

type VirtualListenerVIPPoolRef struct {
	LoadBalanceMethod string            `json:"loadBalanceMethod"`
	ServiceDownAction string            `json:"serviceDownAction"`
	HealthMonitors    []EntityReference `json:"healthMonitor"`

	EntityReference
}

VirtualListenerVIPPoolRef represents a VirtualListener's reference to a VIP pool

type VirtualListeners

type VirtualListeners struct {
	Items []VirtualListener `json:"virtualListener"`

	PagedResult
}

VirtualListeners represents a page of VirtualListener results.

type VirtualMachineCPU

type VirtualMachineCPU struct {
	Count          int    `json:"count,omitempty"`
	Speed          string `json:"speed,omitempty"`
	CoresPerSocket int    `json:"coresPerSocket,omitempty"`
}

VirtualMachineCPU represents the CPU configuration for a virtual machine.

type VirtualMachineDisk

type VirtualMachineDisk struct {
	ID         *string `json:"id,omitempty"`
	SCSIUnitID int     `json:"scsiId"`
	SizeGB     int     `json:"sizeGb"`
	Speed      string  `json:"speed"`
}

VirtualMachineDisk represents the disk configuration for a virtual machine.

type VirtualMachineNetwork

type VirtualMachineNetwork struct {
	NetworkDomainID           string                         `json:"networkDomainId,omitempty"`
	PrimaryAdapter            VirtualMachineNetworkAdapter   `json:"primaryNic"`
	AdditionalNetworkAdapters []VirtualMachineNetworkAdapter `json:"additionalNic"`
}

VirtualMachineNetwork represents the networking configuration for a virtual machine.

type VirtualMachineNetworkAdapter

type VirtualMachineNetworkAdapter struct {
	ID                 *string `json:"id,omitempty"`
	MACAddress         *string `json:"macAddress,omitempty"` // CloudControl v2.4 and higher
	VLANID             *string `json:"vlanId,omitempty"`
	VLANName           *string `json:"vlanName,omitempty"`
	PrivateIPv4Address *string `json:"privateIpv4,omitempty"`
	PrivateIPv6Address *string `json:"ipv6,omitempty"`
	AdapterType        *string `json:"networkAdapter,omitempty"`
	AdapterKey         *int    `json:"key,omitempty"` // CloudControl v2.4 and higher
	State              *string `json:"state,omitempty"`
}

VirtualMachineNetworkAdapter represents the configuration for a virtual machine's network adapter. If deploying a new VM, exactly one of VLANID / PrivateIPv4Address must be specified.

AdapterType (if specified) must be either E1000 or VMXNET3.

func (*VirtualMachineNetworkAdapter) GetID

func (networkAdapter *VirtualMachineNetworkAdapter) GetID() string

GetID returns the network adapter's Id.

func (*VirtualMachineNetworkAdapter) GetName

func (networkAdapter *VirtualMachineNetworkAdapter) GetName() string

GetName returns the network adapter's name (actually Id, since adapters don't have names).

func (*VirtualMachineNetworkAdapter) GetResourceType

func (networkAdapter *VirtualMachineNetworkAdapter) GetResourceType() ResourceType

GetResourceType returns the network domain's resource type.

func (*VirtualMachineNetworkAdapter) GetState

func (networkAdapter *VirtualMachineNetworkAdapter) GetState() string

GetState returns the network adapter's current state.

func (*VirtualMachineNetworkAdapter) IsDeleted

func (networkAdapter *VirtualMachineNetworkAdapter) IsDeleted() bool

IsDeleted determines whether the network adapter has been deleted (is nil).

func (*VirtualMachineNetworkAdapter) ToEntityReference

func (networkAdapter *VirtualMachineNetworkAdapter) ToEntityReference() EntityReference

ToEntityReference creates an EntityReference representing the CustomerImage.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL