cloudca

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2019 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

View Source
const (
	AFFINITY_GROUP_ENTITY_TYPE         = "affinitygroups"
	INSTANCE_ENTITY_TYPE               = "instances"
	VOLUME_ENTITY_TYPE                 = "volumes"
	TEMPLATE_ENTITY_TYPE               = "templates"
	NETWORK_ENTITY_TYPE                = "networks"
	COMPUTE_OFFERING_ENTITY_TYPE       = "computeofferings"
	DISK_OFFERING_ENTITY_TYPE          = "diskofferings"
	SSH_KEY_ENTITY_TYPE                = "sshkeys"
	VPC_ENTITY_TYPE                    = "vpcs"
	VPC_OFFERING_ENTITY_TYPE           = "vpcofferings"
	NETWORK_OFFERING_ENTITY_TYPE       = "networkofferings"
	NETWORK_ACL_ENTITY_TYPE            = "networkacls"
	NETWORK_ACL_RULE_ENTITY_TYPE       = "networkaclrules"
	PORT_FORWARDING_RULE_ENTITY_TYPE   = "portforwardingrules"
	LOAD_BALANCER_RULE_ENTITY_TYPE     = "loadbalancerrules"
	PUBLIC_IP_ENTITY_TYPE              = "publicipaddresses"
	ZONE_ENTITY_TYPE                   = "zones"
	REMOTE_ACCESS_VPN_ENTITY_TYPE      = "remoteaccessvpns"
	REMOTE_ACCESS_VPN_USER_ENTITY_TYPE = "vpnusers"
)

All entity types for the cloudca service

View Source
const (
	INSTANCE_STATE_RUNNING = "Running"
	INSTANCE_STATE_STOPPED = "Stopped"
)
View Source
const (
	INSTANCE_START_OPERATION                   = "start"
	INSTANCE_STOP_OPERATION                    = "stop"
	INSTANCE_REBOOT_OPERATION                  = "reboot"
	INSTANCE_RECOVER_OPERATION                 = "recover"
	INSTANCE_PURGE_OPERATION                   = "purge"
	INSTANCE_RESET_PASSWORD_OPERATION          = "resetPassword"
	INSTANCE_CREATE_RECOVERY_POINT_OPERATION   = "createRecoveryPoint"
	INSTANCE_CHANGE_COMPUTE_OFFERING_OPERATION = "changeComputeOffering"
	INSTANCE_ASSOCIATE_SSH_KEY_OPERATION       = "associateSSHKey"
)
View Source
const (
	UPDATE_INSTANCES  = "updateInstances"
	UPDATE_STICKINESS = "updateStickiness"
)
View Source
const (
	PFR_CREATE = "create"
	PFR_DELETE = "delete"
)
View Source
const (
	PUBLIC_IP_ENABLE_STATIC_NAT_OPERATION  = "enableStaticNat"
	PUBLIC_IP_DISABLE_STATIC_NAT_OPERATION = "disableStaticNat"
)
View Source
const (
	REMOTE_ACCESS_VPN_ENABLE_OPERATION  = "enable"
	REMOTE_ACCESS_VPN_DISABLE_OPERATION = "disable"
)
View Source
const (
	VOLUME_TYPE_OS   = "OS"
	VOLUME_TYPE_DATA = "DATA"
)
View Source
const (
	CLOUD_CA_SERVICE = "cloudca"
)
View Source
const (
	VPC_RESTART_ROUTER_OPERATION = "restart"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AffinityGroup added in v1.3.0

type AffinityGroup struct {
	Id            string   `json:"id,omitempty"`
	Name          string   `json:"name,omitempty"`
	Description   string   `json:"description,omitempty"`
	Type          string   `json:"type,omitempty"`
	InstanceIds   []string `json:"instanceIds,omitempty"`
	InstanceNames []string `json:"instanceNames,omitempty"`
	ZoneIds       []string `json:"zoneIds,omitempty"`
}

type AffinityGroupApi added in v1.3.0

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

func (*AffinityGroupApi) Get added in v1.3.0

func (api *AffinityGroupApi) Get(id string) (*AffinityGroup, error)

func (*AffinityGroupApi) List added in v1.3.0

func (api *AffinityGroupApi) List() ([]AffinityGroup, error)

func (*AffinityGroupApi) ListWithOptions added in v1.3.0

func (api *AffinityGroupApi) ListWithOptions(options map[string]string) ([]AffinityGroup, error)

type AffinityGroupService added in v1.3.0

type AffinityGroupService interface {
	Get(string) (*AffinityGroup, error)
	List() ([]AffinityGroup, error)
	ListWithOptions(map[string]string) ([]AffinityGroup, error)
}

func NewAffinityGroupsService added in v1.3.0

func NewAffinityGroupsService(apiClient api.ApiClient, serviceCode string, environmentName string) AffinityGroupService

type ComputeOffering

type ComputeOffering struct {
	Id         string `json:"id,omitempty"`
	Name       string `json:"name,omitempty"`
	MemoryInMB int    `json:"memoryInMB,omitempty"`
	CpuCount   int    `json:"cpuCount,omitempty"`
	Custom     bool   `json:"custom,omitempty"`
}

type ComputeOfferingApi

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

func (*ComputeOfferingApi) Get

func (computeOfferingApi *ComputeOfferingApi) Get(id string) (*ComputeOffering, error)

Get compute offering with the specified id for the current environment

func (*ComputeOfferingApi) List

func (computeOfferingApi *ComputeOfferingApi) List() ([]ComputeOffering, error)

List all compute offerings for the current environment

func (*ComputeOfferingApi) ListWithOptions

func (computeOfferingApi *ComputeOfferingApi) ListWithOptions(options map[string]string) ([]ComputeOffering, error)

List all compute offerings for the current environment. Can use options to do sorting and paging.

type ComputeOfferingService

type ComputeOfferingService interface {
	Get(id string) (*ComputeOffering, error)
	List() ([]ComputeOffering, error)
	ListWithOptions(options map[string]string) ([]ComputeOffering, error)
}

func NewComputeOfferingService

func NewComputeOfferingService(apiClient api.ApiClient, serviceCode string, environmentName string) ComputeOfferingService

type DestroyOptions

type DestroyOptions struct {
	PurgeImmediately     bool     `json:"purgeImmediately,omitempty"`
	DeleteSnapshots      bool     `json:"deleteSnapshots,omitempty"`
	PublicIpIdsToRelease []string `json:"publicIpIdsToRelease,omitempty"`
	VolumeIdsToDelete    []string `json:"volumeIdsToDelete,omitempty"`
}

type DiskOffering

type DiskOffering struct {
	Id         string `json:"id,omitempty"`
	Name       string `json:"name,omitempty"`
	GbSize     int    `json:"gbSize,omitempty"`
	MinIops    int    `json:"minIops,omitempty"`
	MaxIops    int    `json:"maxIops,omitempty"`
	CustomSize bool   `json:"customSize,omitempty"`
	CustomIops bool   `json:"customIops,omitempty"`
}

type DiskOfferingApi

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

func (*DiskOfferingApi) Get

func (diskOfferingApi *DiskOfferingApi) Get(id string) (*DiskOffering, error)

Get disk offering with the specified id for the current environment

func (*DiskOfferingApi) List

func (diskOfferingApi *DiskOfferingApi) List() ([]DiskOffering, error)

List all disk offerings for the current environment

func (*DiskOfferingApi) ListWithOptions

func (diskOfferingApi *DiskOfferingApi) ListWithOptions(options map[string]string) ([]DiskOffering, error)

List all disk offerings for the current environment. Can use options to do sorting and paging.

type DiskOfferingService

type DiskOfferingService interface {
	Get(id string) (*DiskOffering, error)
	List() ([]DiskOffering, error)
	ListWithOptions(options map[string]string) ([]DiskOffering, error)
}

func NewDiskOfferingService

func NewDiskOfferingService(apiClient api.ApiClient, serviceCode string, environmentName string) DiskOfferingService

type Instance

type Instance struct {
	Id                       string        `json:"id,omitempty"`
	Name                     string        `json:"name,omitempty"`
	State                    string        `json:"state,omitempty"`
	TemplateId               string        `json:"templateId,omitempty"`
	TemplateName             string        `json:"templateName,omitempty"`
	IsPasswordEnabled        bool          `json:"isPasswordEnabled,omitempty"`
	IsSSHKeyEnabled          bool          `json:"isSshKeyEnabled,omitempty"`
	Username                 string        `json:"username,omitempty"`
	Password                 string        `json:"password,omitempty"`
	SSHKeyName               string        `json:"sshKeyName,omitempty"`
	ComputeOfferingId        string        `json:"computeOfferingId,omitempty"`
	ComputeOfferingName      string        `json:"computeOfferingName,omitempty"`
	NewComputeOfferingId     string        `json:"newComputeOfferingId,omitempty"`
	CpuCount                 int           `json:"cpuCount,omitempty"`
	MemoryInMB               int           `json:"memoryInMB,omitempty"`
	ZoneId                   string        `json:"zoneId,omitempty"`
	ZoneName                 string        `json:"zoneName,omitempty"`
	ProjectId                string        `json:"projectId,omitempty"`
	NetworkId                string        `json:"networkId,omitempty"`
	NetworkName              string        `json:"networkName,omitempty"`
	VpcId                    string        `json:"vpcId,omitempty"`
	VpcName                  string        `json:"vpcName,omitempty"`
	MacAddress               string        `json:"macAddress,omitempty"`
	UserData                 string        `json:"userData,omitempty"`
	RecoveryPoint            RecoveryPoint `json:"recoveryPoint,omitempty"`
	IpAddress                string        `json:"ipAddress,omitempty"`
	IpAddressId              string        `json:"ipAddressId,omitempty"`
	PublicIps                []PublicIp    `json:"publicIPs,omitempty"`
	PublicKey                string        `json:"publicKey,omitempty"`
	AdditionalDiskOfferingId string        `json:"diskOfferingId,omitempty"`
	AdditionalDiskSizeInGb   string        `json:"additionalDiskSizeInGb,omitempty"`
	AdditionalDiskIops       string        `json:"additionalDiskIops,omitempty"`
	VolumeIdToAttach         string        `json:"volumeIdToAttach,omitempty"`
	PortsToForward           []string      `json:"portsToForward,omitempty"`
	RootVolumeSizeInGb       int           `json:"rootVolumeSizeInGb,omitempty"`
	DedicatedGroupId         string        `json:"dedicatedGroupId,omitempty"`
	AffinityGroupIds         []string      `json:"affinityGroupIds,omitempty"`
}

func (*Instance) IsRunning

func (instance *Instance) IsRunning() bool

func (*Instance) IsStopped

func (instance *Instance) IsStopped() bool

type InstanceApi

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

func (*InstanceApi) AssociateSSHKey

func (instanceApi *InstanceApi) AssociateSSHKey(id string, sshKeyName string) (bool, error)

Associate an SSH key to the instance with the specified id exists in the current environment Note: This will reboot your instance if running

func (*InstanceApi) ChangeComputeOffering

func (instanceApi *InstanceApi) ChangeComputeOffering(instance Instance) (bool, error)

Change the compute offering of the instance with the specified id exists in the current environment Note: This will reboot your instance if running

func (*InstanceApi) ChangeNetwork added in v1.1.0

func (instanceApi *InstanceApi) ChangeNetwork(id string, networkId string) (bool, error)

Change the network of the instance with the specified id Note: This will reboot your instance, remove all pfrs of this instance and remove the instance from all lbrs.

func (*InstanceApi) Create

func (instanceApi *InstanceApi) Create(instance Instance) (*Instance, error)

Create an instance in the current environment

func (*InstanceApi) CreateRecoveryPoint

func (instanceApi *InstanceApi) CreateRecoveryPoint(id string, recoveryPoint RecoveryPoint) (bool, error)

Create a recovery point of the instance with the specified id exists in the current environment

func (*InstanceApi) Destroy

func (instanceApi *InstanceApi) Destroy(id string, purge bool) (bool, error)

Destroy an instance with specified id in the current environment Set the purge flag to true if you want to purge immediately

func (*InstanceApi) DestroyWithOptions

func (instanceApi *InstanceApi) DestroyWithOptions(id string, options DestroyOptions) (bool, error)

Destroy an instance with specified id in the current environment Set the purge flag to true if you want to purge immediately

func (*InstanceApi) Exists

func (instanceApi *InstanceApi) Exists(id string) (bool, error)

Check if instance with specified id exists in the current environment

func (*InstanceApi) Get

func (instanceApi *InstanceApi) Get(id string) (*Instance, error)

Get instance with the specified id for the current environment

func (*InstanceApi) List

func (instanceApi *InstanceApi) List() ([]Instance, error)

List all instances for the current environment

func (*InstanceApi) ListWithOptions

func (instanceApi *InstanceApi) ListWithOptions(options map[string]string) ([]Instance, error)

List all instances for the current environment. Can use options to do sorting and paging.

func (*InstanceApi) Purge

func (instanceApi *InstanceApi) Purge(id string) (bool, error)

Purge an instance with the specified id in the current environment The instance must be in the Destroyed state. To destroy and purge an instance, see the Destroy method

func (*InstanceApi) Reboot

func (instanceApi *InstanceApi) Reboot(id string) (bool, error)

Reboot a running instance with specified id exists in the current environment

func (*InstanceApi) Recover

func (instanceApi *InstanceApi) Recover(id string) (bool, error)

Recover a destroyed instance with the specified id in the current environment Note: Cannot recover instances that have been purged

func (*InstanceApi) ResetPassword

func (instanceApi *InstanceApi) ResetPassword(id string) (string, error)

Reset the password of the instance with the specified id exists in the current environment

func (*InstanceApi) Start

func (instanceApi *InstanceApi) Start(id string) (bool, error)

Start a stopped instance with specified id exists in the current environment

func (*InstanceApi) Stop

func (instanceApi *InstanceApi) Stop(id string) (bool, error)

Stop a running instance with specified id exists in the current environment

type InstanceService

type InstanceService interface {
	Get(id string) (*Instance, error)
	List() ([]Instance, error)
	ListWithOptions(options map[string]string) ([]Instance, error)
	Create(Instance) (*Instance, error)
	Destroy(id string, purge bool) (bool, error)
	DestroyWithOptions(id string, options DestroyOptions) (bool, error)
	Purge(id string) (bool, error)
	Recover(id string) (bool, error)
	Exists(id string) (bool, error)
	Start(id string) (bool, error)
	Stop(id string) (bool, error)
	AssociateSSHKey(id string, sshKeyName string) (bool, error)
	Reboot(id string) (bool, error)
	ChangeComputeOffering(Instance) (bool, error)
	ChangeNetwork(id string, newNetworkId string) (bool, error)
	ResetPassword(id string) (string, error)
	CreateRecoveryPoint(id string, recoveryPoint RecoveryPoint) (bool, error)
}

func NewInstanceService

func NewInstanceService(apiClient api.ApiClient, serviceCode string, environmentName string) InstanceService

type LoadBalancerRule

type LoadBalancerRule struct {
	Id                         string            `json:"id,omitempty"`
	Name                       string            `json:"name,omitempty"`
	InstanceIds                []string          `json:"instanceIds,omitempty"`
	NetworkId                  string            `json:"networkId,omitempty"`
	PublicIp                   string            `json:"publicIp,omitempty"`
	PublicIpId                 string            `json:"publicIpId,omitempty"`
	PublicPort                 string            `json:"publicPort,omitempty"`
	PrivatePort                string            `json:"privatePort,omitempty"`
	Protocol                   string            `json:"protocol,omitempty"`
	Algorithm                  string            `json:"algorithm,omitempty"`
	StickinessMethod           string            `json:"stickinessMethod,omitempty"`
	StickinessPolicyParameters map[string]string `json:"stickinessPolicyParameters,omitempty"`
}

type LoadBalancerRuleApi

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

func (*LoadBalancerRuleApi) Create

func (*LoadBalancerRuleApi) Delete

func (api *LoadBalancerRuleApi) Delete(id string) error

func (*LoadBalancerRuleApi) Get

func (*LoadBalancerRuleApi) List

func (api *LoadBalancerRuleApi) List() ([]LoadBalancerRule, error)

func (*LoadBalancerRuleApi) ListWithOptions

func (api *LoadBalancerRuleApi) ListWithOptions(options map[string]string) ([]LoadBalancerRule, error)

func (*LoadBalancerRuleApi) RemoveLoadBalancerRuleStickinessPolicy

func (api *LoadBalancerRuleApi) RemoveLoadBalancerRuleStickinessPolicy(id string) error

func (*LoadBalancerRuleApi) SetLoadBalancerRuleInstances

func (api *LoadBalancerRuleApi) SetLoadBalancerRuleInstances(id string, instanceIds []string) error

func (*LoadBalancerRuleApi) SetLoadBalancerRuleStickinessPolicy

func (api *LoadBalancerRuleApi) SetLoadBalancerRuleStickinessPolicy(id string, method string, stickinessPolicyParameters map[string]string) error

func (*LoadBalancerRuleApi) Update

type LoadBalancerRuleService

type LoadBalancerRuleService interface {
	Get(id string) (*LoadBalancerRule, error)
	List() ([]LoadBalancerRule, error)
	ListWithOptions(options map[string]string) ([]LoadBalancerRule, error)
	Create(lbr LoadBalancerRule) (*LoadBalancerRule, error)
	Delete(id string) error
	Update(lbr LoadBalancerRule) (*LoadBalancerRule, error)
	SetLoadBalancerRuleInstances(id string, instanceIds []string) error
	SetLoadBalancerRuleStickinessPolicy(id string, method string, stickinessPolicyParameters map[string]string) error
	RemoveLoadBalancerRuleStickinessPolicy(id string) error
}

func NewLoadBalancerRuleService

func NewLoadBalancerRuleService(apiClient api.ApiClient, serviceCode string, environmentName string) LoadBalancerRuleService

type Network

type Network struct {
	Id                string    `json:"id,omitempty"`
	Name              string    `json:"name,omitempty"`
	Description       string    `json:"description,omitempty"`
	VpcId             string    `json:"vpcId,omitempty"`
	NetworkOfferingId string    `json:"networkOfferingId,omitempty"`
	NetworkAclId      string    `json:"networkAclId,omitempty"`
	NetworkAclName    string    `json:"networkAclName,omitempty"`
	ZoneId            string    `json:"zoneid,omitempty"`
	ZoneName          string    `json:"zonename,omitempty"`
	Cidr              string    `json:"cidr,omitempty"`
	Type              string    `json:"type,omitempty"`
	State             string    `json:"state,omitempty"`
	Gateway           string    `json:"gateway,omitempty"`
	IsSystem          bool      `json:"issystem,omitempty"`
	Domain            string    `json:"domain,omitempty"`
	DomainId          string    `json:"domainid,omitempty"`
	Project           string    `json:"project,omitempty"`
	ProjectId         string    `json:"projectid,omitempty"`
	Services          []Service `json:"service,omitempty"`
}

type NetworkAcl

type NetworkAcl struct {
	Id          string `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
	VpcId       string `json:"vpcId,omitempty"`
}

type NetworkAclApi

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

func (*NetworkAclApi) Create

func (networkAclApi *NetworkAclApi) Create(networkAcl NetworkAcl) (*NetworkAcl, error)

func (*NetworkAclApi) Delete

func (networkAclApi *NetworkAclApi) Delete(id string) (bool, error)

func (*NetworkAclApi) Get

func (networkAclApi *NetworkAclApi) Get(id string) (*NetworkAcl, error)

Get network acl with the specified id for the current environment

func (*NetworkAclApi) List

func (networkAclApi *NetworkAclApi) List() ([]NetworkAcl, error)

List all network offerings for the current environment

func (*NetworkAclApi) ListByVpcId

func (networkAclApi *NetworkAclApi) ListByVpcId(vpcId string) ([]NetworkAcl, error)

List all network offerings for the current environment

func (*NetworkAclApi) ListWithOptions

func (networkAclApi *NetworkAclApi) ListWithOptions(options map[string]string) ([]NetworkAcl, error)

List all network offerings for the current environment. Can use options to do sorting and paging.

type NetworkAclRule

type NetworkAclRule struct {
	Id           string `json:"id,omitempty"`
	NetworkAclId string `json:"networkAclId,omitempty"`
	RuleNumber   string `json:"ruleNumber,omitempty"`
	Cidr         string `json:"cidr,omitempty"`
	Action       string `json:"action,omitempty"`
	Protocol     string `json:"protocol,omitempty"`
	StartPort    string `json:"startPort,omitempty"`
	EndPort      string `json:"endPort,omitempty"`
	IcmpType     string `json:"icmpType,omitempty"`
	IcmpCode     string `json:"icmpCode,omitempty"`
	TrafficType  string `json:"trafficType,omitempty"`
	State        string `json:"state,omitempty"`
}

type NetworkAclRuleApi

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

func (*NetworkAclRuleApi) Create

func (networkAclRuleApi *NetworkAclRuleApi) Create(networkAclRule NetworkAclRule) (*NetworkAclRule, error)

func (*NetworkAclRuleApi) Delete

func (networkAclRuleApi *NetworkAclRuleApi) Delete(id string) (bool, error)

func (*NetworkAclRuleApi) Get

func (networkAclRuleApi *NetworkAclRuleApi) Get(id string) (*NetworkAclRule, error)

Get network acl rule with the specified id for the current environment

func (*NetworkAclRuleApi) List

func (networkAclRuleApi *NetworkAclRuleApi) List() ([]NetworkAclRule, error)

func (*NetworkAclRuleApi) ListByNetworkAclId

func (networkAclRuleApi *NetworkAclRuleApi) ListByNetworkAclId(networkAclId string) ([]NetworkAclRule, error)

List all network acl rules for the NetworkAcl

func (*NetworkAclRuleApi) ListWithOptions

func (networkAclRuleApi *NetworkAclRuleApi) ListWithOptions(options map[string]string) ([]NetworkAclRule, error)

func (*NetworkAclRuleApi) Update

func (networkAclRuleApi *NetworkAclRuleApi) Update(id string, networkAclRule NetworkAclRule) (*NetworkAclRule, error)

type NetworkAclRuleService

type NetworkAclRuleService interface {
	Get(id string) (*NetworkAclRule, error)
	List() ([]NetworkAclRule, error)
	ListByNetworkAclId(networkAclId string) ([]NetworkAclRule, error)
	ListWithOptions(options map[string]string) ([]NetworkAclRule, error)
	Create(networkAclRule NetworkAclRule) (*NetworkAclRule, error)
	Update(id string, networkAclRule NetworkAclRule) (*NetworkAclRule, error)
	Delete(id string) (bool, error)
}

func NewNetworkAclRuleService

func NewNetworkAclRuleService(apiClient api.ApiClient, serviceCode string, environmentName string) NetworkAclRuleService

type NetworkAclService

type NetworkAclService interface {
	Get(id string) (*NetworkAcl, error)
	List() ([]NetworkAcl, error)
	ListByVpcId(vpcId string) ([]NetworkAcl, error)
	ListWithOptions(options map[string]string) ([]NetworkAcl, error)
	Create(networkAcl NetworkAcl) (*NetworkAcl, error)
	Delete(id string) (bool, error)
}

func NewNetworkAclService

func NewNetworkAclService(apiClient api.ApiClient, serviceCode string, environmentName string) NetworkAclService

type NetworkApi

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

func (*NetworkApi) ChangeAcl

func (networkApi *NetworkApi) ChangeAcl(id string, aclId string) (bool, error)

func (*NetworkApi) Create

func (networkApi *NetworkApi) Create(network Network, options map[string]string) (*Network, error)

func (*NetworkApi) Delete

func (networkApi *NetworkApi) Delete(id string) (bool, error)

func (*NetworkApi) Get

func (networkApi *NetworkApi) Get(id string) (*Network, error)

Get network with the specified id for the current environment

func (*NetworkApi) List

func (networkApi *NetworkApi) List() ([]Network, error)

List all networks for the current environment

func (*NetworkApi) ListOfVpc

func (networkApi *NetworkApi) ListOfVpc(vpcId string) ([]Network, error)

List all networks of a vpc for the current environment

func (*NetworkApi) ListWithOptions

func (networkApi *NetworkApi) ListWithOptions(options map[string]string) ([]Network, error)

List all networks for the current environment. Can use options to do sorting and paging.

func (*NetworkApi) Update

func (networkApi *NetworkApi) Update(id string, network Network) (*Network, error)

type NetworkOffering

type NetworkOffering struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type NetworkOfferingApi

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

func (*NetworkOfferingApi) Get

func (networkOfferingApi *NetworkOfferingApi) Get(id string) (*NetworkOffering, error)

Get network offering with the specified id for the current environment

func (*NetworkOfferingApi) List

func (networkOfferingApi *NetworkOfferingApi) List() ([]NetworkOffering, error)

List all network offerings for the current environment

func (*NetworkOfferingApi) ListWithOptions

func (networkOfferingApi *NetworkOfferingApi) ListWithOptions(options map[string]string) ([]NetworkOffering, error)

List all network offerings for the current environment. Can use options to do sorting and paging.

type NetworkOfferingService

type NetworkOfferingService interface {
	Get(id string) (*NetworkOffering, error)
	List() ([]NetworkOffering, error)
	ListWithOptions(options map[string]string) ([]NetworkOffering, error)
}

func NewNetworkOfferingService

func NewNetworkOfferingService(apiClient api.ApiClient, serviceCode string, environmentName string) NetworkOfferingService

type NetworkService

type NetworkService interface {
	Get(id string) (*Network, error)
	List() ([]Network, error)
	ListOfVpc(vpcId string) ([]Network, error)
	ListWithOptions(options map[string]string) ([]Network, error)
	Create(network Network, options map[string]string) (*Network, error)
	Update(id string, network Network) (*Network, error)
	Delete(id string) (bool, error)
	ChangeAcl(id string, aclId string) (bool, error)
}

func NewNetworkService

func NewNetworkService(apiClient api.ApiClient, serviceCode string, environmentName string) NetworkService

type PortForwardingRule

type PortForwardingRule struct {
	Id               string `json:"id,omitempty"`
	InstanceId       string `json:"instanceId,omitempty"`
	InstanceName     string `json:"instanceName,omitempty"`
	NetworkId        string `json:"networkId,omitempty"`
	PrivateIp        string `json:"privateIp,omitempty"`
	PrivateIpId      string `json:"privateIpId,omitempty"`
	PrivatePortStart string `json:"privatePortStart,omitempty"`
	PrivatePortEnd   string `json:"privatePortEnd,omitempty"`
	PublicIp         string `json:"ipAddress,omitempty"`
	PublicIpId       string `json:"ipAddressId,omitempty"`
	PublicPortStart  string `json:"publicPortStart,omitempty"`
	PublicPortEnd    string `json:"publicPortEnd,omitempty"`
	Protocol         string `json:"protocol,omitempty"`
	State            string `json:"state,omitempty"`
	VpcId            string `json:"vpcId,omitempty"`
}

type PortForwardingRuleApi

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

func (*PortForwardingRuleApi) Create

func (*PortForwardingRuleApi) Delete

func (api *PortForwardingRuleApi) Delete(id string) (bool, error)

func (*PortForwardingRuleApi) Get

func (*PortForwardingRuleApi) List

func (*PortForwardingRuleApi) ListWithOptions

func (api *PortForwardingRuleApi) ListWithOptions(options map[string]string) ([]PortForwardingRule, error)

type PortForwardingRuleService

type PortForwardingRuleService interface {
	Get(id string) (*PortForwardingRule, error)
	List() ([]PortForwardingRule, error)
	ListWithOptions(options map[string]string) ([]PortForwardingRule, error)
	Create(pfr PortForwardingRule) (*PortForwardingRule, error)
	Delete(id string) (bool, error)
}

func NewPortForwardingRuleService

func NewPortForwardingRuleService(apiClient api.ApiClient, serviceCode string, environmentName string) PortForwardingRuleService

type PublicIp

type PublicIp struct {
	Id            string   `json:"id,omitempty"`
	IpAddress     string   `json:"ipaddress,omitempty"`
	State         string   `json:"state,omitempty"`
	ZoneId        string   `json:"zoneId,omitempty"`
	ZoneName      string   `json:"zoneName,omitempty"`
	NetworkId     string   `json:"networkId,omitempty"`
	NetworkName   string   `json:"networkName,omitempty"`
	VpcId         string   `json:"vpcId,omitempty"`
	VpcName       string   `json:"vpcName,omitempty"`
	PrivateIpId   string   `json:"privateIpId,omitempty"`
	InstanceNames []string `json:"instanceNames,omitempty"`
	InstanceId    string   `json:"instanceId,omitempty"`
	Purposes      []string `json:"purposes,omitempty"`
	Ports         []string `json:"ports,omitempty"`
}

type PublicIpApi

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

func (*PublicIpApi) Acquire

func (publicIpApi *PublicIpApi) Acquire(publicIp PublicIp) (*PublicIp, error)

func (*PublicIpApi) DisableStaticNat

func (publicIpApi *PublicIpApi) DisableStaticNat(id string) (bool, error)

func (*PublicIpApi) EnableStaticNat

func (publicIpApi *PublicIpApi) EnableStaticNat(publicIp PublicIp) (bool, error)

func (*PublicIpApi) Get

func (publicIpApi *PublicIpApi) Get(id string) (*PublicIp, error)

func (*PublicIpApi) List

func (publicIpApi *PublicIpApi) List() ([]PublicIp, error)

func (*PublicIpApi) ListWithOptions

func (publicIpApi *PublicIpApi) ListWithOptions(options map[string]string) ([]PublicIp, error)

func (*PublicIpApi) Release

func (publicIpApi *PublicIpApi) Release(id string) (bool, error)

type PublicIpService

type PublicIpService interface {
	Get(id string) (*PublicIp, error)
	List() ([]PublicIp, error)
	Acquire(publicIp PublicIp) (*PublicIp, error)
	Release(id string) (bool, error)
	EnableStaticNat(publicIp PublicIp) (bool, error)
	DisableStaticNat(id string) (bool, error)
}

func NewPublicIpService

func NewPublicIpService(apiClient api.ApiClient, serviceCode string, environmentName string) PublicIpService

type RecoveryPoint

type RecoveryPoint struct {
	Name        string `json:"name,omitempty"`
	Description string `json:"description,omitempty"`
}

type RemoteAccessVpn added in v1.4.0

type RemoteAccessVpn struct {
	Certificate       string `json:"certificate,omitempty"`
	Id                string `json:"id,omitempty"`
	PresharedKey      string `json:"presharedKey,omitempty"`
	PublicIpAddress   string `json:"publicIpAddress,omitempty"`
	PublicIpAddressId string `json:"publicIpAddressId,omitempty"`
	State             string `json:"state,omitempty"`
	Type              string `json:"type,omitempty"`
}

RemoteAccessVpn is a VPN configuration which can connect a RemoteAccessVpnUser

type RemoteAccessVpnApi added in v1.4.0

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

RemoteAccessVpnApi wraps the EntityService

func (*RemoteAccessVpnApi) Disable added in v1.4.0

func (remoteAccessVpnApi *RemoteAccessVpnApi) Disable(id string) (bool, error)

Disable a specific VPN in the current environment by its ID

func (*RemoteAccessVpnApi) Enable added in v1.4.0

func (remoteAccessVpnApi *RemoteAccessVpnApi) Enable(id string) (bool, error)

Enable a specific VPN in the current environment by its ID

func (*RemoteAccessVpnApi) Get added in v1.4.0

func (remoteAccessVpnApi *RemoteAccessVpnApi) Get(id string) (*RemoteAccessVpn, error)

Get a specific VPN in the current environment by its ID

func (*RemoteAccessVpnApi) List added in v1.4.0

func (remoteAccessVpnApi *RemoteAccessVpnApi) List() ([]RemoteAccessVpn, error)

List the available VPNs in the current environment

func (*RemoteAccessVpnApi) ListWithOptions added in v1.4.0

func (remoteAccessVpnApi *RemoteAccessVpnApi) ListWithOptions(options map[string]string) ([]RemoteAccessVpn, error)

ListWithOptions lists the available VPNs in the current environment with options

type RemoteAccessVpnService added in v1.4.0

type RemoteAccessVpnService interface {
	Get(id string) (*RemoteAccessVpn, error)
	List() ([]RemoteAccessVpn, error)
	ListWithOptions(options map[string]string) ([]RemoteAccessVpn, error)
	Enable(id string) (bool, error)
	Disable(id string) (bool, error)
}

RemoteAccessVpnService defines the interface which is implemented

func NewRemoteAccessVpnService added in v1.4.0

func NewRemoteAccessVpnService(apiClient api.ApiClient, serviceCode string, environmentName string) RemoteAccessVpnService

NewRemoteAccessVpnService creates a new VPN Service for this specific service and environment

type RemoteAccessVpnUser added in v1.4.0

type RemoteAccessVpnUser struct {
	Id       string `json:"id,omitempty"`
	Username string `json:"username,omitempty"`
	Password string `json:"password,omitempty"`
}

RemoteAccessVpnUser is an environment wide user for a RemoteAccessVpn

type RemoteAccessVpnUserApi added in v1.4.0

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

RemoteAccessVpnUserApi wraps the EntityService

func (*RemoteAccessVpnUserApi) Create added in v1.4.0

func (remoteAccessVpnUserApi *RemoteAccessVpnUserApi) Create(remoteAccessVpnUser RemoteAccessVpnUser) (bool, error)

Create a VPN User in the current environment

func (*RemoteAccessVpnUserApi) Delete added in v1.4.0

func (remoteAccessVpnUserApi *RemoteAccessVpnUserApi) Delete(remoteAccessVpnUser RemoteAccessVpnUser) (bool, error)

Delete a specific VPN User in the current environment by their ID

func (*RemoteAccessVpnUserApi) Get added in v1.4.0

func (remoteAccessVpnUserApi *RemoteAccessVpnUserApi) Get(id string) (*RemoteAccessVpnUser, error)

Get a specific VPN User in the current environment by their ID

func (*RemoteAccessVpnUserApi) List added in v1.4.0

func (remoteAccessVpnUserApi *RemoteAccessVpnUserApi) List() ([]RemoteAccessVpnUser, error)

List VPN Users for this environment

type RemoteAccessVpnUserService added in v1.4.0

type RemoteAccessVpnUserService interface {
	Get(id string) (*RemoteAccessVpnUser, error)
	List() ([]RemoteAccessVpnUser, error)
	Create(remoteAccessVpnUser RemoteAccessVpnUser) (bool, error)
	Delete(remoteAccessVpnUser RemoteAccessVpnUser) (bool, error)
}

RemoteAccessVpnUserService defines the interface which is implemented

func NewRemoteAccessVpnUserService added in v1.4.0

func NewRemoteAccessVpnUserService(apiClient api.ApiClient, serviceCode string, environmentName string) RemoteAccessVpnUserService

NewRemoteAccessVpnUserService creates a new VPN User Service for this specific service and environment

type Resources

type Resources struct {
	AffinityGroups      AffinityGroupService
	Instances           InstanceService
	Volumes             VolumeService
	Templates           TemplateService
	ComputeOfferings    ComputeOfferingService
	DiskOfferings       DiskOfferingService
	SSHKeys             SSHKeyService
	Networks            NetworkService
	Vpcs                VpcService
	VpcOfferings        VpcOfferingService
	NetworkOfferings    NetworkOfferingService
	PublicIps           PublicIpService
	NetworkAcls         NetworkAclService
	NetworkAclRules     NetworkAclRuleService
	Zones               ZoneService
	PortForwardingRules PortForwardingRuleService
	LoadBalancerRules   LoadBalancerRuleService
	RemoteAccessVpn     RemoteAccessVpnService
	RemoteAccessVpnUser RemoteAccessVpnUserService
	// contains filtered or unexported fields
}

func NewResources

func NewResources(apiClient api.ApiClient, serviceCode string, environmentName string) Resources

func (Resources) GetServiceType

func (resources Resources) GetServiceType() string

type SSHKey

type SSHKey struct {
	ID          string `json:"id,omitempty"`
	Name        string `json:"name,omitempty"`
	PublicKey   string `json:"publicKey,omitempty"`
	Fingerprint string `json:"fingerprint,omitempty"`
}

type SSHKeyApi

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

func (*SSHKeyApi) Create added in v1.2.0

func (sshKeyApi *SSHKeyApi) Create(key SSHKey) (*SSHKey, error)

Create an SSH key in the current environment

func (*SSHKeyApi) Delete added in v1.2.0

func (sshKeyApi *SSHKeyApi) Delete(id string) (bool, error)

Delete an SSH Key with specified id in the current environment

func (*SSHKeyApi) Get

func (sshKeyApi *SSHKeyApi) Get(name string) (*SSHKey, error)

Get SSH key with the specified id for the current environment

func (*SSHKeyApi) List

func (sshKeyApi *SSHKeyApi) List() ([]SSHKey, error)

List all SSH keys for the current environment

func (*SSHKeyApi) ListWithOptions

func (sshKeyApi *SSHKeyApi) ListWithOptions(options map[string]string) ([]SSHKey, error)

List all SSH keys for the current environment. Can use options to do sorting and paging.

type SSHKeyService

type SSHKeyService interface {
	Get(name string) (*SSHKey, error)
	List() ([]SSHKey, error)
	ListWithOptions(options map[string]string) ([]SSHKey, error)
	Create(key SSHKey) (*SSHKey, error)
	Delete(id string) (bool, error)
}

func NewSSHKeyService

func NewSSHKeyService(apiClient api.ApiClient, serviceCode string, environmentName string) SSHKeyService

type Service

type Service struct {
	Name         string                 `json:"name,omitempty"`
	Capabilities map[string]interface{} `json:"capabilities,omitempty"`
}

type Template

type Template struct {
	ID                string   `json:"id,omitempty"`
	Name              string   `json:"name,omitempty"`
	Description       string   `json:"description,omitempty"`
	Size              int      `json:"size,omitempty"`
	AvailablePublicly bool     `json:availablePublicly`
	Ready             bool     `json:"ready,omitempty"`
	SSHKeyEnabled     bool     `json:"sshKeyEnabled,omitempty"`
	PassowordEnabled  bool     `json:"passwordEnabled,omitempty"`
	Extractable       bool     `json:"extractable,omitempty"`
	Resizable         bool     `json:"resizable,omitempty"`
	OSType            string   `json:"osType,omitempty"`
	OSTypeID          string   `json:"osTypeId,omitempty"`
	Hypervisor        string   `json:"hypervisor,omitempty"`
	Format            string   `json:"format,omitempty"`
	ProjectID         string   `json:"projectId,omitempty"`
	URL               string   `json:"url,omitempty"`
	ZoneID            string   `json:"zoneId,omitempty"`
	AvailableInZones  []string `json:"availableInZones,omitempty"`
}

type TemplateApi

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

func (*TemplateApi) Create added in v1.4.0

func (templateApi *TemplateApi) Create(t Template) (*Template, error)

func (*TemplateApi) Delete added in v1.4.0

func (templateApi *TemplateApi) Delete(id string) (bool, error)

func (*TemplateApi) Get

func (templateApi *TemplateApi) Get(id string) (*Template, error)

Get template with the specified id for the current environment

func (*TemplateApi) List

func (templateApi *TemplateApi) List() ([]Template, error)

List all templates for the current environment

func (*TemplateApi) ListWithOptions

func (templateApi *TemplateApi) ListWithOptions(options map[string]string) ([]Template, error)

List all templates for the current environment. Can use options to do sorting and paging.

type TemplateService

type TemplateService interface {
	Get(id string) (*Template, error)
	List() ([]Template, error)
	ListWithOptions(options map[string]string) ([]Template, error)
	Create(Template) (*Template, error)
	Delete(id string) (bool, error)
}

func NewTemplateService

func NewTemplateService(apiClient api.ApiClient, serviceCode string, environmentName string) TemplateService

type Volume

type Volume struct {
	Id               string `json:"id,omitempty"`
	Name             string `json:"name,omitempty"`
	Type             string `json:"type,omitempty"`
	CreationDate     string `json:"creationDate,omitempty"`
	Size             int    `json:"size,omitempty"`
	GbSize           int    `json:"sizeInGb,omitempty"`
	DiskOfferingId   string `json:"diskOfferingId,omitempty"`
	DiskOfferingName string `json:"diskOfferingName,omitempty"`
	TemplateId       string `json:"templateId,omitempty"`
	ZoneName         string `json:"zoneName,omitempty"`
	ZoneId           string `json:"zoneId,omitempty"`
	State            string `json:"state,omitempty"`
	InstanceName     string `json:"instanceName,omitempty"`
	InstanceId       string `json:"instanceId,omitempty"`
	InstanceState    string `json:"instanceState,omitempty"`
	Iops             int    `json:"iops,omitempty"`
}

type VolumeApi

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

func (*VolumeApi) AttachToInstance

func (api *VolumeApi) AttachToInstance(volume *Volume, instanceId string) error

func (*VolumeApi) Create

func (api *VolumeApi) Create(volume Volume) (*Volume, error)

func (*VolumeApi) Delete

func (api *VolumeApi) Delete(volumeId string) error

func (*VolumeApi) DetachFromInstance

func (api *VolumeApi) DetachFromInstance(volume *Volume) error

func (*VolumeApi) Get

func (volumeApi *VolumeApi) Get(id string) (*Volume, error)

Get volume with the specified id for the current environment

func (*VolumeApi) List

func (volumeApi *VolumeApi) List() ([]Volume, error)

List all volumes for the current environment

func (*VolumeApi) ListOfType

func (volumeApi *VolumeApi) ListOfType(volumeType string) ([]Volume, error)

List all volumes of specified type for the current environment

func (*VolumeApi) ListWithOptions

func (volumeApi *VolumeApi) ListWithOptions(options map[string]string) ([]Volume, error)

List all volumes for the current environment. Can use options to do sorting and paging.

func (*VolumeApi) Resize added in v1.1.0

func (api *VolumeApi) Resize(volume *Volume) error

type VolumeService

type VolumeService interface {
	Get(id string) (*Volume, error)
	List() ([]Volume, error)
	ListOfType(volumeType string) ([]Volume, error)
	ListWithOptions(options map[string]string) ([]Volume, error)
	Create(Volume) (*Volume, error)
	Resize(*Volume) error
	Delete(string) error
	AttachToInstance(*Volume, string) error
	DetachFromInstance(*Volume) error
}

func NewVolumeService

func NewVolumeService(apiClient api.ApiClient, serviceCode string, environmentName string) VolumeService

type Vpc

type Vpc struct {
	Id            string `json:"id,omitempty"`
	Name          string `json:"name,omitempty"`
	Description   string `json:"description,omitempty"`
	VpcOfferingId string `json:"vpcOfferingId,omitempty"`
	State         string `json:"state,omitempty"`
	Cidr          string `json:"cidr,omitempty"`
	ZoneId        string `json:"zoneId,omitempty"`
	ZoneName      string `json:"zoneName,omitempty"`
	NetworkDomain string `json:"networkDomain,omitempty"`
	SourceNatIp   string `json:"sourceNatIp,omitempty"`
	VpnStatus     string `json:"vpnStatus,omitempty"`
	Type          string `json:"type,omitempty"`
}

type VpcApi

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

func (*VpcApi) Create

func (vpcApi *VpcApi) Create(vpc Vpc) (*Vpc, error)

Create an vpc in the current environment

func (*VpcApi) Destroy

func (vpcApi *VpcApi) Destroy(id string) (bool, error)

Destroy a vpc with specified id in the current environment

func (*VpcApi) Get

func (vpcApi *VpcApi) Get(id string) (*Vpc, error)

Get vpc with the specified id for the current environment

func (*VpcApi) List

func (vpcApi *VpcApi) List() ([]Vpc, error)

List all vpcs for the current environment

func (*VpcApi) ListWithOptions

func (vpcApi *VpcApi) ListWithOptions(options map[string]string) ([]Vpc, error)

List all vpcs for the current environment. Can use options to do sorting and paging.

func (*VpcApi) RestartRouter

func (vpcApi *VpcApi) RestartRouter(id string) (bool, error)

Restart the router of the vpc with the specified id exists in the current environment

func (*VpcApi) Update

func (vpcApi *VpcApi) Update(vpc Vpc) (*Vpc, error)

Create an vpc in the current environment

type VpcOffering

type VpcOffering struct {
	Id    string `json:"id,omitempty"`
	Name  string `json:"name,omitempty"`
	State string `json:"state,omitempty"`
}

type VpcOfferingApi

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

func (*VpcOfferingApi) Get

func (vpcOfferingApi *VpcOfferingApi) Get(id string) (*VpcOffering, error)

Get disk offering with the specified id for the current environment

func (*VpcOfferingApi) List

func (vpcOfferingApi *VpcOfferingApi) List() ([]VpcOffering, error)

List all disk offerings for the current environment

func (*VpcOfferingApi) ListWithOptions

func (vpcOfferingApi *VpcOfferingApi) ListWithOptions(options map[string]string) ([]VpcOffering, error)

List all disk offerings for the current environment. Can use options to do sorting and paging.

type VpcOfferingService

type VpcOfferingService interface {
	Get(id string) (*VpcOffering, error)
	List() ([]VpcOffering, error)
	ListWithOptions(options map[string]string) ([]VpcOffering, error)
}

func NewVpcOfferingService

func NewVpcOfferingService(apiClient api.ApiClient, serviceCode string, environmentName string) VpcOfferingService

type VpcService

type VpcService interface {
	Get(id string) (*Vpc, error)
	List() ([]Vpc, error)
	ListWithOptions(options map[string]string) ([]Vpc, error)
	Create(vpc Vpc) (*Vpc, error)
	Update(vpc Vpc) (*Vpc, error)
	Destroy(id string) (bool, error)
	RestartRouter(id string) (bool, error)
}

func NewVpcService

func NewVpcService(apiClient api.ApiClient, serviceCode string, environmentName string) VpcService

type Zone

type Zone struct {
	Id   string `json:"id,omitempty"`
	Name string `json:"name,omitempty"`
}

type ZoneApi

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

func (*ZoneApi) Get

func (api *ZoneApi) Get(id string) (*Zone, error)

func (*ZoneApi) List

func (api *ZoneApi) List() ([]Zone, error)

func (*ZoneApi) ListWithOptions

func (api *ZoneApi) ListWithOptions(options map[string]string) ([]Zone, error)

type ZoneService

type ZoneService interface {
	Get(string) (*Zone, error)
	List() ([]Zone, error)
	ListWithOptions(map[string]string) ([]Zone, error)
}

func NewZoneService

func NewZoneService(apiClient api.ApiClient, serviceCode string, environmentName string) ZoneService

Jump to

Keyboard shortcuts

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