Documentation ¶
Overview ¶
Package replicapoolupdater provides access to the Google Compute Engine Instance Group Updater API.
See https://developers.google.com/compute/docs/instance-groups/manager/v1beta2
Usage example:
import "code.google.com/p/google-api-go-client/replicapoolupdater/v1beta1" ... replicapoolupdaterService, err := replicapoolupdater.New(oauthHttpClient)
Index ¶
- Constants
- type InsertResponse
- type InstanceUpdate
- type Service
- type Update
- type UpdateList
- type UpdatePolicy
- type UpdatePolicyCanary
- type UpdatesCancelCall
- type UpdatesGetCall
- type UpdatesInsertCall
- type UpdatesListCall
- type UpdatesPauseCall
- type UpdatesRollbackCall
- type UpdatesRollforwardCall
- type UpdatesService
- func (r *UpdatesService) Cancel(project string, zone string, instanceGroupManager string, update string) *UpdatesCancelCall
- func (r *UpdatesService) Get(project string, zone string, instanceGroupManager string, update string) *UpdatesGetCall
- func (r *UpdatesService) Insert(project string, zone string, instanceGroupManager string, update *Update) *UpdatesInsertCall
- func (r *UpdatesService) List(project string, zone string, instanceGroupManager string) *UpdatesListCall
- func (r *UpdatesService) Pause(project string, zone string, instanceGroupManager string, update string) *UpdatesPauseCall
- func (r *UpdatesService) Rollback(project string, zone string, instanceGroupManager string, update string) *UpdatesRollbackCall
- func (r *UpdatesService) Rollforward(project string, zone string, instanceGroupManager string, update string) *UpdatesRollforwardCall
Constants ¶
const ( // View and manage your data across Google Cloud Platform services CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" // View and manage replica pools ReplicapoolScope = "https://www.googleapis.com/auth/replicapool" // View replica pools ReplicapoolReadonlyScope = "https://www.googleapis.com/auth/replicapool.readonly" )
OAuth2 scopes used by this API.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InsertResponse ¶
type InsertResponse struct { // Update: Unique (in the context of a group) handle of an update. Update string `json:"update,omitempty"` }
type InstanceUpdate ¶
type Service ¶
type Service struct { BasePath string // API endpoint base URL Updates *UpdatesService // contains filtered or unexported fields }
type Update ¶
type Update struct { // Details: [Output Only] Human-readable description of an update // progress. Details string `json:"details,omitempty"` // Handle: [Output Only] Unique (in the context of a group) handle // assigned to this update. Handle string `json:"handle,omitempty"` // InstanceTemplate: Url of an instance template to be applied. InstanceTemplate string `json:"instanceTemplate,omitempty"` // InstanceUpdates: [Output Only] Collection of instance updates. InstanceUpdates []*InstanceUpdate `json:"instanceUpdates,omitempty"` // Kind: [Output only] The resource type. Always // replicapoolupdater#update. Kind string `json:"kind,omitempty"` // Policy: Parameters of an update process. Policy *UpdatePolicy `json:"policy,omitempty"` // SelfLink: [Output only] The fully qualified URL for this resource. SelfLink string `json:"selfLink,omitempty"` // State: [Output Only] Current state of an update. State string `json:"state,omitempty"` // TargetState: [Output Only] Requested state of an update. This is the // state that the updater is moving towards. Acceptable values are: // - // "ROLLED_OUT": The user has requested the update to go forward. // - // "ROLLED_BACK": The user has requested the update to be rolled back. // // - "PAUSED": The user has requested the update to be paused. // // - // "CANCELLED": The user has requested the update to be cancelled. The // updater service is in the process of canceling the update. TargetState string `json:"targetState,omitempty"` }
type UpdateList ¶
type UpdatePolicy ¶
type UpdatePolicy struct { // Canary: Parameters of a canary phase. If absent, canary will NOT be // performed. Canary *UpdatePolicyCanary `json:"canary,omitempty"` // MaxNumConcurrentInstances: Maximum number of instances that can be // updated simultaneously (concurrently). An update of an instance // starts when the instance is about to be restarted and finishes after // the instance has been restarted and the sleep period (defined by // sleep_after_instance_restart_sec) has passed. MaxNumConcurrentInstances int64 `json:"maxNumConcurrentInstances,omitempty"` // SleepAfterInstanceRestartSec: Time period after the instance has been // restarted but before marking the update of this instance as done. SleepAfterInstanceRestartSec int64 `json:"sleepAfterInstanceRestartSec,omitempty"` }
type UpdatePolicyCanary ¶
type UpdatePolicyCanary struct { // NumInstances: Number of instances updated as a part of canary phase. // If absent, the default number of instances will be used. NumInstances int64 `json:"numInstances,omitempty"` }
type UpdatesCancelCall ¶
type UpdatesCancelCall struct {
// contains filtered or unexported fields
}
func (*UpdatesCancelCall) Do ¶
func (c *UpdatesCancelCall) Do() error
func (*UpdatesCancelCall) Fields ¶
func (c *UpdatesCancelCall) Fields(s ...googleapi.Field) *UpdatesCancelCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UpdatesGetCall ¶
type UpdatesGetCall struct {
// contains filtered or unexported fields
}
func (*UpdatesGetCall) Do ¶
func (c *UpdatesGetCall) Do() (*Update, error)
func (*UpdatesGetCall) Fields ¶
func (c *UpdatesGetCall) Fields(s ...googleapi.Field) *UpdatesGetCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UpdatesInsertCall ¶
type UpdatesInsertCall struct {
// contains filtered or unexported fields
}
func (*UpdatesInsertCall) Do ¶
func (c *UpdatesInsertCall) Do() (*InsertResponse, error)
func (*UpdatesInsertCall) Fields ¶
func (c *UpdatesInsertCall) Fields(s ...googleapi.Field) *UpdatesInsertCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UpdatesListCall ¶
type UpdatesListCall struct {
// contains filtered or unexported fields
}
func (*UpdatesListCall) Do ¶
func (c *UpdatesListCall) Do() (*UpdateList, error)
func (*UpdatesListCall) Fields ¶
func (c *UpdatesListCall) Fields(s ...googleapi.Field) *UpdatesListCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
func (*UpdatesListCall) MaxResults ¶
func (c *UpdatesListCall) MaxResults(maxResults int64) *UpdatesListCall
MaxResults sets the optional parameter "maxResults": Maximum count of results to be returned. Acceptable values are 1 to 100, inclusive. (Default: 50)
func (*UpdatesListCall) PageToken ¶
func (c *UpdatesListCall) PageToken(pageToken string) *UpdatesListCall
PageToken sets the optional parameter "pageToken": Set this to the nextPageToken value returned by a previous list request to obtain the next page of results from the previous list request.
type UpdatesPauseCall ¶
type UpdatesPauseCall struct {
// contains filtered or unexported fields
}
func (*UpdatesPauseCall) Do ¶
func (c *UpdatesPauseCall) Do() error
func (*UpdatesPauseCall) Fields ¶
func (c *UpdatesPauseCall) Fields(s ...googleapi.Field) *UpdatesPauseCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UpdatesRollbackCall ¶
type UpdatesRollbackCall struct {
// contains filtered or unexported fields
}
func (*UpdatesRollbackCall) Do ¶
func (c *UpdatesRollbackCall) Do() error
func (*UpdatesRollbackCall) Fields ¶
func (c *UpdatesRollbackCall) Fields(s ...googleapi.Field) *UpdatesRollbackCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UpdatesRollforwardCall ¶
type UpdatesRollforwardCall struct {
// contains filtered or unexported fields
}
func (*UpdatesRollforwardCall) Do ¶
func (c *UpdatesRollforwardCall) Do() error
func (*UpdatesRollforwardCall) Fields ¶
func (c *UpdatesRollforwardCall) Fields(s ...googleapi.Field) *UpdatesRollforwardCall
Fields allows partial responses to be retrieved. See https://developers.google.com/gdata/docs/2.0/basics#PartialResponse for more information.
type UpdatesService ¶
type UpdatesService struct {
// contains filtered or unexported fields
}
func NewUpdatesService ¶
func NewUpdatesService(s *Service) *UpdatesService
func (*UpdatesService) Cancel ¶
func (r *UpdatesService) Cancel(project string, zone string, instanceGroupManager string, update string) *UpdatesCancelCall
Cancel: Called on the particular Update endpoint. Cancels the update in state PAUSED. No-op if invoked in state CANCELLED.
func (*UpdatesService) Get ¶
func (r *UpdatesService) Get(project string, zone string, instanceGroupManager string, update string) *UpdatesGetCall
Get: Called on the particular Update endpoint. Returns the Update resource.
func (*UpdatesService) Insert ¶
func (r *UpdatesService) Insert(project string, zone string, instanceGroupManager string, update *Update) *UpdatesInsertCall
Insert: Called on the collection endpoint. Inserts the new Update resource and starts the update.
func (*UpdatesService) List ¶
func (r *UpdatesService) List(project string, zone string, instanceGroupManager string) *UpdatesListCall
List: Called on the collection endpoint. Lists updates for a given instance group, in reverse chronological order. Pagination is supported, see ListRequestHeader.
func (*UpdatesService) Pause ¶
func (r *UpdatesService) Pause(project string, zone string, instanceGroupManager string, update string) *UpdatesPauseCall
Pause: Called on the particular Update endpoint. Pauses the update in state from { ROLLING_FORWARD, ROLLING_BACK, PAUSED }. No-op if invoked in state PAUSED.
func (*UpdatesService) Rollback ¶
func (r *UpdatesService) Rollback(project string, zone string, instanceGroupManager string, update string) *UpdatesRollbackCall
Rollback: Called on the particular Update endpoint. Rolls back the update in state from { ROLLING_FORWARD, ROLLING_BACK, PAUSED }. No-op if invoked in state ROLLED_BACK.
func (*UpdatesService) Rollforward ¶
func (r *UpdatesService) Rollforward(project string, zone string, instanceGroupManager string, update string) *UpdatesRollforwardCall
Rollforward: Called on the particular Update endpoint. Rolls forward the update in state from { ROLLING_FORWARD, ROLLING_BACK, PAUSED }. No-op if invoked in state ROLLED_OUT.