Documentation
¶
Overview ¶
Package autoscaler provides access to the Google Compute Engine Autoscaler API.
See http://developers.google.com/compute/docs/autoscaler
Usage example:
import "code.google.com/p/google-api-go-client/autoscaler/v1beta2" ... autoscalerService, err := autoscaler.New(oauthHttpClient)
Index ¶
- Constants
- type Autoscaler
- type AutoscalerListResponse
- type AutoscalersDeleteCall
- type AutoscalersGetCall
- type AutoscalersInsertCall
- type AutoscalersListCall
- type AutoscalersPatchCall
- type AutoscalersService
- func (r *AutoscalersService) Delete(project string, zone string, autoscaler string) *AutoscalersDeleteCall
- func (r *AutoscalersService) Get(project string, zone string, autoscaler string) *AutoscalersGetCall
- func (r *AutoscalersService) Insert(project string, zone string, autoscaler *Autoscaler) *AutoscalersInsertCall
- func (r *AutoscalersService) List(project string, zone string) *AutoscalersListCall
- func (r *AutoscalersService) Patch(project string, zone string, autoscaler string, autoscaler2 *Autoscaler) *AutoscalersPatchCall
- func (r *AutoscalersService) Update(project string, zone string, autoscaler string, autoscaler2 *Autoscaler) *AutoscalersUpdateCall
- type AutoscalersUpdateCall
- type AutoscalingPolicy
- type AutoscalingPolicyCpuUtilization
- type Operation
- type OperationError
- type OperationErrorErrors
- type OperationList
- type OperationWarnings
- type OperationWarningsData
- type Service
- type ZoneOperationsDeleteCall
- type ZoneOperationsGetCall
- type ZoneOperationsListCall
- func (c *ZoneOperationsListCall) Do() (*OperationList, error)
- func (c *ZoneOperationsListCall) Filter(filter string) *ZoneOperationsListCall
- func (c *ZoneOperationsListCall) MaxResults(maxResults int64) *ZoneOperationsListCall
- func (c *ZoneOperationsListCall) PageToken(pageToken string) *ZoneOperationsListCall
- type ZoneOperationsService
- func (r *ZoneOperationsService) Delete(project string, zone string, operation string) *ZoneOperationsDeleteCall
- func (r *ZoneOperationsService) Get(project string, zone string, operation string) *ZoneOperationsGetCall
- func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperationsListCall
Constants ¶
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"` // 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"` }
type AutoscalerListResponse ¶
type AutoscalerListResponse struct { // Items: Autoscaler resources. Items []*Autoscaler `json:"items,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 (c *AutoscalersDeleteCall) Do() (*Operation, error)
type AutoscalersGetCall ¶
type AutoscalersGetCall struct {
// contains filtered or unexported fields
}
func (*AutoscalersGetCall) Do ¶
func (c *AutoscalersGetCall) Do() (*Autoscaler, error)
type AutoscalersInsertCall ¶
type AutoscalersInsertCall struct {
// contains filtered or unexported fields
}
func (*AutoscalersInsertCall) Do ¶
func (c *AutoscalersInsertCall) Do() (*Operation, error)
type AutoscalersListCall ¶
type AutoscalersListCall struct {
// contains filtered or unexported fields
}
func (*AutoscalersListCall) Do ¶
func (c *AutoscalersListCall) Do() (*AutoscalerListResponse, error)
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)
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 (c *AutoscalersUpdateCall) Do() (*Operation, error)
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: Configuration parameters of CPU based autoscaling // policy. CpuUtilization *AutoscalingPolicyCpuUtilization `json:"cpuUtilization,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"` }
type AutoscalingPolicyCpuUtilization ¶
type AutoscalingPolicyCpuUtilization struct { // UtilizationTarget: The target utilization that the Autoscaler should // maintain. Must be a float value between (0, 1]. If not defined, the // default is 0.8. UtilizationTarget float64 `json:"utilizationTarget,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: Type of the resource. 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 OperationList ¶
type OperationWarnings ¶
type OperationWarnings struct { Code string `json:"code,omitempty"` Data []*OperationWarningsData `json:"data,omitempty"` Message string `json:"message,omitempty"` }
type OperationWarningsData ¶
type Service ¶
type Service struct { BasePath string // API endpoint base URL Autoscalers *AutoscalersService ZoneOperations *ZoneOperationsService // contains filtered or unexported fields }
type ZoneOperationsDeleteCall ¶
type ZoneOperationsDeleteCall struct {
// contains filtered or unexported fields
}
func (*ZoneOperationsDeleteCall) Do ¶
func (c *ZoneOperationsDeleteCall) Do() error
type ZoneOperationsGetCall ¶
type ZoneOperationsGetCall struct {
// contains filtered or unexported fields
}
func (*ZoneOperationsGetCall) Do ¶
func (c *ZoneOperationsGetCall) Do() (*Operation, error)
type ZoneOperationsListCall ¶
type ZoneOperationsListCall struct {
// contains filtered or unexported fields
}
func (*ZoneOperationsListCall) Do ¶
func (c *ZoneOperationsListCall) Do() (*OperationList, error)
func (*ZoneOperationsListCall) Filter ¶
func (c *ZoneOperationsListCall) Filter(filter string) *ZoneOperationsListCall
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 ¶
func (r *ZoneOperationsService) List(project string, zone string) *ZoneOperationsListCall
List: Retrieves the list of operation resources contained within the specified zone.