autoscaler

package
v0.0.0-...-7ca0ba9 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2015 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

Package autoscaler provides access to the Google Compute Engine Autoscaler API.

See http://developers.google.com/compute/docs/autoscaler

Usage example:

import "google.golang.org/api/autoscaler/v1beta2"
...
autoscalerService, err := autoscaler.New(oauthHttpClient)

Index

Constants

View Source
const (
	// View and manage your Google Compute Engine resources
	ComputeScope = "https://www.googleapis.com/auth/compute"

	// View your Google Compute Engine resources
	ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly"
)

OAuth2 scopes used by this API.

Variables

This section is empty.

Functions

This section is empty.

Types

type Autoscaler

type Autoscaler struct {
	// AutoscalingPolicy: Configuration parameters for autoscaling
	// algorithm.
	AutoscalingPolicy *AutoscalingPolicy `json:"autoscalingPolicy,omitempty"`

	// CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text
	// format.
	CreationTimestamp string `json:"creationTimestamp,omitempty"`

	// Description: An optional textual description of the resource provided
	// by the client.
	Description string `json:"description,omitempty"`

	// Id: [Output Only] Unique identifier for the resource; defined by the
	// server.
	Id uint64 `json:"id,omitempty,string"`

	// Kind: Type of resource.
	Kind string `json:"kind,omitempty"`

	// Name: Name of the Autoscaler resource. Must be unique per project and
	// zone.
	Name string `json:"name,omitempty"`

	// SelfLink: [Output Only] A self-link to the Autoscaler configuration
	// resource.
	SelfLink string `json:"selfLink,omitempty"`

	// Target: URL to the entity which will be autoscaled. Currently the
	// only supported value is ReplicaPool?s URL. Note: it is illegal to
	// specify multiple Autoscalers for the same target.
	Target string `json:"target,omitempty"`
}

Autoscaler: Cloud Autoscaler resource.

type AutoscalerListResponse

type AutoscalerListResponse struct {
	// Items: Autoscaler resources.
	Items []*Autoscaler `json:"items,omitempty"`

	// Kind: Type of resource.
	Kind string `json:"kind,omitempty"`

	// NextPageToken: [Output only] A token used to continue a truncated
	// list request.
	NextPageToken string `json:"nextPageToken,omitempty"`
}

type AutoscalersDeleteCall

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

func (*AutoscalersDeleteCall) Do

func (*AutoscalersDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type AutoscalersGetCall

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

func (*AutoscalersGetCall) Do

func (c *AutoscalersGetCall) Do() (*Autoscaler, error)

func (*AutoscalersGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type AutoscalersInsertCall

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

func (*AutoscalersInsertCall) Do

func (*AutoscalersInsertCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type AutoscalersListCall

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

func (*AutoscalersListCall) Do

func (*AutoscalersListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*AutoscalersListCall) Filter

func (c *AutoscalersListCall) Filter(filter string) *AutoscalersListCall

Filter sets the optional parameter "filter":

func (*AutoscalersListCall) MaxResults

func (c *AutoscalersListCall) MaxResults(maxResults int64) *AutoscalersListCall

MaxResults sets the optional parameter "maxResults":

func (*AutoscalersListCall) PageToken

func (c *AutoscalersListCall) PageToken(pageToken string) *AutoscalersListCall

PageToken sets the optional parameter "pageToken":

type AutoscalersPatchCall

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

func (*AutoscalersPatchCall) Do

func (c *AutoscalersPatchCall) Do() (*Operation, error)

func (*AutoscalersPatchCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type AutoscalersService

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

func NewAutoscalersService

func NewAutoscalersService(s *Service) *AutoscalersService

func (*AutoscalersService) Delete

func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall

Delete: Deletes the specified Autoscaler resource.

func (*AutoscalersService) Get

func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall

Get: Gets the specified Autoscaler resource.

func (*AutoscalersService) Insert

func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall

Insert: Adds new Autoscaler resource.

func (*AutoscalersService) List

func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall

List: Lists all Autoscaler resources in this zone.

func (*AutoscalersService) Patch

func (r *AutoscalersService) Patch(project string, zone string, autoscaler string, autoscaler2 *Autoscaler) *AutoscalersPatchCall

Patch: Update the entire content of the Autoscaler resource. This method supports patch semantics.

func (*AutoscalersService) Update

func (r *AutoscalersService) Update(project string, zone string, autoscaler string, autoscaler2 *Autoscaler) *AutoscalersUpdateCall

Update: Update the entire content of the Autoscaler resource.

type AutoscalersUpdateCall

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

func (*AutoscalersUpdateCall) Do

func (*AutoscalersUpdateCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type AutoscalingPolicy

type AutoscalingPolicy struct {
	// CoolDownPeriodSec: The number of seconds that the Autoscaler should
	// wait between two succeeding changes to the number of virtual
	// machines. You should define an interval that is at least as long as
	// the initialization time of a virtual machine and the time it may take
	// for replica pool to create the virtual machine. The default is 60
	// seconds.
	CoolDownPeriodSec int64 `json:"coolDownPeriodSec,omitempty"`

	// CpuUtilization: Exactly one utilization policy should be provided.
	// Configuration parameters of CPU based autoscaling policy.
	CpuUtilization *AutoscalingPolicyCpuUtilization `json:"cpuUtilization,omitempty"`

	// CustomMetricUtilizations: Configuration parameters of autoscaling
	// based on custom metric.
	CustomMetricUtilizations []*AutoscalingPolicyCustomMetricUtilization `json:"customMetricUtilizations,omitempty"`

	// LoadBalancingUtilization: Configuration parameters of autoscaling
	// based on load balancer.
	LoadBalancingUtilization *AutoscalingPolicyLoadBalancingUtilization `json:"loadBalancingUtilization,omitempty"`

	// MaxNumReplicas: The maximum number of replicas that the Autoscaler
	// can scale up to.
	MaxNumReplicas int64 `json:"maxNumReplicas,omitempty"`

	// MinNumReplicas: The minimum number of replicas that the Autoscaler
	// can scale down to.
	MinNumReplicas int64 `json:"minNumReplicas,omitempty"`
}

AutoscalingPolicy: Cloud Autoscaler policy.

type AutoscalingPolicyCpuUtilization

type AutoscalingPolicyCpuUtilization struct {
	// UtilizationTarget: The target utilization that the Autoscaler should
	// maintain. It is represented as a fraction of used cores. For example:
	// 6 cores used in 8-core VM are represented here as 0.75. Must be a
	// float value between (0, 1]. If not defined, the default is 0.8.
	UtilizationTarget float64 `json:"utilizationTarget,omitempty"`
}

AutoscalingPolicyCpuUtilization: CPU utilization policy.

type AutoscalingPolicyCustomMetricUtilization

type AutoscalingPolicyCustomMetricUtilization struct {
	// Metric: Identifier of the metric. It should be a Cloud Monitoring
	// metric. The metric can not have negative values. The metric should be
	// an utilization metric (increasing number of VMs handling requests x
	// times should reduce average value of the metric roughly x times). For
	// example you could use:
	// compute.googleapis.com/instance/network/received_bytes_count.
	Metric string `json:"metric,omitempty"`

	// UtilizationTarget: Target value of the metric which Autoscaler should
	// maintain. Must be a positive value.
	UtilizationTarget float64 `json:"utilizationTarget,omitempty"`

	// UtilizationTargetType: Defines type in which utilization_target is
	// expressed.
	UtilizationTargetType string `json:"utilizationTargetType,omitempty"`
}

AutoscalingPolicyCustomMetricUtilization: Custom utilization metric policy.

type AutoscalingPolicyLoadBalancingUtilization

type AutoscalingPolicyLoadBalancingUtilization struct {
	// UtilizationTarget: Fraction of backend capacity utilization (set in
	// HTTP load balancing configuration) that Autoscaler should maintain.
	// Must be a positive float value. If not defined, the default is 0.8.
	// For example if your maxRatePerInstance capacity (in HTTP Load
	// Balancing configuration) is set at 10 and you would like to keep
	// number of instances such that each instance receives 7 QPS on
	// average, set this to 0.7.
	UtilizationTarget float64 `json:"utilizationTarget,omitempty"`
}

AutoscalingPolicyLoadBalancingUtilization: Load balancing utilization policy.

type DeprecationStatus

type DeprecationStatus struct {
	Deleted string `json:"deleted,omitempty"`

	Deprecated string `json:"deprecated,omitempty"`

	Obsolete string `json:"obsolete,omitempty"`

	Replacement string `json:"replacement,omitempty"`

	State string `json:"state,omitempty"`
}

type Operation

type Operation struct {
	ClientOperationId string `json:"clientOperationId,omitempty"`

	CreationTimestamp string `json:"creationTimestamp,omitempty"`

	EndTime string `json:"endTime,omitempty"`

	Error *OperationError `json:"error,omitempty"`

	HttpErrorMessage string `json:"httpErrorMessage,omitempty"`

	HttpErrorStatusCode int64 `json:"httpErrorStatusCode,omitempty"`

	Id uint64 `json:"id,omitempty,string"`

	InsertTime string `json:"insertTime,omitempty"`

	// Kind: [Output Only] Type of the resource. Always compute#Operation
	// for Operation resources.
	Kind string `json:"kind,omitempty"`

	Name string `json:"name,omitempty"`

	OperationType string `json:"operationType,omitempty"`

	Progress int64 `json:"progress,omitempty"`

	Region string `json:"region,omitempty"`

	SelfLink string `json:"selfLink,omitempty"`

	StartTime string `json:"startTime,omitempty"`

	Status string `json:"status,omitempty"`

	StatusMessage string `json:"statusMessage,omitempty"`

	TargetId uint64 `json:"targetId,omitempty,string"`

	TargetLink string `json:"targetLink,omitempty"`

	User string `json:"user,omitempty"`

	Warnings []*OperationWarnings `json:"warnings,omitempty"`

	Zone string `json:"zone,omitempty"`
}

type OperationError

type OperationError struct {
	Errors []*OperationErrorErrors `json:"errors,omitempty"`
}

type OperationErrorErrors

type OperationErrorErrors struct {
	Code string `json:"code,omitempty"`

	Location string `json:"location,omitempty"`

	Message string `json:"message,omitempty"`
}

type OperationList

type OperationList struct {
	Id string `json:"id,omitempty"`

	Items []*Operation `json:"items,omitempty"`

	// Kind: [Output Only] Type of resource. Always compute#operations for
	// Operations resource.
	Kind string `json:"kind,omitempty"`

	NextPageToken string `json:"nextPageToken,omitempty"`

	SelfLink string `json:"selfLink,omitempty"`
}

type OperationWarnings

type OperationWarnings struct {
	Code string `json:"code,omitempty"`

	Data []*OperationWarningsData `json:"data,omitempty"`

	Message string `json:"message,omitempty"`
}

type OperationWarningsData

type OperationWarningsData struct {
	Key string `json:"key,omitempty"`

	Value string `json:"value,omitempty"`
}

type Service

type Service struct {
	BasePath  string // API endpoint base URL
	UserAgent string // optional additional User-Agent fragment

	Autoscalers *AutoscalersService

	ZoneOperations *ZoneOperationsService

	Zones *ZonesService
	// contains filtered or unexported fields
}

func New

func New(client *http.Client) (*Service, error)

type Zone

type Zone struct {
	CreationTimestamp string `json:"creationTimestamp,omitempty"`

	Deprecated *DeprecationStatus `json:"deprecated,omitempty"`

	Description string `json:"description,omitempty"`

	Id uint64 `json:"id,omitempty,string"`

	// Kind: [Output Only] Type of the resource. Always kind#zone for zones.
	Kind string `json:"kind,omitempty"`

	MaintenanceWindows []*ZoneMaintenanceWindows `json:"maintenanceWindows,omitempty"`

	Name string `json:"name,omitempty"`

	Region string `json:"region,omitempty"`

	// SelfLink: [Output Only] Server defined URL for the resource.
	SelfLink string `json:"selfLink,omitempty"`

	Status string `json:"status,omitempty"`
}

type ZoneList

type ZoneList struct {
	Id string `json:"id,omitempty"`

	Items []*Zone `json:"items,omitempty"`

	// Kind: Type of resource.
	Kind string `json:"kind,omitempty"`

	NextPageToken string `json:"nextPageToken,omitempty"`

	// SelfLink: Server defined URL for this resource (output only).
	SelfLink string `json:"selfLink,omitempty"`
}

type ZoneMaintenanceWindows

type ZoneMaintenanceWindows struct {
	BeginTime string `json:"beginTime,omitempty"`

	Description string `json:"description,omitempty"`

	EndTime string `json:"endTime,omitempty"`

	Name string `json:"name,omitempty"`
}

type ZoneOperationsDeleteCall

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

func (*ZoneOperationsDeleteCall) Do

func (*ZoneOperationsDeleteCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type ZoneOperationsGetCall

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

func (*ZoneOperationsGetCall) Do

func (*ZoneOperationsGetCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

type ZoneOperationsListCall

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

func (*ZoneOperationsListCall) Do

func (*ZoneOperationsListCall) Fields

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ZoneOperationsListCall) Filter

Filter sets the optional parameter "filter":

func (*ZoneOperationsListCall) MaxResults

func (c *ZoneOperationsListCall) MaxResults(maxResults int64) *ZoneOperationsListCall

MaxResults sets the optional parameter "maxResults":

func (*ZoneOperationsListCall) PageToken

func (c *ZoneOperationsListCall) PageToken(pageToken string) *ZoneOperationsListCall

PageToken sets the optional parameter "pageToken":

type ZoneOperationsService

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

func NewZoneOperationsService

func NewZoneOperationsService(s *Service) *ZoneOperationsService

func (*ZoneOperationsService) Delete

func (r *ZoneOperationsService) Delete(project string, zone string, operation string) *ZoneOperationsDeleteCall

Delete: Deletes the specified zone-specific operation resource.

func (*ZoneOperationsService) Get

func (r *ZoneOperationsService) Get(project string, zone string, operation string) *ZoneOperationsGetCall

Get: Retrieves the specified zone-specific operation resource.

func (*ZoneOperationsService) List

List: Retrieves the list of operation resources contained within the specified zone.

type ZonesListCall

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

func (*ZonesListCall) Do

func (c *ZonesListCall) Do() (*ZoneList, error)

func (*ZonesListCall) Fields

func (c *ZonesListCall) Fields(s ...googleapi.Field) *ZonesListCall

Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.

func (*ZonesListCall) Filter

func (c *ZonesListCall) Filter(filter string) *ZonesListCall

Filter sets the optional parameter "filter":

func (*ZonesListCall) MaxResults

func (c *ZonesListCall) MaxResults(maxResults int64) *ZonesListCall

MaxResults sets the optional parameter "maxResults":

func (*ZonesListCall) PageToken

func (c *ZonesListCall) PageToken(pageToken string) *ZonesListCall

PageToken sets the optional parameter "pageToken":

type ZonesService

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

func NewZonesService

func NewZonesService(s *Service) *ZonesService

func (*ZonesService) List

func (r *ZonesService) List(project string) *ZonesListCall

List:

Jump to

Keyboard shortcuts

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