From e5a70592890986f7fd4dd9078955af6510185339 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Mon, 6 Jul 2015 10:19:54 +0200 Subject: [PATCH 1/3] Support static IP on GCE Signed-off-by: David Gageot --- drivers/google/compute_util.go | 7 +++++++ drivers/google/google.go | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/drivers/google/compute_util.go b/drivers/google/compute_util.go index 793506a090..aa5365c59c 100644 --- a/drivers/google/compute_util.go +++ b/drivers/google/compute_util.go @@ -19,6 +19,7 @@ type ComputeUtil struct { userName string project string diskTypeURL string + address string service *raw.Service zoneURL string authTokenPath string @@ -51,6 +52,7 @@ func newComputeUtil(driver *Driver) (*ComputeUtil, error) { userName: driver.SSHUser, project: driver.Project, diskTypeURL: driver.DiskType, + address: driver.Address, service: service, zoneURL: apiURL + driver.Project + "/zones/" + driver.Zone, globalURL: apiURL + driver.Project + "/global", @@ -179,6 +181,11 @@ func (c *ComputeUtil) createInstance(d *Driver) error { }, }, } + + if c.address != "" { + instance.NetworkInterfaces[0].AccessConfigs[0].NatIP = c.address + } + disk, err := c.disk() if disk == nil || err != nil { instance.Disks[0].InitializeParams = &raw.AttachedDiskInitializeParams{ diff --git a/drivers/google/google.go b/drivers/google/google.go index 2a535265f6..e4d1973dbc 100644 --- a/drivers/google/google.go +++ b/drivers/google/google.go @@ -16,6 +16,7 @@ type Driver struct { Zone string MachineType string DiskType string + Address string Scopes string DiskSize int AuthTokenPath string @@ -79,6 +80,11 @@ func GetCreateFlags() []cli.Flag { Value: "pd-standard", EnvVar: "GOOGLE_DISK_TYPE", }, + cli.StringFlag{ + Name: "google-address", + Usage: "GCE Instance External IP", + EnvVar: "GOOGLE_ADDRESS", + }, } } @@ -111,6 +117,7 @@ func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error { d.MachineType = flags.String("google-machine-type") d.DiskSize = flags.Int("google-disk-size") d.DiskType = flags.String("google-disk-type") + d.Address = flags.String("google-address") d.AuthTokenPath = flags.String("google-auth-token") d.Project = flags.String("google-project") d.Scopes = flags.String("google-scopes") From 8ce161e8303cfbec7422406f12eb62603e7b706d Mon Sep 17 00:00:00 2001 From: David Gageot Date: Mon, 6 Jul 2015 11:04:33 +0200 Subject: [PATCH 2/3] Support Preemptiple instances on GCE Signed-off-by: David Gageot --- Godeps/Godeps.json | 8 +- .../src/golang.org/x/net/context/context.go | 447 ++ .../golang.org/x/net/context/context_test.go | 575 ++ .../x/net/context/withtimeout_test.go | 26 + .../api/compute/v1/compute-api.json | 2544 ++++++--- .../api/compute/v1/compute-gen.go | 4959 +++++++++++++---- .../api/googleapi/googleapi.go | 269 +- .../api/googleapi/googleapi_test.go | 237 + drivers/google/compute_util.go | 5 + drivers/google/google.go | 7 + 10 files changed, 7252 insertions(+), 1825 deletions(-) create mode 100644 Godeps/_workspace/src/golang.org/x/net/context/context.go create mode 100644 Godeps/_workspace/src/golang.org/x/net/context/context_test.go create mode 100644 Godeps/_workspace/src/golang.org/x/net/context/withtimeout_test.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index a551002a04..18dd12df0b 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -147,13 +147,17 @@ "ImportPath": "golang.org/x/crypto/ssh", "Rev": "1fbbd62cfec66bd39d91e97749579579d4d3037e" }, + { + "ImportPath": "golang.org/x/net/context", + "Rev": "d9558e5c97f85372afee28cf2b6059d7d3818919" + }, { "ImportPath": "google.golang.org/api/compute/v1", - "Rev": "aa91ac681e18e52b1a0dfe29b9d8354e88c0dcf5" + "Rev": "a09229c13c2f13bbdedf7b31b506cad4c83ef3bf" }, { "ImportPath": "google.golang.org/api/googleapi", - "Rev": "aa91ac681e18e52b1a0dfe29b9d8354e88c0dcf5" + "Rev": "a09229c13c2f13bbdedf7b31b506cad4c83ef3bf" } ] } diff --git a/Godeps/_workspace/src/golang.org/x/net/context/context.go b/Godeps/_workspace/src/golang.org/x/net/context/context.go new file mode 100644 index 0000000000..ef2f3e86fe --- /dev/null +++ b/Godeps/_workspace/src/golang.org/x/net/context/context.go @@ -0,0 +1,447 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package context defines the Context type, which carries deadlines, +// cancelation signals, and other request-scoped values across API boundaries +// and between processes. +// +// Incoming requests to a server should create a Context, and outgoing calls to +// servers should accept a Context. The chain of function calls between must +// propagate the Context, optionally replacing it with a modified copy created +// using WithDeadline, WithTimeout, WithCancel, or WithValue. +// +// Programs that use Contexts should follow these rules to keep interfaces +// consistent across packages and enable static analysis tools to check context +// propagation: +// +// Do not store Contexts inside a struct type; instead, pass a Context +// explicitly to each function that needs it. The Context should be the first +// parameter, typically named ctx: +// +// func DoSomething(ctx context.Context, arg Arg) error { +// // ... use ctx ... +// } +// +// Do not pass a nil Context, even if a function permits it. Pass context.TODO +// if you are unsure about which Context to use. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +// +// The same Context may be passed to functions running in different goroutines; +// Contexts are safe for simultaneous use by multiple goroutines. +// +// See http://blog.golang.org/context for example code for a server that uses +// Contexts. +package context + +import ( + "errors" + "fmt" + "sync" + "time" +) + +// A Context carries a deadline, a cancelation signal, and other values across +// API boundaries. +// +// Context's methods may be called by multiple goroutines simultaneously. +type Context interface { + // Deadline returns the time when work done on behalf of this context + // should be canceled. Deadline returns ok==false when no deadline is + // set. Successive calls to Deadline return the same results. + Deadline() (deadline time.Time, ok bool) + + // Done returns a channel that's closed when work done on behalf of this + // context should be canceled. Done may return nil if this context can + // never be canceled. Successive calls to Done return the same value. + // + // WithCancel arranges for Done to be closed when cancel is called; + // WithDeadline arranges for Done to be closed when the deadline + // expires; WithTimeout arranges for Done to be closed when the timeout + // elapses. + // + // Done is provided for use in select statements: + // + // // Stream generates values with DoSomething and sends them to out + // // until DoSomething returns an error or ctx.Done is closed. + // func Stream(ctx context.Context, out <-chan Value) error { + // for { + // v, err := DoSomething(ctx) + // if err != nil { + // return err + // } + // select { + // case <-ctx.Done(): + // return ctx.Err() + // case out <- v: + // } + // } + // } + // + // See http://blog.golang.org/pipelines for more examples of how to use + // a Done channel for cancelation. + Done() <-chan struct{} + + // Err returns a non-nil error value after Done is closed. Err returns + // Canceled if the context was canceled or DeadlineExceeded if the + // context's deadline passed. No other values for Err are defined. + // After Done is closed, successive calls to Err return the same value. + Err() error + + // Value returns the value associated with this context for key, or nil + // if no value is associated with key. Successive calls to Value with + // the same key returns the same result. + // + // Use context values only for request-scoped data that transits + // processes and API boundaries, not for passing optional parameters to + // functions. + // + // A key identifies a specific value in a Context. Functions that wish + // to store values in Context typically allocate a key in a global + // variable then use that key as the argument to context.WithValue and + // Context.Value. A key can be any type that supports equality; + // packages should define keys as an unexported type to avoid + // collisions. + // + // Packages that define a Context key should provide type-safe accessors + // for the values stores using that key: + // + // // Package user defines a User type that's stored in Contexts. + // package user + // + // import "golang.org/x/net/context" + // + // // User is the type of value stored in the Contexts. + // type User struct {...} + // + // // key is an unexported type for keys defined in this package. + // // This prevents collisions with keys defined in other packages. + // type key int + // + // // userKey is the key for user.User values in Contexts. It is + // // unexported; clients use user.NewContext and user.FromContext + // // instead of using this key directly. + // var userKey key = 0 + // + // // NewContext returns a new Context that carries value u. + // func NewContext(ctx context.Context, u *User) context.Context { + // return context.WithValue(ctx, userKey, u) + // } + // + // // FromContext returns the User value stored in ctx, if any. + // func FromContext(ctx context.Context) (*User, bool) { + // u, ok := ctx.Value(userKey).(*User) + // return u, ok + // } + Value(key interface{}) interface{} +} + +// Canceled is the error returned by Context.Err when the context is canceled. +var Canceled = errors.New("context canceled") + +// DeadlineExceeded is the error returned by Context.Err when the context's +// deadline passes. +var DeadlineExceeded = errors.New("context deadline exceeded") + +// An emptyCtx is never canceled, has no values, and has no deadline. It is not +// struct{}, since vars of this type must have distinct addresses. +type emptyCtx int + +func (*emptyCtx) Deadline() (deadline time.Time, ok bool) { + return +} + +func (*emptyCtx) Done() <-chan struct{} { + return nil +} + +func (*emptyCtx) Err() error { + return nil +} + +func (*emptyCtx) Value(key interface{}) interface{} { + return nil +} + +func (e *emptyCtx) String() string { + switch e { + case background: + return "context.Background" + case todo: + return "context.TODO" + } + return "unknown empty Context" +} + +var ( + background = new(emptyCtx) + todo = new(emptyCtx) +) + +// Background returns a non-nil, empty Context. It is never canceled, has no +// values, and has no deadline. It is typically used by the main function, +// initialization, and tests, and as the top-level Context for incoming +// requests. +func Background() Context { + return background +} + +// TODO returns a non-nil, empty Context. Code should use context.TODO when +// it's unclear which Context to use or it's is not yet available (because the +// surrounding function has not yet been extended to accept a Context +// parameter). TODO is recognized by static analysis tools that determine +// whether Contexts are propagated correctly in a program. +func TODO() Context { + return todo +} + +// A CancelFunc tells an operation to abandon its work. +// A CancelFunc does not wait for the work to stop. +// After the first call, subsequent calls to a CancelFunc do nothing. +type CancelFunc func() + +// WithCancel returns a copy of parent with a new Done channel. The returned +// context's Done channel is closed when the returned cancel function is called +// or when the parent context's Done channel is closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithCancel(parent Context) (ctx Context, cancel CancelFunc) { + c := newCancelCtx(parent) + propagateCancel(parent, &c) + return &c, func() { c.cancel(true, Canceled) } +} + +// newCancelCtx returns an initialized cancelCtx. +func newCancelCtx(parent Context) cancelCtx { + return cancelCtx{ + Context: parent, + done: make(chan struct{}), + } +} + +// propagateCancel arranges for child to be canceled when parent is. +func propagateCancel(parent Context, child canceler) { + if parent.Done() == nil { + return // parent is never canceled + } + if p, ok := parentCancelCtx(parent); ok { + p.mu.Lock() + if p.err != nil { + // parent has already been canceled + child.cancel(false, p.err) + } else { + if p.children == nil { + p.children = make(map[canceler]bool) + } + p.children[child] = true + } + p.mu.Unlock() + } else { + go func() { + select { + case <-parent.Done(): + child.cancel(false, parent.Err()) + case <-child.Done(): + } + }() + } +} + +// parentCancelCtx follows a chain of parent references until it finds a +// *cancelCtx. This function understands how each of the concrete types in this +// package represents its parent. +func parentCancelCtx(parent Context) (*cancelCtx, bool) { + for { + switch c := parent.(type) { + case *cancelCtx: + return c, true + case *timerCtx: + return &c.cancelCtx, true + case *valueCtx: + parent = c.Context + default: + return nil, false + } + } +} + +// removeChild removes a context from its parent. +func removeChild(parent Context, child canceler) { + p, ok := parentCancelCtx(parent) + if !ok { + return + } + p.mu.Lock() + if p.children != nil { + delete(p.children, child) + } + p.mu.Unlock() +} + +// A canceler is a context type that can be canceled directly. The +// implementations are *cancelCtx and *timerCtx. +type canceler interface { + cancel(removeFromParent bool, err error) + Done() <-chan struct{} +} + +// A cancelCtx can be canceled. When canceled, it also cancels any children +// that implement canceler. +type cancelCtx struct { + Context + + done chan struct{} // closed by the first cancel call. + + mu sync.Mutex + children map[canceler]bool // set to nil by the first cancel call + err error // set to non-nil by the first cancel call +} + +func (c *cancelCtx) Done() <-chan struct{} { + return c.done +} + +func (c *cancelCtx) Err() error { + c.mu.Lock() + defer c.mu.Unlock() + return c.err +} + +func (c *cancelCtx) String() string { + return fmt.Sprintf("%v.WithCancel", c.Context) +} + +// cancel closes c.done, cancels each of c's children, and, if +// removeFromParent is true, removes c from its parent's children. +func (c *cancelCtx) cancel(removeFromParent bool, err error) { + if err == nil { + panic("context: internal error: missing cancel error") + } + c.mu.Lock() + if c.err != nil { + c.mu.Unlock() + return // already canceled + } + c.err = err + close(c.done) + for child := range c.children { + // NOTE: acquiring the child's lock while holding parent's lock. + child.cancel(false, err) + } + c.children = nil + c.mu.Unlock() + + if removeFromParent { + removeChild(c.Context, c) + } +} + +// WithDeadline returns a copy of the parent context with the deadline adjusted +// to be no later than d. If the parent's deadline is already earlier than d, +// WithDeadline(parent, d) is semantically equivalent to parent. The returned +// context's Done channel is closed when the deadline expires, when the returned +// cancel function is called, or when the parent context's Done channel is +// closed, whichever happens first. +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete. +func WithDeadline(parent Context, deadline time.Time) (Context, CancelFunc) { + if cur, ok := parent.Deadline(); ok && cur.Before(deadline) { + // The current deadline is already sooner than the new one. + return WithCancel(parent) + } + c := &timerCtx{ + cancelCtx: newCancelCtx(parent), + deadline: deadline, + } + propagateCancel(parent, c) + d := deadline.Sub(time.Now()) + if d <= 0 { + c.cancel(true, DeadlineExceeded) // deadline has already passed + return c, func() { c.cancel(true, Canceled) } + } + c.mu.Lock() + defer c.mu.Unlock() + if c.err == nil { + c.timer = time.AfterFunc(d, func() { + c.cancel(true, DeadlineExceeded) + }) + } + return c, func() { c.cancel(true, Canceled) } +} + +// A timerCtx carries a timer and a deadline. It embeds a cancelCtx to +// implement Done and Err. It implements cancel by stopping its timer then +// delegating to cancelCtx.cancel. +type timerCtx struct { + cancelCtx + timer *time.Timer // Under cancelCtx.mu. + + deadline time.Time +} + +func (c *timerCtx) Deadline() (deadline time.Time, ok bool) { + return c.deadline, true +} + +func (c *timerCtx) String() string { + return fmt.Sprintf("%v.WithDeadline(%s [%s])", c.cancelCtx.Context, c.deadline, c.deadline.Sub(time.Now())) +} + +func (c *timerCtx) cancel(removeFromParent bool, err error) { + c.cancelCtx.cancel(false, err) + if removeFromParent { + // Remove this timerCtx from its parent cancelCtx's children. + removeChild(c.cancelCtx.Context, c) + } + c.mu.Lock() + if c.timer != nil { + c.timer.Stop() + c.timer = nil + } + c.mu.Unlock() +} + +// WithTimeout returns WithDeadline(parent, time.Now().Add(timeout)). +// +// Canceling this context releases resources associated with it, so code should +// call cancel as soon as the operations running in this Context complete: +// +// func slowOperationWithTimeout(ctx context.Context) (Result, error) { +// ctx, cancel := context.WithTimeout(ctx, 100*time.Millisecond) +// defer cancel() // releases resources if slowOperation completes before timeout elapses +// return slowOperation(ctx) +// } +func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc) { + return WithDeadline(parent, time.Now().Add(timeout)) +} + +// WithValue returns a copy of parent in which the value associated with key is +// val. +// +// Use context Values only for request-scoped data that transits processes and +// APIs, not for passing optional parameters to functions. +func WithValue(parent Context, key interface{}, val interface{}) Context { + return &valueCtx{parent, key, val} +} + +// A valueCtx carries a key-value pair. It implements Value for that key and +// delegates all other calls to the embedded Context. +type valueCtx struct { + Context + key, val interface{} +} + +func (c *valueCtx) String() string { + return fmt.Sprintf("%v.WithValue(%#v, %#v)", c.Context, c.key, c.val) +} + +func (c *valueCtx) Value(key interface{}) interface{} { + if c.key == key { + return c.val + } + return c.Context.Value(key) +} diff --git a/Godeps/_workspace/src/golang.org/x/net/context/context_test.go b/Godeps/_workspace/src/golang.org/x/net/context/context_test.go new file mode 100644 index 0000000000..faf67722a0 --- /dev/null +++ b/Godeps/_workspace/src/golang.org/x/net/context/context_test.go @@ -0,0 +1,575 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package context + +import ( + "fmt" + "math/rand" + "runtime" + "strings" + "sync" + "testing" + "time" +) + +// otherContext is a Context that's not one of the types defined in context.go. +// This lets us test code paths that differ based on the underlying type of the +// Context. +type otherContext struct { + Context +} + +func TestBackground(t *testing.T) { + c := Background() + if c == nil { + t.Fatalf("Background returned nil") + } + select { + case x := <-c.Done(): + t.Errorf("<-c.Done() == %v want nothing (it should block)", x) + default: + } + if got, want := fmt.Sprint(c), "context.Background"; got != want { + t.Errorf("Background().String() = %q want %q", got, want) + } +} + +func TestTODO(t *testing.T) { + c := TODO() + if c == nil { + t.Fatalf("TODO returned nil") + } + select { + case x := <-c.Done(): + t.Errorf("<-c.Done() == %v want nothing (it should block)", x) + default: + } + if got, want := fmt.Sprint(c), "context.TODO"; got != want { + t.Errorf("TODO().String() = %q want %q", got, want) + } +} + +func TestWithCancel(t *testing.T) { + c1, cancel := WithCancel(Background()) + + if got, want := fmt.Sprint(c1), "context.Background.WithCancel"; got != want { + t.Errorf("c1.String() = %q want %q", got, want) + } + + o := otherContext{c1} + c2, _ := WithCancel(o) + contexts := []Context{c1, o, c2} + + for i, c := range contexts { + if d := c.Done(); d == nil { + t.Errorf("c[%d].Done() == %v want non-nil", i, d) + } + if e := c.Err(); e != nil { + t.Errorf("c[%d].Err() == %v want nil", i, e) + } + + select { + case x := <-c.Done(): + t.Errorf("<-c.Done() == %v want nothing (it should block)", x) + default: + } + } + + cancel() + time.Sleep(100 * time.Millisecond) // let cancelation propagate + + for i, c := range contexts { + select { + case <-c.Done(): + default: + t.Errorf("<-c[%d].Done() blocked, but shouldn't have", i) + } + if e := c.Err(); e != Canceled { + t.Errorf("c[%d].Err() == %v want %v", i, e, Canceled) + } + } +} + +func TestParentFinishesChild(t *testing.T) { + // Context tree: + // parent -> cancelChild + // parent -> valueChild -> timerChild + parent, cancel := WithCancel(Background()) + cancelChild, stop := WithCancel(parent) + defer stop() + valueChild := WithValue(parent, "key", "value") + timerChild, stop := WithTimeout(valueChild, 10000*time.Hour) + defer stop() + + select { + case x := <-parent.Done(): + t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) + case x := <-cancelChild.Done(): + t.Errorf("<-cancelChild.Done() == %v want nothing (it should block)", x) + case x := <-timerChild.Done(): + t.Errorf("<-timerChild.Done() == %v want nothing (it should block)", x) + case x := <-valueChild.Done(): + t.Errorf("<-valueChild.Done() == %v want nothing (it should block)", x) + default: + } + + // The parent's children should contain the two cancelable children. + pc := parent.(*cancelCtx) + cc := cancelChild.(*cancelCtx) + tc := timerChild.(*timerCtx) + pc.mu.Lock() + if len(pc.children) != 2 || !pc.children[cc] || !pc.children[tc] { + t.Errorf("bad linkage: pc.children = %v, want %v and %v", + pc.children, cc, tc) + } + pc.mu.Unlock() + + if p, ok := parentCancelCtx(cc.Context); !ok || p != pc { + t.Errorf("bad linkage: parentCancelCtx(cancelChild.Context) = %v, %v want %v, true", p, ok, pc) + } + if p, ok := parentCancelCtx(tc.Context); !ok || p != pc { + t.Errorf("bad linkage: parentCancelCtx(timerChild.Context) = %v, %v want %v, true", p, ok, pc) + } + + cancel() + + pc.mu.Lock() + if len(pc.children) != 0 { + t.Errorf("pc.cancel didn't clear pc.children = %v", pc.children) + } + pc.mu.Unlock() + + // parent and children should all be finished. + check := func(ctx Context, name string) { + select { + case <-ctx.Done(): + default: + t.Errorf("<-%s.Done() blocked, but shouldn't have", name) + } + if e := ctx.Err(); e != Canceled { + t.Errorf("%s.Err() == %v want %v", name, e, Canceled) + } + } + check(parent, "parent") + check(cancelChild, "cancelChild") + check(valueChild, "valueChild") + check(timerChild, "timerChild") + + // WithCancel should return a canceled context on a canceled parent. + precanceledChild := WithValue(parent, "key", "value") + select { + case <-precanceledChild.Done(): + default: + t.Errorf("<-precanceledChild.Done() blocked, but shouldn't have") + } + if e := precanceledChild.Err(); e != Canceled { + t.Errorf("precanceledChild.Err() == %v want %v", e, Canceled) + } +} + +func TestChildFinishesFirst(t *testing.T) { + cancelable, stop := WithCancel(Background()) + defer stop() + for _, parent := range []Context{Background(), cancelable} { + child, cancel := WithCancel(parent) + + select { + case x := <-parent.Done(): + t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) + case x := <-child.Done(): + t.Errorf("<-child.Done() == %v want nothing (it should block)", x) + default: + } + + cc := child.(*cancelCtx) + pc, pcok := parent.(*cancelCtx) // pcok == false when parent == Background() + if p, ok := parentCancelCtx(cc.Context); ok != pcok || (ok && pc != p) { + t.Errorf("bad linkage: parentCancelCtx(cc.Context) = %v, %v want %v, %v", p, ok, pc, pcok) + } + + if pcok { + pc.mu.Lock() + if len(pc.children) != 1 || !pc.children[cc] { + t.Errorf("bad linkage: pc.children = %v, cc = %v", pc.children, cc) + } + pc.mu.Unlock() + } + + cancel() + + if pcok { + pc.mu.Lock() + if len(pc.children) != 0 { + t.Errorf("child's cancel didn't remove self from pc.children = %v", pc.children) + } + pc.mu.Unlock() + } + + // child should be finished. + select { + case <-child.Done(): + default: + t.Errorf("<-child.Done() blocked, but shouldn't have") + } + if e := child.Err(); e != Canceled { + t.Errorf("child.Err() == %v want %v", e, Canceled) + } + + // parent should not be finished. + select { + case x := <-parent.Done(): + t.Errorf("<-parent.Done() == %v want nothing (it should block)", x) + default: + } + if e := parent.Err(); e != nil { + t.Errorf("parent.Err() == %v want nil", e) + } + } +} + +func testDeadline(c Context, wait time.Duration, t *testing.T) { + select { + case <-time.After(wait): + t.Fatalf("context should have timed out") + case <-c.Done(): + } + if e := c.Err(); e != DeadlineExceeded { + t.Errorf("c.Err() == %v want %v", e, DeadlineExceeded) + } +} + +func TestDeadline(t *testing.T) { + c, _ := WithDeadline(Background(), time.Now().Add(100*time.Millisecond)) + if got, prefix := fmt.Sprint(c), "context.Background.WithDeadline("; !strings.HasPrefix(got, prefix) { + t.Errorf("c.String() = %q want prefix %q", got, prefix) + } + testDeadline(c, 200*time.Millisecond, t) + + c, _ = WithDeadline(Background(), time.Now().Add(100*time.Millisecond)) + o := otherContext{c} + testDeadline(o, 200*time.Millisecond, t) + + c, _ = WithDeadline(Background(), time.Now().Add(100*time.Millisecond)) + o = otherContext{c} + c, _ = WithDeadline(o, time.Now().Add(300*time.Millisecond)) + testDeadline(c, 200*time.Millisecond, t) +} + +func TestTimeout(t *testing.T) { + c, _ := WithTimeout(Background(), 100*time.Millisecond) + if got, prefix := fmt.Sprint(c), "context.Background.WithDeadline("; !strings.HasPrefix(got, prefix) { + t.Errorf("c.String() = %q want prefix %q", got, prefix) + } + testDeadline(c, 200*time.Millisecond, t) + + c, _ = WithTimeout(Background(), 100*time.Millisecond) + o := otherContext{c} + testDeadline(o, 200*time.Millisecond, t) + + c, _ = WithTimeout(Background(), 100*time.Millisecond) + o = otherContext{c} + c, _ = WithTimeout(o, 300*time.Millisecond) + testDeadline(c, 200*time.Millisecond, t) +} + +func TestCanceledTimeout(t *testing.T) { + c, _ := WithTimeout(Background(), 200*time.Millisecond) + o := otherContext{c} + c, cancel := WithTimeout(o, 400*time.Millisecond) + cancel() + time.Sleep(100 * time.Millisecond) // let cancelation propagate + select { + case <-c.Done(): + default: + t.Errorf("<-c.Done() blocked, but shouldn't have") + } + if e := c.Err(); e != Canceled { + t.Errorf("c.Err() == %v want %v", e, Canceled) + } +} + +type key1 int +type key2 int + +var k1 = key1(1) +var k2 = key2(1) // same int as k1, different type +var k3 = key2(3) // same type as k2, different int + +func TestValues(t *testing.T) { + check := func(c Context, nm, v1, v2, v3 string) { + if v, ok := c.Value(k1).(string); ok == (len(v1) == 0) || v != v1 { + t.Errorf(`%s.Value(k1).(string) = %q, %t want %q, %t`, nm, v, ok, v1, len(v1) != 0) + } + if v, ok := c.Value(k2).(string); ok == (len(v2) == 0) || v != v2 { + t.Errorf(`%s.Value(k2).(string) = %q, %t want %q, %t`, nm, v, ok, v2, len(v2) != 0) + } + if v, ok := c.Value(k3).(string); ok == (len(v3) == 0) || v != v3 { + t.Errorf(`%s.Value(k3).(string) = %q, %t want %q, %t`, nm, v, ok, v3, len(v3) != 0) + } + } + + c0 := Background() + check(c0, "c0", "", "", "") + + c1 := WithValue(Background(), k1, "c1k1") + check(c1, "c1", "c1k1", "", "") + + if got, want := fmt.Sprint(c1), `context.Background.WithValue(1, "c1k1")`; got != want { + t.Errorf("c.String() = %q want %q", got, want) + } + + c2 := WithValue(c1, k2, "c2k2") + check(c2, "c2", "c1k1", "c2k2", "") + + c3 := WithValue(c2, k3, "c3k3") + check(c3, "c2", "c1k1", "c2k2", "c3k3") + + c4 := WithValue(c3, k1, nil) + check(c4, "c4", "", "c2k2", "c3k3") + + o0 := otherContext{Background()} + check(o0, "o0", "", "", "") + + o1 := otherContext{WithValue(Background(), k1, "c1k1")} + check(o1, "o1", "c1k1", "", "") + + o2 := WithValue(o1, k2, "o2k2") + check(o2, "o2", "c1k1", "o2k2", "") + + o3 := otherContext{c4} + check(o3, "o3", "", "c2k2", "c3k3") + + o4 := WithValue(o3, k3, nil) + check(o4, "o4", "", "c2k2", "") +} + +func TestAllocs(t *testing.T) { + bg := Background() + for _, test := range []struct { + desc string + f func() + limit float64 + gccgoLimit float64 + }{ + { + desc: "Background()", + f: func() { Background() }, + limit: 0, + gccgoLimit: 0, + }, + { + desc: fmt.Sprintf("WithValue(bg, %v, nil)", k1), + f: func() { + c := WithValue(bg, k1, nil) + c.Value(k1) + }, + limit: 3, + gccgoLimit: 3, + }, + { + desc: "WithTimeout(bg, 15*time.Millisecond)", + f: func() { + c, _ := WithTimeout(bg, 15*time.Millisecond) + <-c.Done() + }, + limit: 8, + gccgoLimit: 13, + }, + { + desc: "WithCancel(bg)", + f: func() { + c, cancel := WithCancel(bg) + cancel() + <-c.Done() + }, + limit: 5, + gccgoLimit: 8, + }, + { + desc: "WithTimeout(bg, 100*time.Millisecond)", + f: func() { + c, cancel := WithTimeout(bg, 100*time.Millisecond) + cancel() + <-c.Done() + }, + limit: 8, + gccgoLimit: 25, + }, + } { + limit := test.limit + if runtime.Compiler == "gccgo" { + // gccgo does not yet do escape analysis. + // TOOD(iant): Remove this when gccgo does do escape analysis. + limit = test.gccgoLimit + } + if n := testing.AllocsPerRun(100, test.f); n > limit { + t.Errorf("%s allocs = %f want %d", test.desc, n, int(limit)) + } + } +} + +func TestSimultaneousCancels(t *testing.T) { + root, cancel := WithCancel(Background()) + m := map[Context]CancelFunc{root: cancel} + q := []Context{root} + // Create a tree of contexts. + for len(q) != 0 && len(m) < 100 { + parent := q[0] + q = q[1:] + for i := 0; i < 4; i++ { + ctx, cancel := WithCancel(parent) + m[ctx] = cancel + q = append(q, ctx) + } + } + // Start all the cancels in a random order. + var wg sync.WaitGroup + wg.Add(len(m)) + for _, cancel := range m { + go func(cancel CancelFunc) { + cancel() + wg.Done() + }(cancel) + } + // Wait on all the contexts in a random order. + for ctx := range m { + select { + case <-ctx.Done(): + case <-time.After(1 * time.Second): + buf := make([]byte, 10<<10) + n := runtime.Stack(buf, true) + t.Fatalf("timed out waiting for <-ctx.Done(); stacks:\n%s", buf[:n]) + } + } + // Wait for all the cancel functions to return. + done := make(chan struct{}) + go func() { + wg.Wait() + close(done) + }() + select { + case <-done: + case <-time.After(1 * time.Second): + buf := make([]byte, 10<<10) + n := runtime.Stack(buf, true) + t.Fatalf("timed out waiting for cancel functions; stacks:\n%s", buf[:n]) + } +} + +func TestInterlockedCancels(t *testing.T) { + parent, cancelParent := WithCancel(Background()) + child, cancelChild := WithCancel(parent) + go func() { + parent.Done() + cancelChild() + }() + cancelParent() + select { + case <-child.Done(): + case <-time.After(1 * time.Second): + buf := make([]byte, 10<<10) + n := runtime.Stack(buf, true) + t.Fatalf("timed out waiting for child.Done(); stacks:\n%s", buf[:n]) + } +} + +func TestLayersCancel(t *testing.T) { + testLayers(t, time.Now().UnixNano(), false) +} + +func TestLayersTimeout(t *testing.T) { + testLayers(t, time.Now().UnixNano(), true) +} + +func testLayers(t *testing.T, seed int64, testTimeout bool) { + rand.Seed(seed) + errorf := func(format string, a ...interface{}) { + t.Errorf(fmt.Sprintf("seed=%d: %s", seed, format), a...) + } + const ( + timeout = 200 * time.Millisecond + minLayers = 30 + ) + type value int + var ( + vals []*value + cancels []CancelFunc + numTimers int + ctx = Background() + ) + for i := 0; i < minLayers || numTimers == 0 || len(cancels) == 0 || len(vals) == 0; i++ { + switch rand.Intn(3) { + case 0: + v := new(value) + ctx = WithValue(ctx, v, v) + vals = append(vals, v) + case 1: + var cancel CancelFunc + ctx, cancel = WithCancel(ctx) + cancels = append(cancels, cancel) + case 2: + var cancel CancelFunc + ctx, cancel = WithTimeout(ctx, timeout) + cancels = append(cancels, cancel) + numTimers++ + } + } + checkValues := func(when string) { + for _, key := range vals { + if val := ctx.Value(key).(*value); key != val { + errorf("%s: ctx.Value(%p) = %p want %p", when, key, val, key) + } + } + } + select { + case <-ctx.Done(): + errorf("ctx should not be canceled yet") + default: + } + if s, prefix := fmt.Sprint(ctx), "context.Background."; !strings.HasPrefix(s, prefix) { + t.Errorf("ctx.String() = %q want prefix %q", s, prefix) + } + t.Log(ctx) + checkValues("before cancel") + if testTimeout { + select { + case <-ctx.Done(): + case <-time.After(timeout + timeout/10): + errorf("ctx should have timed out") + } + checkValues("after timeout") + } else { + cancel := cancels[rand.Intn(len(cancels))] + cancel() + select { + case <-ctx.Done(): + default: + errorf("ctx should be canceled") + } + checkValues("after cancel") + } +} + +func TestCancelRemoves(t *testing.T) { + checkChildren := func(when string, ctx Context, want int) { + if got := len(ctx.(*cancelCtx).children); got != want { + t.Errorf("%s: context has %d children, want %d", when, got, want) + } + } + + ctx, _ := WithCancel(Background()) + checkChildren("after creation", ctx, 0) + _, cancel := WithCancel(ctx) + checkChildren("with WithCancel child ", ctx, 1) + cancel() + checkChildren("after cancelling WithCancel child", ctx, 0) + + ctx, _ = WithCancel(Background()) + checkChildren("after creation", ctx, 0) + _, cancel = WithTimeout(ctx, 60*time.Minute) + checkChildren("with WithTimeout child ", ctx, 1) + cancel() + checkChildren("after cancelling WithTimeout child", ctx, 0) +} diff --git a/Godeps/_workspace/src/golang.org/x/net/context/withtimeout_test.go b/Godeps/_workspace/src/golang.org/x/net/context/withtimeout_test.go new file mode 100644 index 0000000000..a6754dc368 --- /dev/null +++ b/Godeps/_workspace/src/golang.org/x/net/context/withtimeout_test.go @@ -0,0 +1,26 @@ +// Copyright 2014 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package context_test + +import ( + "fmt" + "time" + + "golang.org/x/net/context" +) + +func ExampleWithTimeout() { + // Pass a context with a timeout to tell a blocking function that it + // should abandon its work after the timeout elapses. + ctx, _ := context.WithTimeout(context.Background(), 100*time.Millisecond) + select { + case <-time.After(200 * time.Millisecond): + fmt.Println("overslept") + case <-ctx.Done(): + fmt.Println(ctx.Err()) // prints "context deadline exceeded" + } + // Output: + // context deadline exceeded +} diff --git a/Godeps/_workspace/src/google.golang.org/api/compute/v1/compute-api.json b/Godeps/_workspace/src/google.golang.org/api/compute/v1/compute-api.json index 726a0ac363..921d5fd90e 100644 --- a/Godeps/_workspace/src/google.golang.org/api/compute/v1/compute-api.json +++ b/Godeps/_workspace/src/google.golang.org/api/compute/v1/compute-api.json @@ -1,11 +1,11 @@ { "kind": "discovery#restDescription", - "etag": "\"l66ggWbucbkBw9Lpos72oziyefE/qp3DHGvWPpREzEdWk7WwxnpgC9w\"", + "etag": "\"ye6orv2F-1npMW3u9suM3a7C5Bo/zfEgIM85dgKQ1dAjVHrRpCmO0gk\"", "discoveryVersion": "v1", "id": "compute:v1", "name": "compute", "version": "v1", - "revision": "20141014", + "revision": "20150617", "title": "Compute Engine API", "description": "API for the Google Compute Engine service.", "ownerDomain": "google.com", @@ -69,6 +69,9 @@ "auth": { "oauth2": { "scopes": { + "https://www.googleapis.com/auth/cloud-platform": { + "description": "View and manage your data across Google Cloud Platform services" + }, "https://www.googleapis.com/auth/compute": { "description": "View and manage your Google Compute Engine resources" }, @@ -95,7 +98,7 @@ "properties": { "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Only] Type of the resource. Always compute#accessConfig for access configs.", "default": "compute#accessConfig" }, "name": { @@ -104,11 +107,11 @@ }, "natIP": { "type": "string", - "description": "An external IP address associated with this instance. Specify an unused static IP address available to the project. If not specified, the external IP will be drawn from a shared ephemeral pool." + "description": "An external IP address associated with this instance. Specify an unused static external IP address available to the project or leave this field undefined to use an IP from a shared ephemeral IP address pool. If you specify a static external IP address, it must live in the same region as the zone of the instance." }, "type": { "type": "string", - "description": "Type of configuration. Must be set to \"ONE_TO_ONE_NAT\". This configures port-for-port NAT to the internet.", + "description": "The type of configuration. The default and only option is ONE_TO_ONE_NAT.", "default": "ONE_TO_ONE_NAT", "enum": [ "ONE_TO_ONE_NAT" @@ -126,11 +129,11 @@ "properties": { "address": { "type": "string", - "description": "The IP address represented by this resource." + "description": "The static external IP address represented by this resource." }, "creationTimestamp": { "type": "string", - "description": "Creation timestamp in RFC3339 text format (output only)." + "description": "[Output Only] Creation timestamp in RFC3339 text format." }, "description": { "type": "string", @@ -138,17 +141,17 @@ }, "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only).", + "description": "[Output Only] Unique identifier for the resource; defined by the server.", "format": "uint64" }, "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Only] Type of the resource. Always compute#address for addresses.", "default": "compute#address" }, "name": { "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035.", + "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "annotations": { "required": [ @@ -158,15 +161,15 @@ }, "region": { "type": "string", - "description": "URL of the region where the regional address resides (output only). This field is not applicable to global addresses." + "description": "[Output Only] URL of the region where the regional address resides. This field is not applicable to global addresses." }, "selfLink": { "type": "string", - "description": "Server defined URL for the resource (output only)." + "description": "[Output Only] Server defined URL for the resource." }, "status": { "type": "string", - "description": "The status of the address (output only).", + "description": "[Output Only] The status of the address, which can be either IN_USE or RESERVED. An address that is RESERVED is currently reserved and available to use. An IN_USE address is currently being used by another resource and is not available.", "enum": [ "IN_USE", "RESERVED" @@ -178,7 +181,7 @@ }, "users": { "type": "array", - "description": "The resources that are using this address resource.", + "description": "[Output Only] The URLs of the resources that are using this address.", "items": { "type": "string" } @@ -191,28 +194,28 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "A map of scoped address lists.", + "description": "[Output Only] A map of scoped address lists.", "additionalProperties": { "$ref": "AddressesScopedList", - "description": "Name of the scope containing this set of addresses." + "description": "[Output Only] Name of the scope containing this set of addresses." } }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#addressAggregatedList for aggregated lists of addresses.", "default": "compute#addressAggregatedList" }, "nextPageToken": { "type": "string", - "description": "A token used to continue a truncated list request (output only)." + "description": "[Output Only] A token used to continue a truncated list request." }, "selfLink": { "type": "string", - "description": "Server defined URL for this resource (output only)." + "description": "[Output Only] Server defined URL for this resource." } } }, @@ -223,27 +226,27 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "The address resources.", + "description": "[Output Only] A list of Address resources.", "items": { "$ref": "Address" } }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#addressList for lists of addresses.", "default": "compute#addressList" }, "nextPageToken": { "type": "string", - "description": "A token used to continue a truncated list request (output only)." + "description": "[Output Only] A token used to continue a truncated list request." }, "selfLink": { "type": "string", - "description": "Server defined URL for the resource (output only)." + "description": "[Output Only] Server defined URL for the resource." } } }, @@ -253,18 +256,18 @@ "properties": { "addresses": { "type": "array", - "description": "List of addresses contained in this scope.", + "description": "[Output Only] List of addresses contained in this scope.", "items": { "$ref": "Address" } }, "warning": { "type": "object", - "description": "Informational warning which replaces the list of addresses when the list is empty.", + "description": "[Output Only] Informational warning which replaces the list of addresses when the list is empty.", "properties": { "code": { "type": "string", - "description": "The warning type identifier for this warning.", + "description": "[Output Only] The warning type identifier for this warning.", "enum": [ "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", @@ -274,9 +277,11 @@ "NEXT_HOP_INSTANCE_NOT_FOUND", "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" ], "enumDescriptions": [ @@ -291,29 +296,31 @@ "", "", "", + "", + "", "" ] }, "data": { "type": "array", - "description": "Metadata for this warning in 'key: value' format.", + "description": "[Output Only] Metadata for this warning in key: value format.", "items": { "type": "object", "properties": { "key": { "type": "string", - "description": "A key for the warning data." + "description": "[Output Only] A key for the warning data." }, "value": { "type": "string", - "description": "A warning data value corresponding to the key." + "description": "[Output Only] A warning data value corresponding to the key." } } } }, "message": { "type": "string", - "description": "Optional human-readable details for this warning." + "description": "[Output Only] Optional human-readable details for this warning." } } } @@ -326,24 +333,24 @@ "properties": { "autoDelete": { "type": "boolean", - "description": "Whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance)." + "description": "Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance)." }, "boot": { "type": "boolean", - "description": "Indicates that this is a boot disk. VM will use the first partition of the disk for its root filesystem." + "description": "Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem." }, "deviceName": { "type": "string", - "description": "Persistent disk only; must be unique within the instance when specified. This represents a unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, a default will be chosen by the system." + "description": "Specifies a unique device name of your choice that is reflected into the /dev/ tree of a Linux operating system running within the instance. This name can be used to reference the device for mounting, resizing, and so on, from within the instance.\n\nIf not specified, the server chooses a default device name to apply to this disk, in the form persistent-disks-x, where x is a number assigned by Google Compute Engine. This field is only applicable for persistent disks." }, "index": { "type": "integer", - "description": "A zero-based index to assign to this disk, where 0 is reserved for the boot disk. If not specified, the server will choose an appropriate value (output only).", + "description": "Assigns a zero-based index to this disk, where 0 is reserved for the boot disk. For example, if you have many disks attached to an instance, each disk would have a unique index number. If not specified, the server will choose an appropriate value.", "format": "int32" }, "initializeParams": { "$ref": "AttachedDiskInitializeParams", - "description": "Initialization parameters." + "description": "[Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.\n\nThis property is mutually exclusive with the source property; you can only define one or the other, but not both." }, "interface": { "type": "string", @@ -358,19 +365,19 @@ }, "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Only] Type of the resource. Always compute#attachedDisk for attached disks.", "default": "compute#attachedDisk" }, "licenses": { "type": "array", - "description": "Public visible licenses.", + "description": "[Output Only] Any valid publicly visible licenses.", "items": { "type": "string" } }, "mode": { "type": "string", - "description": "The mode in which to attach this disk, either \"READ_WRITE\" or \"READ_ONLY\".", + "description": "The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If not specified, the default is to attach the disk in READ_WRITE mode.", "enum": [ "READ_ONLY", "READ_WRITE" @@ -382,11 +389,11 @@ }, "source": { "type": "string", - "description": "Persistent disk only; the URL of the persistent disk resource." + "description": "Specifies a valid partial or full URL to an existing Persistent Disk resource. This field is only applicable for persistent disks." }, "type": { "type": "string", - "description": "Type of the disk, either \"SCRATCH\" or \"PERSISTENT\". Note that persistent disks must be created before you can specify them here.", + "description": "Specifies the type of the disk, either SCRATCH or PERSISTENT. If not specified, the default is PERSISTENT.", "enum": [ "PERSISTENT", "SCRATCH" @@ -406,24 +413,24 @@ "AttachedDiskInitializeParams": { "id": "AttachedDiskInitializeParams", "type": "object", - "description": "Initialization parameters for the new disk (input-only). Can only be specified on the boot disk or local SSDs. Mutually exclusive with 'source'.", + "description": "[Input Only] Specifies the parameters for a new disk that will be created alongside the new instance. Use initialization parameters to create boot disks or local SSDs attached to the new instance.\n\nThis property is mutually exclusive with the source property; you can only define one or the other, but not both.", "properties": { "diskName": { "type": "string", - "description": "Name of the disk (when not provided defaults to the name of the instance)." + "description": "Specifies the disk name. If not specified, the default is to use the name of the instance." }, "diskSizeGb": { "type": "string", - "description": "Size of the disk in base-2 GB.", + "description": "Specifies the size of the disk in base-2 GB.", "format": "int64" }, "diskType": { "type": "string", - "description": "URL of the disk type resource describing which disk type to use to create the disk; provided by the client when the disk is created." + "description": "Specifies the disk type to use to create the instance. If not specified, the default is pd-standard, specified using the full URL. For example:\n\nhttps://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/pd-standard \n\nOther values include pd-ssd and local-ssd. If you define this field, you can provide either the full or partial URL. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/diskTypes/diskType \n- projects/project/zones/zone/diskTypes/diskType \n- zones/zone/diskTypes/diskType" }, "sourceImage": { "type": "string", - "description": "The source image used to create this disk." + "description": "A source image used to create the disk. You can provide a private (custom) image, and Compute Engine will use the corresponding image from your project. For example:\n\nglobal/images/my-private-image \n\nOr you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:\n\nprojects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD \n\nwhere vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases." } } }, @@ -446,7 +453,7 @@ }, "capacityScaler": { "type": "number", - "description": "The multiplier (a value between 0 and 1e6) of the max capacity (CPU or RPS, depending on 'balancingMode') the group should serve up to. 0 means the group is totally drained. Default value is 1. Valid range is [0, 1e6].", + "description": "The multiplier (a value between 0.0 and 1.0) of the max capacity (CPU or RPS, depending on 'balancingMode') the group should serve up to. 0 means the group is totally drained. Default value is 1. Valid range is [0.0, 1.0].", "format": "float" }, "description": { @@ -477,7 +484,7 @@ "BackendService": { "id": "BackendService", "type": "object", - "description": "A BackendService resource. This resource defines a group of backend VMs together with their serving capacity.", + "description": "A BackendService resource. This resource defines a group of backend VMs together with their serving capacity.\n\nIf you add field foo, you probably need to also add: com.google.cloud.cluster.manager.api.BackendServiceResource: foo com.google.cloud.cluster.manager.networking.entities: BackendService, BackendServiceEntity: getFoo, setFoo:\n\nConverters/mappers will need to be updated: com.google.cloud.cluster.manager.networking.services.backendservice.BackendServiceResourceConverter: toResource, updateEntity: copy foo com.google.cloud.cluster.mixer.protomappers.BackendServiceMappers.ResourceMapper: ResourceMapper: add a new map call\n\nTests to update: com.google.cloud.cluster.manager.networking.services.backendservice.BackendServiceResourceConverterTest com.google.cloud.cluster.mixer.protomappers.BackendServiceMappersTest.testResourceMapping", "properties": { "backends": { "type": "array", @@ -578,7 +585,7 @@ }, "items": { "type": "array", - "description": "The BackendService resources.", + "description": "A list of BackendService resources.", "items": { "$ref": "BackendService" } @@ -617,11 +624,11 @@ }, "replacement": { "type": "string", - "description": "A URL of the suggested replacement for the deprecated resource. The deprecated resource and its replacement must be resources of the same kind." + "description": "The URL of the suggested replacement for a deprecated resource. The suggested replacement resource must be the same kind of resource as the deprecated resource." }, "state": { "type": "string", - "description": "The deprecation state. Can be \"DEPRECATED\", \"OBSOLETE\", or \"DELETED\". Operations which create a new resource using a \"DEPRECATED\" resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. New uses of \"OBSOLETE\" or \"DELETED\" resources will result in an error.", + "description": "The deprecation state of this resource. This can be DEPRECATED, OBSOLETE, or DELETED. Operations which create a new resource using a DEPRECATED resource will return successfully, but with a warning indicating the deprecated resource and recommending its replacement. Operations which use OBSOLETE or DELETED resources will be rejected and result in an error.", "enum": [ "DELETED", "DEPRECATED", @@ -638,11 +645,11 @@ "Disk": { "id": "Disk", "type": "object", - "description": "A persistent disk resource.", + "description": "A Disk resource.", "properties": { "creationTimestamp": { "type": "string", - "description": "Creation timestamp in RFC3339 text format (output only)." + "description": "[Output Only] Creation timestamp in RFC3339 text format." }, "description": { "type": "string", @@ -650,24 +657,32 @@ }, "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only).", + "description": "[Output Only] Unique identifier for the resource; defined by the server.", "format": "uint64" }, "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Only] Type of the resource. Always compute#disk for disks.", "default": "compute#disk" }, + "lastAttachTimestamp": { + "type": "string", + "description": "[Output Only] Last attach timestamp in RFC3339 text format." + }, + "lastDetachTimestamp": { + "type": "string", + "description": "[Output Only] Last detach timestamp in RFC3339 text format." + }, "licenses": { "type": "array", - "description": "Public visible licenses.", + "description": "Any applicable publicly visible licenses.", "items": { "type": "string" } }, "name": { "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035.", + "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "annotations": { "required": [ @@ -681,32 +696,32 @@ }, "selfLink": { "type": "string", - "description": "Server defined URL for the resource (output only)." + "description": "[Output Only] Server-defined fully-qualified URL for this resource." }, "sizeGb": { "type": "string", - "description": "Size of the persistent disk, specified in GB. This parameter is optional when creating a disk from a disk image or a snapshot, otherwise it is required.", + "description": "Size of the persistent disk, specified in GB. You can specify this field when creating a persistent disk using the sourceImage or sourceSnapshot parameter, or specify it alone to create an empty persistent disk.\n\nIf you specify this field along with sourceImage or sourceSnapshot, the value of sizeGb must not be less than the size of the sourceImage or the size of the snapshot.", "format": "int64" }, "sourceImage": { "type": "string", - "description": "The source image used to create this disk." + "description": "The source image used to create this disk. If the source image is deleted from the system, this field will not be set, even if an image with the same name has been re-created.\n\nWhen creating a disk, you can provide a private (custom) image using the following input, and Compute Engine will use the corresponding image from your project. For example:\n\nglobal/images/my-private-image \n\nOr you can provide an image from a publicly-available project. For example, to use a Debian image from the debian-cloud project, make sure to include the project in the URL:\n\nprojects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD \n\nwhere vYYYYMMDD is the image version. The fully-qualified URL will also work in both cases." }, "sourceImageId": { "type": "string", - "description": "The 'id' value of the image used to create this disk. This value may be used to determine whether the disk was created from the current or a previous instance of a given image." + "description": "The ID value of the image used to create this disk. This value identifies the exact image that was used to create this persistent disk. For example, if you created the persistent disk from an image that was later deleted and recreated under the same name, the source image ID would identify the exact version of the image that was used." }, "sourceSnapshot": { "type": "string", - "description": "The source snapshot used to create this disk." + "description": "The source snapshot used to create this disk. You can provide this as a partial or full URL to the resource. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/global/snapshots/snapshot \n- projects/project/global/snapshots/snapshot \n- global/snapshots/snapshot" }, "sourceSnapshotId": { "type": "string", - "description": "The 'id' value of the snapshot used to create this disk. This value may be used to determine whether the disk was created from the current or a previous instance of a given disk snapshot." + "description": "[Output Only] The unique ID of the snapshot used to create this disk. This value identifies the exact snapshot that was used to create this persistent disk. For example, if you created the persistent disk from a snapshot that was later deleted and recreated under the same name, the source snapshot ID would identify the exact version of the snapshot that was used." }, "status": { "type": "string", - "description": "The status of disk creation (output only).", + "description": "[Output Only] The status of disk creation. Applicable statuses includes: CREATING, FAILED, READY, RESTORING.", "enum": [ "CREATING", "FAILED", @@ -724,9 +739,16 @@ "type": "string", "description": "URL of the disk type resource describing which disk type to use to create the disk; provided by the client when the disk is created." }, + "users": { + "type": "array", + "description": "Links to the users of the disk (attached instances) in form: project/zones/zone/instances/instance", + "items": { + "type": "string" + } + }, "zone": { "type": "string", - "description": "URL of the zone where the disk resides (output only)." + "description": "[Output Only] URL of the zone where the disk resides." } } }, @@ -736,59 +758,73 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "A map of scoped disk lists.", + "description": "[Output Only] A map of scoped disk lists.", "additionalProperties": { "$ref": "DisksScopedList", - "description": "Name of the scope containing this set of disks." + "description": "[Output Only] Name of the scope containing this set of disks." } }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#diskAggregatedList for aggregated lists of persistent disks.", "default": "compute#diskAggregatedList" }, "nextPageToken": { "type": "string", - "description": "A token used to continue a truncated list request (output only)." + "description": "[Output Only] A token used to continue a truncated list request." }, "selfLink": { "type": "string", - "description": "Server defined URL for this resource (output only)." + "description": "[Output Only] Server defined URL for this resource." } } }, "DiskList": { "id": "DiskList", "type": "object", - "description": "Contains a list of persistent disk resources.", + "description": "A list of Disk resources.", "properties": { "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "The persistent disk resources.", + "description": "[Output Only] A list of persistent disks.", "items": { "$ref": "Disk" } }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#diskList for lists of disks.", "default": "compute#diskList" }, "nextPageToken": { "type": "string", - "description": "A token used to continue a truncated list request (output only)." + "description": "[Output Only] A token used to continue a truncated list request." }, "selfLink": { "type": "string", - "description": "Server defined URL for this resource (output only)." + "description": "[Output Only] Server defined URL for this resource." + } + } + }, + "DiskMoveRequest": { + "id": "DiskMoveRequest", + "type": "object", + "properties": { + "destinationZone": { + "type": "string", + "description": "The URL of the destination zone to move the disk to. This can be a full or partial URL. For example, the following are all valid URLs to a zone: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone \n- projects/project/zones/zone \n- zones/zone" + }, + "targetDisk": { + "type": "string", + "description": "The URL of the target disk to move. This can be a full or partial URL. For example, the following are all valid URLs to a disk: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk \n- projects/project/zones/zone/disks/disk \n- zones/zone/disks/disk" } } }, @@ -799,47 +835,47 @@ "properties": { "creationTimestamp": { "type": "string", - "description": "Creation timestamp in RFC3339 text format (output only)." + "description": "[Output Only] Creation timestamp in RFC3339 text format." }, "defaultDiskSizeGb": { "type": "string", - "description": "Server defined default disk size in gb (output only).", + "description": "[Output Only] Server defined default disk size in GB.", "format": "int64" }, "deprecated": { "$ref": "DeprecationStatus", - "description": "The deprecation status associated with this disk type." + "description": "[Output Only] The deprecation status associated with this disk type." }, "description": { "type": "string", - "description": "An optional textual description of the resource." + "description": "[Output Only] An optional textual description of the resource." }, "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only).", + "description": "[Output Only] Unique identifier for the resource; defined by the server.", "format": "uint64" }, "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Only] Type of the resource. Always compute#diskType for disk types.", "default": "compute#diskType" }, "name": { "type": "string", - "description": "Name of the resource.", + "description": "[Output Only] Name of the resource.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" }, "selfLink": { "type": "string", - "description": "Server defined URL for the resource (output only)." + "description": "[Output Only] Server defined URL for the resource." }, "validDiskSize": { "type": "string", - "description": "An optional textual descroption of the valid disk size, e.g., \"10GB-10TB\"." + "description": "[Output Only] An optional textual description of the valid disk size, such as \"10GB-10TB\"." }, "zone": { "type": "string", - "description": "Url of the zone where the disk type resides (output only)." + "description": "[Output Only] URL of the zone where the disk type resides." } } }, @@ -849,28 +885,28 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "A map of scoped disk type lists.", + "description": "[Output Only] A map of scoped disk type lists.", "additionalProperties": { "$ref": "DiskTypesScopedList", - "description": "Name of the scope containing this set of disk types." + "description": "[Output Only] Name of the scope containing this set of disk types." } }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#diskTypeAggregatedList.", "default": "compute#diskTypeAggregatedList" }, "nextPageToken": { "type": "string", - "description": "A token used to continue a truncated list request (output only)." + "description": "[Output Only] A token used to continue a truncated list request." }, "selfLink": { "type": "string", - "description": "Server defined URL for this resource (output only)." + "description": "[Output Only] Server defined URL for this resource." } } }, @@ -881,27 +917,27 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "The disk type resources.", + "description": "[Output Only] A list of Disk Type resources.", "items": { "$ref": "DiskType" } }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#diskTypeList for disk types.", "default": "compute#diskTypeList" }, "nextPageToken": { "type": "string", - "description": "A token used to continue a truncated list request (output only)." + "description": "[Output Only] A token used to continue a truncated list request." }, "selfLink": { "type": "string", - "description": "Server defined URL for this resource (output only)." + "description": "[Output Only] Server defined URL for this resource." } } }, @@ -911,18 +947,18 @@ "properties": { "diskTypes": { "type": "array", - "description": "List of disk types contained in this scope.", + "description": "[Output Only] List of disk types contained in this scope.", "items": { "$ref": "DiskType" } }, "warning": { "type": "object", - "description": "Informational warning which replaces the list of disk types when the list is empty.", + "description": "[Output Only] Informational warning which replaces the list of disk types when the list is empty.", "properties": { "code": { "type": "string", - "description": "The warning type identifier for this warning.", + "description": "[Output Only] The warning type identifier for this warning.", "enum": [ "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", @@ -932,9 +968,11 @@ "NEXT_HOP_INSTANCE_NOT_FOUND", "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" ], "enumDescriptions": [ @@ -949,29 +987,31 @@ "", "", "", + "", + "", "" ] }, "data": { "type": "array", - "description": "Metadata for this warning in 'key: value' format.", + "description": "[Output Only] Metadata for this warning in key: value format.", "items": { "type": "object", "properties": { "key": { "type": "string", - "description": "A key for the warning data." + "description": "[Output Only] A key for the warning data." }, "value": { "type": "string", - "description": "A warning data value corresponding to the key." + "description": "[Output Only] A warning data value corresponding to the key." } } } }, "message": { "type": "string", - "description": "Optional human-readable details for this warning." + "description": "[Output Only] Optional human-readable details for this warning." } } } @@ -983,18 +1023,18 @@ "properties": { "disks": { "type": "array", - "description": "List of disks contained in this scope.", + "description": "[Output Only] List of disks contained in this scope.", "items": { "$ref": "Disk" } }, "warning": { "type": "object", - "description": "Informational warning which replaces the list of disks when the list is empty.", + "description": "[Output Only] Informational warning which replaces the list of disks when the list is empty.", "properties": { "code": { "type": "string", - "description": "The warning type identifier for this warning.", + "description": "[Output Only] The warning type identifier for this warning.", "enum": [ "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", @@ -1004,9 +1044,11 @@ "NEXT_HOP_INSTANCE_NOT_FOUND", "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" ], "enumDescriptions": [ @@ -1021,29 +1063,31 @@ "", "", "", + "", + "", "" ] }, "data": { "type": "array", - "description": "Metadata for this warning in 'key: value' format.", + "description": "[Output Only] Metadata for this warning in key: value format.", "items": { "type": "object", "properties": { "key": { "type": "string", - "description": "A key for the warning data." + "description": "[Output Only] A key for the warning data." }, "value": { "type": "string", - "description": "A warning data value corresponding to the key." + "description": "[Output Only] A warning data value corresponding to the key." } } } }, "message": { "type": "string", - "description": "Optional human-readable details for this warning." + "description": "[Output Only] Optional human-readable details for this warning." } } } @@ -1052,7 +1096,7 @@ "Firewall": { "id": "Firewall", "type": "object", - "description": "A firewall resource.", + "description": "A Firewall resource.", "properties": { "allowed": { "type": "array", @@ -1062,11 +1106,11 @@ "properties": { "IPProtocol": { "type": "string", - "description": "Required; this is the IP protocol that is allowed for this rule. This can either be one of the following well known protocol strings [\"tcp\", \"udp\", \"icmp\", \"esp\", \"ah\", \"sctp\"], or the IP protocol number." + "description": "The IP protocol that is allowed for this rule. The protocol type is required when creating a firewall. This value can either be one of the following well known protocol strings (tcp, udp, icmp, esp, ah, sctp), or the IP protocol number." }, "ports": { "type": "array", - "description": "An optional list of ports which are allowed. It is an error to specify this for any protocol that isn't UDP or TCP. Each entry must be either an integer or a range. If not specified, connections through any port are allowed.\n\nExample inputs include: [\"22\"], [\"80\",\"443\"] and [\"12345-12349\"].", + "description": "An optional list of ports which are allowed. This field is only applicable for UDP or TCP protocol. Each entry must be either an integer or a range. If not specified, connections through any port are allowed\n\nExample inputs include: [\"22\"], [\"80\",\"443\"], and [\"12345-12349\"].", "items": { "type": "string" } @@ -1076,7 +1120,7 @@ }, "creationTimestamp": { "type": "string", - "description": "Creation timestamp in RFC3339 text format (output only)." + "description": "[Output Only] Creation timestamp in RFC3339text format." }, "description": { "type": "string", @@ -1084,17 +1128,17 @@ }, "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only).", + "description": "[Output Only] Unique identifier for the resource; defined by the server.", "format": "uint64" }, "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Ony] Type of the resource. Always compute#firewall for firewall rules.", "default": "compute#firewall" }, "name": { "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035.", + "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "annotations": { "required": [ @@ -1105,29 +1149,29 @@ }, "network": { "type": "string", - "description": "URL of the network to which this firewall is applied; provided by the client when the firewall is created." + "description": "URL of the network resource for this firewall rule. This field is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used:\nglobal/networks/default\nIf you choose to specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/myproject/global/networks/my-network \n- projects/myproject/global/networks/my-network \n- global/networks/default" }, "selfLink": { "type": "string", - "description": "Server defined URL for the resource (output only)." + "description": "[Output Only] Server defined URL for the resource." }, "sourceRanges": { "type": "array", - "description": "A list of IP address blocks expressed in CIDR format which this rule applies to. One or both of sourceRanges and sourceTags may be set; an inbound connection is allowed if either the range or the tag of the source matches.", + "description": "The IP address blocks that this rule applies to, expressed in CIDR format. One or both of sourceRanges and sourceTags may be set.\n\nIf both properties are set, an inbound connection is allowed if the range or the tag of the source matches the sourceRanges OR matches the sourceTags property; the connection does not need to match both properties.", "items": { "type": "string" } }, "sourceTags": { "type": "array", - "description": "A list of instance tags which this rule applies to. One or both of sourceRanges and sourceTags may be set; an inbound connection is allowed if either the range or the tag of the source matches.", + "description": "A list of instance tags which this rule applies to. One or both of sourceRanges and sourceTags may be set.\n\nIf both properties are set, an inbound connection is allowed if the range or the tag of the source matches the sourceRanges OR matches the sourceTags property; the connection does not need to match both properties.", "items": { "type": "string" } }, "targetTags": { "type": "array", - "description": "A list of instance tags indicating sets of instances located on network which may make network connections as specified in allowed. If no targetTags are specified, the firewall rule applies to all instances on the specified network.", + "description": "A list of instance tags indicating sets of instances located on network which may make network connections as specified in allowed[]. If no targetTags are specified, the firewall rule applies to all instances on the specified network.", "items": { "type": "string" } @@ -1137,31 +1181,31 @@ "FirewallList": { "id": "FirewallList", "type": "object", - "description": "Contains a list of firewall resources.", + "description": "Contains a list of Firewall resources.", "properties": { "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "The firewall resources.", + "description": "[Output Only] A list of Firewall resources.", "items": { "$ref": "Firewall" } }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#firewallList for lists of firewalls.", "default": "compute#firewallList" }, "nextPageToken": { "type": "string", - "description": "A token used to continue a truncated list request (output only)." + "description": "[Output Only] A token used to continue a truncated list request." }, "selfLink": { "type": "string", - "description": "Server defined URL for this resource (output only)." + "description": "[Output Only] Server defined URL for this resource." } } }, @@ -1275,7 +1319,7 @@ }, "items": { "type": "array", - "description": "The ForwardingRule resources.", + "description": "A list of ForwardingRule resources.", "items": { "$ref": "ForwardingRule" } @@ -1312,7 +1356,7 @@ "properties": { "code": { "type": "string", - "description": "The warning type identifier for this warning.", + "description": "[Output Only] The warning type identifier for this warning.", "enum": [ "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", @@ -1322,9 +1366,11 @@ "NEXT_HOP_INSTANCE_NOT_FOUND", "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" ], "enumDescriptions": [ @@ -1339,29 +1385,31 @@ "", "", "", + "", + "", "" ] }, "data": { "type": "array", - "description": "Metadata for this warning in 'key: value' format.", + "description": "[Output Only] Metadata for this warning in key: value format.", "items": { "type": "object", "properties": { "key": { "type": "string", - "description": "A key for the warning data." + "description": "[Output Only] A key for the warning data." }, "value": { "type": "string", - "description": "A warning data value corresponding to the key." + "description": "[Output Only] A warning data value corresponding to the key." } } } }, "message": { "type": "string", - "description": "Optional human-readable details for this warning." + "description": "[Output Only] Optional human-readable details for this warning." } } } @@ -1485,7 +1533,7 @@ }, "timeoutSec": { "type": "integer", - "description": "How long (in seconds) to wait before claiming failure. The default value is 5 seconds.", + "description": "How long (in seconds) to wait before claiming failure. The default value is 5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.", "format": "int32" }, "unhealthyThreshold": { @@ -1506,7 +1554,7 @@ }, "items": { "type": "array", - "description": "The HttpHealthCheck resources.", + "description": "A list of HttpHealthCheck resources.", "items": { "$ref": "HttpHealthCheck" } @@ -1529,7 +1577,7 @@ "Image": { "id": "Image", "type": "object", - "description": "A disk image resource.", + "description": "An Image resource.", "properties": { "archiveSizeBytes": { "type": "string", @@ -1538,7 +1586,7 @@ }, "creationTimestamp": { "type": "string", - "description": "Creation timestamp in RFC3339 text format (output only)." + "description": "[Output Only] Creation timestamp in RFC3339 text format." }, "deprecated": { "$ref": "DeprecationStatus", @@ -1550,29 +1598,29 @@ }, "diskSizeGb": { "type": "string", - "description": "Size of the image when restored onto a disk (in GiB).", + "description": "Size of the image when restored onto a persistent disk (in GB).", "format": "int64" }, "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only).", + "description": "[Output Only] Unique identifier for the resource; defined by the server.", "format": "uint64" }, "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Only] Type of the resource. Always compute#image for images.", "default": "compute#image" }, "licenses": { "type": "array", - "description": "Public visible licenses.", + "description": "Any applicable publicly visible licenses.", "items": { "type": "string" } }, "name": { "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035.", + "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "annotations": { "required": [ @@ -1582,11 +1630,11 @@ }, "rawDisk": { "type": "object", - "description": "The raw disk image parameters.", + "description": "The parameters of the raw disk image.", "properties": { "containerType": { "type": "string", - "description": "The format used to encode and transmit the block device. Should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.", + "description": "The format used to encode and transmit the block device, which should be TAR. This is just a container and transmission format and not a runtime format. Provided by the client when the disk image is created.", "enum": [ "TAR" ], @@ -1601,7 +1649,7 @@ }, "source": { "type": "string", - "description": "The full Google Cloud Storage URL where the disk image is stored; provided by the client when the disk image is created.", + "description": "The full Google Cloud Storage URL where the disk image is stored. You must provide either this property or the sourceDisk property but not both.", "annotations": { "required": [ "compute.images.insert" @@ -1612,19 +1660,19 @@ }, "selfLink": { "type": "string", - "description": "Server defined URL for the resource (output only)." + "description": "[Output Only] Server defined URL for the resource." }, "sourceDisk": { "type": "string", - "description": "The source disk used to create this image." + "description": "URL of the The source disk used to create this image. This can be a full or valid partial URL. You must provide either this property or the rawDisk.source property but not both to create an image. For example, the following are valid values: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/disk/disk \n- projects/project/zones/zone/disk/disk \n- zones/zone/disks/disk" }, "sourceDiskId": { "type": "string", - "description": "The 'id' value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name." + "description": "The ID value of the disk used to create this image. This value may be used to determine whether the image was taken from the current or a previous instance of a given disk name." }, "sourceType": { "type": "string", - "description": "Must be \"RAW\"; provided by the client when the disk image is created.", + "description": "The type of the image used to create this disk. The default and only value is RAW", "default": "RAW", "enum": [ "RAW" @@ -1635,7 +1683,7 @@ }, "status": { "type": "string", - "description": "Status of the image (output only). It will be one of the following READY - after image has been successfully created and is ready for use FAILED - if creating the image fails for some reason PENDING - the image creation is in progress An image can be used to create other resources suck as instances only after the image has been successfully created and the status is set to READY.", + "description": "[Output Only] The status of the image. An image can be used to create other resources, such as instances, only after the image has been successfully created and the status is set to READY. Possible values are FAILED, PENDING, or READY.", "enum": [ "FAILED", "PENDING", @@ -1652,7 +1700,7 @@ "ImageList": { "id": "ImageList", "type": "object", - "description": "Contains a list of disk image resources.", + "description": "Contains a list of Image resources.", "properties": { "id": { "type": "string", @@ -1660,7 +1708,7 @@ }, "items": { "type": "array", - "description": "The disk image resources.", + "description": "A list of Image resources.", "items": { "$ref": "Image" } @@ -1683,15 +1731,19 @@ "Instance": { "id": "Instance", "type": "object", - "description": "An instance resource.", + "description": "An Instance resource.", "properties": { "canIpForward": { "type": "boolean", - "description": "Allows this instance to send packets with source IP addresses other than its own and receive packets with destination IP addresses other than its own. If this instance will be used as an IP gateway or it will be set as the next-hop in a Route resource, say true. If unsure, leave this set to false." + "description": "Allows this instance to send and receive packets with non-matching destination or source IPs. This is required if you plan to use this instance to forward routes. For more information, see Enabling IP Forwarding." + }, + "cpuPlatform": { + "type": "string", + "description": "[Output Only] The CPU platform used by this instance." }, "creationTimestamp": { "type": "string", - "description": "Creation timestamp in RFC3339 text format (output only)." + "description": "[Output Only] Creation timestamp in RFC3339 text format." }, "description": { "type": "string", @@ -1706,17 +1758,17 @@ }, "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only).", + "description": "[Output Only] Unique identifier for the resource; defined by the server.", "format": "uint64" }, "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Only] Type of the resource. Always compute#instance for instances.", "default": "compute#instance" }, "machineType": { "type": "string", - "description": "URL of the machine type resource describing which machine type to use to host the instance; provided by the client when the instance is created.", + "description": "Full or partial URL of the machine type resource to use for this instance. This is provided by the client when the instance is created. For example, the following is a valid partial url:\n\nzones/zone/machineTypes/machine-type", "annotations": { "required": [ "compute.instances.insert" @@ -1725,21 +1777,15 @@ }, "metadata": { "$ref": "Metadata", - "description": "Metadata key/value pairs assigned to this instance. Consists of custom metadata or predefined keys; see Instance documentation for more information." + "description": "The metadata key/value pairs assigned to this instance. This includes custom metadata and predefined keys." }, "name": { "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035.", - "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", - "annotations": { - "required": [ - "compute.instances.insert" - ] - } + "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash." }, "networkInterfaces": { "type": "array", - "description": "Array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.", + "description": "An array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet.", "items": { "$ref": "NetworkInterface" } @@ -1750,24 +1796,26 @@ }, "selfLink": { "type": "string", - "description": "Server defined URL for this resource (output only)." + "description": "[Output Only] Server defined URL for this resource." }, "serviceAccounts": { "type": "array", - "description": "A list of service accounts each with specified scopes, for which access tokens are to be made available to the instance through metadata queries.", + "description": "A list of service accounts, with their specified scopes, authorized for this instance. Service accounts generate access tokens that can be accessed through the metadata server and used to authenticate applications on the instance. See Authenticating from Google Compute Engine for more information.", "items": { "$ref": "ServiceAccount" } }, "status": { "type": "string", - "description": "Instance status. One of the following values: \"PROVISIONING\", \"STAGING\", \"RUNNING\", \"STOPPING\", \"STOPPED\", \"TERMINATED\" (output only).", + "description": "[Output Only] The status of the instance. One of the following values: PROVISIONING, STAGING, RUNNING, STOPPING, and TERMINATED.", "enum": [ "PROVISIONING", "RUNNING", "STAGING", "STOPPED", "STOPPING", + "SUSPENDED", + "SUSPENDING", "TERMINATED" ], "enumDescriptions": [ @@ -1776,20 +1824,22 @@ "", "", "", + "", + "", "" ] }, "statusMessage": { "type": "string", - "description": "An optional, human-readable explanation of the status (output only)." + "description": "[Output Only] An optional, human-readable explanation of the status." }, "tags": { "$ref": "Tags", - "description": "A list of tags to be applied to this instance. Used to identify valid sources or targets for network firewalls. Provided by the client on instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035." + "description": "A list of tags to appy to this instance. Tags are used to identify valid sources or targets for network firewalls and are specified by the client during instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035." }, "zone": { "type": "string", - "description": "URL of the zone where the instance resides (output only)." + "description": "[Output Only] URL of the zone where the instance resides." } } }, @@ -1799,11 +1849,11 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "A map of scoped instance lists.", + "description": "[Output Only] A map of scoped instance lists.", "additionalProperties": { "$ref": "InstancesScopedList", "description": "Name of the scope containing this set of instances." @@ -1811,16 +1861,16 @@ }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#instanceAggregatedList for aggregated lists of Instance resources.", "default": "compute#instanceAggregatedList" }, "nextPageToken": { "type": "string", - "description": "A token used to continue a truncated list request (output only)." + "description": "[Output Only] A token used to continue a truncated list request." }, "selfLink": { "type": "string", - "description": "Server defined URL for this resource (output only)." + "description": "[Output Only] Server defined URL for this resource." } } }, @@ -1831,27 +1881,41 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "A list of instance resources.", + "description": "[Output Only] A list of Instance resources.", "items": { "$ref": "Instance" } }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#instanceList for lists of Instance resources.", "default": "compute#instanceList" }, "nextPageToken": { "type": "string", - "description": "A token used to continue a truncated list request (output only)." + "description": "[Output Only] A token used to continue a truncated list request." }, "selfLink": { "type": "string", - "description": "Server defined URL for this resource (output only)." + "description": "[Output Only] Server defined URL for this resource." + } + } + }, + "InstanceMoveRequest": { + "id": "InstanceMoveRequest", + "type": "object", + "properties": { + "destinationZone": { + "type": "string", + "description": "The URL of the destination zone to move the instance to. This can be a full or partial URL. For example, the following are all valid URLs to a zone: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone \n- projects/project/zones/zone \n- zones/zone" + }, + "targetInstance": { + "type": "string", + "description": "The URL of the target instance to move. This can be a full or partial URL. For example, the following are all valid URLs to an instance: \n- https://www.googleapis.com/compute/v1/projects/project/zones/zone/instances/instance \n- projects/project/zones/zone/instances/instance \n- zones/zone/instances/instance" } } }, @@ -1862,22 +1926,22 @@ "properties": { "canIpForward": { "type": "boolean", - "description": "Allows instances created based on this template to send packets with source IP addresses other than their own and receive packets with destination IP addresses other than their own. If these instances will be used as an IP gateway or it will be set as the next-hop in a Route resource, say true. If unsure, leave this set to false." + "description": "A boolean that specifies if instances created from this template can send packets with source IP addresses other than their own or receive packets with destination IP addresses other than their own. If you use these instances as an IP gateway or as the next-hop in a Route resource, specify true. Otherwise, specify false." }, "description": { "type": "string", - "description": "An optional textual description for the instances created based on the instance template resource; provided by the client when the template is created." + "description": "An optional text description for the instances that are created from this instance template." }, "disks": { "type": "array", - "description": "Array of disks associated with instance created based on this template.", + "description": "An array of disks that are associated with the instances that are created from this template.", "items": { "$ref": "AttachedDisk" } }, "machineType": { "type": "string", - "description": "Name of the machine type resource describing which machine type to use to host the instances created based on this template; provided by the client when the instance template is created.", + "description": "The machine type to use for instances that are created from this template.", "annotations": { "required": [ "compute.instanceTemplates.insert" @@ -1886,29 +1950,29 @@ }, "metadata": { "$ref": "Metadata", - "description": "Metadata key/value pairs assigned to instances created based on this template. Consists of custom metadata or predefined keys; see Instance documentation for more information." + "description": "The metadata key/value pairs to assign to instances that are created from this template. These pairs can consist of custom metadata or predefined keys. See Project and instance metadata for more information." }, "networkInterfaces": { "type": "array", - "description": "Array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instances created based based on this template will have no external internet access.", + "description": "An array of network access configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only supported access configuration. If you do not specify any access configurations, the instances that are created from this template will have no external internet access.", "items": { "$ref": "NetworkInterface" } }, "scheduling": { "$ref": "Scheduling", - "description": "Scheduling options for the instances created based on this template." + "description": "A list of scheduling options for the instances that are created from this template." }, "serviceAccounts": { "type": "array", - "description": "A list of service accounts each with specified scopes, for which access tokens are to be made available to the instances created based on this template, through metadata queries.", + "description": "A list of service accounts with specified scopes. Access tokens for these service accounts are available to the instances that are created from this template. Use metadata queries to obtain the access tokens for these instances.", "items": { "$ref": "ServiceAccount" } }, "tags": { "$ref": "Tags", - "description": "A list of tags to be applied to the instances created based on this template used to identify valid sources or targets for network firewalls. Provided by the client on instance creation. The tags can be later modified by the setTags method. Each tag within the list must comply with RFC1035." + "description": "A list of tags to apply to the instances that are created from this template. The tags identify valid sources or targets for network firewalls. The setTags method can modify this list of tags. Each tag within the list must comply with RFC1035." } } }, @@ -1928,25 +1992,25 @@ "properties": { "creationTimestamp": { "type": "string", - "description": "Creation timestamp in RFC3339 text format (output only)." + "description": "[Output Only] The creation timestamp for this instance template in RFC3339 text format." }, "description": { "type": "string", - "description": "An optional textual description of the instance template resource; provided by the client when the resource is created." + "description": "An optional text description for the instance template." }, "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only).", + "description": "[Output Only] A unique identifier for this instance template. The server defines this identifier.", "format": "uint64" }, "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Only] The resource type, which is always compute#instanceTemplate for instance templates.", "default": "compute#instanceTemplate" }, "name": { "type": "string", - "description": "Name of the instance template resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035", + "description": "The name of the instance template. The name must be 1-63 characters long, and comply with RFC1035.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "annotations": { "required": [ @@ -1956,42 +2020,42 @@ }, "properties": { "$ref": "InstanceProperties", - "description": "The instance properties portion of this instance template resource." + "description": "The instance properties for the instance template resource." }, "selfLink": { "type": "string", - "description": "Server defined URL for the resource (output only)." + "description": "[Output Only] The URL for this instance template. The server defines this URL." } } }, "InstanceTemplateList": { "id": "InstanceTemplateList", "type": "object", - "description": "Contains a list of instance template resources.", + "description": "A list of instance templates.", "properties": { "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." + "description": "[Output Only] A unique identifier for this instance template. The server defines this identifier." }, "items": { "type": "array", - "description": "A list of instance template resources.", + "description": "A list of InstanceTemplate resources.", "items": { "$ref": "InstanceTemplate" } }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] The resource type, which is always compute#instanceTemplatesListResponse for instance template lists.", "default": "compute#instanceTemplateList" }, "nextPageToken": { "type": "string", - "description": "A token used to continue a truncated list request (output only)." + "description": "[Output Only] A token that is used to continue a truncated list request." }, "selfLink": { "type": "string", - "description": "Server defined URL for this resource (output only)." + "description": "[Output Only] The URL for this instance template list. The server defines this URL." } } }, @@ -2001,18 +2065,18 @@ "properties": { "instances": { "type": "array", - "description": "List of instances contained in this scope.", + "description": "[Output Only] List of instances contained in this scope.", "items": { "$ref": "Instance" } }, "warning": { "type": "object", - "description": "Informational warning which replaces the list of instances when the list is empty.", + "description": "[Output Only] Informational warning which replaces the list of instances when the list is empty.", "properties": { "code": { "type": "string", - "description": "The warning type identifier for this warning.", + "description": "[Output Only] The warning type identifier for this warning.", "enum": [ "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", @@ -2022,9 +2086,11 @@ "NEXT_HOP_INSTANCE_NOT_FOUND", "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" ], "enumDescriptions": [ @@ -2039,29 +2105,31 @@ "", "", "", + "", + "", "" ] }, "data": { "type": "array", - "description": "Metadata for this warning in 'key: value' format.", + "description": "[Output Only] Metadata for this warning in key: value format.", "items": { "type": "object", "properties": { "key": { "type": "string", - "description": "A key for the warning data." + "description": "[Output Only] A key for the warning data." }, "value": { "type": "string", - "description": "A warning data value corresponding to the key." + "description": "[Output Only] A warning data value corresponding to the key." } } } }, "message": { "type": "string", - "description": "Optional human-readable details for this warning." + "description": "[Output Only] Optional human-readable details for this warning." } } } @@ -2078,12 +2146,12 @@ }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#license for licenses.", "default": "compute#license" }, "name": { "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035.", + "description": "Name of the resource. The name must be 1-63 characters long, and comply with RCF1035.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "annotations": { "required": [ @@ -2093,40 +2161,40 @@ }, "selfLink": { "type": "string", - "description": "Server defined URL for the resource (output only)." + "description": "[Output Only] Server defined URL for the resource." } } }, "MachineType": { "id": "MachineType", "type": "object", - "description": "A machine type resource.", + "description": "A Machine Type resource.", "properties": { "creationTimestamp": { "type": "string", - "description": "Creation timestamp in RFC3339 text format (output only)." + "description": "[Output Only] Creation timestamp in RFC3339 text format." }, "deprecated": { "$ref": "DeprecationStatus", - "description": "The deprecation status associated with this machine type." + "description": "[Output Only] The deprecation status associated with this machine type." }, "description": { "type": "string", - "description": "An optional textual description of the resource." + "description": "[Output Only] An optional textual description of the resource." }, "guestCpus": { "type": "integer", - "description": "Count of CPUs exposed to the instance.", + "description": "[Output Only] The tumber of CPUs exposed to the instance.", "format": "int32" }, "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only).", + "description": "[Output Only] Unique identifier for the resource; defined by the server.", "format": "uint64" }, "imageSpaceGb": { "type": "integer", - "description": "Space allotted for the image, defined in GB.", + "description": "[Deprecated] This property is deprecated and will never be populated with any relevant values.", "format": "int32" }, "kind": { @@ -2136,27 +2204,27 @@ }, "maximumPersistentDisks": { "type": "integer", - "description": "Maximum persistent disks allowed.", + "description": "[Output Only] Maximum persistent disks allowed.", "format": "int32" }, "maximumPersistentDisksSizeGb": { "type": "string", - "description": "Maximum total persistent disks size (GB) allowed.", + "description": "[Output Only] Maximum total persistent disks size (GB) allowed.", "format": "int64" }, "memoryMb": { "type": "integer", - "description": "Physical memory assigned to the instance, defined in MB.", + "description": "[Output Only] The amount of physical memory available to the instance, defined in MB.", "format": "int32" }, "name": { "type": "string", - "description": "Name of the resource.", + "description": "[Output Only] Name of the resource.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?" }, "scratchDisks": { "type": "array", - "description": "List of extended scratch disks assigned to the instance.", + "description": "[Output Only] List of extended scratch disks assigned to the instance.", "items": { "type": "object", "properties": { @@ -2170,11 +2238,11 @@ }, "selfLink": { "type": "string", - "description": "Server defined URL for the resource (output only)." + "description": "[Output Only] Server defined URL for the resource." }, "zone": { "type": "string", - "description": "Url of the zone where the machine type resides (output only)." + "description": "[Output Only] The name of the zone where the machine type resides, such as us-central1-a." } } }, @@ -2184,59 +2252,59 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "A map of scoped machine type lists.", + "description": "[Output Only] A map of scoped machine type lists.", "additionalProperties": { "$ref": "MachineTypesScopedList", - "description": "Name of the scope containing this set of machine types." + "description": "[Output Only] Name of the scope containing this set of machine types." } }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#machineTypeAggregatedList for aggregated lists of machine types.", "default": "compute#machineTypeAggregatedList" }, "nextPageToken": { "type": "string", - "description": "A token used to continue a truncated list request (output only)." + "description": "[Output Only] A token used to continue a truncated list request." }, "selfLink": { "type": "string", - "description": "Server defined URL for this resource (output only)." + "description": "[Output Only] Server defined URL for this resource." } } }, "MachineTypeList": { "id": "MachineTypeList", "type": "object", - "description": "Contains a list of machine type resources.", + "description": "Contains a list of Machine Type resources.", "properties": { "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "The machine type resources.", + "description": "[Output Only] A list of Machine Type resources.", "items": { "$ref": "MachineType" } }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#machineTypeList for lists of machine types.", "default": "compute#machineTypeList" }, "nextPageToken": { "type": "string", - "description": "A token used to continue a truncated list request (output only)." + "description": "[Output Only] A token used to continue a truncated list request." }, "selfLink": { "type": "string", - "description": "Server defined URL for this resource (output only)." + "description": "[Output Only] Server defined URL for this resource." } } }, @@ -2246,18 +2314,18 @@ "properties": { "machineTypes": { "type": "array", - "description": "List of machine types contained in this scope.", + "description": "[Output Only] List of machine types contained in this scope.", "items": { "$ref": "MachineType" } }, "warning": { "type": "object", - "description": "Informational warning which replaces the list of machine types when the list is empty.", + "description": "[Output Only] An informational warning that appears when the machine types list is empty.", "properties": { "code": { "type": "string", - "description": "The warning type identifier for this warning.", + "description": "[Output Only] The warning type identifier for this warning.", "enum": [ "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", @@ -2267,9 +2335,11 @@ "NEXT_HOP_INSTANCE_NOT_FOUND", "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" ], "enumDescriptions": [ @@ -2284,29 +2354,31 @@ "", "", "", + "", + "", "" ] }, "data": { "type": "array", - "description": "Metadata for this warning in 'key: value' format.", + "description": "[Output Only] Metadata for this warning in key: value format.", "items": { "type": "object", "properties": { "key": { "type": "string", - "description": "A key for the warning data." + "description": "[Output Only] A key for the warning data." }, "value": { "type": "string", - "description": "A warning data value corresponding to the key." + "description": "[Output Only] A warning data value corresponding to the key." } } } }, "message": { "type": "string", - "description": "Optional human-readable details for this warning." + "description": "[Output Only] Optional human-readable details for this warning." } } } @@ -2319,7 +2391,7 @@ "properties": { "fingerprint": { "type": "string", - "description": "Fingerprint of this resource. A hash of the metadata's contents. This field is used for optimistic locking. An up-to-date metadata fingerprint must be provided in order to modify metadata.", + "description": "Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.", "format": "byte" }, "items": { @@ -2354,7 +2426,7 @@ }, "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Only] Type of the resource. Always compute#metadata for metadata.", "default": "compute#metadata" } } @@ -2366,7 +2438,7 @@ "properties": { "IPv4Range": { "type": "string", - "description": "Required; The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.", + "description": "The range of internal addresses that are legal on this network. This range is a CIDR specification, for example: 192.168.0.0/16. Provided by the client when the network is created.", "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}/[0-9]{1,2}", "annotations": { "required": [ @@ -2376,7 +2448,7 @@ }, "creationTimestamp": { "type": "string", - "description": "Creation timestamp in RFC3339 text format (output only)." + "description": "[Output Only] Creation timestamp in RFC3339 text format." }, "description": { "type": "string", @@ -2384,22 +2456,22 @@ }, "gatewayIPv4": { "type": "string", - "description": "An optional address that is used for default routing to other networks. This must be within the range specified by IPv4Range, and is typically the first usable address in that range. If not specified, the default value is the first usable address in IPv4Range.", + "description": "A gateway address for default routing to other networks. This value is read only and is selected by the Google Compute Engine, typically as the first usable address in the IPv4Range.", "pattern": "[0-9]{1,3}(?:\\.[0-9]{1,3}){3}" }, "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only).", + "description": "[Output Only] Unique identifier for the resource; defined by the server.", "format": "uint64" }, "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Only] Type of the resource. Always compute#network for networks.", "default": "compute#network" }, "name": { "type": "string", - "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035.", + "description": "Name of the resource; provided by the client when the resource is created. The name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.", "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "annotations": { "required": [ @@ -2409,7 +2481,7 @@ }, "selfLink": { "type": "string", - "description": "Server defined URL for the resource (output only)." + "description": "[Output Only] Server defined URL for the resource." } } }, @@ -2420,18 +2492,18 @@ "properties": { "accessConfigs": { "type": "array", - "description": "Array of configurations for this interface. This specifies how this interface is configured to interact with other network services, such as connecting to the internet. Currently, ONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.", + "description": "An array of configurations for this interface. Currently, \u003ccodeONE_TO_ONE_NAT is the only access config supported. If there are no accessConfigs specified, then this instance will have no external internet access.", "items": { "$ref": "AccessConfig" } }, "name": { "type": "string", - "description": "Name of the network interface, determined by the server; for network devices, these are e.g. eth0, eth1, etc. (output only)." + "description": "[Output Only] The name of the network interface, generated by the server. For network devices, these are eth0, eth1, etc." }, "network": { "type": "string", - "description": "URL of the network resource attached to this interface.", + "description": "URL of the network resource for this instance. This is required for creating an instance but optional when creating a firewall rule. If not specified when creating a firewall rule, the default network is used:\n\nglobal/networks/default \n\nIf you specify this property, you can specify the network as a full or partial URL. For example, the following are all valid URLs: \n- https://www.googleapis.com/compute/v1/projects/project/global/networks/network \n- projects/project/global/networks/network \n- global/networks/default", "annotations": { "required": [ "compute.instances.insert" @@ -2440,38 +2512,38 @@ }, "networkIP": { "type": "string", - "description": "An optional IPV4 internal network address assigned to the instance for this network interface (output only)." + "description": "[Output Only] An optional IPV4 internal network address assigned to the instance for this network interface." } } }, "NetworkList": { "id": "NetworkList", "type": "object", - "description": "Contains a list of network resources.", + "description": "Contains a list of Network resources.", "properties": { "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "The network resources.", + "description": "[Output Only] A list of Network resources.", "items": { "$ref": "Network" } }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#networkList for lists of networks.", "default": "compute#networkList" }, "nextPageToken": { "type": "string", - "description": "A token used to continue a truncated list request (output only)." + "description": "[Output Only] A token used to continue a truncated list request." }, "selfLink": { "type": "string", - "description": "Server defined URL for this resource (output only)." + "description": "[Output Only] Server defined URL for this resource ." } } }, @@ -2482,37 +2554,37 @@ "properties": { "clientOperationId": { "type": "string", - "description": "An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project (output only)." + "description": "[Output Only] An optional identifier specified by the client when the mutation was initiated. Must be unique for all operation resources in the project." }, "creationTimestamp": { "type": "string", - "description": "Creation timestamp in RFC3339 text format (output only)." + "description": "[Output Only] Creation timestamp in RFC3339 text format." }, "endTime": { "type": "string", - "description": "The time that this operation was completed. This is in RFC 3339 format (output only)." + "description": "[Output Only] The time that this operation was completed. This is in RFC3339 text format." }, "error": { "type": "object", - "description": "If errors occurred during processing of this operation, this field will be populated (output only).", + "description": "[Output Only] If errors are generated during processing of the operation, this field will be populated.", "properties": { "errors": { "type": "array", - "description": "The array of errors encountered while processing this operation.", + "description": "[Output Only] The array of errors encountered while processing this operation.", "items": { "type": "object", "properties": { "code": { "type": "string", - "description": "The error type identifier for this error." + "description": "[Output Only] The error type identifier for this error." }, "location": { "type": "string", - "description": "Indicates the field in the request which caused the error. This property is optional." + "description": "[Output Only] Indicates the field in the request which caused the error. This property is optional." }, "message": { "type": "string", - "description": "An optional, human-readable error message." + "description": "[Output Only] An optional, human-readable error message." } } } @@ -2521,55 +2593,55 @@ }, "httpErrorMessage": { "type": "string", - "description": "If operation fails, the HTTP error message returned, e.g. NOT FOUND. (output only)." + "description": "[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as NOT FOUND." }, "httpErrorStatusCode": { "type": "integer", - "description": "If operation fails, the HTTP error status code returned, e.g. 404. (output only).", + "description": "[Output Only] If the operation fails, this field contains the HTTP error message that was returned, such as 404.", "format": "int32" }, "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only).", + "description": "[Output Only] Unique identifier for the resource; defined by the server.", "format": "uint64" }, "insertTime": { "type": "string", - "description": "The time that this operation was requested. This is in RFC 3339 format (output only)." + "description": "[Output Only] The time that this operation was requested. This is in RFC3339 text format." }, "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Only] Type of the resource. Always compute#Operation for Operation resources.", "default": "compute#operation" }, "name": { "type": "string", - "description": "Name of the resource (output only)." + "description": "[Output Only] Name of the resource." }, "operationType": { "type": "string", - "description": "Type of the operation. Examples include \"insert\", \"update\", and \"delete\" (output only)." + "description": "[Output Only] Type of the operation, such as insert, update, and delete." }, "progress": { "type": "integer", - "description": "An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should be monotonically increasing as the operation progresses (output only).", + "description": "[Output Only] An optional progress indicator that ranges from 0 to 100. There is no requirement that this be linear or support any granularity of operations. This should not be used to guess at when the operation will be complete. This number should monotonically increase as the operation progresses.", "format": "int32" }, "region": { "type": "string", - "description": "URL of the region where the operation resides (output only)." + "description": "[Output Only] URL of the region where the operation resides. Only applicable for regional resources." }, "selfLink": { "type": "string", - "description": "Server defined URL for the resource (output only)." + "description": "[Output Only] Server defined URL for the resource." }, "startTime": { "type": "string", - "description": "The time that this operation was started by the server. This is in RFC 3339 format (output only)." + "description": "[Output Only] The time that this operation was started by the server. This is in RFC3339 text format." }, "status": { "type": "string", - "description": "Status of the operation. Can be one of the following: \"PENDING\", \"RUNNING\", or \"DONE\" (output only).", + "description": "[Output Only] Status of the operation. Can be one of the following: PENDING, RUNNING, or DONE.", "enum": [ "DONE", "PENDING", @@ -2583,30 +2655,30 @@ }, "statusMessage": { "type": "string", - "description": "An optional textual description of the current status of the operation (output only)." + "description": "[Output Only] An optional textual description of the current status of the operation." }, "targetId": { "type": "string", - "description": "Unique target id which identifies a particular incarnation of the target (output only).", + "description": "[Output Only] Unique target ID which identifies a particular incarnation of the target.", "format": "uint64" }, "targetLink": { "type": "string", - "description": "URL of the resource the operation is mutating (output only)." + "description": "[Output Only] URL of the resource the operation is mutating." }, "user": { "type": "string", - "description": "User who requested the operation, for example \"user@example.com\" (output only)." + "description": "[Output Only] User who requested the operation, for example: user@example.com." }, "warnings": { "type": "array", - "description": "If warning messages generated during processing of this operation, this field will be populated (output only).", + "description": "[Output Only] If warning messages are generated during processing of the operation, this field will be populated.", "items": { "type": "object", "properties": { "code": { "type": "string", - "description": "The warning type identifier for this warning.", + "description": "[Output Only] The warning type identifier for this warning.", "enum": [ "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", @@ -2616,9 +2688,11 @@ "NEXT_HOP_INSTANCE_NOT_FOUND", "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" ], "enumDescriptions": [ @@ -2633,36 +2707,38 @@ "", "", "", + "", + "", "" ] }, "data": { "type": "array", - "description": "Metadata for this warning in 'key: value' format.", + "description": "[Output Only] Metadata for this warning in key: value format.", "items": { "type": "object", "properties": { "key": { "type": "string", - "description": "A key for the warning data." + "description": "[Output Only] A key for the warning data." }, "value": { "type": "string", - "description": "A warning data value corresponding to the key." + "description": "[Output Only] A warning data value corresponding to the key." } } } }, "message": { "type": "string", - "description": "Optional human-readable details for this warning." + "description": "[Output Only] Optional human-readable details for this warning." } } } }, "zone": { "type": "string", - "description": "URL of the zone where the operation resides (output only)." + "description": "[Output Only] URL of the zone where the operation resides." } } }, @@ -2672,28 +2748,28 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "object", - "description": "A map of scoped operation lists.", + "description": "[Output Only] A map of scoped operation lists.", "additionalProperties": { "$ref": "OperationsScopedList", - "description": "Name of the scope containing this set of operations." + "description": "[Output Only] Name of the scope containing this set of operations." } }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#operationAggregatedList for aggregated lists of operations.", "default": "compute#operationAggregatedList" }, "nextPageToken": { "type": "string", - "description": "A token used to continue a truncated list request (output only)." + "description": "[Output Only] A token used to continue a truncated list request." }, "selfLink": { "type": "string", - "description": "Server defined URL for this resource (output only)." + "description": "[Output Only] Server defined URL for this resource." } } }, @@ -2704,27 +2780,27 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "The operation resources.", + "description": "[Output Only] The operation resources.", "items": { "$ref": "Operation" } }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#operations for Operations resource.", "default": "compute#operationList" }, "nextPageToken": { "type": "string", - "description": "A token used to continue a truncated list request (output only)." + "description": "[Output Only] A token used to continue a truncate." }, "selfLink": { "type": "string", - "description": "Server defined URL for this resource (output only)." + "description": "[Output Only] Server defined URL for this resource." } } }, @@ -2734,18 +2810,18 @@ "properties": { "operations": { "type": "array", - "description": "List of operations contained in this scope.", + "description": "[Output Only] List of operations contained in this scope.", "items": { "$ref": "Operation" } }, "warning": { "type": "object", - "description": "Informational warning which replaces the list of operations when the list is empty.", + "description": "[Output Only] Informational warning which replaces the list of operations when the list is empty.", "properties": { "code": { "type": "string", - "description": "The warning type identifier for this warning.", + "description": "[Output Only] The warning type identifier for this warning.", "enum": [ "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", @@ -2755,9 +2831,11 @@ "NEXT_HOP_INSTANCE_NOT_FOUND", "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" ], "enumDescriptions": [ @@ -2772,29 +2850,31 @@ "", "", "", + "", + "", "" ] }, "data": { "type": "array", - "description": "Metadata for this warning in 'key: value' format.", + "description": "[Output Only] Metadata for this warning in key: value format.", "items": { "type": "object", "properties": { "key": { "type": "string", - "description": "A key for the warning data." + "description": "[Output Only] A key for the warning data." }, "value": { "type": "string", - "description": "A warning data value corresponding to the key." + "description": "[Output Only] A warning data value corresponding to the key." } } } }, "message": { "type": "string", - "description": "Optional human-readable details for this warning." + "description": "[Output Only] Optional human-readable details for this warning." } } } @@ -2846,15 +2926,15 @@ "Project": { "id": "Project", "type": "object", - "description": "A project resource. Projects can be created only in the APIs Console. Unless marked otherwise, values can only be modified in the console.", + "description": "A Project resource. Projects can only be created in the Google Developers Console. Unless marked otherwise, values can only be modified in the console.", "properties": { "commonInstanceMetadata": { "$ref": "Metadata", - "description": "Metadata key/value pairs available to all instances contained in this project." + "description": "Metadata key/value pairs available to all instances contained in this project. See Custom metadata for more information." }, "creationTimestamp": { "type": "string", - "description": "Creation timestamp in RFC3339 text format (output only)." + "description": "[Output Only] Creation timestamp in RFC3339 text format." }, "description": { "type": "string", @@ -2862,12 +2942,12 @@ }, "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only).", + "description": "[Output Only] Unique identifier for the resource; defined by the server.", "format": "uint64" }, "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Only] Type of the resource. Always compute#project for projects.", "default": "compute#project" }, "name": { @@ -2876,14 +2956,14 @@ }, "quotas": { "type": "array", - "description": "Quotas assigned to this project.", + "description": "[Output Only] Quotas assigned to this project.", "items": { "$ref": "Quota" } }, "selfLink": { "type": "string", - "description": "Server defined URL for the resource (output only)." + "description": "[Output Only] Server defined URL for the resource." }, "usageExportLocation": { "$ref": "UsageExportLocation", @@ -2898,30 +2978,25 @@ "properties": { "limit": { "type": "number", - "description": "Quota limit for this metric.", + "description": "[Output Only] Quota limit for this metric.", "format": "double" }, "metric": { "type": "string", - "description": "Name of the quota metric.", + "description": "[Output Only] Name of the quota metric.", "enum": [ "BACKEND_SERVICES", "CPUS", - "DISKS", "DISKS_TOTAL_GB", - "EPHEMERAL_ADDRESSES", "FIREWALLS", "FORWARDING_RULES", "HEALTH_CHECKS", "IMAGES", - "IMAGES_TOTAL_GB", "INSTANCES", + "INSTANCE_TEMPLATES", "IN_USE_ADDRESSES", - "KERNELS", - "KERNELS_TOTAL_GB", "LOCAL_SSD_TOTAL_GB", "NETWORKS", - "OPERATIONS", "ROUTES", "SNAPSHOTS", "SSD_TOTAL_GB", @@ -2929,7 +3004,9 @@ "TARGET_HTTP_PROXIES", "TARGET_INSTANCES", "TARGET_POOLS", - "URL_MAPS" + "TARGET_VPN_GATEWAYS", + "URL_MAPS", + "VPN_TUNNELS" ], "enumDescriptions": [ "", @@ -2953,15 +3030,12 @@ "", "", "", - "", - "", - "", "" ] }, "usage": { "type": "number", - "description": "Current usage of this metric.", + "description": "[Output Only] Current usage of this metric.", "format": "double" } } @@ -2973,44 +3047,44 @@ "properties": { "creationTimestamp": { "type": "string", - "description": "Creation timestamp in RFC3339 text format (output only)." + "description": "[Output Only] Creation timestamp in RFC3339 text format." }, "deprecated": { "$ref": "DeprecationStatus", - "description": "The deprecation status associated with this region." + "description": "[Output Only] The deprecation status associated with this region." }, "description": { "type": "string", - "description": "Textual description of the resource." + "description": "[Output Only] Textual description of the resource." }, "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only).", + "description": "[Output Only] Unique identifier for the resource; defined by the server .", "format": "uint64" }, "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Only] Type of the resource. Always compute#region for regions.", "default": "compute#region" }, "name": { "type": "string", - "description": "Name of the resource." + "description": "[Output Only] Name of the resource." }, "quotas": { "type": "array", - "description": "Quotas assigned to this region.", + "description": "[Output Only] Quotas assigned to this region.", "items": { "$ref": "Quota" } }, "selfLink": { "type": "string", - "description": "Server defined URL for the resource (output only)." + "description": "[Output Only] Server defined URL for the resource." }, "status": { "type": "string", - "description": "Status of the region, \"UP\" or \"DOWN\".", + "description": "[Output Only] Status of the region, either UP or DOWN.", "enum": [ "DOWN", "UP" @@ -3022,7 +3096,7 @@ }, "zones": { "type": "array", - "description": "A list of zones homed in this region, in the form of resource URLs.", + "description": "[Output Only] A list of zones available in this region, in the form of resource URLs.", "items": { "type": "string" } @@ -3036,27 +3110,27 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "The region resources.", + "description": "[Output Only] A list of Region resources.", "items": { "$ref": "Region" } }, "kind": { "type": "string", - "description": "Type of resource.", + "description": "[Output Only] Type of resource. Always compute#regionList for lists of regions.", "default": "compute#regionList" }, "nextPageToken": { "type": "string", - "description": "A token used to continue a truncated list request (output only)." + "description": "[Output Only] A token used to continue a truncated list request." }, "selfLink": { "type": "string", - "description": "Server defined URL for this resource (output only)." + "description": "[Output Only] Server defined URL for this resource." } } }, @@ -3137,9 +3211,13 @@ "type": "string", "description": "The URL of the local network if it should handle matching packets." }, + "nextHopVpnTunnel": { + "type": "string", + "description": "The URL to a VpnTunnel that should handle matching packets." + }, "priority": { "type": "integer", - "description": "Breaks ties between Routes of equal specificity. Routes with smaller values win when tied with routes with larger values.", + "description": "Breaks ties between Routes of equal specificity. Routes with smaller values win when tied with routes with larger values. Default value is 1000. A valid range is between 0 and 65535.", "format": "uint32", "annotations": { "required": [ @@ -3171,7 +3249,7 @@ "properties": { "code": { "type": "string", - "description": "The warning type identifier for this warning.", + "description": "[Output Only] The warning type identifier for this warning.", "enum": [ "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", @@ -3181,9 +3259,11 @@ "NEXT_HOP_INSTANCE_NOT_FOUND", "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" ], "enumDescriptions": [ @@ -3198,29 +3278,31 @@ "", "", "", + "", + "", "" ] }, "data": { "type": "array", - "description": "Metadata for this warning in 'key: value' format.", + "description": "[Output Only] Metadata for this warning in key: value format.", "items": { "type": "object", "properties": { "key": { "type": "string", - "description": "A key for the warning data." + "description": "[Output Only] A key for the warning data." }, "value": { "type": "string", - "description": "A warning data value corresponding to the key." + "description": "[Output Only] A warning data value corresponding to the key." } } } }, "message": { "type": "string", - "description": "Optional human-readable details for this warning." + "description": "[Output Only] Optional human-readable details for this warning." } } } @@ -3238,7 +3320,7 @@ }, "items": { "type": "array", - "description": "The route resources.", + "description": "A list of Route resources.", "items": { "$ref": "Route" } @@ -3261,15 +3343,15 @@ "Scheduling": { "id": "Scheduling", "type": "object", - "description": "Scheduling options for an Instance.", + "description": "Sets the scheduling options for an Instance.", "properties": { "automaticRestart": { "type": "boolean", - "description": "Whether the Instance should be automatically restarted whenever it is terminated by Compute Engine (not terminated by user)." + "description": "Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user)." }, "onHostMaintenance": { "type": "string", - "description": "How the instance should behave when the host machine undergoes maintenance that may temporarily impact instance performance.", + "description": "Defines the maintenance behavior for this instance. The default behavior is MIGRATE. For more information, see Setting maintenance behavior.", "enum": [ "MIGRATE", "TERMINATE" @@ -3278,26 +3360,30 @@ "", "" ] + }, + "preemptible": { + "type": "boolean", + "description": "Whether the Instance is preemptible." } } }, "SerialPortOutput": { "id": "SerialPortOutput", "type": "object", - "description": "An instance serial console output.", + "description": "An instance's serial console output.", "properties": { "contents": { "type": "string", - "description": "The contents of the console output." + "description": "[Output Only] The contents of the console output." }, "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Only] Type of the resource. Always compute#serialPortOutput for serial port output.", "default": "compute#serialPortOutput" }, "selfLink": { "type": "string", - "description": "Server defined URL for the resource (output only)." + "description": "[Output Only] Server defined URL for the resource." } } }, @@ -3419,7 +3505,7 @@ }, "items": { "type": "array", - "description": "The persistent snapshot resources.", + "description": "A list of Snapshot resources.", "items": { "$ref": "Snapshot" } @@ -3446,7 +3532,7 @@ "properties": { "fingerprint": { "type": "string", - "description": "Fingerprint of this resource. A hash of the tags stored in this object. This field is used optimistic locking. An up-to-date tags fingerprint must be provided in order to modify tags.", + "description": "Specifies a fingerprint for this request, which is essentially a hash of the metadata's contents and used for optimistic locking. The fingerprint is initially generated by Compute Engine and changes after every request to modify or update metadata. You must always provide an up-to-date fingerprint hash in order to update or change metadata.\n\nTo see the latest fingerprint, make get() request to the instance.", "format": "byte" }, "items": { @@ -3507,7 +3593,7 @@ }, "items": { "type": "array", - "description": "The TargetHttpProxy resources.", + "description": "A list of TargetHttpProxy resources.", "items": { "$ref": "TargetHttpProxy" } @@ -3621,7 +3707,7 @@ }, "items": { "type": "array", - "description": "The TargetInstance resources.", + "description": "A list of TargetInstance resources.", "items": { "$ref": "TargetInstance" } @@ -3658,7 +3744,7 @@ "properties": { "code": { "type": "string", - "description": "The warning type identifier for this warning.", + "description": "[Output Only] The warning type identifier for this warning.", "enum": [ "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", @@ -3668,9 +3754,11 @@ "NEXT_HOP_INSTANCE_NOT_FOUND", "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" ], "enumDescriptions": [ @@ -3685,29 +3773,31 @@ "", "", "", + "", + "", "" ] }, "data": { "type": "array", - "description": "Metadata for this warning in 'key: value' format.", + "description": "[Output Only] Metadata for this warning in key: value format.", "items": { "type": "object", "properties": { "key": { "type": "string", - "description": "A key for the warning data." + "description": "[Output Only] A key for the warning data." }, "value": { "type": "string", - "description": "A warning data value corresponding to the key." + "description": "[Output Only] A warning data value corresponding to the key." } } } }, "message": { "type": "string", - "description": "Optional human-readable details for this warning." + "description": "[Output Only] Optional human-readable details for this warning." } } } @@ -3847,7 +3937,7 @@ }, "items": { "type": "array", - "description": "The TargetPool resources.", + "description": "A list of TargetPool resources.", "items": { "$ref": "TargetPool" } @@ -3936,7 +4026,7 @@ "properties": { "code": { "type": "string", - "description": "The warning type identifier for this warning.", + "description": "[Output Only] The warning type identifier for this warning.", "enum": [ "DEPRECATED_RESOURCE_USED", "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", @@ -3946,9 +4036,11 @@ "NEXT_HOP_INSTANCE_NOT_FOUND", "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", "NO_RESULTS_ON_PAGE", "REQUIRED_TOS_AGREEMENT", "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", "UNREACHABLE" ], "enumDescriptions": [ @@ -3963,29 +4055,31 @@ "", "", "", + "", + "", "" ] }, "data": { "type": "array", - "description": "Metadata for this warning in 'key: value' format.", + "description": "[Output Only] Metadata for this warning in key: value format.", "items": { "type": "object", "properties": { "key": { "type": "string", - "description": "A key for the warning data." + "description": "[Output Only] A key for the warning data." }, "value": { "type": "string", - "description": "A warning data value corresponding to the key." + "description": "[Output Only] A warning data value corresponding to the key." } } } }, "message": { "type": "string", - "description": "Optional human-readable details for this warning." + "description": "[Output Only] Optional human-readable details for this warning." } } } @@ -4000,6 +4094,225 @@ } } }, + "TargetVpnGateway": { + "id": "TargetVpnGateway", + "type": "object", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource. Provided by the client when the resource is created." + }, + "forwardingRules": { + "type": "array", + "description": "[Output Only] A list of URLs to the ForwardingRule resources. ForwardingRules are created using compute.forwardingRules.insert and associated to a VPN gateway.", + "items": { + "type": "string" + } + }, + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource. Defined by the server.", + "format": "uint64" + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#targetVpnGateway for target VPN gateways.", + "default": "compute#targetVpnGateway" + }, + "name": { + "type": "string", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long and comply with RFC1035.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "annotations": { + "required": [ + "compute.targetVpnGateways.insert" + ] + } + }, + "network": { + "type": "string", + "description": "URL of the network to which this VPN gateway is attached. Provided by the client when the VPN gateway is created.", + "annotations": { + "required": [ + "compute.targetVpnGateways.insert" + ] + } + }, + "region": { + "type": "string", + "description": "[Output Only] URL of the region where the target VPN gateway resides." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + }, + "status": { + "type": "string", + "description": "[Output Only] The status of the VPN gateway.", + "enum": [ + "CREATING", + "DELETING", + "FAILED", + "READY" + ], + "enumDescriptions": [ + "", + "", + "", + "" + ] + }, + "tunnels": { + "type": "array", + "description": "[Output Only] A list of URLs to VpnTunnel resources. VpnTunnels are created using compute.vpntunnels.insert and associated to a VPN gateway.", + "items": { + "type": "string" + } + } + } + }, + "TargetVpnGatewayAggregatedList": { + "id": "TargetVpnGatewayAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource. Defined by the server." + }, + "items": { + "type": "object", + "description": "A map of scoped target vpn gateway lists.", + "additionalProperties": { + "$ref": "TargetVpnGatewaysScopedList", + "description": "[Output Only] Name of the scope containing this set of target vpn gateways." + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#targetVpnGateway for target VPN gateways.", + "default": "compute#targetVpnGatewayAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] A token used to continue a truncated list request." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + } + } + }, + "TargetVpnGatewayList": { + "id": "TargetVpnGatewayList", + "type": "object", + "description": "Contains a list of TargetVpnGateway resources.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource. Defined by the server." + }, + "items": { + "type": "array", + "description": "[Output Only] A list of TargetVpnGateway resources.", + "items": { + "$ref": "TargetVpnGateway" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#targetVpnGateway for target VPN gateways.", + "default": "compute#targetVpnGatewayList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] A token used to continue a truncated list request." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + } + } + }, + "TargetVpnGatewaysScopedList": { + "id": "TargetVpnGatewaysScopedList", + "type": "object", + "properties": { + "targetVpnGateways": { + "type": "array", + "description": "[Output Only] List of target vpn gateways contained in this scope.", + "items": { + "$ref": "TargetVpnGateway" + } + }, + "warning": { + "type": "object", + "description": "[Output Only] Informational warning which replaces the list of addresses when the list is empty.", + "properties": { + "code": { + "type": "string", + "description": "[Output Only] The warning type identifier for this warning.", + "enum": [ + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "INJECTED_KERNELS_DEPRECATED", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata for this warning in key: value format.", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "[Output Only] A key for the warning data." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] Optional human-readable details for this warning." + } + } + } + } + }, "TestFailure": { "id": "TestFailure", "type": "object", @@ -4093,7 +4406,7 @@ }, "items": { "type": "array", - "description": "The UrlMap resources.", + "description": "A list of UrlMap resources.", "items": { "$ref": "UrlMap" } @@ -4198,81 +4511,328 @@ "properties": { "bucketName": { "type": "string", - "description": "The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This is simply the bucket name, with no \"gs://\" or \"https://storage.googleapis.com/\" in front of it." + "description": "The name of an existing bucket in Cloud Storage where the usage report object is stored. The Google Service Account is granted write access to this bucket. This is just the bucket name, with no gs:// or https://storage.googleapis.com/ in front of it." }, "reportNamePrefix": { "type": "string", - "description": "An optional prefix for the name of the usage report object stored in bucket_name. If not supplied, defaults to \"usage_\". The report is stored as a CSV file named _gce_.csv. where is the day of the usage according to Pacific Time. The prefix should conform to Cloud Storage object naming conventions." + "description": "An optional prefix for the name of the usage report object stored in bucketName. If not supplied, defaults to usage. The report is stored as a CSV file named report_name_prefix_gce_YYYYMMDD.csv where YYYYMMDD is the day of the usage according to Pacific Time. If you supply a prefix, it should conform to Cloud Storage object naming conventions." + } + } + }, + "VpnTunnel": { + "id": "VpnTunnel", + "type": "object", + "properties": { + "creationTimestamp": { + "type": "string", + "description": "[Output Only] Creation timestamp in RFC3339 text format." + }, + "description": { + "type": "string", + "description": "An optional textual description of the resource. Provided by the client when the resource is created." + }, + "detailedStatus": { + "type": "string", + "description": "[Output Only] Detailed status message for the VPN tunnel." + }, + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource. Defined by the server.", + "format": "uint64" + }, + "ikeNetworks": { + "type": "array", + "description": "IKE networks to use when establishing the VPN tunnel with peer VPN gateway. The value should be a CIDR formatted string, for example: 192.168.0.0/16. The ranges should be disjoint.", + "items": { + "type": "string" + } + }, + "ikeVersion": { + "type": "integer", + "description": "IKE protocol version to use when establishing the VPN tunnel with peer VPN gateway. Acceptable IKE versions are 1 or 2. Default version is 2.", + "format": "int32" + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.", + "default": "compute#vpnTunnel" + }, + "name": { + "type": "string", + "description": "Name of the resource. Provided by the client when the resource is created. The name must be 1-63 characters long and comply with RFC1035.", + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "annotations": { + "required": [ + "compute.vpnTunnels.insert" + ] + } + }, + "peerIp": { + "type": "string", + "description": "IP address of the peer VPN gateway." + }, + "region": { + "type": "string", + "description": "[Output Only] URL of the region where the VPN tunnel resides." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server defined URL for the resource." + }, + "sharedSecret": { + "type": "string", + "description": "Shared secret used to set the secure session between the GCE VPN gateway and the peer VPN gateway." + }, + "sharedSecretHash": { + "type": "string", + "description": "Hash of the shared secret." + }, + "status": { + "type": "string", + "description": "[Output Only] The status of the VPN tunnel.", + "enum": [ + "AUTHORIZATION_ERROR", + "DEPROVISIONING", + "ESTABLISHED", + "FAILED", + "FIRST_HANDSHAKE", + "NEGOTIATION_FAILURE", + "NETWORK_ERROR", + "NO_INCOMING_PACKETS", + "PROVISIONING", + "REJECTED", + "WAITING_FOR_FULL_CONFIG" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "targetVpnGateway": { + "type": "string", + "description": "URL of the VPN gateway to which this VPN tunnel is associated. Provided by the client when the VPN tunnel is created.", + "annotations": { + "required": [ + "compute.vpnTunnels.insert" + ] + } + } + } + }, + "VpnTunnelAggregatedList": { + "id": "VpnTunnelAggregatedList", + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server." + }, + "items": { + "type": "object", + "description": "[Output Only] A map of scoped vpn tunnel lists.", + "additionalProperties": { + "$ref": "VpnTunnelsScopedList", + "description": "Name of the scope containing this set of vpn tunnels." + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.", + "default": "compute#vpnTunnelAggregatedList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] A token used to continue a truncated list request." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server defined URL for this resource." + } + } + }, + "VpnTunnelList": { + "id": "VpnTunnelList", + "type": "object", + "description": "Contains a list of VpnTunnel resources.", + "properties": { + "id": { + "type": "string", + "description": "[Output Only] Unique identifier for the resource; defined by the server." + }, + "items": { + "type": "array", + "description": "[Output Only] A list of VpnTunnel resources.", + "items": { + "$ref": "VpnTunnel" + } + }, + "kind": { + "type": "string", + "description": "[Output Only] Type of resource. Always compute#vpnTunnel for VPN tunnels.", + "default": "compute#vpnTunnelList" + }, + "nextPageToken": { + "type": "string", + "description": "[Output Only] A token used to continue a truncated list request." + }, + "selfLink": { + "type": "string", + "description": "[Output Only] Server-defined URL for the resource." + } + } + }, + "VpnTunnelsScopedList": { + "id": "VpnTunnelsScopedList", + "type": "object", + "properties": { + "vpnTunnels": { + "type": "array", + "description": "List of vpn tunnels contained in this scope.", + "items": { + "$ref": "VpnTunnel" + } + }, + "warning": { + "type": "object", + "description": "Informational warning which replaces the list of addresses when the list is empty.", + "properties": { + "code": { + "type": "string", + "description": "[Output Only] The warning type identifier for this warning.", + "enum": [ + "DEPRECATED_RESOURCE_USED", + "DISK_SIZE_LARGER_THAN_IMAGE_SIZE", + "INJECTED_KERNELS_DEPRECATED", + "NEXT_HOP_ADDRESS_NOT_ASSIGNED", + "NEXT_HOP_CANNOT_IP_FORWARD", + "NEXT_HOP_INSTANCE_NOT_FOUND", + "NEXT_HOP_INSTANCE_NOT_ON_NETWORK", + "NEXT_HOP_NOT_RUNNING", + "NOT_CRITICAL_ERROR", + "NO_RESULTS_ON_PAGE", + "REQUIRED_TOS_AGREEMENT", + "RESOURCE_NOT_DELETED", + "SINGLE_INSTANCE_PROPERTY_TEMPLATE", + "UNREACHABLE" + ], + "enumDescriptions": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" + ] + }, + "data": { + "type": "array", + "description": "[Output Only] Metadata for this warning in key: value format.", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "[Output Only] A key for the warning data." + }, + "value": { + "type": "string", + "description": "[Output Only] A warning data value corresponding to the key." + } + } + } + }, + "message": { + "type": "string", + "description": "[Output Only] Optional human-readable details for this warning." + } + } } } }, "Zone": { "id": "Zone", "type": "object", - "description": "A zone resource.", + "description": "A Zone resource.", "properties": { "creationTimestamp": { "type": "string", - "description": "Creation timestamp in RFC3339 text format (output only)." + "description": "[Output Only] Creation timestamp in RFC3339 text format." }, "deprecated": { "$ref": "DeprecationStatus", - "description": "The deprecation status associated with this zone." + "description": "[Output Only] The deprecation status associated with this zone." }, "description": { "type": "string", - "description": "Textual description of the resource." + "description": "[Output Only] Textual description of the resource." }, "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only).", + "description": "[Output Only] Unique identifier for the resource; defined by the server.", "format": "uint64" }, "kind": { "type": "string", - "description": "Type of the resource.", + "description": "[Output Only] Type of the resource. Always kind#zone for zones.", "default": "compute#zone" }, "maintenanceWindows": { "type": "array", - "description": "Scheduled maintenance windows for the zone. When the zone is in a maintenance window, all resources which reside in the zone will be unavailable.", + "description": "[Output Only] Any scheduled maintenance windows for this zone. When the zone is in a maintenance window, all resources which reside in the zone will be unavailable. For more information, see Maintenance Windows", "items": { "type": "object", "properties": { "beginTime": { "type": "string", - "description": "Begin time of the maintenance window, in RFC 3339 format." + "description": "[Output Only] Starting time of the maintenance window, in RFC3339 format." }, "description": { "type": "string", - "description": "Textual description of the maintenance window." + "description": "[Output Only] Textual description of the maintenance window." }, "endTime": { "type": "string", - "description": "End time of the maintenance window, in RFC 3339 format." + "description": "[Output Only] Ending time of the maintenance window, in RFC3339 format." }, "name": { "type": "string", - "description": "Name of the maintenance window." + "description": "[Output Only] Name of the maintenance window." } } } }, "name": { "type": "string", - "description": "Name of the resource." + "description": "[Output Only] Name of the resource." }, "region": { "type": "string", - "description": "Full URL reference to the region which hosts the zone (output only)." + "description": "[Output Only] Full URL reference to the region which hosts the zone." }, "selfLink": { "type": "string", - "description": "Server defined URL for the resource (output only)." + "description": "[Output Only] Server defined URL for the resource." }, "status": { "type": "string", - "description": "Status of the zone. \"UP\" or \"DOWN\".", + "description": "[Output Only] Status of the zone, either UP or DOWN.", "enum": [ "DOWN", "UP" @@ -4291,11 +4851,11 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier for the resource; defined by the server (output only)." + "description": "[Output Only] Unique identifier for the resource; defined by the server." }, "items": { "type": "array", - "description": "The zone resources.", + "description": "[Output Only] A list of Zone resources.", "items": { "$ref": "Zone" } @@ -4307,7 +4867,7 @@ }, "nextPageToken": { "type": "string", - "description": "A token used to continue a truncated list request (output only)." + "description": "[Output Only] A token used to continue a truncated list request." }, "selfLink": { "type": "string", @@ -4327,12 +4887,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -4341,12 +4901,12 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -4359,6 +4919,7 @@ "$ref": "AddressAggregatedList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -4378,14 +4939,14 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "region": { "type": "string", - "description": "Name of the region scoping this request.", + "description": "The name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -4400,6 +4961,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -4418,14 +4980,14 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "region": { "type": "string", - "description": "Name of the region scoping this request.", + "description": "The name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -4440,6 +5002,7 @@ "$ref": "Address" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -4452,14 +5015,14 @@ "parameters": { "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "region": { "type": "string", - "description": "Name of the region scoping this request.", + "description": "The name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -4476,6 +5039,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -4487,12 +5051,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -4501,19 +5065,19 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "region": { "type": "string", - "description": "Name of the region scoping this request.", + "description": "The name of the region for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -4527,6 +5091,7 @@ "$ref": "AddressList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -4564,6 +5129,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -4596,6 +5162,7 @@ "$ref": "BackendService" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -4631,6 +5198,7 @@ "$ref": "BackendServiceGroupHealth" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -4659,6 +5227,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -4670,12 +5239,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -4684,7 +5253,7 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { @@ -4702,6 +5271,7 @@ "$ref": "BackendServiceList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -4738,6 +5308,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -4773,6 +5344,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] } @@ -4788,12 +5360,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -4802,12 +5374,12 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -4820,6 +5392,7 @@ "$ref": "DiskTypeAggregatedList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -4839,14 +5412,14 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -4861,6 +5434,7 @@ "$ref": "DiskType" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -4873,12 +5447,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -4887,19 +5461,19 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -4913,6 +5487,7 @@ "$ref": "DiskTypeList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -4929,12 +5504,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -4943,12 +5518,12 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -4961,6 +5536,7 @@ "$ref": "DiskAggregatedList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -4969,24 +5545,25 @@ "id": "compute.disks.createSnapshot", "path": "{project}/zones/{zone}/disks/{disk}/createSnapshot", "httpMethod": "POST", + "description": "Creates a snapshot of this disk.", "parameters": { "disk": { "type": "string", - "description": "Name of the persistent disk resource to snapshot.", + "description": "Name of the persistent disk to snapshot.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -5004,6 +5581,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -5011,25 +5589,25 @@ "id": "compute.disks.delete", "path": "{project}/zones/{zone}/disks/{disk}", "httpMethod": "DELETE", - "description": "Deletes the specified persistent disk resource.", + "description": "Deletes the specified persistent disk.", "parameters": { "disk": { "type": "string", - "description": "Name of the persistent disk resource to delete.", + "description": "Name of the persistent disk to delete.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -5044,6 +5622,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -5051,25 +5630,25 @@ "id": "compute.disks.get", "path": "{project}/zones/{zone}/disks/{disk}", "httpMethod": "GET", - "description": "Returns the specified persistent disk resource.", + "description": "Returns a specified persistent disk.", "parameters": { "disk": { "type": "string", - "description": "Name of the persistent disk resource to return.", + "description": "Name of the persistent disk to return.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -5084,6 +5663,7 @@ "$ref": "Disk" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -5092,11 +5672,11 @@ "id": "compute.disks.insert", "path": "{project}/zones/{zone}/disks", "httpMethod": "POST", - "description": "Creates a persistent disk resource in the specified project using the data included in the request.", + "description": "Creates a persistent disk in the specified project using the data included in the request.", "parameters": { "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -5108,7 +5688,7 @@ }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -5125,6 +5705,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -5132,16 +5713,16 @@ "id": "compute.disks.list", "path": "{project}/zones/{zone}/disks", "httpMethod": "GET", - "description": "Retrieves the list of persistent disk resources contained within the specified zone.", + "description": "Retrieves the list of persistent disks contained within the specified zone.", "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -5150,19 +5731,19 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -5176,6 +5757,7 @@ "$ref": "DiskList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -5199,7 +5781,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -5213,6 +5795,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -5231,7 +5814,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -5245,6 +5828,7 @@ "$ref": "Firewall" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -5257,7 +5841,7 @@ "parameters": { "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -5273,6 +5857,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -5284,12 +5869,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -5298,12 +5883,12 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -5316,6 +5901,7 @@ "$ref": "FirewallList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -5335,7 +5921,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -5352,6 +5938,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -5370,7 +5957,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -5387,6 +5974,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] } @@ -5402,12 +5990,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -5416,7 +6004,7 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { @@ -5434,6 +6022,7 @@ "$ref": "ForwardingRuleAggregatedList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -5475,6 +6064,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -5515,6 +6105,7 @@ "$ref": "ForwardingRule" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -5551,6 +6142,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -5562,12 +6154,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -5576,7 +6168,7 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { @@ -5602,6 +6194,7 @@ "$ref": "ForwardingRuleList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -5646,6 +6239,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] } @@ -5668,7 +6262,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -5682,6 +6276,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -5700,7 +6295,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -5714,6 +6309,7 @@ "$ref": "Address" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -5726,7 +6322,7 @@ "parameters": { "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -5742,6 +6338,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -5753,12 +6350,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -5767,12 +6364,12 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -5785,6 +6382,7 @@ "$ref": "AddressList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -5822,6 +6420,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -5854,6 +6453,7 @@ "$ref": "ForwardingRule" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -5882,6 +6482,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -5893,12 +6494,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -5907,7 +6508,7 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { @@ -5925,6 +6526,7 @@ "$ref": "ForwardingRuleList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -5961,6 +6563,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] } @@ -5976,12 +6579,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -5990,12 +6593,12 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -6008,6 +6611,7 @@ "$ref": "OperationAggregatedList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -6027,7 +6631,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -6038,6 +6642,7 @@ "operation" ], "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -6056,7 +6661,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -6070,6 +6675,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -6082,12 +6688,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -6096,12 +6702,12 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -6114,6 +6720,7 @@ "$ref": "OperationList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -6151,6 +6758,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -6183,6 +6791,7 @@ "$ref": "HttpHealthCheck" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -6211,6 +6820,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -6222,12 +6832,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -6236,7 +6846,7 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { @@ -6254,6 +6864,7 @@ "$ref": "HttpHealthCheckList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -6290,6 +6901,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -6325,6 +6937,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] } @@ -6347,7 +6960,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -6361,6 +6974,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -6368,7 +6982,7 @@ "id": "compute.images.deprecate", "path": "{project}/global/images/{image}/deprecate", "httpMethod": "POST", - "description": "Sets the deprecation status of an image. If no message body is given, clears the deprecation status instead.", + "description": "Sets the deprecation status of an image.\n\nIf an empty request body is given, clears the deprecation status instead.", "parameters": { "image": { "type": "string", @@ -6379,7 +6993,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -6396,6 +7010,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -6414,7 +7029,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -6428,6 +7043,7 @@ "$ref": "Image" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -6440,7 +7056,7 @@ "parameters": { "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -6456,6 +7072,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", @@ -6470,12 +7087,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -6484,12 +7101,12 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -6502,6 +7119,7 @@ "$ref": "ImageList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -6514,18 +7132,18 @@ "id": "compute.instanceTemplates.delete", "path": "{project}/global/instanceTemplates/{instanceTemplate}", "httpMethod": "DELETE", - "description": "Deletes the specified instance template resource.", + "description": "Deletes the specified instance template.", "parameters": { "instanceTemplate": { "type": "string", - "description": "Name of the instance template resource to delete.", + "description": "The name of the instance template to delete.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "The project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -6539,6 +7157,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -6550,14 +7169,14 @@ "parameters": { "instanceTemplate": { "type": "string", - "description": "Name of the instance template resource to return.", + "description": "The name of the instance template.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "The project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -6571,6 +7190,7 @@ "$ref": "InstanceTemplate" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -6579,11 +7199,11 @@ "id": "compute.instanceTemplates.insert", "path": "{project}/global/instanceTemplates", "httpMethod": "POST", - "description": "Creates an instance template resource in the specified project using the data included in the request.", + "description": "Creates an instance template in the specified project using the data that is included in the request.", "parameters": { "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "The project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -6599,6 +7219,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -6606,16 +7227,16 @@ "id": "compute.instanceTemplates.list", "path": "{project}/global/instanceTemplates", "httpMethod": "GET", - "description": "Retrieves the list of instance template resources contained within the specified project.", + "description": "Retrieves a list of instance templates that are contained within the specified project and zone.", "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -6624,12 +7245,12 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "The project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -6642,6 +7263,7 @@ "$ref": "InstanceTemplateList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -6658,27 +7280,27 @@ "parameters": { "instance": { "type": "string", - "description": "Instance name.", + "description": "The instance name for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, "networkInterface": { "type": "string", - "description": "Network interface name.", + "description": "The name of the network interface to add to this instance.", "required": true, "location": "query" }, "project": { "type": "string", - "description": "Project name.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6697,6 +7319,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -6707,12 +7330,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -6721,12 +7344,12 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -6739,6 +7362,7 @@ "$ref": "InstanceAggregatedList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -6747,7 +7371,7 @@ "id": "compute.instances.attachDisk", "path": "{project}/zones/{zone}/instances/{instance}/attachDisk", "httpMethod": "POST", - "description": "Attaches a disk resource to an instance.", + "description": "Attaches a Disk resource to an instance.", "parameters": { "instance": { "type": "string", @@ -6758,14 +7382,14 @@ }, "project": { "type": "string", - "description": "Project name.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6783,6 +7407,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -6790,7 +7415,7 @@ "id": "compute.instances.delete", "path": "{project}/zones/{zone}/instances/{instance}", "httpMethod": "DELETE", - "description": "Deletes the specified instance resource.", + "description": "Deletes the specified Instance resource. For more information, see Shutting down an instance.", "parameters": { "instance": { "type": "string", @@ -6801,14 +7426,14 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6823,6 +7448,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -6834,33 +7460,33 @@ "parameters": { "accessConfig": { "type": "string", - "description": "Access config name.", + "description": "The name of the access config to delete.", "required": true, "location": "query" }, "instance": { "type": "string", - "description": "Instance name.", + "description": "The instance name for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, "networkInterface": { "type": "string", - "description": "Network interface name.", + "description": "The name of the network interface.", "required": true, "location": "query" }, "project": { "type": "string", - "description": "Project name.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6877,6 +7503,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -6902,14 +7529,14 @@ }, "project": { "type": "string", - "description": "Project name.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6925,6 +7552,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -6943,14 +7571,14 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the The name of the zone for this request..", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -6965,6 +7593,7 @@ "$ref": "Instance" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -6982,16 +7611,25 @@ "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, + "port": { + "type": "integer", + "description": "Which COM port to retrieve data from.", + "default": "1", + "format": "int32", + "minimum": "1", + "maximum": "4", + "location": "query" + }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -7006,6 +7644,7 @@ "$ref": "SerialPortOutput" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -7018,14 +7657,14 @@ "parameters": { "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -7042,6 +7681,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -7053,12 +7693,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -7067,19 +7707,19 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -7093,6 +7733,7 @@ "$ref": "InstanceList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -7112,14 +7753,14 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -7134,6 +7775,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -7141,7 +7783,7 @@ "id": "compute.instances.setDiskAutoDelete", "path": "{project}/zones/{zone}/instances/{instance}/setDiskAutoDelete", "httpMethod": "POST", - "description": "Sets the auto-delete flag for a disk attached to an instance", + "description": "Sets the auto-delete flag for a disk attached to an instance.", "parameters": { "autoDelete": { "type": "boolean", @@ -7151,28 +7793,28 @@ }, "deviceName": { "type": "string", - "description": "Disk device name to modify.", + "description": "The device name of the disk to modify.", "required": true, "pattern": "\\w[\\w.-]{0,254}", "location": "query" }, "instance": { "type": "string", - "description": "Instance name.", + "description": "The instance name.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" }, "project": { "type": "string", - "description": "Project name.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -7189,6 +7831,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -7207,14 +7850,14 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -7232,6 +7875,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -7250,14 +7894,14 @@ }, "project": { "type": "string", - "description": "Project name.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -7275,6 +7919,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -7293,14 +7938,14 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -7318,6 +7963,89 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "start": { + "id": "compute.instances.start", + "path": "{project}/zones/{zone}/instances/{instance}/start", + "httpMethod": "POST", + "description": "This method starts an instance that was stopped using the using the instances().stop method. For more information, see Restart an instance.", + "parameters": { + "instance": { + "type": "string", + "description": "Name of the instance resource to start.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "stop": { + "id": "compute.instances.stop", + "path": "{project}/zones/{zone}/instances/{instance}/stop", + "httpMethod": "POST", + "description": "This method stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur per-minute, virtual machine usage charges while they are stopped, but any resources that the virtual machine is using, such as persistent disks and static IP addresses,will continue to be charged until they are deleted. For more information, see Stopping an instance.", + "parameters": { + "instance": { + "type": "string", + "description": "Name of the instance resource to stop.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "zone": { + "type": "string", + "description": "The name of the zone for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "zone", + "instance" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] } @@ -7340,7 +8068,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -7354,6 +8082,7 @@ "$ref": "License" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -7370,12 +8099,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -7384,12 +8113,12 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -7402,6 +8131,7 @@ "$ref": "MachineTypeAggregatedList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -7421,14 +8151,14 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -7443,6 +8173,7 @@ "$ref": "MachineType" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -7455,12 +8186,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -7469,19 +8200,19 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" }, "zone": { "type": "string", - "description": "Name of the zone scoping this request.", + "description": "The name of the zone for this request.", "required": true, "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", "location": "path" @@ -7495,6 +8226,7 @@ "$ref": "MachineTypeList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -7518,7 +8250,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -7532,6 +8264,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -7550,7 +8283,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -7564,6 +8297,7 @@ "$ref": "Network" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -7576,7 +8310,7 @@ "parameters": { "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -7592,6 +8326,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -7603,12 +8338,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -7617,12 +8352,12 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -7635,6 +8370,7 @@ "$ref": "NetworkList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -7651,7 +8387,7 @@ "parameters": { "project": { "type": "string", - "description": "Name of the project resource to retrieve.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -7664,10 +8400,67 @@ "$ref": "Project" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] }, + "moveDisk": { + "id": "compute.projects.moveDisk", + "path": "{project}/moveDisk", + "httpMethod": "POST", + "description": "Moves a persistent disk from one zone to another.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "DiskMoveRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "moveInstance": { + "id": "compute.projects.moveInstance", + "path": "{project}/moveInstance", + "httpMethod": "POST", + "description": "Moves an instance and its attached persistent disks from one zone to another.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "request": { + "$ref": "InstanceMoveRequest" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, "setCommonInstanceMetadata": { "id": "compute.projects.setCommonInstanceMetadata", "path": "{project}/setCommonInstanceMetadata", @@ -7676,7 +8469,7 @@ "parameters": { "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -7692,6 +8485,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -7699,11 +8493,11 @@ "id": "compute.projects.setUsageExportBucket", "path": "{project}/setUsageExportBucket", "httpMethod": "POST", - "description": "Sets usage export location", + "description": "Enables the usage export feature and sets the usage export bucket where reports are stored. If you provide an empty request body using this method, the usage export feature will be disabled.", "parameters": { "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -7719,6 +8513,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/devstorage.full_control", "https://www.googleapis.com/auth/devstorage.read_only", @@ -7744,7 +8539,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -7763,6 +8558,7 @@ "operation" ], "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -7781,7 +8577,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -7803,6 +8599,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -7815,12 +8612,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -7829,12 +8626,12 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -7855,6 +8652,7 @@ "$ref": "OperationList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -7871,7 +8669,7 @@ "parameters": { "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -7892,6 +8690,7 @@ "$ref": "Region" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -7904,12 +8703,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -7918,12 +8717,12 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -7936,6 +8735,7 @@ "$ref": "RegionList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -7973,6 +8773,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -8005,6 +8806,7 @@ "$ref": "Route" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -8033,6 +8835,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -8044,12 +8847,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -8058,7 +8861,7 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { @@ -8076,6 +8879,7 @@ "$ref": "RouteList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -8113,6 +8917,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -8145,6 +8950,7 @@ "$ref": "Snapshot" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -8157,12 +8963,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -8171,7 +8977,7 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { @@ -8189,6 +8995,7 @@ "$ref": "SnapshotList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -8226,6 +9033,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -8258,6 +9066,7 @@ "$ref": "TargetHttpProxy" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -8286,6 +9095,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -8297,12 +9107,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -8311,7 +9121,7 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { @@ -8329,6 +9139,7 @@ "$ref": "TargetHttpProxyList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -8365,6 +9176,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] } @@ -8380,12 +9192,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -8394,7 +9206,7 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { @@ -8412,6 +9224,7 @@ "$ref": "TargetInstanceAggregatedList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -8453,6 +9266,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -8493,6 +9307,7 @@ "$ref": "TargetInstance" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -8529,6 +9344,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -8540,12 +9356,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -8554,7 +9370,7 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { @@ -8580,6 +9396,7 @@ "$ref": "TargetInstanceList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -8627,6 +9444,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -8669,6 +9487,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -8680,12 +9499,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -8694,7 +9513,7 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { @@ -8712,6 +9531,7 @@ "$ref": "TargetPoolAggregatedList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -8753,6 +9573,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -8793,6 +9614,7 @@ "$ref": "TargetPool" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -8836,6 +9658,7 @@ "$ref": "TargetPoolInstanceHealth" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -8872,6 +9695,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -8883,12 +9707,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -8897,7 +9721,7 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { @@ -8923,6 +9747,7 @@ "$ref": "TargetPoolList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -8966,6 +9791,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -9008,6 +9834,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -9057,11 +9884,233 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] } } }, + "targetVpnGateways": { + "methods": { + "aggregatedList": { + "id": "compute.targetVpnGateways.aggregatedList", + "path": "{project}/aggregated/targetVpnGateways", + "httpMethod": "GET", + "description": "Retrieves the list of target VPN gateways grouped by scope.", + "parameters": { + "filter": { + "type": "string", + "description": "Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Maximum count of results to be returned.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "TargetVpnGatewayAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "id": "compute.targetVpnGateways.delete", + "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", + "httpMethod": "DELETE", + "description": "Deletes the specified TargetVpnGateway resource.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "The name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "targetVpnGateway": { + "type": "string", + "description": "Name of the TargetVpnGateway resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "targetVpnGateway" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.targetVpnGateways.get", + "path": "{project}/regions/{region}/targetVpnGateways/{targetVpnGateway}", + "httpMethod": "GET", + "description": "Returns the specified TargetVpnGateway resource.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "The name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "targetVpnGateway": { + "type": "string", + "description": "Name of the TargetVpnGateway resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "targetVpnGateway" + ], + "response": { + "$ref": "TargetVpnGateway" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.targetVpnGateways.insert", + "path": "{project}/regions/{region}/targetVpnGateways", + "httpMethod": "POST", + "description": "Creates a TargetVpnGateway resource in the specified project and region using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "The name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "request": { + "$ref": "TargetVpnGateway" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.targetVpnGateways.list", + "path": "{project}/regions/{region}/targetVpnGateways", + "httpMethod": "GET", + "description": "Retrieves the list of TargetVpnGateway resources available to the specified project and region.", + "parameters": { + "filter": { + "type": "string", + "description": "Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Maximum count of results to be returned.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "The name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "response": { + "$ref": "TargetVpnGatewayList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "urlMaps": { "methods": { "delete": { @@ -9093,6 +10142,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -9125,6 +10175,7 @@ "$ref": "UrlMap" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -9153,6 +10204,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -9164,12 +10216,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -9178,7 +10230,7 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { @@ -9196,6 +10248,7 @@ "$ref": "UrlMapList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -9232,6 +10285,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -9267,6 +10321,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -9302,11 +10357,233 @@ "$ref": "UrlMapsValidateResponse" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] } } }, + "vpnTunnels": { + "methods": { + "aggregatedList": { + "id": "compute.vpnTunnels.aggregatedList", + "path": "{project}/aggregated/vpnTunnels", + "httpMethod": "GET", + "description": "Retrieves the list of VPN tunnels grouped by scope.", + "parameters": { + "filter": { + "type": "string", + "description": "Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Maximum count of results to be returned.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + } + }, + "parameterOrder": [ + "project" + ], + "response": { + "$ref": "VpnTunnelAggregatedList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "delete": { + "id": "compute.vpnTunnels.delete", + "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}", + "httpMethod": "DELETE", + "description": "Deletes the specified VpnTunnel resource.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "The name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "vpnTunnel": { + "type": "string", + "description": "Name of the VpnTunnel resource to delete.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "vpnTunnel" + ], + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "get": { + "id": "compute.vpnTunnels.get", + "path": "{project}/regions/{region}/vpnTunnels/{vpnTunnel}", + "httpMethod": "GET", + "description": "Returns the specified VpnTunnel resource.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "The name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + }, + "vpnTunnel": { + "type": "string", + "description": "Name of the VpnTunnel resource to return.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region", + "vpnTunnel" + ], + "response": { + "$ref": "VpnTunnel" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + }, + "insert": { + "id": "compute.vpnTunnels.insert", + "path": "{project}/regions/{region}/vpnTunnels", + "httpMethod": "POST", + "description": "Creates a VpnTunnel resource in the specified project and region using the data included in the request.", + "parameters": { + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "The name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "request": { + "$ref": "VpnTunnel" + }, + "response": { + "$ref": "Operation" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute" + ] + }, + "list": { + "id": "compute.vpnTunnels.list", + "path": "{project}/regions/{region}/vpnTunnels", + "httpMethod": "GET", + "description": "Retrieves the list of VpnTunnel resources contained in the specified project and region.", + "parameters": { + "filter": { + "type": "string", + "description": "Filter expression for filtering listed resources.", + "location": "query" + }, + "maxResults": { + "type": "integer", + "description": "Maximum count of results to be returned.", + "default": "500", + "format": "uint32", + "minimum": "0", + "maximum": "500", + "location": "query" + }, + "pageToken": { + "type": "string", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", + "location": "query" + }, + "project": { + "type": "string", + "description": "Project ID for this request.", + "required": true, + "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", + "location": "path" + }, + "region": { + "type": "string", + "description": "The name of the region for this request.", + "required": true, + "pattern": "[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?", + "location": "path" + } + }, + "parameterOrder": [ + "project", + "region" + ], + "response": { + "$ref": "VpnTunnelList" + }, + "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/compute", + "https://www.googleapis.com/auth/compute.readonly" + ] + } + } + }, "zoneOperations": { "methods": { "delete": { @@ -9324,7 +10601,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -9343,6 +10620,7 @@ "operation" ], "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute" ] }, @@ -9361,7 +10639,7 @@ }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -9383,6 +10661,7 @@ "$ref": "Operation" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -9395,12 +10674,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -9409,12 +10688,12 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -9435,6 +10714,7 @@ "$ref": "OperationList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -9451,7 +10731,7 @@ "parameters": { "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -9472,6 +10752,7 @@ "$ref": "Zone" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] @@ -9484,12 +10765,12 @@ "parameters": { "filter": { "type": "string", - "description": "Optional. Filter expression for filtering listed resources.", + "description": "Filter expression for filtering listed resources.", "location": "query" }, "maxResults": { "type": "integer", - "description": "Optional. Maximum count of results to be returned. Maximum value is 500 and default value is 500.", + "description": "Maximum count of results to be returned.", "default": "500", "format": "uint32", "minimum": "0", @@ -9498,12 +10779,12 @@ }, "pageToken": { "type": "string", - "description": "Optional. Tag returned by a previous list request truncated by maxResults. Used to continue a previous list request.", + "description": "Tag returned by a previous list request when that list was truncated to maxResults. Used to continue a previous list request.", "location": "query" }, "project": { "type": "string", - "description": "Name of the project scoping this request.", + "description": "Project ID for this request.", "required": true, "pattern": "(?:(?:[-a-z0-9]{1,63}\\.)*(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?):)?(?:[0-9]{1,19}|(?:[a-z](?:[-a-z0-9]{0,61}[a-z0-9])?))", "location": "path" @@ -9516,6 +10797,7 @@ "$ref": "ZoneList" }, "scopes": [ + "https://www.googleapis.com/auth/cloud-platform", "https://www.googleapis.com/auth/compute", "https://www.googleapis.com/auth/compute.readonly" ] diff --git a/Godeps/_workspace/src/google.golang.org/api/compute/v1/compute-gen.go b/Godeps/_workspace/src/google.golang.org/api/compute/v1/compute-gen.go index 5e9da0dffd..d5cd944676 100644 --- a/Godeps/_workspace/src/google.golang.org/api/compute/v1/compute-gen.go +++ b/Godeps/_workspace/src/google.golang.org/api/compute/v1/compute-gen.go @@ -14,6 +14,7 @@ import ( "encoding/json" "errors" "fmt" + "golang.org/x/net/context" "google.golang.org/api/googleapi" "io" "net/http" @@ -33,6 +34,7 @@ var _ = url.Parse var _ = googleapi.Version var _ = errors.New var _ = strings.Replace +var _ = context.Background const apiId = "compute:v1" const apiName = "compute" @@ -41,6 +43,9 @@ const basePath = "https://www.googleapis.com/compute/v1/projects/" // OAuth2 scopes used by this API. const ( + // View and manage your data across Google Cloud Platform services + CloudPlatformScope = "https://www.googleapis.com/auth/cloud-platform" + // View and manage your Google Compute Engine resources ComputeScope = "https://www.googleapis.com/auth/compute" @@ -48,13 +53,13 @@ const ( ComputeReadonlyScope = "https://www.googleapis.com/auth/compute.readonly" // Manage your data and permissions in Google Cloud Storage - DevstorageFull_controlScope = "https://www.googleapis.com/auth/devstorage.full_control" + DevstorageFullControlScope = "https://www.googleapis.com/auth/devstorage.full_control" // View your data in Google Cloud Storage - DevstorageRead_onlyScope = "https://www.googleapis.com/auth/devstorage.read_only" + DevstorageReadOnlyScope = "https://www.googleapis.com/auth/devstorage.read_only" // Manage your data in Google Cloud Storage - DevstorageRead_writeScope = "https://www.googleapis.com/auth/devstorage.read_write" + DevstorageReadWriteScope = "https://www.googleapis.com/auth/devstorage.read_write" ) func New(client *http.Client) (*Service, error) { @@ -86,15 +91,18 @@ func New(client *http.Client) (*Service, error) { s.TargetHttpProxies = NewTargetHttpProxiesService(s) s.TargetInstances = NewTargetInstancesService(s) s.TargetPools = NewTargetPoolsService(s) + s.TargetVpnGateways = NewTargetVpnGatewaysService(s) s.UrlMaps = NewUrlMapsService(s) + s.VpnTunnels = NewVpnTunnelsService(s) s.ZoneOperations = NewZoneOperationsService(s) s.Zones = NewZonesService(s) return s, nil } type Service struct { - client *http.Client - BasePath string // API endpoint base URL + client *http.Client + BasePath string // API endpoint base URL + UserAgent string // optional additional User-Agent fragment Addresses *AddressesService @@ -144,13 +152,24 @@ type Service struct { TargetPools *TargetPoolsService + TargetVpnGateways *TargetVpnGatewaysService + UrlMaps *UrlMapsService + VpnTunnels *VpnTunnelsService + ZoneOperations *ZoneOperationsService Zones *ZonesService } +func (s *Service) userAgent() string { + if s.UserAgent == "" { + return googleapi.UserAgent + } + return googleapi.UserAgent + " " + s.UserAgent +} + func NewAddressesService(s *Service) *AddressesService { rs := &AddressesService{s: s} return rs @@ -367,6 +386,15 @@ type TargetPoolsService struct { s *Service } +func NewTargetVpnGatewaysService(s *Service) *TargetVpnGatewaysService { + rs := &TargetVpnGatewaysService{s: s} + return rs +} + +type TargetVpnGatewaysService struct { + s *Service +} + func NewUrlMapsService(s *Service) *UrlMapsService { rs := &UrlMapsService{s: s} return rs @@ -376,6 +404,15 @@ type UrlMapsService struct { s *Service } +func NewVpnTunnelsService(s *Service) *VpnTunnelsService { + rs := &VpnTunnelsService{s: s} + return rs +} + +type VpnTunnelsService struct { + s *Service +} + func NewZoneOperationsService(s *Service) *ZoneOperationsService { rs := &ZoneOperationsService{s: s} return rs @@ -395,198 +432,293 @@ type ZonesService struct { } type AccessConfig struct { - // Kind: Type of the resource. + // Kind: [Output Only] Type of the resource. Always compute#accessConfig + // for access configs. Kind string `json:"kind,omitempty"` // Name: Name of this access configuration. Name string `json:"name,omitempty"` // NatIP: An external IP address associated with this instance. Specify - // an unused static IP address available to the project. If not - // specified, the external IP will be drawn from a shared ephemeral - // pool. + // an unused static external IP address available to the project or + // leave this field undefined to use an IP from a shared ephemeral IP + // address pool. If you specify a static external IP address, it must + // live in the same region as the zone of the instance. NatIP string `json:"natIP,omitempty"` - // Type: Type of configuration. Must be set to "ONE_TO_ONE_NAT". This - // configures port-for-port NAT to the internet. + // Type: The type of configuration. The default and only option is + // ONE_TO_ONE_NAT. + // + // Possible values: + // "ONE_TO_ONE_NAT" (default) Type string `json:"type,omitempty"` } type Address struct { - // Address: The IP address represented by this resource. + // Address: The static external IP address represented by this resource. Address string `json:"address,omitempty"` - // CreationTimestamp: Creation timestamp in RFC3339 text format (output - // only). + // 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 when the resource is created. Description string `json:"description,omitempty"` - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. + // Kind: [Output Only] Type of the resource. Always compute#address for + // addresses. Kind string `json:"kind,omitempty"` // Name: Name of the resource; provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with - // RFC1035. + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // Region: URL of the region where the regional address resides (output - // only). This field is not applicable to global addresses. + // Region: [Output Only] URL of the region where the regional address + // resides. This field is not applicable to global addresses. Region string `json:"region,omitempty"` - // SelfLink: Server defined URL for the resource (output only). + // SelfLink: [Output Only] Server defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // Status: The status of the address (output only). + // Status: [Output Only] The status of the address, which can be either + // IN_USE or RESERVED. An address that is RESERVED is currently reserved + // and available to use. An IN_USE address is currently being used by + // another resource and is not available. + // + // Possible values: + // "IN_USE" + // "RESERVED" Status string `json:"status,omitempty"` - // Users: The resources that are using this address resource. + // Users: [Output Only] The URLs of the resources that are using this + // address. Users []string `json:"users,omitempty"` } type AddressAggregatedList struct { - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: A map of scoped address lists. + // Items: [Output Only] A map of scoped address lists. Items map[string]AddressesScopedList `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource. Always + // compute#addressAggregatedList for aggregated lists of addresses. Kind string `json:"kind,omitempty"` - // NextPageToken: A token used to continue a truncated list request - // (output only). + // NextPageToken: [Output Only] A token used to continue a truncated + // list request. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: Server defined URL for this resource (output only). + // SelfLink: [Output Only] Server defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` } type AddressList struct { - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: The address resources. + // Items: [Output Only] A list of Address resources. Items []*Address `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource. Always compute#addressList for + // lists of addresses. Kind string `json:"kind,omitempty"` - // NextPageToken: A token used to continue a truncated list request - // (output only). + // NextPageToken: [Output Only] A token used to continue a truncated + // list request. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: Server defined URL for the resource (output only). + // SelfLink: [Output Only] Server defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` } type AddressesScopedList struct { - // Addresses: List of addresses contained in this scope. + // Addresses: [Output Only] List of addresses contained in this scope. Addresses []*Address `json:"addresses,omitempty"` - // Warning: Informational warning which replaces the list of addresses - // when the list is empty. + // Warning: [Output Only] Informational warning which replaces the list + // of addresses when the list is empty. Warning *AddressesScopedListWarning `json:"warning,omitempty"` } type AddressesScopedListWarning struct { - // Code: The warning type identifier for this warning. + // Code: [Output Only] The warning type identifier for this warning. + // + // Possible values: + // "DEPRECATED_RESOURCE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "INJECTED_KERNELS_DEPRECATED" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_NOT_DELETED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNREACHABLE" Code string `json:"code,omitempty"` - // Data: Metadata for this warning in 'key: value' format. + // Data: [Output Only] Metadata for this warning in key: value format. Data []*AddressesScopedListWarningData `json:"data,omitempty"` - // Message: Optional human-readable details for this warning. + // Message: [Output Only] Optional human-readable details for this + // warning. Message string `json:"message,omitempty"` } type AddressesScopedListWarningData struct { - // Key: A key for the warning data. + // Key: [Output Only] A key for the warning data. Key string `json:"key,omitempty"` - // Value: A warning data value corresponding to the key. + // Value: [Output Only] A warning data value corresponding to the key. Value string `json:"value,omitempty"` } type AttachedDisk struct { - // AutoDelete: Whether the disk will be auto-deleted when the instance - // is deleted (but not when the disk is detached from the instance). + // AutoDelete: Specifies whether the disk will be auto-deleted when the + // instance is deleted (but not when the disk is detached from the + // instance). AutoDelete bool `json:"autoDelete,omitempty"` - // Boot: Indicates that this is a boot disk. VM will use the first - // partition of the disk for its root filesystem. + // Boot: Indicates that this is a boot disk. The virtual machine will + // use the first partition of the disk for its root filesystem. Boot bool `json:"boot,omitempty"` - // DeviceName: Persistent disk only; must be unique within the instance - // when specified. This represents a unique device name that is + // DeviceName: Specifies a unique device name of your choice that is // reflected into the /dev/ tree of a Linux operating system running - // within the instance. If not specified, a default will be chosen by - // the system. + // within the instance. This name can be used to reference the device + // for mounting, resizing, and so on, from within the instance. + // + // If not specified, the server chooses a default device name to apply + // to this disk, in the form persistent-disks-x, where x is a number + // assigned by Google Compute Engine. This field is only applicable for + // persistent disks. DeviceName string `json:"deviceName,omitempty"` - // Index: A zero-based index to assign to this disk, where 0 is reserved - // for the boot disk. If not specified, the server will choose an - // appropriate value (output only). + // Index: Assigns a zero-based index to this disk, where 0 is reserved + // for the boot disk. For example, if you have many disks attached to an + // instance, each disk would have a unique index number. If not + // specified, the server will choose an appropriate value. Index int64 `json:"index,omitempty"` - // InitializeParams: Initialization parameters. + // InitializeParams: [Input Only] Specifies the parameters for a new + // disk that will be created alongside the new instance. Use + // initialization parameters to create boot disks or local SSDs attached + // to the new instance. + // + // This property is mutually exclusive with the source property; you can + // only define one or the other, but not both. InitializeParams *AttachedDiskInitializeParams `json:"initializeParams,omitempty"` + // Possible values: + // "NVME" + // "SCSI" Interface string `json:"interface,omitempty"` - // Kind: Type of the resource. + // Kind: [Output Only] Type of the resource. Always compute#attachedDisk + // for attached disks. Kind string `json:"kind,omitempty"` - // Licenses: Public visible licenses. + // Licenses: [Output Only] Any valid publicly visible licenses. Licenses []string `json:"licenses,omitempty"` - // Mode: The mode in which to attach this disk, either "READ_WRITE" or - // "READ_ONLY". + // Mode: The mode in which to attach this disk, either READ_WRITE or + // READ_ONLY. If not specified, the default is to attach the disk in + // READ_WRITE mode. + // + // Possible values: + // "READ_ONLY" + // "READ_WRITE" Mode string `json:"mode,omitempty"` - // Source: Persistent disk only; the URL of the persistent disk - // resource. + // Source: Specifies a valid partial or full URL to an existing + // Persistent Disk resource. This field is only applicable for + // persistent disks. Source string `json:"source,omitempty"` - // Type: Type of the disk, either "SCRATCH" or "PERSISTENT". Note that - // persistent disks must be created before you can specify them here. + // Type: Specifies the type of the disk, either SCRATCH or PERSISTENT. + // If not specified, the default is PERSISTENT. + // + // Possible values: + // "PERSISTENT" + // "SCRATCH" Type string `json:"type,omitempty"` } type AttachedDiskInitializeParams struct { - // DiskName: Name of the disk (when not provided defaults to the name of - // the instance). + // DiskName: Specifies the disk name. If not specified, the default is + // to use the name of the instance. DiskName string `json:"diskName,omitempty"` - // DiskSizeGb: Size of the disk in base-2 GB. + // DiskSizeGb: Specifies the size of the disk in base-2 GB. DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // DiskType: URL of the disk type resource describing which disk type to - // use to create the disk; provided by the client when the disk is - // created. + // DiskType: Specifies the disk type to use to create the instance. If + // not specified, the default is pd-standard, specified using the full + // URL. For + // example: + // + // https://www.googleapis.com/compute/v1/projects/project/zones + // /zone/diskTypes/pd-standard + // + // Other values include pd-ssd and local-ssd. If you define this field, + // you can provide either the full or partial URL. For example, the + // following are valid values: + // - + // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disk + // Types/diskType + // - projects/project/zones/zone/diskTypes/diskType + // - zones/zone/diskTypes/diskType DiskType string `json:"diskType,omitempty"` - // SourceImage: The source image used to create this disk. + // SourceImage: A source image used to create the disk. You can provide + // a private (custom) image, and Compute Engine will use the + // corresponding image from your project. For + // example: + // + // global/images/my-private-image + // + // Or you can provide an image from a publicly-available project. For + // example, to use a Debian image from the debian-cloud project, make + // sure to include the project in the + // URL: + // + // projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD + // + // where vYYYYMMDD is the image version. The fully-qualified URL will + // also work in both cases. SourceImage string `json:"sourceImage,omitempty"` } type Backend struct { // BalancingMode: The balancing mode of this backend, default is // UTILIZATION. + // + // Possible values: + // "RATE" + // "UTILIZATION" BalancingMode string `json:"balancingMode,omitempty"` - // CapacityScaler: The multiplier (a value between 0 and 1e6) of the max - // capacity (CPU or RPS, depending on 'balancingMode') the group should - // serve up to. 0 means the group is totally drained. Default value is - // 1. Valid range is [0, 1e6]. + // CapacityScaler: The multiplier (a value between 0.0 and 1.0) of the + // max capacity (CPU or RPS, depending on 'balancingMode') the group + // should serve up to. 0 means the group is totally drained. Default + // value is 1. Valid range is [0.0, 1.0]. CapacityScaler float64 `json:"capacityScaler,omitempty"` // Description: An optional textual description of the resource, which @@ -660,6 +792,8 @@ type BackendService struct { // resource views referenced by this service. Required. PortName string `json:"portName,omitempty"` + // Possible values: + // "HTTP" Protocol string `json:"protocol,omitempty"` // SelfLink: Server defined URL for the resource (output only). @@ -682,7 +816,7 @@ type BackendServiceList struct { // only). Id string `json:"id,omitempty"` - // Items: The BackendService resources. + // Items: A list of BackendService resources. Items []*BackendService `json:"items,omitempty"` // Kind: Type of resource. @@ -709,248 +843,375 @@ type DeprecationStatus struct { // deprecation state of this resource will be changed to OBSOLETE. Obsolete string `json:"obsolete,omitempty"` - // Replacement: A URL of the suggested replacement for the deprecated - // resource. The deprecated resource and its replacement must be - // resources of the same kind. + // Replacement: The URL of the suggested replacement for a deprecated + // resource. The suggested replacement resource must be the same kind of + // resource as the deprecated resource. Replacement string `json:"replacement,omitempty"` - // State: The deprecation state. Can be "DEPRECATED", "OBSOLETE", or - // "DELETED". Operations which create a new resource using a - // "DEPRECATED" resource will return successfully, but with a warning - // indicating the deprecated resource and recommending its replacement. - // New uses of "OBSOLETE" or "DELETED" resources will result in an - // error. + // State: The deprecation state of this resource. This can be + // DEPRECATED, OBSOLETE, or DELETED. Operations which create a new + // resource using a DEPRECATED resource will return successfully, but + // with a warning indicating the deprecated resource and recommending + // its replacement. Operations which use OBSOLETE or DELETED resources + // will be rejected and result in an error. + // + // Possible values: + // "DELETED" + // "DEPRECATED" + // "OBSOLETE" State string `json:"state,omitempty"` } type Disk struct { - // CreationTimestamp: Creation timestamp in RFC3339 text format (output - // only). + // 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 when the resource is created. Description string `json:"description,omitempty"` - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. + // Kind: [Output Only] Type of the resource. Always compute#disk for + // disks. Kind string `json:"kind,omitempty"` - // Licenses: Public visible licenses. + // LastAttachTimestamp: [Output Only] Last attach timestamp in RFC3339 + // text format. + LastAttachTimestamp string `json:"lastAttachTimestamp,omitempty"` + + // LastDetachTimestamp: [Output Only] Last detach timestamp in RFC3339 + // text format. + LastDetachTimestamp string `json:"lastDetachTimestamp,omitempty"` + + // Licenses: Any applicable publicly visible licenses. Licenses []string `json:"licenses,omitempty"` // Name: Name of the resource; provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with - // RFC1035. + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. Name string `json:"name,omitempty"` // Options: Internal use only. Options string `json:"options,omitempty"` - // SelfLink: Server defined URL for the resource (output only). + // SelfLink: [Output Only] Server-defined fully-qualified URL for this + // resource. SelfLink string `json:"selfLink,omitempty"` - // SizeGb: Size of the persistent disk, specified in GB. This parameter - // is optional when creating a disk from a disk image or a snapshot, - // otherwise it is required. + // SizeGb: Size of the persistent disk, specified in GB. You can specify + // this field when creating a persistent disk using the sourceImage or + // sourceSnapshot parameter, or specify it alone to create an empty + // persistent disk. + // + // If you specify this field along with sourceImage or sourceSnapshot, + // the value of sizeGb must not be less than the size of the sourceImage + // or the size of the snapshot. SizeGb int64 `json:"sizeGb,omitempty,string"` - // SourceImage: The source image used to create this disk. + // SourceImage: The source image used to create this disk. If the source + // image is deleted from the system, this field will not be set, even if + // an image with the same name has been re-created. + // + // When creating a disk, you can provide a private (custom) image using + // the following input, and Compute Engine will use the corresponding + // image from your project. For example: + // + // global/images/my-private-image + // + // Or you can provide an image from a publicly-available project. For + // example, to use a Debian image from the debian-cloud project, make + // sure to include the project in the + // URL: + // + // projects/debian-cloud/global/images/debian-7-wheezy-vYYYYMMDD + // + // where vYYYYMMDD is the image version. The fully-qualified URL will + // also work in both cases. SourceImage string `json:"sourceImage,omitempty"` - // SourceImageId: The 'id' value of the image used to create this disk. - // This value may be used to determine whether the disk was created from - // the current or a previous instance of a given image. + // SourceImageId: The ID value of the image used to create this disk. + // This value identifies the exact image that was used to create this + // persistent disk. For example, if you created the persistent disk from + // an image that was later deleted and recreated under the same name, + // the source image ID would identify the exact version of the image + // that was used. SourceImageId string `json:"sourceImageId,omitempty"` - // SourceSnapshot: The source snapshot used to create this disk. + // SourceSnapshot: The source snapshot used to create this disk. You can + // provide this as a partial or full URL to the resource. For example, + // the following are valid values: + // - + // https://www.googleapis.com/compute/v1/projects/project/global/snapshot + // s/snapshot + // - projects/project/global/snapshots/snapshot + // - global/snapshots/snapshot SourceSnapshot string `json:"sourceSnapshot,omitempty"` - // SourceSnapshotId: The 'id' value of the snapshot used to create this - // disk. This value may be used to determine whether the disk was - // created from the current or a previous instance of a given disk - // snapshot. + // SourceSnapshotId: [Output Only] The unique ID of the snapshot used to + // create this disk. This value identifies the exact snapshot that was + // used to create this persistent disk. For example, if you created the + // persistent disk from a snapshot that was later deleted and recreated + // under the same name, the source snapshot ID would identify the exact + // version of the snapshot that was used. SourceSnapshotId string `json:"sourceSnapshotId,omitempty"` - // Status: The status of disk creation (output only). + // Status: [Output Only] The status of disk creation. Applicable + // statuses includes: CREATING, FAILED, READY, RESTORING. + // + // Possible values: + // "CREATING" + // "FAILED" + // "READY" + // "RESTORING" Status string `json:"status,omitempty"` // Type: URL of the disk type resource describing which disk type to use // to create the disk; provided by the client when the disk is created. Type string `json:"type,omitempty"` - // Zone: URL of the zone where the disk resides (output only). + // Users: Links to the users of the disk (attached instances) in form: + // project/zones/zone/instances/instance + Users []string `json:"users,omitempty"` + + // Zone: [Output Only] URL of the zone where the disk resides. Zone string `json:"zone,omitempty"` } type DiskAggregatedList struct { - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: A map of scoped disk lists. + // Items: [Output Only] A map of scoped disk lists. Items map[string]DisksScopedList `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource. Always + // compute#diskAggregatedList for aggregated lists of persistent disks. Kind string `json:"kind,omitempty"` - // NextPageToken: A token used to continue a truncated list request - // (output only). + // NextPageToken: [Output Only] A token used to continue a truncated + // list request. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: Server defined URL for this resource (output only). + // SelfLink: [Output Only] Server defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` } type DiskList struct { - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: The persistent disk resources. + // Items: [Output Only] A list of persistent disks. Items []*Disk `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource. Always compute#diskList for + // lists of disks. Kind string `json:"kind,omitempty"` - // NextPageToken: A token used to continue a truncated list request - // (output only). + // NextPageToken: [Output Only] A token used to continue a truncated + // list request. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: Server defined URL for this resource (output only). + // SelfLink: [Output Only] Server defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` } +type DiskMoveRequest struct { + // DestinationZone: The URL of the destination zone to move the disk to. + // This can be a full or partial URL. For example, the following are all + // valid URLs to a zone: + // - https://www.googleapis.com/compute/v1/projects/project/zones/zone + // + // - projects/project/zones/zone + // - zones/zone + DestinationZone string `json:"destinationZone,omitempty"` + + // TargetDisk: The URL of the target disk to move. This can be a full or + // partial URL. For example, the following are all valid URLs to a disk: + // + // - + // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disk + // s/disk + // - projects/project/zones/zone/disks/disk + // - zones/zone/disks/disk + TargetDisk string `json:"targetDisk,omitempty"` +} + type DiskType struct { - // CreationTimestamp: Creation timestamp in RFC3339 text format (output - // only). + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` - // DefaultDiskSizeGb: Server defined default disk size in gb (output - // only). + // DefaultDiskSizeGb: [Output Only] Server defined default disk size in + // GB. DefaultDiskSizeGb int64 `json:"defaultDiskSizeGb,omitempty,string"` - // Deprecated: The deprecation status associated with this disk type. + // Deprecated: [Output Only] The deprecation status associated with this + // disk type. Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: An optional textual description of the resource. + // Description: [Output Only] An optional textual description of the + // resource. Description string `json:"description,omitempty"` - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. + // Kind: [Output Only] Type of the resource. Always compute#diskType for + // disk types. Kind string `json:"kind,omitempty"` - // Name: Name of the resource. + // Name: [Output Only] Name of the resource. Name string `json:"name,omitempty"` - // SelfLink: Server defined URL for the resource (output only). + // SelfLink: [Output Only] Server defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // ValidDiskSize: An optional textual descroption of the valid disk - // size, e.g., "10GB-10TB". + // ValidDiskSize: [Output Only] An optional textual description of the + // valid disk size, such as "10GB-10TB". ValidDiskSize string `json:"validDiskSize,omitempty"` - // Zone: Url of the zone where the disk type resides (output only). + // Zone: [Output Only] URL of the zone where the disk type resides. Zone string `json:"zone,omitempty"` } type DiskTypeAggregatedList struct { - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: A map of scoped disk type lists. + // Items: [Output Only] A map of scoped disk type lists. Items map[string]DiskTypesScopedList `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource. Always + // compute#diskTypeAggregatedList. Kind string `json:"kind,omitempty"` - // NextPageToken: A token used to continue a truncated list request - // (output only). + // NextPageToken: [Output Only] A token used to continue a truncated + // list request. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: Server defined URL for this resource (output only). + // SelfLink: [Output Only] Server defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` } type DiskTypeList struct { - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: The disk type resources. + // Items: [Output Only] A list of Disk Type resources. Items []*DiskType `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource. Always compute#diskTypeList for + // disk types. Kind string `json:"kind,omitempty"` - // NextPageToken: A token used to continue a truncated list request - // (output only). + // NextPageToken: [Output Only] A token used to continue a truncated + // list request. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: Server defined URL for this resource (output only). + // SelfLink: [Output Only] Server defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` } type DiskTypesScopedList struct { - // DiskTypes: List of disk types contained in this scope. + // DiskTypes: [Output Only] List of disk types contained in this scope. DiskTypes []*DiskType `json:"diskTypes,omitempty"` - // Warning: Informational warning which replaces the list of disk types - // when the list is empty. + // Warning: [Output Only] Informational warning which replaces the list + // of disk types when the list is empty. Warning *DiskTypesScopedListWarning `json:"warning,omitempty"` } type DiskTypesScopedListWarning struct { - // Code: The warning type identifier for this warning. + // Code: [Output Only] The warning type identifier for this warning. + // + // Possible values: + // "DEPRECATED_RESOURCE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "INJECTED_KERNELS_DEPRECATED" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_NOT_DELETED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNREACHABLE" Code string `json:"code,omitempty"` - // Data: Metadata for this warning in 'key: value' format. + // Data: [Output Only] Metadata for this warning in key: value format. Data []*DiskTypesScopedListWarningData `json:"data,omitempty"` - // Message: Optional human-readable details for this warning. + // Message: [Output Only] Optional human-readable details for this + // warning. Message string `json:"message,omitempty"` } type DiskTypesScopedListWarningData struct { - // Key: A key for the warning data. + // Key: [Output Only] A key for the warning data. Key string `json:"key,omitempty"` - // Value: A warning data value corresponding to the key. + // Value: [Output Only] A warning data value corresponding to the key. Value string `json:"value,omitempty"` } type DisksScopedList struct { - // Disks: List of disks contained in this scope. + // Disks: [Output Only] List of disks contained in this scope. Disks []*Disk `json:"disks,omitempty"` - // Warning: Informational warning which replaces the list of disks when - // the list is empty. + // Warning: [Output Only] Informational warning which replaces the list + // of disks when the list is empty. Warning *DisksScopedListWarning `json:"warning,omitempty"` } type DisksScopedListWarning struct { - // Code: The warning type identifier for this warning. + // Code: [Output Only] The warning type identifier for this warning. + // + // Possible values: + // "DEPRECATED_RESOURCE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "INJECTED_KERNELS_DEPRECATED" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_NOT_DELETED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNREACHABLE" Code string `json:"code,omitempty"` - // Data: Metadata for this warning in 'key: value' format. + // Data: [Output Only] Metadata for this warning in key: value format. Data []*DisksScopedListWarningData `json:"data,omitempty"` - // Message: Optional human-readable details for this warning. + // Message: [Output Only] Optional human-readable details for this + // warning. Message string `json:"message,omitempty"` } type DisksScopedListWarningData struct { - // Key: A key for the warning data. + // Key: [Output Only] A key for the warning data. Key string `json:"key,omitempty"` - // Value: A warning data value corresponding to the key. + // Value: [Output Only] A warning data value corresponding to the key. Value string `json:"value,omitempty"` } @@ -960,85 +1221,108 @@ type Firewall struct { // connection. Allowed []*FirewallAllowed `json:"allowed,omitempty"` - // CreationTimestamp: Creation timestamp in RFC3339 text format (output - // only). + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339text + // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` // Description: An optional textual description of the resource; // provided by the client when the resource is created. Description string `json:"description,omitempty"` - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. + // Kind: [Output Ony] Type of the resource. Always compute#firewall for + // firewall rules. Kind string `json:"kind,omitempty"` // Name: Name of the resource; provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with - // RFC1035. + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // Network: URL of the network to which this firewall is applied; - // provided by the client when the firewall is created. + // Network: URL of the network resource for this firewall rule. This + // field is required for creating an instance but optional when creating + // a firewall rule. If not specified when creating a firewall rule, the + // default network is used: + // global/networks/default + // If you choose to specify this property, you can specify the network + // as a full or partial URL. For example, the following are all valid + // URLs: + // - + // https://www.googleapis.com/compute/v1/projects/myproject/global/networ + // ks/my-network + // - projects/myproject/global/networks/my-network + // - global/networks/default Network string `json:"network,omitempty"` - // SelfLink: Server defined URL for the resource (output only). + // SelfLink: [Output Only] Server defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // SourceRanges: A list of IP address blocks expressed in CIDR format - // which this rule applies to. One or both of sourceRanges and - // sourceTags may be set; an inbound connection is allowed if either the - // range or the tag of the source matches. + // SourceRanges: The IP address blocks that this rule applies to, + // expressed in CIDR format. One or both of sourceRanges and sourceTags + // may be set. + // + // If both properties are set, an inbound connection is allowed if the + // range or the tag of the source matches the sourceRanges OR matches + // the sourceTags property; the connection does not need to match both + // properties. SourceRanges []string `json:"sourceRanges,omitempty"` // SourceTags: A list of instance tags which this rule applies to. One - // or both of sourceRanges and sourceTags may be set; an inbound - // connection is allowed if either the range or the tag of the source - // matches. + // or both of sourceRanges and sourceTags may be set. + // + // If both properties are set, an inbound connection is allowed if the + // range or the tag of the source matches the sourceRanges OR matches + // the sourceTags property; the connection does not need to match both + // properties. SourceTags []string `json:"sourceTags,omitempty"` // TargetTags: A list of instance tags indicating sets of instances // located on network which may make network connections as specified in - // allowed. If no targetTags are specified, the firewall rule applies to - // all instances on the specified network. + // allowed[]. If no targetTags are specified, the firewall rule applies + // to all instances on the specified network. TargetTags []string `json:"targetTags,omitempty"` } type FirewallAllowed struct { - // IPProtocol: Required; this is the IP protocol that is allowed for - // this rule. This can either be one of the following well known - // protocol strings ["tcp", "udp", "icmp", "esp", "ah", "sctp"], or the - // IP protocol number. + // IPProtocol: The IP protocol that is allowed for this rule. The + // protocol type is required when creating a firewall. This value can + // either be one of the following well known protocol strings (tcp, udp, + // icmp, esp, ah, sctp), or the IP protocol number. IPProtocol string `json:"IPProtocol,omitempty"` - // Ports: An optional list of ports which are allowed. It is an error to - // specify this for any protocol that isn't UDP or TCP. Each entry must - // be either an integer or a range. If not specified, connections - // through any port are allowed. + // Ports: An optional list of ports which are allowed. This field is + // only applicable for UDP or TCP protocol. Each entry must be either an + // integer or a range. If not specified, connections through any port + // are allowed // - // Example inputs include: ["22"], - // ["80","443"] and ["12345-12349"]. + // Example inputs include: ["22"], ["80","443"], and ["12345-12349"]. Ports []string `json:"ports,omitempty"` } type FirewallList struct { - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: The firewall resources. + // Items: [Output Only] A list of Firewall resources. Items []*Firewall `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource. Always compute#firewallList for + // lists of firewalls. Kind string `json:"kind,omitempty"` - // NextPageToken: A token used to continue a truncated list request - // (output only). + // NextPageToken: [Output Only] A token used to continue a truncated + // list request. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: Server defined URL for this resource (output only). + // SelfLink: [Output Only] Server defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` } @@ -1053,6 +1337,13 @@ type ForwardingRule struct { // IPProtocol: The IP protocol to which this rule applies, valid options // are 'TCP', 'UDP', 'ESP', 'AH' or 'SCTP'. + // + // Possible values: + // "AH" + // "ESP" + // "SCTP" + // "TCP" + // "UDP" IPProtocol string `json:"IPProtocol,omitempty"` // CreationTimestamp: Creation timestamp in RFC3339 text format (output @@ -1121,7 +1412,7 @@ type ForwardingRuleList struct { // only). Id string `json:"id,omitempty"` - // Items: The ForwardingRule resources. + // Items: A list of ForwardingRule resources. Items []*ForwardingRule `json:"items,omitempty"` // Kind: Type of resource. @@ -1145,21 +1436,38 @@ type ForwardingRulesScopedList struct { } type ForwardingRulesScopedListWarning struct { - // Code: The warning type identifier for this warning. + // Code: [Output Only] The warning type identifier for this warning. + // + // Possible values: + // "DEPRECATED_RESOURCE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "INJECTED_KERNELS_DEPRECATED" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_NOT_DELETED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNREACHABLE" Code string `json:"code,omitempty"` - // Data: Metadata for this warning in 'key: value' format. + // Data: [Output Only] Metadata for this warning in key: value format. Data []*ForwardingRulesScopedListWarningData `json:"data,omitempty"` - // Message: Optional human-readable details for this warning. + // Message: [Output Only] Optional human-readable details for this + // warning. Message string `json:"message,omitempty"` } type ForwardingRulesScopedListWarningData struct { - // Key: A key for the warning data. + // Key: [Output Only] A key for the warning data. Key string `json:"key,omitempty"` - // Value: A warning data value corresponding to the key. + // Value: [Output Only] A warning data value corresponding to the key. Value string `json:"value,omitempty"` } @@ -1169,6 +1477,10 @@ type HealthCheckReference struct { type HealthStatus struct { // HealthState: Health state of the instance. + // + // Possible values: + // "HEALTHY" + // "UNHEALTHY" HealthState string `json:"healthState,omitempty"` // Instance: URL of the instance resource. @@ -1241,7 +1553,8 @@ type HttpHealthCheck struct { SelfLink string `json:"selfLink,omitempty"` // TimeoutSec: How long (in seconds) to wait before claiming failure. - // The default value is 5 seconds. + // The default value is 5 seconds. It is invalid for timeoutSec to have + // greater value than checkIntervalSec. TimeoutSec int64 `json:"timeoutSec,omitempty"` // UnhealthyThreshold: A so-far healthy VM will be marked unhealthy @@ -1254,7 +1567,7 @@ type HttpHealthCheckList struct { // only). Id string `json:"id,omitempty"` - // Items: The HttpHealthCheck resources. + // Items: A list of HttpHealthCheck resources. Items []*HttpHealthCheck `json:"items,omitempty"` // Kind: Type of resource. @@ -1273,8 +1586,8 @@ type Image struct { // Cloud Storage (in bytes). ArchiveSizeBytes int64 `json:"archiveSizeBytes,omitempty,string"` - // CreationTimestamp: Creation timestamp in RFC3339 text format (output - // only). + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` // Deprecated: The deprecation status associated with this image. @@ -1284,56 +1597,79 @@ type Image struct { // client when the resource is created. Description string `json:"description,omitempty"` - // DiskSizeGb: Size of the image when restored onto a disk (in GiB). + // DiskSizeGb: Size of the image when restored onto a persistent disk + // (in GB). DiskSizeGb int64 `json:"diskSizeGb,omitempty,string"` - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. + // Kind: [Output Only] Type of the resource. Always compute#image for + // images. Kind string `json:"kind,omitempty"` - // Licenses: Public visible licenses. + // Licenses: Any applicable publicly visible licenses. Licenses []string `json:"licenses,omitempty"` // Name: Name of the resource; provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with - // RFC1035. + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // RawDisk: The raw disk image parameters. + // RawDisk: The parameters of the raw disk image. RawDisk *ImageRawDisk `json:"rawDisk,omitempty"` - // SelfLink: Server defined URL for the resource (output only). + // SelfLink: [Output Only] Server defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // SourceDisk: The source disk used to create this image. + // SourceDisk: URL of the The source disk used to create this image. + // This can be a full or valid partial URL. You must provide either this + // property or the rawDisk.source property but not both to create an + // image. For example, the following are valid values: + // - + // https://www.googleapis.com/compute/v1/projects/project/zones/zone/disk + // /disk + // - projects/project/zones/zone/disk/disk + // - zones/zone/disks/disk SourceDisk string `json:"sourceDisk,omitempty"` - // SourceDiskId: The 'id' value of the disk used to create this image. + // SourceDiskId: The ID value of the disk used to create this image. // This value may be used to determine whether the image was taken from // the current or a previous instance of a given disk name. SourceDiskId string `json:"sourceDiskId,omitempty"` - // SourceType: Must be "RAW"; provided by the client when the disk image - // is created. + // SourceType: The type of the image used to create this disk. The + // default and only value is RAW + // + // Possible values: + // "RAW" (default) SourceType string `json:"sourceType,omitempty"` - // Status: Status of the image (output only). It will be one of the - // following READY - after image has been successfully created and is - // ready for use FAILED - if creating the image fails for some reason - // PENDING - the image creation is in progress An image can be used to - // create other resources suck as instances only after the image has - // been successfully created and the status is set to READY. + // Status: [Output Only] The status of the image. An image can be used + // to create other resources, such as instances, only after the image + // has been successfully created and the status is set to READY. + // Possible values are FAILED, PENDING, or READY. + // + // Possible values: + // "FAILED" + // "PENDING" + // "READY" Status string `json:"status,omitempty"` } type ImageRawDisk struct { // ContainerType: The format used to encode and transmit the block - // device. Should be TAR. This is just a container and transmission - // format and not a runtime format. Provided by the client when the disk - // image is created. + // device, which should be TAR. This is just a container and + // transmission format and not a runtime format. Provided by the client + // when the disk image is created. + // + // Possible values: + // "TAR" ContainerType string `json:"containerType,omitempty"` // Sha1Checksum: An optional SHA1 checksum of the disk image before @@ -1341,7 +1677,8 @@ type ImageRawDisk struct { Sha1Checksum string `json:"sha1Checksum,omitempty"` // Source: The full Google Cloud Storage URL where the disk image is - // stored; provided by the client when the disk image is created. + // stored. You must provide either this property or the sourceDisk + // property but not both. Source string `json:"source,omitempty"` } @@ -1350,7 +1687,7 @@ type ImageList struct { // only). Id string `json:"id,omitempty"` - // Items: The disk image resources. + // Items: A list of Image resources. Items []*Image `json:"items,omitempty"` // Kind: Type of resource. @@ -1365,15 +1702,17 @@ type ImageList struct { } type Instance struct { - // CanIpForward: Allows this instance to send packets with source IP - // addresses other than its own and receive packets with destination IP - // addresses other than its own. If this instance will be used as an IP - // gateway or it will be set as the next-hop in a Route resource, say - // true. If unsure, leave this set to false. + // CanIpForward: Allows this instance to send and receive packets with + // non-matching destination or source IPs. This is required if you plan + // to use this instance to forward routes. For more information, see + // Enabling IP Forwarding. CanIpForward bool `json:"canIpForward,omitempty"` - // CreationTimestamp: Creation timestamp in RFC3339 text format (output - // only). + // CpuPlatform: [Output Only] The CPU platform used by this instance. + CpuPlatform string `json:"cpuPlatform,omitempty"` + + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` // Description: An optional textual description of the resource; @@ -1384,155 +1723,194 @@ type Instance struct { // must be created before you can assign them. Disks []*AttachedDisk `json:"disks,omitempty"` - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. + // Kind: [Output Only] Type of the resource. Always compute#instance for + // instances. Kind string `json:"kind,omitempty"` - // MachineType: URL of the machine type resource describing which - // machine type to use to host the instance; provided by the client when - // the instance is created. + // MachineType: Full or partial URL of the machine type resource to use + // for this instance. This is provided by the client when the instance + // is created. For example, the following is a valid partial + // url: + // + // zones/zone/machineTypes/machine-type MachineType string `json:"machineType,omitempty"` - // Metadata: Metadata key/value pairs assigned to this instance. - // Consists of custom metadata or predefined keys; see Instance - // documentation for more information. + // Metadata: The metadata key/value pairs assigned to this instance. + // This includes custom metadata and predefined keys. Metadata *Metadata `json:"metadata,omitempty"` // Name: Name of the resource; provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with - // RFC1035. + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // NetworkInterfaces: Array of configurations for this interface. This - // specifies how this interface is configured to interact with other - // network services, such as connecting to the internet. Currently, - // ONE_TO_ONE_NAT is the only access config supported. If there are no - // accessConfigs specified, then this instance will have no external - // internet access. + // NetworkInterfaces: An array of configurations for this interface. + // This specifies how this interface is configured to interact with + // other network services, such as connecting to the internet. NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` // Scheduling: Scheduling options for this instance. Scheduling *Scheduling `json:"scheduling,omitempty"` - // SelfLink: Server defined URL for this resource (output only). + // SelfLink: [Output Only] Server defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` - // ServiceAccounts: A list of service accounts each with specified - // scopes, for which access tokens are to be made available to the - // instance through metadata queries. + // ServiceAccounts: A list of service accounts, with their specified + // scopes, authorized for this instance. Service accounts generate + // access tokens that can be accessed through the metadata server and + // used to authenticate applications on the instance. See Authenticating + // from Google Compute Engine for more information. ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` - // Status: Instance status. One of the following values: "PROVISIONING", - // "STAGING", "RUNNING", "STOPPING", "STOPPED", "TERMINATED" (output - // only). + // Status: [Output Only] The status of the instance. One of the + // following values: PROVISIONING, STAGING, RUNNING, STOPPING, and + // TERMINATED. + // + // Possible values: + // "PROVISIONING" + // "RUNNING" + // "STAGING" + // "STOPPED" + // "STOPPING" + // "SUSPENDED" + // "SUSPENDING" + // "TERMINATED" Status string `json:"status,omitempty"` - // StatusMessage: An optional, human-readable explanation of the status - // (output only). + // StatusMessage: [Output Only] An optional, human-readable explanation + // of the status. StatusMessage string `json:"statusMessage,omitempty"` - // Tags: A list of tags to be applied to this instance. Used to identify - // valid sources or targets for network firewalls. Provided by the - // client on instance creation. The tags can be later modified by the - // setTags method. Each tag within the list must comply with RFC1035. + // Tags: A list of tags to appy to this instance. Tags are used to + // identify valid sources or targets for network firewalls and are + // specified by the client during instance creation. The tags can be + // later modified by the setTags method. Each tag within the list must + // comply with RFC1035. Tags *Tags `json:"tags,omitempty"` - // Zone: URL of the zone where the instance resides (output only). + // Zone: [Output Only] URL of the zone where the instance resides. Zone string `json:"zone,omitempty"` } type InstanceAggregatedList struct { - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: A map of scoped instance lists. + // Items: [Output Only] A map of scoped instance lists. Items map[string]InstancesScopedList `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource. Always + // compute#instanceAggregatedList for aggregated lists of Instance + // resources. Kind string `json:"kind,omitempty"` - // NextPageToken: A token used to continue a truncated list request - // (output only). + // NextPageToken: [Output Only] A token used to continue a truncated + // list request. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: Server defined URL for this resource (output only). + // SelfLink: [Output Only] Server defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` } type InstanceList struct { - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: A list of instance resources. + // Items: [Output Only] A list of Instance resources. Items []*Instance `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource. Always compute#instanceList for + // lists of Instance resources. Kind string `json:"kind,omitempty"` - // NextPageToken: A token used to continue a truncated list request - // (output only). + // NextPageToken: [Output Only] A token used to continue a truncated + // list request. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: Server defined URL for this resource (output only). + // SelfLink: [Output Only] Server defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` } +type InstanceMoveRequest struct { + // DestinationZone: The URL of the destination zone to move the instance + // to. This can be a full or partial URL. For example, the following are + // all valid URLs to a zone: + // - https://www.googleapis.com/compute/v1/projects/project/zones/zone + // + // - projects/project/zones/zone + // - zones/zone + DestinationZone string `json:"destinationZone,omitempty"` + + // TargetInstance: The URL of the target instance to move. This can be a + // full or partial URL. For example, the following are all valid URLs to + // an instance: + // - + // https://www.googleapis.com/compute/v1/projects/project/zones/zone/inst + // ances/instance + // - projects/project/zones/zone/instances/instance + // - zones/zone/instances/instance + TargetInstance string `json:"targetInstance,omitempty"` +} + type InstanceProperties struct { - // CanIpForward: Allows instances created based on this template to send - // packets with source IP addresses other than their own and receive - // packets with destination IP addresses other than their own. If these - // instances will be used as an IP gateway or it will be set as the - // next-hop in a Route resource, say true. If unsure, leave this set to - // false. + // CanIpForward: A boolean that specifies if instances created from this + // template can send packets with source IP addresses other than their + // own or receive packets with destination IP addresses other than their + // own. If you use these instances as an IP gateway or as the next-hop + // in a Route resource, specify true. Otherwise, specify false. CanIpForward bool `json:"canIpForward,omitempty"` - // Description: An optional textual description for the instances - // created based on the instance template resource; provided by the - // client when the template is created. + // Description: An optional text description for the instances that are + // created from this instance template. Description string `json:"description,omitempty"` - // Disks: Array of disks associated with instance created based on this - // template. + // Disks: An array of disks that are associated with the instances that + // are created from this template. Disks []*AttachedDisk `json:"disks,omitempty"` - // MachineType: Name of the machine type resource describing which - // machine type to use to host the instances created based on this - // template; provided by the client when the instance template is - // created. + // MachineType: The machine type to use for instances that are created + // from this template. MachineType string `json:"machineType,omitempty"` - // Metadata: Metadata key/value pairs assigned to instances created - // based on this template. Consists of custom metadata or predefined - // keys; see Instance documentation for more information. + // Metadata: The metadata key/value pairs to assign to instances that + // are created from this template. These pairs can consist of custom + // metadata or predefined keys. See Project and instance metadata for + // more information. Metadata *Metadata `json:"metadata,omitempty"` - // NetworkInterfaces: Array of configurations for this interface. This - // specifies how this interface is configured to interact with other - // network services, such as connecting to the internet. Currently, - // ONE_TO_ONE_NAT is the only access config supported. If there are no - // accessConfigs specified, then this instances created based based on - // this template will have no external internet access. + // NetworkInterfaces: An array of network access configurations for this + // interface. This specifies how this interface is configured to + // interact with other network services, such as connecting to the + // internet. Currently, ONE_TO_ONE_NAT is the only supported access + // configuration. If you do not specify any access configurations, the + // instances that are created from this template will have no external + // internet access. NetworkInterfaces []*NetworkInterface `json:"networkInterfaces,omitempty"` - // Scheduling: Scheduling options for the instances created based on - // this template. + // Scheduling: A list of scheduling options for the instances that are + // created from this template. Scheduling *Scheduling `json:"scheduling,omitempty"` - // ServiceAccounts: A list of service accounts each with specified - // scopes, for which access tokens are to be made available to the - // instances created based on this template, through metadata queries. + // ServiceAccounts: A list of service accounts with specified scopes. + // Access tokens for these service accounts are available to the + // instances that are created from this template. Use metadata queries + // to obtain the access tokens for these instances. ServiceAccounts []*ServiceAccount `json:"serviceAccounts,omitempty"` - // Tags: A list of tags to be applied to the instances created based on - // this template used to identify valid sources or targets for network - // firewalls. Provided by the client on instance creation. The tags can - // be later modified by the setTags method. Each tag within the list - // must comply with RFC1035. + // Tags: A list of tags to apply to the instances that are created from + // this template. The tags identify valid sources or targets for network + // firewalls. The setTags method can modify this list of tags. Each tag + // within the list must comply with RFC1035. Tags *Tags `json:"tags,omitempty"` } @@ -1541,78 +1919,97 @@ type InstanceReference struct { } type InstanceTemplate struct { - // CreationTimestamp: Creation timestamp in RFC3339 text format (output - // only). + // CreationTimestamp: [Output Only] The creation timestamp for this + // instance template in RFC3339 text format. CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Description: An optional textual description of the instance template - // resource; provided by the client when the resource is created. + // Description: An optional text description for the instance template. Description string `json:"description,omitempty"` - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] A unique identifier for this instance template. The + // server defines this identifier. Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. + // Kind: [Output Only] The resource type, which is always + // compute#instanceTemplate for instance templates. Kind string `json:"kind,omitempty"` - // Name: Name of the instance template resource; provided by the client - // when the resource is created. The name must be 1-63 characters long, - // and comply with RFC1035 + // Name: The name of the instance template. The name must be 1-63 + // characters long, and comply with RFC1035. Name string `json:"name,omitempty"` - // Properties: The instance properties portion of this instance template + // Properties: The instance properties for the instance template // resource. Properties *InstanceProperties `json:"properties,omitempty"` - // SelfLink: Server defined URL for the resource (output only). + // SelfLink: [Output Only] The URL for this instance template. The + // server defines this URL. SelfLink string `json:"selfLink,omitempty"` } type InstanceTemplateList struct { - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] A unique identifier for this instance template. The + // server defines this identifier. Id string `json:"id,omitempty"` - // Items: A list of instance template resources. + // Items: A list of InstanceTemplate resources. Items []*InstanceTemplate `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] The resource type, which is always + // compute#instanceTemplatesListResponse for instance template lists. Kind string `json:"kind,omitempty"` - // NextPageToken: A token used to continue a truncated list request - // (output only). + // NextPageToken: [Output Only] A token that is used to continue a + // truncated list request. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: Server defined URL for this resource (output only). + // SelfLink: [Output Only] The URL for this instance template list. The + // server defines this URL. SelfLink string `json:"selfLink,omitempty"` } type InstancesScopedList struct { - // Instances: List of instances contained in this scope. + // Instances: [Output Only] List of instances contained in this scope. Instances []*Instance `json:"instances,omitempty"` - // Warning: Informational warning which replaces the list of instances - // when the list is empty. + // Warning: [Output Only] Informational warning which replaces the list + // of instances when the list is empty. Warning *InstancesScopedListWarning `json:"warning,omitempty"` } type InstancesScopedListWarning struct { - // Code: The warning type identifier for this warning. + // Code: [Output Only] The warning type identifier for this warning. + // + // Possible values: + // "DEPRECATED_RESOURCE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "INJECTED_KERNELS_DEPRECATED" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_NOT_DELETED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNREACHABLE" Code string `json:"code,omitempty"` - // Data: Metadata for this warning in 'key: value' format. + // Data: [Output Only] Metadata for this warning in key: value format. Data []*InstancesScopedListWarningData `json:"data,omitempty"` - // Message: Optional human-readable details for this warning. + // Message: [Output Only] Optional human-readable details for this + // warning. Message string `json:"message,omitempty"` } type InstancesScopedListWarningData struct { - // Key: A key for the warning data. + // Key: [Output Only] A key for the warning data. Key string `json:"key,omitempty"` - // Value: A warning data value corresponding to the key. + // Value: [Output Only] A warning data value corresponding to the key. Value string `json:"value,omitempty"` } @@ -1621,63 +2018,69 @@ type License struct { // running software that contains this license on an instance. ChargesUseFee bool `json:"chargesUseFee,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource. Always compute#license for + // licenses. Kind string `json:"kind,omitempty"` - // Name: Name of the resource; provided by the client when the resource - // is created. The name must be 1-63 characters long, and comply with - // RFC1035. + // Name: Name of the resource. The name must be 1-63 characters long, + // and comply with RCF1035. Name string `json:"name,omitempty"` - // SelfLink: Server defined URL for the resource (output only). + // SelfLink: [Output Only] Server defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` } type MachineType struct { - // CreationTimestamp: Creation timestamp in RFC3339 text format (output - // only). + // CreationTimestamp: [Output Only] Creation timestamp in RFC3339 text + // format. CreationTimestamp string `json:"creationTimestamp,omitempty"` - // Deprecated: The deprecation status associated with this machine type. + // Deprecated: [Output Only] The deprecation status associated with this + // machine type. Deprecated *DeprecationStatus `json:"deprecated,omitempty"` - // Description: An optional textual description of the resource. + // Description: [Output Only] An optional textual description of the + // resource. Description string `json:"description,omitempty"` - // GuestCpus: Count of CPUs exposed to the instance. + // GuestCpus: [Output Only] The tumber of CPUs exposed to the instance. GuestCpus int64 `json:"guestCpus,omitempty"` - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id uint64 `json:"id,omitempty,string"` - // ImageSpaceGb: Space allotted for the image, defined in GB. + // ImageSpaceGb: [Deprecated] This property is deprecated and will never + // be populated with any relevant values. ImageSpaceGb int64 `json:"imageSpaceGb,omitempty"` // Kind: Type of the resource. Kind string `json:"kind,omitempty"` - // MaximumPersistentDisks: Maximum persistent disks allowed. + // MaximumPersistentDisks: [Output Only] Maximum persistent disks + // allowed. MaximumPersistentDisks int64 `json:"maximumPersistentDisks,omitempty"` - // MaximumPersistentDisksSizeGb: Maximum total persistent disks size - // (GB) allowed. + // MaximumPersistentDisksSizeGb: [Output Only] Maximum total persistent + // disks size (GB) allowed. MaximumPersistentDisksSizeGb int64 `json:"maximumPersistentDisksSizeGb,omitempty,string"` - // MemoryMb: Physical memory assigned to the instance, defined in MB. + // MemoryMb: [Output Only] The amount of physical memory available to + // the instance, defined in MB. MemoryMb int64 `json:"memoryMb,omitempty"` - // Name: Name of the resource. + // Name: [Output Only] Name of the resource. Name string `json:"name,omitempty"` - // ScratchDisks: List of extended scratch disks assigned to the - // instance. + // ScratchDisks: [Output Only] List of extended scratch disks assigned + // to the instance. ScratchDisks []*MachineTypeScratchDisks `json:"scratchDisks,omitempty"` - // SelfLink: Server defined URL for the resource (output only). + // SelfLink: [Output Only] Server defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` - // Zone: Url of the zone where the machine type resides (output only). + // Zone: [Output Only] The name of the zone where the machine type + // resides, such as us-central1-a. Zone string `json:"zone,omitempty"` } @@ -1687,82 +2090,107 @@ type MachineTypeScratchDisks struct { } type MachineTypeAggregatedList struct { - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: A map of scoped machine type lists. + // Items: [Output Only] A map of scoped machine type lists. Items map[string]MachineTypesScopedList `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource. Always + // compute#machineTypeAggregatedList for aggregated lists of machine + // types. Kind string `json:"kind,omitempty"` - // NextPageToken: A token used to continue a truncated list request - // (output only). + // NextPageToken: [Output Only] A token used to continue a truncated + // list request. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: Server defined URL for this resource (output only). + // SelfLink: [Output Only] Server defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` } type MachineTypeList struct { - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id string `json:"id,omitempty"` - // Items: The machine type resources. + // Items: [Output Only] A list of Machine Type resources. Items []*MachineType `json:"items,omitempty"` - // Kind: Type of resource. + // Kind: [Output Only] Type of resource. Always compute#machineTypeList + // for lists of machine types. Kind string `json:"kind,omitempty"` - // NextPageToken: A token used to continue a truncated list request - // (output only). + // NextPageToken: [Output Only] A token used to continue a truncated + // list request. NextPageToken string `json:"nextPageToken,omitempty"` - // SelfLink: Server defined URL for this resource (output only). + // SelfLink: [Output Only] Server defined URL for this resource. SelfLink string `json:"selfLink,omitempty"` } type MachineTypesScopedList struct { - // MachineTypes: List of machine types contained in this scope. + // MachineTypes: [Output Only] List of machine types contained in this + // scope. MachineTypes []*MachineType `json:"machineTypes,omitempty"` - // Warning: Informational warning which replaces the list of machine - // types when the list is empty. + // Warning: [Output Only] An informational warning that appears when the + // machine types list is empty. Warning *MachineTypesScopedListWarning `json:"warning,omitempty"` } type MachineTypesScopedListWarning struct { - // Code: The warning type identifier for this warning. + // Code: [Output Only] The warning type identifier for this warning. + // + // Possible values: + // "DEPRECATED_RESOURCE_USED" + // "DISK_SIZE_LARGER_THAN_IMAGE_SIZE" + // "INJECTED_KERNELS_DEPRECATED" + // "NEXT_HOP_ADDRESS_NOT_ASSIGNED" + // "NEXT_HOP_CANNOT_IP_FORWARD" + // "NEXT_HOP_INSTANCE_NOT_FOUND" + // "NEXT_HOP_INSTANCE_NOT_ON_NETWORK" + // "NEXT_HOP_NOT_RUNNING" + // "NOT_CRITICAL_ERROR" + // "NO_RESULTS_ON_PAGE" + // "REQUIRED_TOS_AGREEMENT" + // "RESOURCE_NOT_DELETED" + // "SINGLE_INSTANCE_PROPERTY_TEMPLATE" + // "UNREACHABLE" Code string `json:"code,omitempty"` - // Data: Metadata for this warning in 'key: value' format. + // Data: [Output Only] Metadata for this warning in key: value format. Data []*MachineTypesScopedListWarningData `json:"data,omitempty"` - // Message: Optional human-readable details for this warning. + // Message: [Output Only] Optional human-readable details for this + // warning. Message string `json:"message,omitempty"` } type MachineTypesScopedListWarningData struct { - // Key: A key for the warning data. + // Key: [Output Only] A key for the warning data. Key string `json:"key,omitempty"` - // Value: A warning data value corresponding to the key. + // Value: [Output Only] A warning data value corresponding to the key. Value string `json:"value,omitempty"` } type Metadata struct { - // Fingerprint: Fingerprint of this resource. A hash of the metadata's - // contents. This field is used for optimistic locking. An up-to-date - // metadata fingerprint must be provided in order to modify metadata. + // Fingerprint: Specifies a fingerprint for this request, which is + // essentially a hash of the metadata's contents and used for optimistic + // locking. The fingerprint is initially generated by Compute Engine and + // changes after every request to modify or update metadata. You must + // always provide an up-to-date fingerprint hash in order to update or + // change metadata. Fingerprint string `json:"fingerprint,omitempty"` // Items: Array of key/value pairs. The total size of all keys and // values must be less than 512 KB. Items []*MetadataItems `json:"items,omitempty"` - // Kind: Type of the resource. + // Kind: [Output Only] Type of the resource. Always compute#metadata for + // metadata. Kind string `json:"kind,omitempty"` } @@ -1782,271 +2210,328 @@ type MetadataItems struct { } type Network struct { - // IPv4Range: Required; The range of internal addresses that are legal - // on this network. This range is a CIDR specification, for example: + // IPv4Range: The range of internal addresses that are legal on this + // network. This range is a CIDR specification, for example: // 192.168.0.0/16. Provided by the client when the network is created. IPv4Range string `json:"IPv4Range,omitempty"` - // CreationTimestamp: Creation timestamp in RFC3339 text format (output - // only). + // 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 when the resource is created. Description string `json:"description,omitempty"` - // GatewayIPv4: An optional address that is used for default routing to - // other networks. This must be within the range specified by IPv4Range, - // and is typically the first usable address in that range. If not - // specified, the default value is the first usable address in - // IPv4Range. + // GatewayIPv4: A gateway address for default routing to other networks. + // This value is read only and is selected by the Google Compute Engine, + // typically as the first usable address in the IPv4Range. GatewayIPv4 string `json:"gatewayIPv4,omitempty"` - // Id: Unique identifier for the resource; defined by the server (output - // only). + // Id: [Output Only] Unique identifier for the resource; defined by the + // server. Id uint64 `json:"id,omitempty,string"` - // Kind: Type of the resource. + // Kind: [Output Only] Type of the resource. Always compute#network for + // networks. Kind string `json:"kind,omitempty"` // Name: Name of the resource; provided by the client when the resource // is created. The name must be 1-63 characters long, and comply with - // RFC1035. + // RFC1035. Specifically, the name must be 1-63 characters long and + // match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means + // the first character must be a lowercase letter, and all following + // characters must be a dash, lowercase letter, or digit, except the + // last character, which cannot be a dash. Name string `json:"name,omitempty"` - // SelfLink: Server defined URL for the resource (output only). + // SelfLink: [Output Only] Server defined URL for the resource. SelfLink string `json:"selfLink,omitempty"` } type NetworkInterface struct { - // AccessConfigs: Array of configurations for this interface. This - // specifies how this interface is configured to interact with other - // network services, such as connecting to the internet. Currently, - // ONE_TO_ONE_NAT is the only access config supported. If there are no - // accessConfigs specified, then this instance will have no external - // internet access. + // AccessConfigs: An array of configurations for this interface. + // Currently, chunkSize { + reqSize = chunkSize + } + r := io.NewSectionReader(rx.Media, start, reqSize) + req, _ := http.NewRequest("POST", rx.URI, r) + req.ContentLength = reqSize + req.Header.Set("Content-Range", fmt.Sprintf("bytes %v-%v/%v", start, start+reqSize-1, rx.ContentLength)) + req.Header.Set("Content-Type", rx.MediaType) + req.Header.Set("User-Agent", rx.UserAgent) + res, err = rx.Client.Do(req) + start += reqSize + if err == nil && (res.StatusCode == statusResumeIncomplete || res.StatusCode == http.StatusOK) { + rx.mu.Lock() + rx.progress = start // keep track of number of bytes sent so far + rx.mu.Unlock() + if rx.Callback != nil { + rx.Callback(start, rx.ContentLength) + } + } + if err != nil || res.StatusCode != statusResumeIncomplete { + break + } + } + return res, err +} + +var sleep = time.Sleep // override in unit tests + +// Upload starts the process of a resumable upload with a cancellable context. +// It retries indefinitely (with a pause of uploadPause between attempts) until cancelled. +// It is called from the auto-generated API code and is not visible to the user. +// rx is private to the auto-generated API code. +func (rx *ResumableUpload) Upload(ctx context.Context) (*http.Response, error) { + var res *http.Response + var err error + for { + res, err = rx.transferChunks(ctx) + if err != nil || res.StatusCode == http.StatusCreated || res.StatusCode == http.StatusOK { + return res, err + } + select { // Check for cancellation + case <-ctx.Done(): + res.StatusCode = http.StatusRequestTimeout + return res, ctx.Err() + default: + } + sleep(uploadPause) + } + return res, err } func ResolveRelative(basestr, relstr string) string { diff --git a/Godeps/_workspace/src/google.golang.org/api/googleapi/googleapi_test.go b/Godeps/_workspace/src/google.golang.org/api/googleapi/googleapi_test.go index abc5185061..c4989f70a5 100644 --- a/Godeps/_workspace/src/google.golang.org/api/googleapi/googleapi_test.go +++ b/Godeps/_workspace/src/google.golang.org/api/googleapi/googleapi_test.go @@ -11,9 +11,15 @@ import ( "io/ioutil" "net/http" "net/url" + "os" "reflect" + "regexp" + "strconv" "strings" "testing" + "time" + + "golang.org/x/net/context" ) type SetOpaqueTest struct { @@ -359,3 +365,234 @@ func TestConvertVariant(t *testing.T) { } } } + +type unexpectedReader struct{} + +func (unexpectedReader) Read([]byte) (int, error) { + return 0, fmt.Errorf("unexpected read in test.") +} + +var contentRangeRE = regexp.MustCompile(`^bytes (\d+)\-(\d+)/(\d+)$`) + +func (t *testTransport) RoundTrip(req *http.Request) (*http.Response, error) { + t.req = req + if rng := req.Header.Get("Content-Range"); rng != "" && !strings.HasPrefix(rng, "bytes */") { // Read the data + m := contentRangeRE.FindStringSubmatch(rng) + if len(m) != 4 { + return nil, fmt.Errorf("unable to parse content range: %v", rng) + } + start, err := strconv.ParseInt(m[1], 10, 64) + if err != nil { + return nil, fmt.Errorf("unable to parse content range: %v", rng) + } + end, err := strconv.ParseInt(m[2], 10, 64) + if err != nil { + return nil, fmt.Errorf("unable to parse content range: %v", rng) + } + totalSize, err := strconv.ParseInt(m[3], 10, 64) + if err != nil { + return nil, fmt.Errorf("unable to parse content range: %v", rng) + } + partialSize := end - start + 1 + t.buf, err = ioutil.ReadAll(req.Body) + if err != nil || int64(len(t.buf)) != partialSize { + return nil, fmt.Errorf("unable to read %v bytes from request data, n=%v: %v", partialSize, len(t.buf), err) + } + if totalSize == end+1 { + t.statusCode = 200 // signify completion of transfer + } + } + f := ioutil.NopCloser(unexpectedReader{}) + res := &http.Response{ + Body: f, + StatusCode: t.statusCode, + Header: http.Header{}, + } + if t.rangeVal != "" { + res.Header.Set("Range", t.rangeVal) + } + return res, nil +} + +type testTransport struct { + req *http.Request + statusCode int + rangeVal string + want int64 + buf []byte +} + +var statusTests = []*testTransport{ + &testTransport{statusCode: 308, want: 0}, + &testTransport{statusCode: 308, rangeVal: "bytes=0-0", want: 1}, + &testTransport{statusCode: 308, rangeVal: "bytes=0-42", want: 43}, +} + +func TestTransferStatus(t *testing.T) { + for _, tr := range statusTests { + rx := &ResumableUpload{ + Client: &http.Client{Transport: tr}, + } + g, _, err := rx.transferStatus() + if err != nil { + t.Error(err) + } + if g != tr.want { + t.Errorf("transferStatus got %v, want %v", g, tr.want) + } + } +} + +func (t *interruptedTransport) RoundTrip(req *http.Request) (*http.Response, error) { + t.req = req + if rng := req.Header.Get("Content-Range"); rng != "" && !strings.HasPrefix(rng, "bytes */") { + t.interruptCount += 1 + if t.interruptCount%7 == 0 { // Respond with a "service unavailable" error + res := &http.Response{ + StatusCode: http.StatusServiceUnavailable, + Header: http.Header{}, + } + t.rangeVal = fmt.Sprintf("bytes=0-%v", len(t.buf)-1) // Set the response for next time + return res, nil + } + m := contentRangeRE.FindStringSubmatch(rng) + if len(m) != 4 { + return nil, fmt.Errorf("unable to parse content range: %v", rng) + } + start, err := strconv.ParseInt(m[1], 10, 64) + if err != nil { + return nil, fmt.Errorf("unable to parse content range: %v", rng) + } + end, err := strconv.ParseInt(m[2], 10, 64) + if err != nil { + return nil, fmt.Errorf("unable to parse content range: %v", rng) + } + totalSize, err := strconv.ParseInt(m[3], 10, 64) + if err != nil { + return nil, fmt.Errorf("unable to parse content range: %v", rng) + } + partialSize := end - start + 1 + buf, err := ioutil.ReadAll(req.Body) + if err != nil || int64(len(buf)) != partialSize { + return nil, fmt.Errorf("unable to read %v bytes from request data, n=%v: %v", partialSize, len(buf), err) + } + t.buf = append(t.buf, buf...) + if totalSize == end+1 { + t.statusCode = 200 // signify completion of transfer + } + } + f := ioutil.NopCloser(unexpectedReader{}) + res := &http.Response{ + Body: f, + StatusCode: t.statusCode, + Header: http.Header{}, + } + if t.rangeVal != "" { + res.Header.Set("Range", t.rangeVal) + } + return res, nil +} + +type interruptedTransport struct { + req *http.Request + statusCode int + rangeVal string + interruptCount int + buf []byte + progressBuf string +} + +func (tr *interruptedTransport) ProgressUpdate(current, total int64) { + tr.progressBuf += fmt.Sprintf("%v, %v\n", current, total) +} + +func TestInterruptedTransferChunks(t *testing.T) { + f, err := os.Open("googleapi.go") + if err != nil { + t.Fatalf("unable to open googleapi.go: %v", err) + } + defer f.Close() + slurp, err := ioutil.ReadAll(f) + if err != nil { + t.Fatalf("unable to slurp file: %v", err) + } + st, err := f.Stat() + if err != nil { + t.Fatalf("unable to stat googleapi.go: %v", err) + } + tr := &interruptedTransport{ + statusCode: 308, + buf: make([]byte, 0, st.Size()), + } + oldChunkSize := chunkSize + defer func() { chunkSize = oldChunkSize }() + chunkSize = 100 // override to process small chunks for test. + + sleep = func(time.Duration) {} // override time.Sleep + rx := &ResumableUpload{ + Client: &http.Client{Transport: tr}, + Media: f, + MediaType: "text/plain", + ContentLength: st.Size(), + Callback: tr.ProgressUpdate, + } + res, err := rx.Upload(context.Background()) + if err != nil || res == nil || res.StatusCode != http.StatusOK { + if res == nil { + t.Errorf("transferChunks not successful, res=nil: %v", err) + } else { + t.Errorf("transferChunks not successful, statusCode=%v: %v", res.StatusCode, err) + } + } + if len(tr.buf) != len(slurp) || bytes.Compare(tr.buf, slurp) != 0 { + t.Errorf("transfered file corrupted:\ngot %s\nwant %s", tr.buf, slurp) + } + w := "" + for i := chunkSize; i <= st.Size(); i += chunkSize { + w += fmt.Sprintf("%v, %v\n", i, st.Size()) + } + if st.Size()%chunkSize != 0 { + w += fmt.Sprintf("%v, %v\n", st.Size(), st.Size()) + } + if tr.progressBuf != w { + t.Errorf("progress update error, got %v, want %v", tr.progressBuf, w) + } +} + +func TestCancelUpload(t *testing.T) { + f, err := os.Open("googleapi.go") + if err != nil { + t.Fatalf("unable to open googleapi.go: %v", err) + } + defer f.Close() + st, err := f.Stat() + if err != nil { + t.Fatalf("unable to stat googleapi.go: %v", err) + } + tr := &interruptedTransport{ + statusCode: 308, + buf: make([]byte, 0, st.Size()), + } + oldChunkSize := chunkSize + defer func() { chunkSize = oldChunkSize }() + chunkSize = 100 // override to process small chunks for test. + + sleep = func(time.Duration) {} // override time.Sleep + rx := &ResumableUpload{ + Client: &http.Client{Transport: tr}, + Media: f, + MediaType: "text/plain", + ContentLength: st.Size(), + Callback: tr.ProgressUpdate, + } + ctx, cancelFunc := context.WithCancel(context.Background()) + cancelFunc() // stop the upload that hasn't started yet + res, err := rx.Upload(ctx) + if err == nil || res == nil || res.StatusCode != http.StatusRequestTimeout { + if res == nil { + t.Errorf("transferChunks not successful, got res=nil, err=%v, want StatusRequestTimeout", err) + } else { + t.Errorf("transferChunks not successful, got statusCode=%v, err=%v, want StatusRequestTimeout", res.StatusCode, err) + } + } +} diff --git a/drivers/google/compute_util.go b/drivers/google/compute_util.go index aa5365c59c..1e4d7771bc 100644 --- a/drivers/google/compute_util.go +++ b/drivers/google/compute_util.go @@ -20,6 +20,7 @@ type ComputeUtil struct { project string diskTypeURL string address string + preemptible bool service *raw.Service zoneURL string authTokenPath string @@ -53,6 +54,7 @@ func newComputeUtil(driver *Driver) (*ComputeUtil, error) { project: driver.Project, diskTypeURL: driver.DiskType, address: driver.Address, + preemptible: driver.Preemptible, service: service, zoneURL: apiURL + driver.Project + "/zones/" + driver.Zone, globalURL: apiURL + driver.Project + "/global", @@ -180,6 +182,9 @@ func (c *ComputeUtil) createInstance(d *Driver) error { Scopes: strings.Split(d.Scopes, ","), }, }, + Scheduling: &raw.Scheduling{ + Preemptible: c.preemptible, + }, } if c.address != "" { diff --git a/drivers/google/google.go b/drivers/google/google.go index e4d1973dbc..cd936014bc 100644 --- a/drivers/google/google.go +++ b/drivers/google/google.go @@ -17,6 +17,7 @@ type Driver struct { MachineType string DiskType string Address string + Preemptible bool Scopes string DiskSize int AuthTokenPath string @@ -85,6 +86,11 @@ func GetCreateFlags() []cli.Flag { Usage: "GCE Instance External IP", EnvVar: "GOOGLE_ADDRESS", }, + cli.BoolFlag{ + Name: "google-preemptible", + Usage: "GCE Instance Preemptibility", + EnvVar: "GOOGLE_PREEMPTIBLE", + }, } } @@ -118,6 +124,7 @@ func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error { d.DiskSize = flags.Int("google-disk-size") d.DiskType = flags.String("google-disk-type") d.Address = flags.String("google-address") + d.Preemptible = flags.Bool("google-preemptible") d.AuthTokenPath = flags.String("google-auth-token") d.Project = flags.String("google-project") d.Scopes = flags.String("google-scopes") From 8aa5e0771a59bcffc6ff577600b89c58ce782038 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Sun, 19 Jul 2015 16:30:15 +0200 Subject: [PATCH 3/3] Support static IP by name on GCE Signed-off-by: David Gageot --- drivers/google/compute_util.go | 33 ++++++++++++++++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/drivers/google/compute_util.go b/drivers/google/compute_util.go index 1e4d7771bc..159788c56b 100644 --- a/drivers/google/compute_util.go +++ b/drivers/google/compute_util.go @@ -4,6 +4,7 @@ import ( "fmt" "io/ioutil" "net/url" + "regexp" "strings" "time" @@ -88,6 +89,31 @@ func (c *ComputeUtil) deleteDisk() error { return c.waitForRegionalOp(op.Name) } +// staticAddress returns the external static IP address. +func (c *ComputeUtil) staticAddress() (string, error) { + // is the address a name? + isName, err := regexp.MatchString("[a-z]([-a-z0-9]*[a-z0-9])?", c.address) + if err != nil { + return "", err + } + + if (!isName) { + return c.address, nil + } + + // resolve the address by name + externalAddress, err := c.service.Addresses.Get(c.project, c.region(), c.address).Do() + if err != nil { + return "", err + } + + return externalAddress.Address, nil +} + +func (c *ComputeUtil) region() (string) { + return c.zone[:len(c.zone)-2] +} + func (c *ComputeUtil) firewallRule() (*raw.Firewall, error) { return c.service.Firewalls.Get(c.project, firewallRule).Do() } @@ -188,7 +214,12 @@ func (c *ComputeUtil) createInstance(d *Driver) error { } if c.address != "" { - instance.NetworkInterfaces[0].AccessConfigs[0].NatIP = c.address + staticAddress, err := c.staticAddress() + if err != nil { + return err + } + + instance.NetworkInterfaces[0].AccessConfigs[0].NatIP = staticAddress } disk, err := c.disk()