gcp

package
v1.336.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 12 Imported by: 34

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessConfig

type AccessConfig struct {
	Name *string `json:"name,omitempty"`
	Type *string `json:"type,omitempty"`
	// contains filtered or unexported fields
}

AccessConfig defines the access configuration for a network. AccessConfig is an element of NetworkInterface.

func (AccessConfig) MarshalJSON

func (o AccessConfig) MarshalJSON() ([]byte, error)

func (*AccessConfig) SetName

func (o *AccessConfig) SetName(v *string) *AccessConfig

SetName sets the name of the access configuration

func (*AccessConfig) SetType

func (o *AccessConfig) SetType(v *string) *AccessConfig

SetType sets the type of access configuration

type Action

type Action struct {
	Adjustment *int    `json:"adjustment,omitempty"`
	Type       *string `json:"type,omitempty"`
	// contains filtered or unexported fields
}

Action defines the action attributes of a ScalingPolicy.

func (Action) MarshalJSON

func (o Action) MarshalJSON() ([]byte, error)

func (*Action) SetAdjustment

func (o *Action) SetAdjustment(v *int) *Action

SetAdjustment sets the number associated with the action type

func (*Action) SetType

func (o *Action) SetType(v *string) *Action

SetType sets the type of action to take when scaling (adjustment)

type AliasIPRange

type AliasIPRange struct {
	IPCIDRRange         *string `json:"ipCidrRange,omitempty"`
	SubnetworkRangeName *string `json:"subnetworkRangeName,omitempty"`
	// contains filtered or unexported fields
}

AliasIPRange defines the alias ip range for a network. AliasIPRange is an element of NetworkInterface.

func (AliasIPRange) MarshalJSON

func (o AliasIPRange) MarshalJSON() ([]byte, error)

func (*AliasIPRange) SetIPCIDRRange

func (o *AliasIPRange) SetIPCIDRRange(v *string) *AliasIPRange

SetIPCIDRRange sets the ip/cidr range

func (*AliasIPRange) SetSubnetworkRangeName

func (o *AliasIPRange) SetSubnetworkRangeName(v *string) *AliasIPRange

SetSubnetworkRangeName sets the name of the subnetwork range

type AutoScale

type AutoScale struct {
	IsEnabled    *bool              `json:"isEnabled,omitempty"`
	IsAutoConfig *bool              `json:"isAutoConfig,omitempty"`
	Cooldown     *int               `json:"cooldown,omitempty"`
	Headroom     *AutoScaleHeadroom `json:"headroom,omitempty"`
	Down         *AutoScaleDown     `json:"down,omitempty"`
	// contains filtered or unexported fields
}

func (AutoScale) MarshalJSON

func (o AutoScale) MarshalJSON() ([]byte, error)

func (*AutoScale) SetCooldown

func (o *AutoScale) SetCooldown(v *int) *AutoScale

func (*AutoScale) SetDown

func (o *AutoScale) SetDown(v *AutoScaleDown) *AutoScale

func (*AutoScale) SetHeadroom

func (o *AutoScale) SetHeadroom(v *AutoScaleHeadroom) *AutoScale

func (*AutoScale) SetIsAutoConfig

func (o *AutoScale) SetIsAutoConfig(v *bool) *AutoScale

func (*AutoScale) SetIsEnabled

func (o *AutoScale) SetIsEnabled(v *bool) *AutoScale

type AutoScaleDown

type AutoScaleDown struct {
	EvaluationPeriods *int `json:"evaluationPeriods,omitempty"`
	// contains filtered or unexported fields
}

func (AutoScaleDown) MarshalJSON

func (o AutoScaleDown) MarshalJSON() ([]byte, error)

func (*AutoScaleDown) SetEvaluationPeriods

func (o *AutoScaleDown) SetEvaluationPeriods(v *int) *AutoScaleDown

type AutoScaleGKE

type AutoScaleGKE struct {
	AutoScale                   // embedding
	Labels    []*AutoScaleLabel `json:"labels,omitempty"`
	// contains filtered or unexported fields
}

func (AutoScaleGKE) MarshalJSON

func (o AutoScaleGKE) MarshalJSON() ([]byte, error)

func (*AutoScaleGKE) SetLabels

func (o *AutoScaleGKE) SetLabels(v []*AutoScaleLabel) *AutoScaleGKE

SetLabels sets the AutoScale labels for the GKE integration

type AutoScaleHeadroom

type AutoScaleHeadroom struct {
	CPUPerUnit    *int `json:"cpuPerUnit,omitempty"`
	MemoryPerUnit *int `json:"memoryPerUnit,omitempty"`
	NumOfUnits    *int `json:"numOfUnits,omitempty"`
	// contains filtered or unexported fields
}

func (AutoScaleHeadroom) MarshalJSON

func (o AutoScaleHeadroom) MarshalJSON() ([]byte, error)

func (*AutoScaleHeadroom) SetCPUPerUnit

func (o *AutoScaleHeadroom) SetCPUPerUnit(v *int) *AutoScaleHeadroom

func (*AutoScaleHeadroom) SetMemoryPerUnit

func (o *AutoScaleHeadroom) SetMemoryPerUnit(v *int) *AutoScaleHeadroom

func (*AutoScaleHeadroom) SetNumOfUnits

func (o *AutoScaleHeadroom) SetNumOfUnits(v *int) *AutoScaleHeadroom

type AutoScaleLabel

type AutoScaleLabel struct {
	Key   *string `json:"key,omitempty"`
	Value *string `json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (AutoScaleLabel) MarshalJSON

func (o AutoScaleLabel) MarshalJSON() ([]byte, error)

func (*AutoScaleLabel) SetKey

func (o *AutoScaleLabel) SetKey(v *string) *AutoScaleLabel

func (*AutoScaleLabel) SetValue

func (o *AutoScaleLabel) SetValue(v *string) *AutoScaleLabel

type BackendService

type BackendService struct {
	BackendServiceName *string     `json:"backendServiceName,omitempty"`
	LocationType       *string     `json:"locationType,omitempty"`
	Scheme             *string     `json:"scheme,omitempty"`
	NamedPorts         *NamedPorts `json:"namedPorts,omitempty"`
	// contains filtered or unexported fields
}

BackendService defines the configuration for a single backend service.

func (BackendService) MarshalJSON

func (o BackendService) MarshalJSON() ([]byte, error)

func (*BackendService) SetBackendServiceName

func (o *BackendService) SetBackendServiceName(v *string) *BackendService

SetBackendServiceName sets the name of the backend service.

func (*BackendService) SetLocationType

func (o *BackendService) SetLocationType(v *string) *BackendService

SetLocationType sets the location type

func (*BackendService) SetNamedPorts

func (o *BackendService) SetNamedPorts(v *NamedPorts) *BackendService

SetNamedPorts sets the named port object

func (*BackendService) SetScheme

func (o *BackendService) SetScheme(v *string) *BackendService

SetScheme sets the scheme

type BackendServiceConfig

type BackendServiceConfig struct {
	BackendServices []*BackendService `json:"backendServices,omitempty"`
	// contains filtered or unexported fields
}

BackendServiceConfig constains a list of backend service configurations.

func (BackendServiceConfig) MarshalJSON

func (o BackendServiceConfig) MarshalJSON() ([]byte, error)

func (*BackendServiceConfig) SetBackendServices

func (o *BackendServiceConfig) SetBackendServices(v []*BackendService) *BackendServiceConfig

SetBackendServices sets the backend service list

type Capacity

type Capacity struct {
	Maximum *int `json:"maximum,omitempty"`
	Minimum *int `json:"minimum,omitempty"`
	Target  *int `json:"target,omitempty"`
	// contains filtered or unexported fields
}

Capacity defines the capacity attributes of a Group instance

func (Capacity) MarshalJSON

func (o Capacity) MarshalJSON() ([]byte, error)

func (*Capacity) SetMaximum

func (o *Capacity) SetMaximum(v *int) *Capacity

SetMaximum sets the Maximum number of VMs in the group.

func (*Capacity) SetMinimum

func (o *Capacity) SetMinimum(v *int) *Capacity

SetMinimum sets the minimum number of VMs in the group

func (*Capacity) SetTarget

func (o *Capacity) SetTarget(v *int) *Capacity

SetTarget sets the desired number of running VMs in the group.

type CapacityGKE

type CapacityGKE struct {
	Capacity //embedding
	// contains filtered or unexported fields
}

type Compute

type Compute struct {
	AvailabilityZones   []string             `json:"availabilityZones,omitempty"`
	GPU                 *GPU                 `json:"gpu,omitempty"`
	Health              *Health              `json:"health,omitempty"`
	InstanceTypes       *InstanceTypes       `json:"instanceTypes,omitempty"`
	LaunchSpecification *LaunchSpecification `json:"launchSpecification,omitempty"`
	Subnets             []*Subnet            `json:"subnets,omitempty"`
	// contains filtered or unexported fields
}

Compute defines the compute attributes of a Group.

func (Compute) MarshalJSON

func (o Compute) MarshalJSON() ([]byte, error)

func (*Compute) SetAvailabilityZones

func (o *Compute) SetAvailabilityZones(v []string) *Compute

SetAvailabilityZones sets the list of availability zones for group resources.

func (*Compute) SetGPU

func (o *Compute) SetGPU(v *GPU) *Compute

SetGPU sets the GPU object

func (*Compute) SetHealth

func (o *Compute) SetHealth(v *Health) *Compute

SetHealth sets the health check attributes for the group

func (*Compute) SetInstanceTypes

func (o *Compute) SetInstanceTypes(v *InstanceTypes) *Compute

SetInstanceTypes sets the instance types for the group.

func (*Compute) SetLaunchConfiguration

func (o *Compute) SetLaunchConfiguration(v *LaunchSpecification) *Compute

SetLaunchSpecification sets the launch configuration of the group.

func (*Compute) SetSubnets

func (o *Compute) SetSubnets(v []*Subnet) *Compute

SetSubnets sets the subnets used by the group.

type CreateGroupInput

type CreateGroupInput struct {
	Group *Group `json:"group,omitempty"`
}

CreateGroupInput contains the Elastigroup description required when making a request to create an Elastigroup.

type CreateGroupOutput

type CreateGroupOutput struct {
	Group *Group `json:"group,omitempty"`
}

CreateGroupOutput contains a definition of the created Elastigroup, including the generated Group ID.

type CustomInstance

type CustomInstance struct {
	VCPU      *int `json:"vCPU,omitempty"`
	MemoryGiB *int `json:"memoryGiB,omitempty"`
	// contains filtered or unexported fields
}

CustomInstance defines the memory and vCPU constraints of an instance

func (*CustomInstance) SetMemoryGiB

func (o *CustomInstance) SetMemoryGiB(v *int) *CustomInstance

SetMemoryGiB sets the memory amount for a Custom Instance in intervals of 2, min 10

func (*CustomInstance) SetVCPU

func (o *CustomInstance) SetVCPU(v *int) *CustomInstance

SetVCPU sets sets the number of vCPUs to use in a Custom instance type

type DeleteGroupInput

type DeleteGroupInput struct {
	GroupID *string `json:"groupId,omitempty"`
}

DeleteGroupInput contains the required input to delete an existing Elastigroup.

type DeleteGroupOutput

type DeleteGroupOutput struct{}

DeleteGroupOutput describes the response a deleted group. Empty at this time.

type Dimension

type Dimension struct {
	Name  *string `json:"name,omitempty"`
	Value *string `json:"value,omitempty"`
	// contains filtered or unexported fields
}

Dimension defines the attributes for the dimensions of a ScalingPolicy.

func (Dimension) MarshalJSON

func (o Dimension) MarshalJSON() ([]byte, error)

func (*Dimension) SetName

func (o *Dimension) SetName(v *string) *Dimension

SetName sets the name of the dimension

func (*Dimension) SetValue

func (o *Dimension) SetValue(v *string) *Dimension

SetValue sets the value of the dimension

type Disk

type Disk struct {
	AutoDelete       *bool             `json:"autoDelete,omitempty"`
	Boot             *bool             `json:"boot,omitempty"`
	DeviceName       *string           `json:"deviceName,omitempty"`
	InitializeParams *InitializeParams `json:"initializeParams,omitempty"`
	Interface        *string           `json:"interface,omitempty"`
	Mode             *string           `json:"mode,omitempty"`
	Source           *string           `json:"source,omitempty"`
	Type             *string           `json:"type,omitempty"`
	// contains filtered or unexported fields
}

Disk defines the a block of memory resources for the group. Stored in an array of Disks, as defined in LaunchSpecification.

func (Disk) MarshalJSON

func (o Disk) MarshalJSON() ([]byte, error)

func (*Disk) SetAutoDelete

func (o *Disk) SetAutoDelete(v *bool) *Disk

SetAutoDelete sets option to have disks autodelete

func (*Disk) SetBoot

func (o *Disk) SetBoot(v *bool) *Disk

SetBoot sets the boot option

func (*Disk) SetDeviceName

func (o *Disk) SetDeviceName(v *string) *Disk

SetDeviceName sets the device name

func (*Disk) SetInitializeParams

func (o *Disk) SetInitializeParams(v *InitializeParams) *Disk

SetInitializeParams sets the initialization paramters object

func (*Disk) SetInterface

func (o *Disk) SetInterface(v *string) *Disk

SetInterface sets the interface

func (*Disk) SetMode

func (o *Disk) SetMode(v *string) *Disk

SetMode sets the mode

func (*Disk) SetSource

func (o *Disk) SetSource(v *string) *Disk

SetSource sets the source

func (*Disk) SetType

func (o *Disk) SetType(v *string) *Disk

SetType sets the type of disk

type DockerSwarmIntegration

type DockerSwarmIntegration struct {
	MasterHost *string `json:"masterHost,omitempty"`
	MasterPort *int    `json:"masterPort,omitempty"`
	// contains filtered or unexported fields
}

func (DockerSwarmIntegration) MarshalJSON

func (o DockerSwarmIntegration) MarshalJSON() ([]byte, error)

func (*DockerSwarmIntegration) SetMasterHost

SetMasterHost sets the master host

func (*DockerSwarmIntegration) SetMasterPort

func (o *DockerSwarmIntegration) SetMasterPort(v *int) *DockerSwarmIntegration

SetMasterPort sets the master port

type GKEIntegration

type GKEIntegration struct {
	ClusterID       *string       `json:"clusterIdentifier,omitempty"`
	ClusterZoneName *string       `json:"clusterZoneName,omitempty"`
	AutoUpdate      *bool         `json:"autoUpdate,omitempty"`
	AutoScale       *AutoScaleGKE `json:"autoScale,omitempty"`
	Location        *string       `json:"location,omitempty"`
	// contains filtered or unexported fields
}

func (GKEIntegration) MarshalJSON

func (o GKEIntegration) MarshalJSON() ([]byte, error)

func (*GKEIntegration) SetAutoScale

func (o *GKEIntegration) SetAutoScale(v *AutoScaleGKE) *GKEIntegration

SetAutoScale sets the AutoScale configuration used with the GKE integration

func (*GKEIntegration) SetAutoUpdate

func (o *GKEIntegration) SetAutoUpdate(v *bool) *GKEIntegration

SetAutoUpdate sets the autoupdate flag

func (*GKEIntegration) SetClusterID

func (o *GKEIntegration) SetClusterID(v *string) *GKEIntegration

SetClusterID sets the cluster ID

func (*GKEIntegration) SetLocation

func (o *GKEIntegration) SetLocation(v *string) *GKEIntegration

SetLocation sets the location that the cluster is located in

type GPU

type GPU struct {
	Type  *string `json:"type,omitempty"`
	Count *int    `json:"count,omitempty"`
	// contains filtered or unexported fields
}

GPU defines the kind and number of GPUs to use with the group. GPU is an element of Compute.

func (GPU) MarshalJSON

func (o GPU) MarshalJSON() ([]byte, error)

func (*GPU) SetCount

func (o *GPU) SetCount(v *int) *GPU

SetCount sets the number of this type of gpu

func (*GPU) SetType

func (o *GPU) SetType(v *string) *GPU

SetType sets the type of gpu

type Group

type Group struct {
	ID          *string      `json:"id,omitempty"`
	Name        *string      `json:"name,omitempty"`
	Description *string      `json:"description,omitempty"`
	NodeImage   *string      `json:"nodeImage,omitempty"`
	Capacity    *Capacity    `json:"capacity,omitempty"`
	Compute     *Compute     `json:"compute,omitempty"`
	Scaling     *Scaling     `json:"scaling,omitempty"`
	Scheduling  *Scheduling  `json:"scheduling,omitempty"`
	Strategy    *Strategy    `json:"strategy,omitempty"`
	Integration *Integration `json:"thirdPartiesIntegration,omitempty"`

	// Read-only fields.
	CreatedAt *time.Time `json:"createdAt,omitempty"`
	UpdatedAt *time.Time `json:"updatedAt,omitempty"`
	// contains filtered or unexported fields
}

Group defines a GCP Elastigroup.

func (Group) MarshalJSON

func (o Group) MarshalJSON() ([]byte, error)

func (*Group) SetCapacity

func (o *Group) SetCapacity(v *Capacity) *Group

SetCapacity sets the Capacity object

func (*Group) SetCompute

func (o *Group) SetCompute(v *Compute) *Group

SetCompute sets the Compute object

func (*Group) SetDescription

func (o *Group) SetDescription(v *string) *Group

SetDescription sets the description for the group

func (*Group) SetID

func (o *Group) SetID(v *string) *Group

SetID sets the group ID attribute

func (*Group) SetIntegration

func (o *Group) SetIntegration(v *Integration) *Group

SetIntegration sets the integrations for the group

func (*Group) SetName

func (o *Group) SetName(v *string) *Group

SetName sets the group name

func (*Group) SetNodeImage

func (o *Group) SetNodeImage(v *string) *Group

SetNodeImage sets image that will be used for the node VMs

func (*Group) SetScaling

func (o *Group) SetScaling(v *Scaling) *Group

SetScaling sets the Scaling object

func (*Group) SetScheduling

func (o *Group) SetScheduling(v *Scheduling) *Group

func (*Group) SetStrategy

func (o *Group) SetStrategy(v *Strategy) *Group

SetStrategy sets the Strategy object

type Health

type Health struct {
	AutoHealing       *bool   `json:"autoHealing,omitempty"`
	GracePeriod       *int    `json:"gracePeriod,omitempty"`
	HealthCheckType   *string `json:"healthCheckType,omitempty"`
	UnhealthyDuration *int    `json:"unhealthyDuration,omitempty"`
	// contains filtered or unexported fields
}

Health defines the healthcheck attributes for the group. Health is an element of Compute.

func (Health) MarshalJSON

func (o Health) MarshalJSON() ([]byte, error)

func (*Health) SetAutoHealing

func (o *Health) SetAutoHealing(v *bool) *Health

SetAutoHealing sets autohealing to true or false

func (*Health) SetGracePeriod

func (o *Health) SetGracePeriod(v *int) *Health

SetGracePeriod sets the grace period time for the groups health check

func (*Health) SetHealthCheckType

func (o *Health) SetHealthCheckType(v *string) *Health

SetHealthCheckType sets the type of helath check to perform

func (*Health) SetUnhealthyDuration

func (o *Health) SetUnhealthyDuration(v *int) *Health

type ImportGKEClusterInput

type ImportGKEClusterInput struct {
	ClusterID       *string         `json:"clusterID,omitempty"`
	ClusterZoneName *string         `json:"clusterZoneName,omitempty"`
	DryRun          *bool           `json:"dryRun,omitempty"`
	Group           *ImportGKEGroup `json:"group,omitempty"`
}

ImportGKEClusterInput describes the input required when importing an existing GKE cluster into Elastigroup, if it exists.

type ImportGKEClusterOutput

type ImportGKEClusterOutput struct {
	Group *Group `json:"group,omitempty"`
}

ImportGKEClusterOutput contains a description of the Elastigroup and the imported GKE cluster.

type ImportGKEGroup

type ImportGKEGroup struct {
	AvailabilityZones     []string          `json:"availabilityZones,omitempty"`
	Capacity              *CapacityGKE      `json:"capacity,omitempty"`
	Name                  *string           `json:"name,omitempty"`
	InstanceTypes         *InstanceTypesGKE `json:"instanceTypes,omitempty"`
	PreemptiblePercentage *int              `json:"preemptiblePercentage,omitempty"`
	NodeImage             *string           `json:"nodeImage,omitempty"`
	// contains filtered or unexported fields
}

ImportGKEGroup contains a modified group struct used for overriding cluster parameters on import

func (ImportGKEGroup) MarshalJSON

func (o ImportGKEGroup) MarshalJSON() ([]byte, error)

func (*ImportGKEGroup) SetAvailabilityZones

func (o *ImportGKEGroup) SetAvailabilityZones(v []string) *ImportGKEGroup

SetAvailabilityZones sets the availability zones for the gke group

func (*ImportGKEGroup) SetCapacity

func (o *ImportGKEGroup) SetCapacity(v *CapacityGKE) *ImportGKEGroup

SetCapacity sets the capacity for a gke group

func (*ImportGKEGroup) SetInstanceTypes

func (o *ImportGKEGroup) SetInstanceTypes(v *InstanceTypesGKE) *ImportGKEGroup

SetInstanceTypes sets the instance types for the group.

func (*ImportGKEGroup) SetName

func (o *ImportGKEGroup) SetName(v *string) *ImportGKEGroup

SetName sets the group name

func (*ImportGKEGroup) SetNodeImage

func (o *ImportGKEGroup) SetNodeImage(v *string) *ImportGKEGroup

SetNodeImage sets the node image for the imported gke group.

func (*ImportGKEGroup) SetPreemptiblePercentage

func (o *ImportGKEGroup) SetPreemptiblePercentage(v *int) *ImportGKEGroup

SetPreemptiblePercentage sets the preemptible percentage when importing a gke cluster into Elastigroup.

type InitializeParams

type InitializeParams struct {
	DiskSizeGB  *int    `json:"diskSizeGb,omitempty"`
	DiskType    *string `json:"diskType,omitempty"`
	SourceImage *string `json:"sourceImage,omitempty"`
	// contains filtered or unexported fields
}

InitializeParams defines the initialization parameters for a Disk object.

func (InitializeParams) MarshalJSON

func (o InitializeParams) MarshalJSON() ([]byte, error)

func (*InitializeParams) SetDiskSizeGB

func (o *InitializeParams) SetDiskSizeGB(v *int) *InitializeParams

SetDiskSizeGB sets the disk size in gigabytes, in multiples of 2

func (*InitializeParams) SetDiskType

func (o *InitializeParams) SetDiskType(v *string) *InitializeParams

SetDiskType sets the type of disk

func (*InitializeParams) SetSourceImage

func (o *InitializeParams) SetSourceImage(v *string) *InitializeParams

SetSourceImage sets the source image to use

type Instance

type Instance struct {
	CreatedAt    *time.Time `json:"createdAt,omitempty"`
	InstanceName *string    `json:"instanceName,omitempty"`
	LifeCycle    *string    `json:"lifeCycle,omitempty"`
	MachineType  *string    `json:"machineType,omitempty"`
	PrivateIP    *string    `json:"privateIpAddress,omitempty"`
	PublicIP     *string    `json:"publicIpAddress,omitempty"`
	StatusName   *string    `json:"statusName,omitempty"`
	UpdatedAt    *time.Time `json:"updatedAt,omitempty"`
	Zone         *string    `json:"zone,omitempty"`
}

Instance describes an individual instance's status and is returned by a Status request

type InstanceTypes

type InstanceTypes struct {
	OnDemand    *string           `json:"ondemand,omitempty"`
	Preemptible []string          `json:"preemptible,omitempty"`
	Custom      []*CustomInstance `json:"custom,omitempty"`
	// contains filtered or unexported fields
}

InstanceTypes defines the type of instances to use with the group. InstanceTypes is an element of Compute.

func (InstanceTypes) MarshalJSON

func (o InstanceTypes) MarshalJSON() ([]byte, error)

func (*InstanceTypes) SetCustom

func (o *InstanceTypes) SetCustom(v []*CustomInstance) *InstanceTypes

SetCustom sets the memory and vCPU attributes for Custom Instance types

func (*InstanceTypes) SetOnDemand

func (o *InstanceTypes) SetOnDemand(v *string) *InstanceTypes

SetOnDemand sets the kind of on demand instances to use for the group.

func (*InstanceTypes) SetPreemptible

func (o *InstanceTypes) SetPreemptible(v []string) *InstanceTypes

SetPreemptible sets the kind of premeptible instances to use with the group.

type InstanceTypesGKE

type InstanceTypesGKE struct {
	OnDemand    *string  `json:"ondemand,omitempty"`
	Preemptible []string `json:"preemptible,omitempty"`
	// contains filtered or unexported fields
}

func (InstanceTypesGKE) MarshalJSON

func (o InstanceTypesGKE) MarshalJSON() ([]byte, error)

func (*InstanceTypesGKE) SetOnDemand

func (o *InstanceTypesGKE) SetOnDemand(v *string) *InstanceTypesGKE

SetOnDemand sets the instance types when importing a gke group

func (*InstanceTypesGKE) SetPreemptible

func (o *InstanceTypesGKE) SetPreemptible(v []string) *InstanceTypesGKE

SetPreemptible sets the list of preemptible instance types

type Integration

type Integration struct {
	GKE         *GKEIntegration         `json:"gke,omitempty"`
	DockerSwarm *DockerSwarmIntegration `json:"dockerSwarm,omitempty"`
	// contains filtered or unexported fields
}

func (Integration) MarshalJSON

func (o Integration) MarshalJSON() ([]byte, error)

func (*Integration) SetDockerSwarm

func (o *Integration) SetDockerSwarm(v *DockerSwarmIntegration) *Integration

SetDockerSwarm sets the DockerSwarm integration

func (*Integration) SetGKE

func (o *Integration) SetGKE(v *GKEIntegration) *Integration

SetGKEIntegration sets the GKE integration

type Label

type Label struct {
	Key   *string `json:"key,omitempty"`
	Value *string `json:"value,omitempty"`
	// contains filtered or unexported fields
}

Label defines an object holding a key:value pair. Label is an element of LaunchSpecification.

func (Label) MarshalJSON

func (o Label) MarshalJSON() ([]byte, error)

func (*Label) SetKey

func (o *Label) SetKey(v *string) *Label

SetKey sets the key for the label

func (*Label) SetValue

func (o *Label) SetValue(v *string) *Label

SetValue sets the value for the label

type LaunchSpecification

type LaunchSpecification struct {
	BackendServiceConfig *BackendServiceConfig `json:"backendServiceConfig,omitempty"`
	Disks                []*Disk               `json:"disks,omitempty"`
	Labels               []*Label              `json:"labels,omitempty"`
	IPForwarding         *bool                 `json:"ipForwarding,omitempty"`
	NetworkInterfaces    []*NetworkInterface   `json:"networkInterfaces,omitempty"`
	Metadata             []*Metadata           `json:"metadata,omitempty"`
	ServiceAccount       *string               `json:"serviceAccount,omitempty"`
	StartupScript        *string               `json:"startupScript,omitempty"`
	ShutdownScript       *string               `json:"shutdownScript,omitempty"`
	Tags                 []string              `json:"tags,omitempty"`
	InstanceNamePrefix   *string               `json:"instanceNamePrefix,omitempty"`
	// contains filtered or unexported fields
}

LaunchSpecification defines launch attributes for the Group. LaunchSpecification is an element of Compute.

func (LaunchSpecification) MarshalJSON

func (o LaunchSpecification) MarshalJSON() ([]byte, error)

func (*LaunchSpecification) SetBackendServiceConfig

func (o *LaunchSpecification) SetBackendServiceConfig(v *BackendServiceConfig) *LaunchSpecification

SetBackendServices sets the backend services to use with the group.

func (*LaunchSpecification) SetDisks

func (o *LaunchSpecification) SetDisks(v []*Disk) *LaunchSpecification

SetDisks sets the list of disks used by the group

func (*LaunchSpecification) SetIPForwarding

func (o *LaunchSpecification) SetIPForwarding(v *bool) *LaunchSpecification

SetIPForwarding sets whether to use IP forwarding for this group.

func (*LaunchSpecification) SetInstanceNamePrefix added in v1.156.0

func (o *LaunchSpecification) SetInstanceNamePrefix(v *string) *LaunchSpecification

SetInstanceNamePrefix sets an instance name prefix to be used for all launched instances and their boot disk.

func (*LaunchSpecification) SetLabels

func (o *LaunchSpecification) SetLabels(v []*Label) *LaunchSpecification

SetLabels sets the labels to be used with the group

func (*LaunchSpecification) SetMetadata

func (o *LaunchSpecification) SetMetadata(v []*Metadata) *LaunchSpecification

SetMetadata sets metadata for the group.

func (*LaunchSpecification) SetNetworkInterfaces

func (o *LaunchSpecification) SetNetworkInterfaces(v []*NetworkInterface) *LaunchSpecification

SetNetworkInterfaces sets number and kinds of network interfaces used by the group.

func (*LaunchSpecification) SetServiceAccount

func (o *LaunchSpecification) SetServiceAccount(v *string) *LaunchSpecification

SetServiceAccount sets the service account used by the instances in the group

func (*LaunchSpecification) SetShutdownScript

func (o *LaunchSpecification) SetShutdownScript(v *string) *LaunchSpecification

SetShutdownScript sets the script that will run when draining instances before termination

func (*LaunchSpecification) SetStartupScript

func (o *LaunchSpecification) SetStartupScript(v *string) *LaunchSpecification

SetStartupScript sets the startup script to be executed when the instance launches.

func (*LaunchSpecification) SetTags

SetTags sets the list of tags

type ListGroupsInput

type ListGroupsInput struct{}

ListGroupsInput describes the input required when making a request to list all groups in an account.

type ListGroupsOutput

type ListGroupsOutput struct {
	Groups []*Group `json:"groups,omitempty"`
}

ListGroupsOutput contains an array of groups.

type Metadata

type Metadata struct {
	Key   *string `json:"key,omitempty"`
	Value *string `json:"value,omitempty"`
	// contains filtered or unexported fields
}

Metadata defines an object holding a key:value pair. Metadata is an element of LaunchSpecification.

func (Metadata) MarshalJSON

func (o Metadata) MarshalJSON() ([]byte, error)

func (*Metadata) SetKey

func (o *Metadata) SetKey(v *string) *Metadata

SetKey sets the metadata key

func (*Metadata) SetValue

func (o *Metadata) SetValue(v *string) *Metadata

SetValue sets the metadata value

type NamedPorts

type NamedPorts struct {
	Name  *string `json:"name,omitempty"`
	Ports []int   `json:"ports,omitempty"`
	// contains filtered or unexported fields
}

NamedPorts describes the name and list of ports to use with the backend service

func (NamedPorts) MarshalJSON

func (o NamedPorts) MarshalJSON() ([]byte, error)

func (*NamedPorts) SetName

func (o *NamedPorts) SetName(v *string) *NamedPorts

SetNamedPorts sets the name of the NamedPorts

func (*NamedPorts) SetPorts

func (o *NamedPorts) SetPorts(v []int) *NamedPorts

SetPorts sets the list of ports in the NamedPorts

type NetworkInterface

type NetworkInterface struct {
	AccessConfigs []*AccessConfig `json:"accessConfigs,omitempty"`
	AliasIPRanges []*AliasIPRange `json:"aliasIpRanges,omitempty"`
	Network       *string         `json:"network,omitempty"`
	ProjectID     *string         `json:"projectId,omitempty"`
	// contains filtered or unexported fields
}

NetworkInterface defines the network configuration for a Group. NetworkInterface is an element of LaunchSpecification.

func (NetworkInterface) MarshalJSON

func (o NetworkInterface) MarshalJSON() ([]byte, error)

func (*NetworkInterface) SetAccessConfigs

func (o *NetworkInterface) SetAccessConfigs(v []*AccessConfig) *NetworkInterface

SetAccessConfigs creates a list of one or more access configuration objects

func (*NetworkInterface) SetAliasIPRanges

func (o *NetworkInterface) SetAliasIPRanges(v []*AliasIPRange) *NetworkInterface

SetAliasIPRanges sets a list of alias IP range objects

func (*NetworkInterface) SetNetwork

func (o *NetworkInterface) SetNetwork(v *string) *NetworkInterface

SetNetwork sets the name of the network

func (*NetworkInterface) SetProjectId added in v1.46.0

func (o *NetworkInterface) SetProjectId(v *string) *NetworkInterface

SetProjectId sets the project identifier of the network.

type ReadGroupInput

type ReadGroupInput struct {
	GroupID *string `json:"groupId,omitempty"`
}

ReadGroupInput describes the input required when making a request to list a single Elastigroup.

type ReadGroupOutput

type ReadGroupOutput struct {
	Group *Group `json:"group,omitempty"`
}

ReadGroupOutput contains a description of the requested Elastigroup, if it exists.

type Scaling

type Scaling struct {
	Up   []*ScalingPolicy `json:"up,omitempty"`
	Down []*ScalingPolicy `json:"down,omitempty"`
	// contains filtered or unexported fields
}

Scaling defines the scaling attributes of a Group

func (Scaling) MarshalJSON

func (o Scaling) MarshalJSON() ([]byte, error)

func (*Scaling) SetDown

func (o *Scaling) SetDown(v []*ScalingPolicy) *Scaling

SetDown sets the scaling policy to use when decreasing the number of instances in a group.

func (*Scaling) SetUp

func (o *Scaling) SetUp(v []*ScalingPolicy) *Scaling

SetUp sets the scaling policy to usewhen increasing the number of instances in a group.

type ScalingPolicy

type ScalingPolicy struct {
	Action            *Action      `json:"action,omitempty"`
	Cooldown          *int         `json:"cooldown,omitempty"`
	Dimensions        []*Dimension `json:"dimensions,omitempty"`
	EvaluationPeriods *int         `json:"evaluationPeriods,omitempty"`
	MetricName        *string      `json:"metricName,omitempty"`
	Namespace         *string      `json:"namespace,omitempty"`
	Operator          *string      `json:"operator,omitempty"`
	Period            *int         `json:"period,omitempty"`
	PolicyName        *string      `json:"policyName,omitempty"`
	Source            *string      `json:"source,omitempty"`
	Statistic         *string      `json:"statistic,omitempty"`
	Threshold         *float64     `json:"threshold,omitempty"`
	Unit              *string      `json:"unit,omitempty"`
	// contains filtered or unexported fields
}

ScalingPolicy defines the scaling attributes for both up and down policies. ScalingPolicy is an element of Scaling.

func (ScalingPolicy) MarshalJSON

func (o ScalingPolicy) MarshalJSON() ([]byte, error)

func (*ScalingPolicy) SetAction

func (o *ScalingPolicy) SetAction(v *Action) *ScalingPolicy

SetAction sets the action to perform when scaling

func (*ScalingPolicy) SetCooldown

func (o *ScalingPolicy) SetCooldown(v *int) *ScalingPolicy

SetCooldown sets the cooldown time in seconds before triggered events can start

func (*ScalingPolicy) SetDimensions

func (o *ScalingPolicy) SetDimensions(v []*Dimension) *ScalingPolicy

SetDimensions sets the list of dimension objects

func (*ScalingPolicy) SetEvaluationPeriods

func (o *ScalingPolicy) SetEvaluationPeriods(v *int) *ScalingPolicy

SetEvaluationPeriods sets the number of periods over which data is compared

func (*ScalingPolicy) SetMetricName

func (o *ScalingPolicy) SetMetricName(v *string) *ScalingPolicy

SetMetricName sets the name of the metric to compare

func (*ScalingPolicy) SetNamespace

func (o *ScalingPolicy) SetNamespace(v *string) *ScalingPolicy

SetNamespace sets the namespace for the associated metric

func (*ScalingPolicy) SetOperator

func (o *ScalingPolicy) SetOperator(v *string) *ScalingPolicy

SetOperator sets the operator (gte, lte)

func (*ScalingPolicy) SetPeriod

func (o *ScalingPolicy) SetPeriod(v *int) *ScalingPolicy

SetPeriod sets the period in seconds over which the statistic is applied

func (*ScalingPolicy) SetPolicyName

func (o *ScalingPolicy) SetPolicyName(v *string) *ScalingPolicy

SetPolicyName sets the name of the scaling policy

func (*ScalingPolicy) SetSource

func (o *ScalingPolicy) SetSource(v *string) *ScalingPolicy

SetSource sets the source of the metric (spectrum, stackdriver)

func (*ScalingPolicy) SetStatistic

func (o *ScalingPolicy) SetStatistic(v *string) *ScalingPolicy

SetStatistic sets the metric aggregator to return (average, sum, min, max)

func (*ScalingPolicy) SetThreshold

func (o *ScalingPolicy) SetThreshold(v *float64) *ScalingPolicy

SetThreshold sets the value against which the metric is compared

func (*ScalingPolicy) SetUnit

func (o *ScalingPolicy) SetUnit(v *string) *ScalingPolicy

SetUnit sets the unit for the associated metric

type Scheduling

type Scheduling struct {
	Tasks []*Task `json:"tasks,omitempty"`
	// contains filtered or unexported fields
}

func (Scheduling) MarshalJSON

func (o Scheduling) MarshalJSON() ([]byte, error)

func (*Scheduling) SetTasks

func (o *Scheduling) SetTasks(v []*Task) *Scheduling

type Service

Service provides the API operation methods for making requests to endpoints of the Spotinst API. See this package's package overview docs for details on the service.

type ServiceOp

type ServiceOp struct {
	Client *client.Client
}

func New

func New(sess *session.Session, cfgs ...*spotinst.Config) *ServiceOp

func (*ServiceOp) Create

func (s *ServiceOp) Create(ctx context.Context, input *CreateGroupInput) (*CreateGroupOutput, error)

Create creates a new Elastigroup using GCE resources.

func (*ServiceOp) Delete

func (s *ServiceOp) Delete(ctx context.Context, input *DeleteGroupInput) (*DeleteGroupOutput, error)

Delete removes a single existing Elastigroup and destroys all associated GCE resources.

func (*ServiceOp) ImportGKECluster

func (s *ServiceOp) ImportGKECluster(ctx context.Context, input *ImportGKEClusterInput) (*ImportGKEClusterOutput, error)

ImportGKECluster imports an existing GKE cluster into Elastigroup.

func (*ServiceOp) List

List returns the configuration of all existing Elastigroups in a given Spotinst GCE account.

func (*ServiceOp) Read

func (s *ServiceOp) Read(ctx context.Context, input *ReadGroupInput) (*ReadGroupOutput, error)

Read returns the configuration of a single existing Elastigroup.

func (*ServiceOp) Status

func (s *ServiceOp) Status(ctx context.Context, input *StatusGroupInput) (*StatusGroupOutput, error)

Status describes the current status of the instances in a specific Elastigroup

func (*ServiceOp) Update

func (s *ServiceOp) Update(ctx context.Context, input *UpdateGroupInput) (*UpdateGroupOutput, error)

Update modifies the configuration of a single existing Elastigroup.

type StatusGroupInput

type StatusGroupInput struct {
	GroupID *string `json:"groupId,omitempty"`
}

StatusGroupInput describes the required input when making a request to see an Elastigroup's status.

type StatusGroupOutput

type StatusGroupOutput struct {
	Instances []*Instance `json:"instances,omitempty"`
}

StatusGroupOutput describes the status of the instances in the Elastigroup.

type Strategy

type Strategy struct {
	DrainingTimeout       *int    `json:"drainingTimeout,omitempty"`
	FallbackToOnDemand    *bool   `json:"fallbackToOd,omitempty"`
	PreemptiblePercentage *int    `json:"preemptiblePercentage,omitempty"`
	OnDemandCount         *int    `json:"onDemandCount,omitempty"`
	ProvisioningModel     *string `json:"provisioningModel,omitempty"`
	// contains filtered or unexported fields
}

Strategy defines the strategy attributes of a Group.

func (Strategy) MarshalJSON

func (o Strategy) MarshalJSON() ([]byte, error)

func (*Strategy) SetDrainingTimeout

func (o *Strategy) SetDrainingTimeout(v *int) *Strategy

SetDrainingTimeout sets the time to keep an instance alive after detaching it from the group

func (*Strategy) SetFallbackToOnDemand

func (o *Strategy) SetFallbackToOnDemand(v *bool) *Strategy

SetFallbackToOnDemand sets the option to fallback to on demand instances if preemptible instances arent available

func (*Strategy) SetOnDemandCount

func (o *Strategy) SetOnDemandCount(v *int) *Strategy

SetOnDemandCount sets the number of on demand instances to use in the group.

func (*Strategy) SetPreemptiblePercentage

func (o *Strategy) SetPreemptiblePercentage(v *int) *Strategy

SetPreemptiblePercentage sets the ratio of preemptible instances to use in the group

func (*Strategy) SetProvisioningModel added in v1.103.0

func (o *Strategy) SetProvisioningModel(v *string) *Strategy

type Subnet

type Subnet struct {
	Region      *string  `json:"region,omitempty"`
	SubnetNames []string `json:"subnetNames,omitempty"`
	// contains filtered or unexported fields
}

Subnet defines the attributes of a single Subnet. The Subnets list is an element of Compute.

func (Subnet) MarshalJSON

func (o Subnet) MarshalJSON() ([]byte, error)

func (*Subnet) SetRegion

func (o *Subnet) SetRegion(v *string) *Subnet

SetRegion sets the region the subnet is in.

func (*Subnet) SetSubnetNames

func (o *Subnet) SetSubnetNames(v []string) *Subnet

SetSubnetNames sets the list of subnets names to use

type Tag

type Tag struct {
	Key   *string `json:"tagKey,omitempty"`
	Value *string `json:"tagValue,omitempty"`
	// contains filtered or unexported fields
}

func (Tag) MarshalJSON

func (o Tag) MarshalJSON() ([]byte, error)

func (*Tag) SetKey

func (o *Tag) SetKey(v *string) *Tag

func (*Tag) SetValue

func (o *Tag) SetValue(v *string) *Tag

type Task

type Task struct {
	IsEnabled      *bool   `json:"isEnabled,omitempty"`
	Type           *string `json:"taskType,omitempty"`
	CronExpression *string `json:"cronExpression,omitempty"`
	TargetCapacity *int    `json:"targetCapacity,omitempty"`
	MinCapacity    *int    `json:"minCapacity,omitempty"`
	MaxCapacity    *int    `json:"maxCapacity,omitempty"`
	// contains filtered or unexported fields
}

func (Task) MarshalJSON

func (o Task) MarshalJSON() ([]byte, error)

func (*Task) SetCronExpression

func (o *Task) SetCronExpression(v *string) *Task

func (*Task) SetIsEnabled

func (o *Task) SetIsEnabled(v *bool) *Task

func (*Task) SetMaxCapacity

func (o *Task) SetMaxCapacity(v *int) *Task

func (*Task) SetMinCapacity

func (o *Task) SetMinCapacity(v *int) *Task

func (*Task) SetTargetCapacity

func (o *Task) SetTargetCapacity(v *int) *Task

func (*Task) SetType

func (o *Task) SetType(v *string) *Task

type UpdateGroupInput

type UpdateGroupInput struct {
	Group *Group `json:"group,omitempty"`
}

UpdateGroupInput contains a description of one or more valid attributes that will be applied to an existing Elastigroup.

type UpdateGroupOutput

type UpdateGroupOutput struct {
	Group *Group `json:"group,omitempty"`
}

UpdateGroupOutPut contains a description of the updated Elastigroup, if successful.

Jump to

Keyboard shortcuts

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