Google Compute Engine API v1 - Package cloud.google.com/go/compute/apiv1 (v0.99.0)

Package compute is an auto-generated package for the Google Compute Engine API.

NOTE: This package is in beta. It is not stable, and may be subject to changes.

Example usage

To get started with this package, create a client.

ctx := context.Background()
c, err := compute.NewAcceleratorTypesClient(ctx)
if err != nil {
    // TODO: Handle error.
}
defer c.Close()

The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.

Using the Client

The following is an example of making an API call with the newly created client.

ctx := context.Background()
c, err := compute.NewAcceleratorTypesRESTClient(ctx)
if err != nil {
    // TODO: Handle error.
}
defer c.Close()

req := &computepb.AggregatedListAcceleratorTypesRequest{
    // TODO: Fill request struct fields.
    // See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListAcceleratorTypesRequest.
}
it := c.AggregatedList(ctx, req)
for {
    resp, err := it.Next()
    if err == iterator.Done {
        break
    }
    if err != nil {
        // TODO: Handle error.
    }
    // TODO: Use resp.
    _ = resp
}

Use of Context

The ctx passed to NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.

To close the open connection, use the Close() method.

For information about setting deadlines, reusing contexts, and more please visit https://pkg.go.dev/cloud.google.com/go.

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

DefaultAuthScopes reports the default set of authentication scopes to use with this package.

AcceleratorTypeIterator

type AcceleratorTypeIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.AcceleratorType, nextPageToken string, err error)
	// contains filtered or unexported fields
}

AcceleratorTypeIterator manages a stream of *computepb.AcceleratorType.

func (*AcceleratorTypeIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*AcceleratorTypeIterator) PageInfo

func (it *AcceleratorTypeIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

AcceleratorTypesCallOptions

type AcceleratorTypesCallOptions struct {
	AggregatedList []gax.CallOption
	Get            []gax.CallOption
	List           []gax.CallOption
}

AcceleratorTypesCallOptions contains the retry settings for each method of AcceleratorTypesClient.

AcceleratorTypesClient

type AcceleratorTypesClient struct {

	// The call options for this service.
	CallOptions *AcceleratorTypesCallOptions
	// contains filtered or unexported fields
}

AcceleratorTypesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Services

The AcceleratorTypes API.

func NewAcceleratorTypesRESTClient

func NewAcceleratorTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (*AcceleratorTypesClient, error)

NewAcceleratorTypesRESTClient creates a new accelerator types rest client.

Services

The AcceleratorTypes API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAcceleratorTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*AcceleratorTypesClient) AggregatedList

AggregatedList retrieves an aggregated list of accelerator types.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAcceleratorTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListAcceleratorTypesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListAcceleratorTypesRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*AcceleratorTypesClient) Close

func (c *AcceleratorTypesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*AcceleratorTypesClient) Connection

func (c *AcceleratorTypesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*AcceleratorTypesClient) Get

Get returns the specified accelerator type.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAcceleratorTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetAcceleratorTypeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetAcceleratorTypeRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AcceleratorTypesClient) List

List retrieves a list of accelerator types that are available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAcceleratorTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListAcceleratorTypesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListAcceleratorTypesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

AcceleratorTypesScopedListPair

type AcceleratorTypesScopedListPair struct {
	Key   string
	Value *computepb.AcceleratorTypesScopedList
}

AcceleratorTypesScopedListPair is a holder type for string/*computepb.AcceleratorTypesScopedList map entries

AcceleratorTypesScopedListPairIterator

type AcceleratorTypesScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []AcceleratorTypesScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

AcceleratorTypesScopedListPairIterator manages a stream of AcceleratorTypesScopedListPair.

func (*AcceleratorTypesScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*AcceleratorTypesScopedListPairIterator) PageInfo

func (it *AcceleratorTypesScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

AddressIterator

type AddressIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Address, nextPageToken string, err error)
	// contains filtered or unexported fields
}

AddressIterator manages a stream of *computepb.Address.

func (*AddressIterator) Next

func (it *AddressIterator) Next() (*computepb.Address, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*AddressIterator) PageInfo

func (it *AddressIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

AddressesCallOptions

type AddressesCallOptions struct {
	AggregatedList []gax.CallOption
	Delete         []gax.CallOption
	Get            []gax.CallOption
	Insert         []gax.CallOption
	List           []gax.CallOption
}

AddressesCallOptions contains the retry settings for each method of AddressesClient.

AddressesClient

type AddressesClient struct {

	// The call options for this service.
	CallOptions *AddressesCallOptions
	// contains filtered or unexported fields
}

AddressesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Addresses API.

func NewAddressesRESTClient

func NewAddressesRESTClient(ctx context.Context, opts ...option.ClientOption) (*AddressesClient, error)

NewAddressesRESTClient creates a new addresses rest client.

The Addresses API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAddressesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*AddressesClient) AggregatedList

AggregatedList retrieves an aggregated list of addresses.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAddressesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListAddressesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListAddressesRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*AddressesClient) Close

func (c *AddressesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*AddressesClient) Connection

func (c *AddressesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*AddressesClient) Delete

Delete deletes the specified address resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAddressesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteAddressRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteAddressRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AddressesClient) Get

Get returns the specified address resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAddressesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetAddressRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetAddressRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AddressesClient) Insert

Insert creates an address resource in the specified project by using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAddressesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertAddressRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertAddressRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AddressesClient) List

List retrieves a list of addresses contained within the specified region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAddressesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListAddressesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListAddressesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

AddressesScopedListPair

type AddressesScopedListPair struct {
	Key   string
	Value *computepb.AddressesScopedList
}

AddressesScopedListPair is a holder type for string/*computepb.AddressesScopedList map entries

AddressesScopedListPairIterator

type AddressesScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []AddressesScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

AddressesScopedListPairIterator manages a stream of AddressesScopedListPair.

func (*AddressesScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*AddressesScopedListPairIterator) PageInfo

func (it *AddressesScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

AutoscalerIterator

type AutoscalerIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Autoscaler, nextPageToken string, err error)
	// contains filtered or unexported fields
}

AutoscalerIterator manages a stream of *computepb.Autoscaler.

func (*AutoscalerIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*AutoscalerIterator) PageInfo

func (it *AutoscalerIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

AutoscalersCallOptions

type AutoscalersCallOptions struct {
	AggregatedList []gax.CallOption
	Delete         []gax.CallOption
	Get            []gax.CallOption
	Insert         []gax.CallOption
	List           []gax.CallOption
	Patch          []gax.CallOption
	Update         []gax.CallOption
}

AutoscalersCallOptions contains the retry settings for each method of AutoscalersClient.

AutoscalersClient

type AutoscalersClient struct {

	// The call options for this service.
	CallOptions *AutoscalersCallOptions
	// contains filtered or unexported fields
}

AutoscalersClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Autoscalers API.

func NewAutoscalersRESTClient

func NewAutoscalersRESTClient(ctx context.Context, opts ...option.ClientOption) (*AutoscalersClient, error)

NewAutoscalersRESTClient creates a new autoscalers rest client.

The Autoscalers API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAutoscalersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*AutoscalersClient) AggregatedList

AggregatedList retrieves an aggregated list of autoscalers.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAutoscalersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListAutoscalersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListAutoscalersRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*AutoscalersClient) Close

func (c *AutoscalersClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*AutoscalersClient) Connection

func (c *AutoscalersClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*AutoscalersClient) Delete

Delete deletes the specified autoscaler.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAutoscalersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteAutoscalerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteAutoscalerRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AutoscalersClient) Get

Get returns the specified autoscaler resource. Gets a list of available autoscalers by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAutoscalersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetAutoscalerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetAutoscalerRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AutoscalersClient) Insert

Insert creates an autoscaler in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAutoscalersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertAutoscalerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertAutoscalerRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AutoscalersClient) List

List retrieves a list of autoscalers contained within the specified zone.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAutoscalersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListAutoscalersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListAutoscalersRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*AutoscalersClient) Patch

Patch updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAutoscalersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchAutoscalerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchAutoscalerRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*AutoscalersClient) Update

Update updates an autoscaler in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewAutoscalersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdateAutoscalerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdateAutoscalerRequest.
	}
	resp, err := c.Update(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

AutoscalersScopedListPair

type AutoscalersScopedListPair struct {
	Key   string
	Value *computepb.AutoscalersScopedList
}

AutoscalersScopedListPair is a holder type for string/*computepb.AutoscalersScopedList map entries

AutoscalersScopedListPairIterator

type AutoscalersScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []AutoscalersScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

AutoscalersScopedListPairIterator manages a stream of AutoscalersScopedListPair.

func (*AutoscalersScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*AutoscalersScopedListPairIterator) PageInfo

func (it *AutoscalersScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

BackendBucketIterator

type BackendBucketIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.BackendBucket, nextPageToken string, err error)
	// contains filtered or unexported fields
}

BackendBucketIterator manages a stream of *computepb.BackendBucket.

func (*BackendBucketIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*BackendBucketIterator) PageInfo

func (it *BackendBucketIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

BackendBucketsCallOptions

type BackendBucketsCallOptions struct {
	AddSignedUrlKey    []gax.CallOption
	Delete             []gax.CallOption
	DeleteSignedUrlKey []gax.CallOption
	Get                []gax.CallOption
	Insert             []gax.CallOption
	List               []gax.CallOption
	Patch              []gax.CallOption
	Update             []gax.CallOption
}

BackendBucketsCallOptions contains the retry settings for each method of BackendBucketsClient.

BackendBucketsClient

type BackendBucketsClient struct {

	// The call options for this service.
	CallOptions *BackendBucketsCallOptions
	// contains filtered or unexported fields
}

BackendBucketsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The BackendBuckets API.

func NewBackendBucketsRESTClient

func NewBackendBucketsRESTClient(ctx context.Context, opts ...option.ClientOption) (*BackendBucketsClient, error)

NewBackendBucketsRESTClient creates a new backend buckets rest client.

The BackendBuckets API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendBucketsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*BackendBucketsClient) AddSignedUrlKey

AddSignedUrlKey adds a key for validating requests with signed URLs for this backend bucket.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendBucketsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AddSignedUrlKeyBackendBucketRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AddSignedUrlKeyBackendBucketRequest.
	}
	resp, err := c.AddSignedUrlKey(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*BackendBucketsClient) Close

func (c *BackendBucketsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*BackendBucketsClient) Connection

func (c *BackendBucketsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*BackendBucketsClient) Delete

Delete deletes the specified BackendBucket resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendBucketsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteBackendBucketRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteBackendBucketRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*BackendBucketsClient) DeleteSignedUrlKey

DeleteSignedUrlKey deletes a key for validating requests with signed URLs for this backend bucket.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendBucketsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteSignedUrlKeyBackendBucketRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteSignedUrlKeyBackendBucketRequest.
	}
	resp, err := c.DeleteSignedUrlKey(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*BackendBucketsClient) Get

Get returns the specified BackendBucket resource. Gets a list of available backend buckets by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendBucketsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetBackendBucketRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetBackendBucketRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*BackendBucketsClient) Insert

Insert creates a BackendBucket resource in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendBucketsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertBackendBucketRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertBackendBucketRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*BackendBucketsClient) List

List retrieves the list of BackendBucket resources available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendBucketsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListBackendBucketsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListBackendBucketsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*BackendBucketsClient) Patch

Patch updates the specified BackendBucket resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendBucketsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchBackendBucketRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchBackendBucketRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*BackendBucketsClient) Update

Update updates the specified BackendBucket resource with the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendBucketsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdateBackendBucketRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdateBackendBucketRequest.
	}
	resp, err := c.Update(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

BackendServiceIterator

type BackendServiceIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.BackendService, nextPageToken string, err error)
	// contains filtered or unexported fields
}

BackendServiceIterator manages a stream of *computepb.BackendService.

func (*BackendServiceIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*BackendServiceIterator) PageInfo

func (it *BackendServiceIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

BackendServicesCallOptions

type BackendServicesCallOptions struct {
	AddSignedUrlKey    []gax.CallOption
	AggregatedList     []gax.CallOption
	Delete             []gax.CallOption
	DeleteSignedUrlKey []gax.CallOption
	Get                []gax.CallOption
	GetHealth          []gax.CallOption
	Insert             []gax.CallOption
	List               []gax.CallOption
	Patch              []gax.CallOption
	SetSecurityPolicy  []gax.CallOption
	Update             []gax.CallOption
}

BackendServicesCallOptions contains the retry settings for each method of BackendServicesClient.

BackendServicesClient

type BackendServicesClient struct {

	// The call options for this service.
	CallOptions *BackendServicesCallOptions
	// contains filtered or unexported fields
}

BackendServicesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The BackendServices API.

func NewBackendServicesRESTClient

func NewBackendServicesRESTClient(ctx context.Context, opts ...option.ClientOption) (*BackendServicesClient, error)

NewBackendServicesRESTClient creates a new backend services rest client.

The BackendServices API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*BackendServicesClient) AddSignedUrlKey

AddSignedUrlKey adds a key for validating requests with signed URLs for this backend service.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AddSignedUrlKeyBackendServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AddSignedUrlKeyBackendServiceRequest.
	}
	resp, err := c.AddSignedUrlKey(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*BackendServicesClient) AggregatedList

AggregatedList retrieves the list of all BackendService resources, regional and global, available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListBackendServicesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListBackendServicesRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*BackendServicesClient) Close

func (c *BackendServicesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*BackendServicesClient) Connection

func (c *BackendServicesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*BackendServicesClient) Delete

Delete deletes the specified BackendService resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteBackendServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteBackendServiceRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*BackendServicesClient) DeleteSignedUrlKey

DeleteSignedUrlKey deletes a key for validating requests with signed URLs for this backend service.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteSignedUrlKeyBackendServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteSignedUrlKeyBackendServiceRequest.
	}
	resp, err := c.DeleteSignedUrlKey(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*BackendServicesClient) Get

Get returns the specified BackendService resource. Gets a list of available backend services.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetBackendServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetBackendServiceRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*BackendServicesClient) GetHealth

GetHealth gets the most recent health check results for this BackendService. Example request body: { “group”: “/zones/us-east1-b/instanceGroups/lb-backend-example” }

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetHealthBackendServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetHealthBackendServiceRequest.
	}
	resp, err := c.GetHealth(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*BackendServicesClient) Insert

Insert creates a BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview .

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertBackendServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertBackendServiceRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*BackendServicesClient) List

List retrieves the list of BackendService resources available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListBackendServicesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListBackendServicesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*BackendServicesClient) Patch

Patch patches the specified BackendService resource with the data included in the request. For more information, see Backend services overview. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchBackendServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchBackendServiceRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*BackendServicesClient) SetSecurityPolicy

SetSecurityPolicy sets the Google Cloud Armor security policy for the specified backend service. For more information, see Google Cloud Armor Overview

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetSecurityPolicyBackendServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetSecurityPolicyBackendServiceRequest.
	}
	resp, err := c.SetSecurityPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*BackendServicesClient) Update

Update updates the specified BackendService resource with the data included in the request. For more information, see Backend services overview.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdateBackendServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdateBackendServiceRequest.
	}
	resp, err := c.Update(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

BackendServicesScopedListPair

type BackendServicesScopedListPair struct {
	Key   string
	Value *computepb.BackendServicesScopedList
}

BackendServicesScopedListPair is a holder type for string/*computepb.BackendServicesScopedList map entries

BackendServicesScopedListPairIterator

type BackendServicesScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []BackendServicesScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

BackendServicesScopedListPairIterator manages a stream of BackendServicesScopedListPair.

func (*BackendServicesScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*BackendServicesScopedListPairIterator) PageInfo

func (it *BackendServicesScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

CommitmentIterator

type CommitmentIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Commitment, nextPageToken string, err error)
	// contains filtered or unexported fields
}

CommitmentIterator manages a stream of *computepb.Commitment.

func (*CommitmentIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*CommitmentIterator) PageInfo

func (it *CommitmentIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

CommitmentsScopedListPair

type CommitmentsScopedListPair struct {
	Key   string
	Value *computepb.CommitmentsScopedList
}

CommitmentsScopedListPair is a holder type for string/*computepb.CommitmentsScopedList map entries

CommitmentsScopedListPairIterator

type CommitmentsScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []CommitmentsScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

CommitmentsScopedListPairIterator manages a stream of CommitmentsScopedListPair.

func (*CommitmentsScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*CommitmentsScopedListPairIterator) PageInfo

func (it *CommitmentsScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

DiskIterator

type DiskIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Disk, nextPageToken string, err error)
	// contains filtered or unexported fields
}

DiskIterator manages a stream of *computepb.Disk.

func (*DiskIterator) Next

func (it *DiskIterator) Next() (*computepb.Disk, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*DiskIterator) PageInfo

func (it *DiskIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

DiskTypeIterator

type DiskTypeIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.DiskType, nextPageToken string, err error)
	// contains filtered or unexported fields
}

DiskTypeIterator manages a stream of *computepb.DiskType.

func (*DiskTypeIterator) Next

func (it *DiskTypeIterator) Next() (*computepb.DiskType, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*DiskTypeIterator) PageInfo

func (it *DiskTypeIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

DiskTypesCallOptions

type DiskTypesCallOptions struct {
	AggregatedList []gax.CallOption
	Get            []gax.CallOption
	List           []gax.CallOption
}

DiskTypesCallOptions contains the retry settings for each method of DiskTypesClient.

DiskTypesClient

type DiskTypesClient struct {

	// The call options for this service.
	CallOptions *DiskTypesCallOptions
	// contains filtered or unexported fields
}

DiskTypesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The DiskTypes API.

func NewDiskTypesRESTClient

func NewDiskTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (*DiskTypesClient, error)

NewDiskTypesRESTClient creates a new disk types rest client.

The DiskTypes API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDiskTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*DiskTypesClient) AggregatedList

AggregatedList retrieves an aggregated list of disk types.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDiskTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListDiskTypesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListDiskTypesRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*DiskTypesClient) Close

func (c *DiskTypesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*DiskTypesClient) Connection

func (c *DiskTypesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*DiskTypesClient) Get

Get returns the specified disk type. Gets a list of available disk types by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDiskTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetDiskTypeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetDiskTypeRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DiskTypesClient) List

List retrieves a list of disk types available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDiskTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListDiskTypesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListDiskTypesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

DiskTypesScopedListPair

type DiskTypesScopedListPair struct {
	Key   string
	Value *computepb.DiskTypesScopedList
}

DiskTypesScopedListPair is a holder type for string/*computepb.DiskTypesScopedList map entries

DiskTypesScopedListPairIterator

type DiskTypesScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []DiskTypesScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

DiskTypesScopedListPairIterator manages a stream of DiskTypesScopedListPair.

func (*DiskTypesScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*DiskTypesScopedListPairIterator) PageInfo

func (it *DiskTypesScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

DisksCallOptions

type DisksCallOptions struct {
	AddResourcePolicies    []gax.CallOption
	AggregatedList         []gax.CallOption
	CreateSnapshot         []gax.CallOption
	Delete                 []gax.CallOption
	Get                    []gax.CallOption
	GetIamPolicy           []gax.CallOption
	Insert                 []gax.CallOption
	List                   []gax.CallOption
	RemoveResourcePolicies []gax.CallOption
	Resize                 []gax.CallOption
	SetIamPolicy           []gax.CallOption
	SetLabels              []gax.CallOption
	TestIamPermissions     []gax.CallOption
}

DisksCallOptions contains the retry settings for each method of DisksClient.

DisksClient

type DisksClient struct {

	// The call options for this service.
	CallOptions *DisksCallOptions
	// contains filtered or unexported fields
}

DisksClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Disks API.

func NewDisksRESTClient

func NewDisksRESTClient(ctx context.Context, opts ...option.ClientOption) (*DisksClient, error)

NewDisksRESTClient creates a new disks rest client.

The Disks API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*DisksClient) AddResourcePolicies

func (c *DisksClient) AddResourcePolicies(ctx context.Context, req *computepb.AddResourcePoliciesDiskRequest, opts ...gax.CallOption) (*Operation, error)

AddResourcePolicies adds existing resource policies to a disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AddResourcePoliciesDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AddResourcePoliciesDiskRequest.
	}
	resp, err := c.AddResourcePolicies(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DisksClient) AggregatedList

AggregatedList retrieves an aggregated list of persistent disks.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListDisksRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListDisksRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*DisksClient) Close

func (c *DisksClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*DisksClient) Connection

func (c *DisksClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*DisksClient) CreateSnapshot

func (c *DisksClient) CreateSnapshot(ctx context.Context, req *computepb.CreateSnapshotDiskRequest, opts ...gax.CallOption) (*Operation, error)

CreateSnapshot creates a snapshot of a specified persistent disk.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.CreateSnapshotDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#CreateSnapshotDiskRequest.
	}
	resp, err := c.CreateSnapshot(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DisksClient) Delete

Delete deletes the specified persistent disk. Deleting a disk removes its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteDiskRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DisksClient) Get

Get returns a specified persistent disk. Gets a list of available persistent disks by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetDiskRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DisksClient) GetIamPolicy

GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetIamPolicyDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetIamPolicyDiskRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DisksClient) Insert

Insert creates a persistent disk in the specified project using the data in the request. You can create a disk from a source (sourceImage, sourceSnapshot, or sourceDisk) or create an empty 500 GB data disk by omitting all properties. You can also create a disk that is larger than the default size by specifying the sizeGb property.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertDiskRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DisksClient) List

List retrieves a list of persistent disks contained within the specified zone.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListDisksRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListDisksRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*DisksClient) RemoveResourcePolicies

func (c *DisksClient) RemoveResourcePolicies(ctx context.Context, req *computepb.RemoveResourcePoliciesDiskRequest, opts ...gax.CallOption) (*Operation, error)

RemoveResourcePolicies removes resource policies from a disk.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.RemoveResourcePoliciesDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#RemoveResourcePoliciesDiskRequest.
	}
	resp, err := c.RemoveResourcePolicies(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DisksClient) Resize

Resize resizes the specified persistent disk. You can only increase the size of the disk.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ResizeDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ResizeDiskRequest.
	}
	resp, err := c.Resize(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DisksClient) SetIamPolicy

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetIamPolicyDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetIamPolicyDiskRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DisksClient) SetLabels

func (c *DisksClient) SetLabels(ctx context.Context, req *computepb.SetLabelsDiskRequest, opts ...gax.CallOption) (*Operation, error)

SetLabels sets the labels on a disk. To learn more about labels, read the Labeling Resources documentation.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetLabelsDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetLabelsDiskRequest.
	}
	resp, err := c.SetLabels(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DisksClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsDiskRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

DisksScopedListPair

type DisksScopedListPair struct {
	Key   string
	Value *computepb.DisksScopedList
}

DisksScopedListPair is a holder type for string/*computepb.DisksScopedList map entries

DisksScopedListPairIterator

type DisksScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []DisksScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

DisksScopedListPairIterator manages a stream of DisksScopedListPair.

func (*DisksScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*DisksScopedListPairIterator) PageInfo

func (it *DisksScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ExchangedPeeringRouteIterator

type ExchangedPeeringRouteIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.ExchangedPeeringRoute, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ExchangedPeeringRouteIterator manages a stream of *computepb.ExchangedPeeringRoute.

func (*ExchangedPeeringRouteIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ExchangedPeeringRouteIterator) PageInfo

func (it *ExchangedPeeringRouteIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ExternalVpnGatewayIterator

type ExternalVpnGatewayIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.ExternalVpnGateway, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ExternalVpnGatewayIterator manages a stream of *computepb.ExternalVpnGateway.

func (*ExternalVpnGatewayIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ExternalVpnGatewayIterator) PageInfo

func (it *ExternalVpnGatewayIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ExternalVpnGatewaysCallOptions

type ExternalVpnGatewaysCallOptions struct {
	Delete             []gax.CallOption
	Get                []gax.CallOption
	Insert             []gax.CallOption
	List               []gax.CallOption
	SetLabels          []gax.CallOption
	TestIamPermissions []gax.CallOption
}

ExternalVpnGatewaysCallOptions contains the retry settings for each method of ExternalVpnGatewaysClient.

ExternalVpnGatewaysClient

type ExternalVpnGatewaysClient struct {

	// The call options for this service.
	CallOptions *ExternalVpnGatewaysCallOptions
	// contains filtered or unexported fields
}

ExternalVpnGatewaysClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The ExternalVpnGateways API.

func NewExternalVpnGatewaysRESTClient

func NewExternalVpnGatewaysRESTClient(ctx context.Context, opts ...option.ClientOption) (*ExternalVpnGatewaysClient, error)

NewExternalVpnGatewaysRESTClient creates a new external vpn gateways rest client.

The ExternalVpnGateways API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewExternalVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*ExternalVpnGatewaysClient) Close

func (c *ExternalVpnGatewaysClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*ExternalVpnGatewaysClient) Connection

func (c *ExternalVpnGatewaysClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*ExternalVpnGatewaysClient) Delete

Delete deletes the specified externalVpnGateway.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewExternalVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteExternalVpnGatewayRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteExternalVpnGatewayRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ExternalVpnGatewaysClient) Get

Get returns the specified externalVpnGateway. Get a list of available externalVpnGateways by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewExternalVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetExternalVpnGatewayRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetExternalVpnGatewayRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ExternalVpnGatewaysClient) Insert

Insert creates a ExternalVpnGateway in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewExternalVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertExternalVpnGatewayRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertExternalVpnGatewayRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ExternalVpnGatewaysClient) List

List retrieves the list of ExternalVpnGateway available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewExternalVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListExternalVpnGatewaysRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListExternalVpnGatewaysRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ExternalVpnGatewaysClient) SetLabels

SetLabels sets the labels on an ExternalVpnGateway. To learn more about labels, read the Labeling Resources documentation.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewExternalVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetLabelsExternalVpnGatewayRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetLabelsExternalVpnGatewayRequest.
	}
	resp, err := c.SetLabels(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ExternalVpnGatewaysClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewExternalVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsExternalVpnGatewayRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsExternalVpnGatewayRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

FirewallIterator

type FirewallIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Firewall, nextPageToken string, err error)
	// contains filtered or unexported fields
}

FirewallIterator manages a stream of *computepb.Firewall.

func (*FirewallIterator) Next

func (it *FirewallIterator) Next() (*computepb.Firewall, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*FirewallIterator) PageInfo

func (it *FirewallIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

FirewallPoliciesCallOptions

type FirewallPoliciesCallOptions struct {
	AddAssociation     []gax.CallOption
	AddRule            []gax.CallOption
	CloneRules         []gax.CallOption
	Delete             []gax.CallOption
	Get                []gax.CallOption
	GetAssociation     []gax.CallOption
	GetIamPolicy       []gax.CallOption
	GetRule            []gax.CallOption
	Insert             []gax.CallOption
	List               []gax.CallOption
	ListAssociations   []gax.CallOption
	Move               []gax.CallOption
	Patch              []gax.CallOption
	PatchRule          []gax.CallOption
	RemoveAssociation  []gax.CallOption
	RemoveRule         []gax.CallOption
	SetIamPolicy       []gax.CallOption
	TestIamPermissions []gax.CallOption
}

FirewallPoliciesCallOptions contains the retry settings for each method of FirewallPoliciesClient.

FirewallPoliciesClient

type FirewallPoliciesClient struct {

	// The call options for this service.
	CallOptions *FirewallPoliciesCallOptions
	// contains filtered or unexported fields
}

FirewallPoliciesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The FirewallPolicies API.

func NewFirewallPoliciesRESTClient

func NewFirewallPoliciesRESTClient(ctx context.Context, opts ...option.ClientOption) (*FirewallPoliciesClient, error)

NewFirewallPoliciesRESTClient creates a new firewall policies rest client.

The FirewallPolicies API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*FirewallPoliciesClient) AddAssociation

AddAssociation inserts an association for the specified firewall policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AddAssociationFirewallPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AddAssociationFirewallPolicyRequest.
	}
	resp, err := c.AddAssociation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallPoliciesClient) AddRule

AddRule inserts a rule into a firewall policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AddRuleFirewallPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AddRuleFirewallPolicyRequest.
	}
	resp, err := c.AddRule(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallPoliciesClient) CloneRules

CloneRules copies rules to the specified firewall policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.CloneRulesFirewallPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#CloneRulesFirewallPolicyRequest.
	}
	resp, err := c.CloneRules(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallPoliciesClient) Close

func (c *FirewallPoliciesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*FirewallPoliciesClient) Connection

func (c *FirewallPoliciesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*FirewallPoliciesClient) Delete

Delete deletes the specified policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteFirewallPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteFirewallPolicyRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallPoliciesClient) Get

Get returns the specified firewall policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetFirewallPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetFirewallPolicyRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallPoliciesClient) GetAssociation

GetAssociation gets an association with the specified name.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetAssociationFirewallPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetAssociationFirewallPolicyRequest.
	}
	resp, err := c.GetAssociation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallPoliciesClient) GetIamPolicy

GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetIamPolicyFirewallPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetIamPolicyFirewallPolicyRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallPoliciesClient) GetRule

GetRule gets a rule of the specified priority.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRuleFirewallPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRuleFirewallPolicyRequest.
	}
	resp, err := c.GetRule(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallPoliciesClient) Insert

Insert creates a new policy in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertFirewallPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertFirewallPolicyRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallPoliciesClient) List

List lists all the policies that have been configured for the specified folder or organization.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListFirewallPoliciesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListFirewallPoliciesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*FirewallPoliciesClient) ListAssociations

ListAssociations lists associations of a specified target, i.e., organization or folder.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListAssociationsFirewallPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListAssociationsFirewallPolicyRequest.
	}
	resp, err := c.ListAssociations(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallPoliciesClient) Move

Move moves the specified firewall policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.MoveFirewallPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#MoveFirewallPolicyRequest.
	}
	resp, err := c.Move(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallPoliciesClient) Patch

Patch patches the specified policy with the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchFirewallPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchFirewallPolicyRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallPoliciesClient) PatchRule

PatchRule patches a rule of the specified priority.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchRuleFirewallPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchRuleFirewallPolicyRequest.
	}
	resp, err := c.PatchRule(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallPoliciesClient) RemoveAssociation

RemoveAssociation removes an association for the specified firewall policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.RemoveAssociationFirewallPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#RemoveAssociationFirewallPolicyRequest.
	}
	resp, err := c.RemoveAssociation(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallPoliciesClient) RemoveRule

RemoveRule deletes a rule of the specified priority.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.RemoveRuleFirewallPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#RemoveRuleFirewallPolicyRequest.
	}
	resp, err := c.RemoveRule(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallPoliciesClient) SetIamPolicy

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetIamPolicyFirewallPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetIamPolicyFirewallPolicyRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallPoliciesClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsFirewallPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsFirewallPolicyRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

FirewallPolicyIterator

type FirewallPolicyIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.FirewallPolicy, nextPageToken string, err error)
	// contains filtered or unexported fields
}

FirewallPolicyIterator manages a stream of *computepb.FirewallPolicy.

func (*FirewallPolicyIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*FirewallPolicyIterator) PageInfo

func (it *FirewallPolicyIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

FirewallsCallOptions

type FirewallsCallOptions struct {
	Delete []gax.CallOption
	Get    []gax.CallOption
	Insert []gax.CallOption
	List   []gax.CallOption
	Patch  []gax.CallOption
	Update []gax.CallOption
}

FirewallsCallOptions contains the retry settings for each method of FirewallsClient.

FirewallsClient

type FirewallsClient struct {

	// The call options for this service.
	CallOptions *FirewallsCallOptions
	// contains filtered or unexported fields
}

FirewallsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Firewalls API.

func NewFirewallsRESTClient

func NewFirewallsRESTClient(ctx context.Context, opts ...option.ClientOption) (*FirewallsClient, error)

NewFirewallsRESTClient creates a new firewalls rest client.

The Firewalls API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*FirewallsClient) Close

func (c *FirewallsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*FirewallsClient) Connection

func (c *FirewallsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*FirewallsClient) Delete

Delete deletes the specified firewall.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteFirewallRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteFirewallRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallsClient) Get

Get returns the specified firewall.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetFirewallRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetFirewallRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallsClient) Insert

Insert creates a firewall rule in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertFirewallRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertFirewallRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallsClient) List

List retrieves the list of firewall rules available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListFirewallsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListFirewallsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*FirewallsClient) Patch

Patch updates the specified firewall rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchFirewallRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchFirewallRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*FirewallsClient) Update

Update updates the specified firewall rule with the data included in the request. Note that all fields will be updated if using PUT, even fields that are not specified. To update individual fields, please use PATCH instead.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewFirewallsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdateFirewallRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdateFirewallRequest.
	}
	resp, err := c.Update(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

ForwardingRuleIterator

type ForwardingRuleIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.ForwardingRule, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ForwardingRuleIterator manages a stream of *computepb.ForwardingRule.

func (*ForwardingRuleIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ForwardingRuleIterator) PageInfo

func (it *ForwardingRuleIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ForwardingRulesCallOptions

type ForwardingRulesCallOptions struct {
	AggregatedList []gax.CallOption
	Delete         []gax.CallOption
	Get            []gax.CallOption
	Insert         []gax.CallOption
	List           []gax.CallOption
	Patch          []gax.CallOption
	SetLabels      []gax.CallOption
	SetTarget      []gax.CallOption
}

ForwardingRulesCallOptions contains the retry settings for each method of ForwardingRulesClient.

ForwardingRulesClient

type ForwardingRulesClient struct {

	// The call options for this service.
	CallOptions *ForwardingRulesCallOptions
	// contains filtered or unexported fields
}

ForwardingRulesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The ForwardingRules API.

func NewForwardingRulesRESTClient

func NewForwardingRulesRESTClient(ctx context.Context, opts ...option.ClientOption) (*ForwardingRulesClient, error)

NewForwardingRulesRESTClient creates a new forwarding rules rest client.

The ForwardingRules API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewForwardingRulesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*ForwardingRulesClient) AggregatedList

AggregatedList retrieves an aggregated list of forwarding rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewForwardingRulesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListForwardingRulesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListForwardingRulesRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ForwardingRulesClient) Close

func (c *ForwardingRulesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*ForwardingRulesClient) Connection

func (c *ForwardingRulesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*ForwardingRulesClient) Delete

Delete deletes the specified ForwardingRule resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewForwardingRulesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteForwardingRuleRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteForwardingRuleRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ForwardingRulesClient) Get

Get returns the specified ForwardingRule resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewForwardingRulesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetForwardingRuleRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetForwardingRuleRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ForwardingRulesClient) Insert

Insert creates a ForwardingRule resource in the specified project and region using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewForwardingRulesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertForwardingRuleRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertForwardingRuleRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ForwardingRulesClient) List

List retrieves a list of ForwardingRule resources available to the specified project and region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewForwardingRulesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListForwardingRulesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListForwardingRulesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ForwardingRulesClient) Patch

Patch updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewForwardingRulesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchForwardingRuleRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchForwardingRuleRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ForwardingRulesClient) SetLabels

SetLabels sets the labels on the specified resource. To learn more about labels, read the Labeling Resources documentation.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewForwardingRulesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetLabelsForwardingRuleRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetLabelsForwardingRuleRequest.
	}
	resp, err := c.SetLabels(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ForwardingRulesClient) SetTarget

SetTarget changes target URL for forwarding rule. The new target should be of the same type as the old target.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewForwardingRulesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetTargetForwardingRuleRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetTargetForwardingRuleRequest.
	}
	resp, err := c.SetTarget(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

ForwardingRulesScopedListPair

type ForwardingRulesScopedListPair struct {
	Key   string
	Value *computepb.ForwardingRulesScopedList
}

ForwardingRulesScopedListPair is a holder type for string/*computepb.ForwardingRulesScopedList map entries

ForwardingRulesScopedListPairIterator

type ForwardingRulesScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []ForwardingRulesScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ForwardingRulesScopedListPairIterator manages a stream of ForwardingRulesScopedListPair.

func (*ForwardingRulesScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ForwardingRulesScopedListPairIterator) PageInfo

func (it *ForwardingRulesScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

GlobalAddressesCallOptions

type GlobalAddressesCallOptions struct {
	Delete []gax.CallOption
	Get    []gax.CallOption
	Insert []gax.CallOption
	List   []gax.CallOption
}

GlobalAddressesCallOptions contains the retry settings for each method of GlobalAddressesClient.

GlobalAddressesClient

type GlobalAddressesClient struct {

	// The call options for this service.
	CallOptions *GlobalAddressesCallOptions
	// contains filtered or unexported fields
}

GlobalAddressesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The GlobalAddresses API.

func NewGlobalAddressesRESTClient

func NewGlobalAddressesRESTClient(ctx context.Context, opts ...option.ClientOption) (*GlobalAddressesClient, error)

NewGlobalAddressesRESTClient creates a new global addresses rest client.

The GlobalAddresses API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalAddressesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*GlobalAddressesClient) Close

func (c *GlobalAddressesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*GlobalAddressesClient) Connection

func (c *GlobalAddressesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*GlobalAddressesClient) Delete

Delete deletes the specified address resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalAddressesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteGlobalAddressRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteGlobalAddressRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalAddressesClient) Get

Get returns the specified address resource. Gets a list of available addresses by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalAddressesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetGlobalAddressRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetGlobalAddressRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalAddressesClient) Insert

Insert creates an address resource in the specified project by using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalAddressesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertGlobalAddressRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertGlobalAddressRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalAddressesClient) List

List retrieves a list of global addresses.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalAddressesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListGlobalAddressesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListGlobalAddressesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

GlobalForwardingRulesCallOptions

type GlobalForwardingRulesCallOptions struct {
	Delete    []gax.CallOption
	Get       []gax.CallOption
	Insert    []gax.CallOption
	List      []gax.CallOption
	Patch     []gax.CallOption
	SetLabels []gax.CallOption
	SetTarget []gax.CallOption
}

GlobalForwardingRulesCallOptions contains the retry settings for each method of GlobalForwardingRulesClient.

GlobalForwardingRulesClient

type GlobalForwardingRulesClient struct {

	// The call options for this service.
	CallOptions *GlobalForwardingRulesCallOptions
	// contains filtered or unexported fields
}

GlobalForwardingRulesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The GlobalForwardingRules API.

func NewGlobalForwardingRulesRESTClient

func NewGlobalForwardingRulesRESTClient(ctx context.Context, opts ...option.ClientOption) (*GlobalForwardingRulesClient, error)

NewGlobalForwardingRulesRESTClient creates a new global forwarding rules rest client.

The GlobalForwardingRules API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalForwardingRulesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*GlobalForwardingRulesClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*GlobalForwardingRulesClient) Connection

func (c *GlobalForwardingRulesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*GlobalForwardingRulesClient) Delete

Delete deletes the specified GlobalForwardingRule resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalForwardingRulesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteGlobalForwardingRuleRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteGlobalForwardingRuleRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalForwardingRulesClient) Get

Get returns the specified GlobalForwardingRule resource. Gets a list of available forwarding rules by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalForwardingRulesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetGlobalForwardingRuleRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetGlobalForwardingRuleRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalForwardingRulesClient) Insert

Insert creates a GlobalForwardingRule resource in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalForwardingRulesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertGlobalForwardingRuleRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertGlobalForwardingRuleRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalForwardingRulesClient) List

List retrieves a list of GlobalForwardingRule resources available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalForwardingRulesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListGlobalForwardingRulesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListGlobalForwardingRulesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*GlobalForwardingRulesClient) Patch

Patch updates the specified forwarding rule with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. Currently, you can only patch the network_tier field.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalForwardingRulesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchGlobalForwardingRuleRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchGlobalForwardingRuleRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalForwardingRulesClient) SetLabels

SetLabels sets the labels on the specified resource. To learn more about labels, read the Labeling resources documentation.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalForwardingRulesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetLabelsGlobalForwardingRuleRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetLabelsGlobalForwardingRuleRequest.
	}
	resp, err := c.SetLabels(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalForwardingRulesClient) SetTarget

SetTarget changes target URL for the GlobalForwardingRule resource. The new target should be of the same type as the old target.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalForwardingRulesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetTargetGlobalForwardingRuleRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetTargetGlobalForwardingRuleRequest.
	}
	resp, err := c.SetTarget(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

GlobalNetworkEndpointGroupsCallOptions

type GlobalNetworkEndpointGroupsCallOptions struct {
	AttachNetworkEndpoints []gax.CallOption
	Delete                 []gax.CallOption
	DetachNetworkEndpoints []gax.CallOption
	Get                    []gax.CallOption
	Insert                 []gax.CallOption
	List                   []gax.CallOption
	ListNetworkEndpoints   []gax.CallOption
}

GlobalNetworkEndpointGroupsCallOptions contains the retry settings for each method of GlobalNetworkEndpointGroupsClient.

GlobalNetworkEndpointGroupsClient

type GlobalNetworkEndpointGroupsClient struct {

	// The call options for this service.
	CallOptions *GlobalNetworkEndpointGroupsCallOptions
	// contains filtered or unexported fields
}

GlobalNetworkEndpointGroupsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The GlobalNetworkEndpointGroups API.

func NewGlobalNetworkEndpointGroupsRESTClient

func NewGlobalNetworkEndpointGroupsRESTClient(ctx context.Context, opts ...option.ClientOption) (*GlobalNetworkEndpointGroupsClient, error)

NewGlobalNetworkEndpointGroupsRESTClient creates a new global network endpoint groups rest client.

The GlobalNetworkEndpointGroups API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*GlobalNetworkEndpointGroupsClient) AttachNetworkEndpoints

AttachNetworkEndpoints attach a network endpoint to the specified network endpoint group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AttachNetworkEndpointsGlobalNetworkEndpointGroupRequest.
	}
	resp, err := c.AttachNetworkEndpoints(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalNetworkEndpointGroupsClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*GlobalNetworkEndpointGroupsClient) Connection

func (c *GlobalNetworkEndpointGroupsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*GlobalNetworkEndpointGroupsClient) Delete

Delete deletes the specified network endpoint group.Note that the NEG cannot be deleted if there are backend services referencing it.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteGlobalNetworkEndpointGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteGlobalNetworkEndpointGroupRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalNetworkEndpointGroupsClient) DetachNetworkEndpoints

DetachNetworkEndpoints detach the network endpoint from the specified network endpoint group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DetachNetworkEndpointsGlobalNetworkEndpointGroupRequest.
	}
	resp, err := c.DetachNetworkEndpoints(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalNetworkEndpointGroupsClient) Get

Get returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetGlobalNetworkEndpointGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetGlobalNetworkEndpointGroupRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalNetworkEndpointGroupsClient) Insert

Insert creates a network endpoint group in the specified project using the parameters that are included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertGlobalNetworkEndpointGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertGlobalNetworkEndpointGroupRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalNetworkEndpointGroupsClient) List

List retrieves the list of network endpoint groups that are located in the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListGlobalNetworkEndpointGroupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListGlobalNetworkEndpointGroupsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*GlobalNetworkEndpointGroupsClient) ListNetworkEndpoints

ListNetworkEndpoints lists the network endpoints in the specified network endpoint group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListNetworkEndpointsGlobalNetworkEndpointGroupsRequest.
	}
	it := c.ListNetworkEndpoints(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

GlobalOperationsCallOptions

type GlobalOperationsCallOptions struct {
	AggregatedList []gax.CallOption
	Delete         []gax.CallOption
	Get            []gax.CallOption
	List           []gax.CallOption
	Wait           []gax.CallOption
}

GlobalOperationsCallOptions contains the retry settings for each method of GlobalOperationsClient.

GlobalOperationsClient

type GlobalOperationsClient struct {

	// The call options for this service.
	CallOptions *GlobalOperationsCallOptions
	// contains filtered or unexported fields
}

GlobalOperationsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The GlobalOperations API.

func NewGlobalOperationsRESTClient

func NewGlobalOperationsRESTClient(ctx context.Context, opts ...option.ClientOption) (*GlobalOperationsClient, error)

NewGlobalOperationsRESTClient creates a new global operations rest client.

The GlobalOperations API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*GlobalOperationsClient) AggregatedList

AggregatedList retrieves an aggregated list of all operations.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListGlobalOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListGlobalOperationsRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*GlobalOperationsClient) Close

func (c *GlobalOperationsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*GlobalOperationsClient) Connection

func (c *GlobalOperationsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*GlobalOperationsClient) Delete

Delete deletes the specified Operations resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteGlobalOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteGlobalOperationRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalOperationsClient) Get

Get retrieves the specified Operations resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetGlobalOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetGlobalOperationRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalOperationsClient) List

List retrieves a list of Operation resources contained within the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListGlobalOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListGlobalOperationsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*GlobalOperationsClient) Wait

Wait waits for the specified Operation resource to return as DONE or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the GET method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be DONE or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not DONE.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.WaitGlobalOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#WaitGlobalOperationRequest.
	}
	resp, err := c.Wait(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

GlobalOrganizationOperationsCallOptions

type GlobalOrganizationOperationsCallOptions struct {
	Delete []gax.CallOption
	Get    []gax.CallOption
	List   []gax.CallOption
}

GlobalOrganizationOperationsCallOptions contains the retry settings for each method of GlobalOrganizationOperationsClient.

GlobalOrganizationOperationsClient

type GlobalOrganizationOperationsClient struct {

	// The call options for this service.
	CallOptions *GlobalOrganizationOperationsCallOptions
	// contains filtered or unexported fields
}

GlobalOrganizationOperationsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The GlobalOrganizationOperations API.

func NewGlobalOrganizationOperationsRESTClient

func NewGlobalOrganizationOperationsRESTClient(ctx context.Context, opts ...option.ClientOption) (*GlobalOrganizationOperationsClient, error)

NewGlobalOrganizationOperationsRESTClient creates a new global organization operations rest client.

The GlobalOrganizationOperations API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalOrganizationOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*GlobalOrganizationOperationsClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*GlobalOrganizationOperationsClient) Connection

func (c *GlobalOrganizationOperationsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*GlobalOrganizationOperationsClient) Delete

Delete deletes the specified Operations resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalOrganizationOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteGlobalOrganizationOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteGlobalOrganizationOperationRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalOrganizationOperationsClient) Get

Get retrieves the specified Operations resource. Gets a list of operations by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalOrganizationOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetGlobalOrganizationOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetGlobalOrganizationOperationRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalOrganizationOperationsClient) List

List retrieves a list of Operation resources contained within the specified organization.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalOrganizationOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListGlobalOrganizationOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListGlobalOrganizationOperationsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

GlobalPublicDelegatedPrefixesCallOptions

type GlobalPublicDelegatedPrefixesCallOptions struct {
	Delete []gax.CallOption
	Get    []gax.CallOption
	Insert []gax.CallOption
	List   []gax.CallOption
	Patch  []gax.CallOption
}

GlobalPublicDelegatedPrefixesCallOptions contains the retry settings for each method of GlobalPublicDelegatedPrefixesClient.

GlobalPublicDelegatedPrefixesClient

type GlobalPublicDelegatedPrefixesClient struct {

	// The call options for this service.
	CallOptions *GlobalPublicDelegatedPrefixesCallOptions
	// contains filtered or unexported fields
}

GlobalPublicDelegatedPrefixesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The GlobalPublicDelegatedPrefixes API.

func NewGlobalPublicDelegatedPrefixesRESTClient

func NewGlobalPublicDelegatedPrefixesRESTClient(ctx context.Context, opts ...option.ClientOption) (*GlobalPublicDelegatedPrefixesClient, error)

NewGlobalPublicDelegatedPrefixesRESTClient creates a new global public delegated prefixes rest client.

The GlobalPublicDelegatedPrefixes API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*GlobalPublicDelegatedPrefixesClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*GlobalPublicDelegatedPrefixesClient) Connection

func (c *GlobalPublicDelegatedPrefixesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*GlobalPublicDelegatedPrefixesClient) Delete

Delete deletes the specified global PublicDelegatedPrefix.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteGlobalPublicDelegatedPrefixeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteGlobalPublicDelegatedPrefixeRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalPublicDelegatedPrefixesClient) Get

Get returns the specified global PublicDelegatedPrefix resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetGlobalPublicDelegatedPrefixeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetGlobalPublicDelegatedPrefixeRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalPublicDelegatedPrefixesClient) Insert

Insert creates a global PublicDelegatedPrefix in the specified project using the parameters that are included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertGlobalPublicDelegatedPrefixeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertGlobalPublicDelegatedPrefixeRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*GlobalPublicDelegatedPrefixesClient) List

List lists the global PublicDelegatedPrefixes for a project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListGlobalPublicDelegatedPrefixesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListGlobalPublicDelegatedPrefixesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*GlobalPublicDelegatedPrefixesClient) Patch

Patch patches the specified global PublicDelegatedPrefix resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewGlobalPublicDelegatedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchGlobalPublicDelegatedPrefixeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchGlobalPublicDelegatedPrefixeRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

HealthCheckIterator

type HealthCheckIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.HealthCheck, nextPageToken string, err error)
	// contains filtered or unexported fields
}

HealthCheckIterator manages a stream of *computepb.HealthCheck.

func (*HealthCheckIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*HealthCheckIterator) PageInfo

func (it *HealthCheckIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

HealthCheckServiceIterator

type HealthCheckServiceIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.HealthCheckService, nextPageToken string, err error)
	// contains filtered or unexported fields
}

HealthCheckServiceIterator manages a stream of *computepb.HealthCheckService.

func (*HealthCheckServiceIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*HealthCheckServiceIterator) PageInfo

func (it *HealthCheckServiceIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

HealthChecksCallOptions

type HealthChecksCallOptions struct {
	AggregatedList []gax.CallOption
	Delete         []gax.CallOption
	Get            []gax.CallOption
	Insert         []gax.CallOption
	List           []gax.CallOption
	Patch          []gax.CallOption
	Update         []gax.CallOption
}

HealthChecksCallOptions contains the retry settings for each method of HealthChecksClient.

HealthChecksClient

type HealthChecksClient struct {

	// The call options for this service.
	CallOptions *HealthChecksCallOptions
	// contains filtered or unexported fields
}

HealthChecksClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The HealthChecks API.

func NewHealthChecksRESTClient

func NewHealthChecksRESTClient(ctx context.Context, opts ...option.ClientOption) (*HealthChecksClient, error)

NewHealthChecksRESTClient creates a new health checks rest client.

The HealthChecks API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewHealthChecksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*HealthChecksClient) AggregatedList

AggregatedList retrieves the list of all HealthCheck resources, regional and global, available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewHealthChecksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListHealthChecksRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListHealthChecksRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*HealthChecksClient) Close

func (c *HealthChecksClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*HealthChecksClient) Connection

func (c *HealthChecksClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*HealthChecksClient) Delete

Delete deletes the specified HealthCheck resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewHealthChecksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteHealthCheckRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteHealthCheckRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*HealthChecksClient) Get

Get returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewHealthChecksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetHealthCheckRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetHealthCheckRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*HealthChecksClient) Insert

Insert creates a HealthCheck resource in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewHealthChecksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertHealthCheckRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertHealthCheckRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*HealthChecksClient) List

List retrieves the list of HealthCheck resources available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewHealthChecksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListHealthChecksRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListHealthChecksRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*HealthChecksClient) Patch

Patch updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewHealthChecksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchHealthCheckRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchHealthCheckRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*HealthChecksClient) Update

Update updates a HealthCheck resource in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewHealthChecksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdateHealthCheckRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdateHealthCheckRequest.
	}
	resp, err := c.Update(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

HealthChecksScopedListPair

type HealthChecksScopedListPair struct {
	Key   string
	Value *computepb.HealthChecksScopedList
}

HealthChecksScopedListPair is a holder type for string/*computepb.HealthChecksScopedList map entries

HealthChecksScopedListPairIterator

type HealthChecksScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []HealthChecksScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

HealthChecksScopedListPairIterator manages a stream of HealthChecksScopedListPair.

func (*HealthChecksScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*HealthChecksScopedListPairIterator) PageInfo

func (it *HealthChecksScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ImageFamilyViewsCallOptions

type ImageFamilyViewsCallOptions struct {
	Get []gax.CallOption
}

ImageFamilyViewsCallOptions contains the retry settings for each method of ImageFamilyViewsClient.

ImageFamilyViewsClient

type ImageFamilyViewsClient struct {

	// The call options for this service.
	CallOptions *ImageFamilyViewsCallOptions
	// contains filtered or unexported fields
}

ImageFamilyViewsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The ImageFamilyViews API.

func NewImageFamilyViewsRESTClient

func NewImageFamilyViewsRESTClient(ctx context.Context, opts ...option.ClientOption) (*ImageFamilyViewsClient, error)

NewImageFamilyViewsRESTClient creates a new image family views rest client.

The ImageFamilyViews API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewImageFamilyViewsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*ImageFamilyViewsClient) Close

func (c *ImageFamilyViewsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*ImageFamilyViewsClient) Connection

func (c *ImageFamilyViewsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*ImageFamilyViewsClient) Get

Get returns the latest image that is part of an image family, is not deprecated and is rolled out in the specified zone.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewImageFamilyViewsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetImageFamilyViewRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetImageFamilyViewRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

ImageIterator

type ImageIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Image, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ImageIterator manages a stream of *computepb.Image.

func (*ImageIterator) Next

func (it *ImageIterator) Next() (*computepb.Image, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ImageIterator) PageInfo

func (it *ImageIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ImagesCallOptions

type ImagesCallOptions struct {
	Delete             []gax.CallOption
	Deprecate          []gax.CallOption
	Get                []gax.CallOption
	GetFromFamily      []gax.CallOption
	GetIamPolicy       []gax.CallOption
	Insert             []gax.CallOption
	List               []gax.CallOption
	Patch              []gax.CallOption
	SetIamPolicy       []gax.CallOption
	SetLabels          []gax.CallOption
	TestIamPermissions []gax.CallOption
}

ImagesCallOptions contains the retry settings for each method of ImagesClient.

ImagesClient

type ImagesClient struct {

	// The call options for this service.
	CallOptions *ImagesCallOptions
	// contains filtered or unexported fields
}

ImagesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Images API.

func NewImagesRESTClient

func NewImagesRESTClient(ctx context.Context, opts ...option.ClientOption) (*ImagesClient, error)

NewImagesRESTClient creates a new images rest client.

The Images API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewImagesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*ImagesClient) Close

func (c *ImagesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*ImagesClient) Connection

func (c *ImagesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*ImagesClient) Delete

Delete deletes the specified image.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewImagesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteImageRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteImageRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ImagesClient) Deprecate

Deprecate sets the deprecation status of an image. If an empty request body is given, clears the deprecation status instead.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewImagesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeprecateImageRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeprecateImageRequest.
	}
	resp, err := c.Deprecate(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ImagesClient) Get

Get returns the specified image. Gets a list of available images by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewImagesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetImageRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetImageRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ImagesClient) GetFromFamily

GetFromFamily returns the latest image that is part of an image family and is not deprecated.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewImagesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetFromFamilyImageRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetFromFamilyImageRequest.
	}
	resp, err := c.GetFromFamily(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ImagesClient) GetIamPolicy

GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewImagesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetIamPolicyImageRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetIamPolicyImageRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ImagesClient) Insert

Insert creates an image in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewImagesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertImageRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertImageRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ImagesClient) List

List retrieves the list of custom images available to the specified project. Custom images are images you create that belong to your project. This method does not get any images that belong to other projects, including publicly-available images, like Debian 8. If you want to get a list of publicly-available images, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewImagesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListImagesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListImagesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ImagesClient) Patch

Patch patches the specified image with the data included in the request. Only the following fields can be modified: family, description, deprecation status.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewImagesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchImageRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchImageRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ImagesClient) SetIamPolicy

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewImagesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetIamPolicyImageRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetIamPolicyImageRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ImagesClient) SetLabels

SetLabels sets the labels on an image. To learn more about labels, read the Labeling Resources documentation.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewImagesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetLabelsImageRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetLabelsImageRequest.
	}
	resp, err := c.SetLabels(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ImagesClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewImagesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsImageRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsImageRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

InstanceGroupIterator

type InstanceGroupIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.InstanceGroup, nextPageToken string, err error)
	// contains filtered or unexported fields
}

InstanceGroupIterator manages a stream of *computepb.InstanceGroup.

func (*InstanceGroupIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*InstanceGroupIterator) PageInfo

func (it *InstanceGroupIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

InstanceGroupManagerIterator

type InstanceGroupManagerIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.InstanceGroupManager, nextPageToken string, err error)
	// contains filtered or unexported fields
}

InstanceGroupManagerIterator manages a stream of *computepb.InstanceGroupManager.

func (*InstanceGroupManagerIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*InstanceGroupManagerIterator) PageInfo

func (it *InstanceGroupManagerIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

InstanceGroupManagersCallOptions

type InstanceGroupManagersCallOptions struct {
	AbandonInstances         []gax.CallOption
	AggregatedList           []gax.CallOption
	ApplyUpdatesToInstances  []gax.CallOption
	CreateInstances          []gax.CallOption
	Delete                   []gax.CallOption
	DeleteInstances          []gax.CallOption
	DeletePerInstanceConfigs []gax.CallOption
	Get                      []gax.CallOption
	Insert                   []gax.CallOption
	List                     []gax.CallOption
	ListErrors               []gax.CallOption
	ListManagedInstances     []gax.CallOption
	ListPerInstanceConfigs   []gax.CallOption
	Patch                    []gax.CallOption
	PatchPerInstanceConfigs  []gax.CallOption
	RecreateInstances        []gax.CallOption
	Resize                   []gax.CallOption
	SetInstanceTemplate      []gax.CallOption
	SetTargetPools           []gax.CallOption
	UpdatePerInstanceConfigs []gax.CallOption
}

InstanceGroupManagersCallOptions contains the retry settings for each method of InstanceGroupManagersClient.

InstanceGroupManagersClient

type InstanceGroupManagersClient struct {

	// The call options for this service.
	CallOptions *InstanceGroupManagersCallOptions
	// contains filtered or unexported fields
}

InstanceGroupManagersClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The InstanceGroupManagers API.

func NewInstanceGroupManagersRESTClient

func NewInstanceGroupManagersRESTClient(ctx context.Context, opts ...option.ClientOption) (*InstanceGroupManagersClient, error)

NewInstanceGroupManagersRESTClient creates a new instance group managers rest client.

The InstanceGroupManagers API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*InstanceGroupManagersClient) AbandonInstances

AbandonInstances flags the specified instances to be removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AbandonInstancesInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AbandonInstancesInstanceGroupManagerRequest.
	}
	resp, err := c.AbandonInstances(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupManagersClient) AggregatedList

AggregatedList retrieves the list of managed instance groups and groups them by zone.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListInstanceGroupManagersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListInstanceGroupManagersRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*InstanceGroupManagersClient) ApplyUpdatesToInstances

ApplyUpdatesToInstances applies changes to selected instances on the managed instance group. This method can be used to apply new overrides and/or new versions.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ApplyUpdatesToInstancesInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ApplyUpdatesToInstancesInstanceGroupManagerRequest.
	}
	resp, err := c.ApplyUpdatesToInstances(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupManagersClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*InstanceGroupManagersClient) Connection

func (c *InstanceGroupManagersClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*InstanceGroupManagersClient) CreateInstances

CreateInstances creates instances with per-instance configs in this managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.CreateInstancesInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#CreateInstancesInstanceGroupManagerRequest.
	}
	resp, err := c.CreateInstances(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupManagersClient) Delete

Delete deletes the specified managed instance group and all of the instances in that group. Note that the instance group must not belong to a backend service. Read Deleting an instance group for more information.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteInstanceGroupManagerRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupManagersClient) DeleteInstances

DeleteInstances flags the specified instances in the managed instance group for immediate deletion. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. This operation is marked as DONE when the action is scheduled even if the instances are still being deleted. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteInstancesInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteInstancesInstanceGroupManagerRequest.
	}
	resp, err := c.DeleteInstances(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupManagersClient) DeletePerInstanceConfigs

DeletePerInstanceConfigs deletes selected per-instance configs for the managed instance group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeletePerInstanceConfigsInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeletePerInstanceConfigsInstanceGroupManagerRequest.
	}
	resp, err := c.DeletePerInstanceConfigs(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupManagersClient) Get

Get returns all of the details about the specified managed instance group. Gets a list of available managed instance groups by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetInstanceGroupManagerRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupManagersClient) Insert

Insert creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A managed instance group can have up to 1000 VM instances per group. Please contact Cloud Support if you need an increase in this limit.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertInstanceGroupManagerRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupManagersClient) List

List retrieves a list of managed instance groups that are contained within the specified project and zone.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListInstanceGroupManagersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListInstanceGroupManagersRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*InstanceGroupManagersClient) ListErrors

ListErrors lists all errors thrown by actions on instances for a given managed instance group. The filter and orderBy query parameters are not supported.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListErrorsInstanceGroupManagersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListErrorsInstanceGroupManagersRequest.
	}
	it := c.ListErrors(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*InstanceGroupManagersClient) ListManagedInstances

ListManagedInstances lists all of the instances in the managed instance group. Each instance in the list has a currentAction, which indicates the action that the managed instance group is performing on the instance. For example, if the group is still creating an instance, the currentAction is CREATING. If a previous action failed, the list displays the errors for that failed action. The orderBy query parameter is not supported.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListManagedInstancesInstanceGroupManagersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListManagedInstancesInstanceGroupManagersRequest.
	}
	it := c.ListManagedInstances(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*InstanceGroupManagersClient) ListPerInstanceConfigs

ListPerInstanceConfigs lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListPerInstanceConfigsInstanceGroupManagersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListPerInstanceConfigsInstanceGroupManagersRequest.
	}
	it := c.ListPerInstanceConfigs(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*InstanceGroupManagersClient) Patch

Patch updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listManagedInstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. If you update your group to specify a new template or instance configuration, it’s possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchInstanceGroupManagerRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupManagersClient) PatchPerInstanceConfigs

PatchPerInstanceConfigs inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchPerInstanceConfigsInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchPerInstanceConfigsInstanceGroupManagerRequest.
	}
	resp, err := c.PatchPerInstanceConfigs(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupManagersClient) RecreateInstances

RecreateInstances flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group’s current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.RecreateInstancesInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#RecreateInstancesInstanceGroupManagerRequest.
	}
	resp, err := c.RecreateInstances(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupManagersClient) Resize

Resize resizes the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes instances. The resize operation is marked DONE when the resize actions are scheduled even if the group has not yet added or deleted any instances. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. When resizing down, the instance group arbitrarily chooses the order in which VMs are deleted. The group takes into account some VM attributes when making the selection including: + The status of the VM instance. + The health of the VM instance. + The instance template version the VM is based on. + For regional managed instance groups, the location of the VM instance. This list is subject to change. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ResizeInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ResizeInstanceGroupManagerRequest.
	}
	resp, err := c.Resize(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupManagersClient) SetInstanceTemplate

SetInstanceTemplate specifies the instance template to use when creating new instances in this group. The templates for existing instances in the group do not change unless you run recreateInstances, run applyUpdatesToInstances, or set the group’s updatePolicy.type to PROACTIVE.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetInstanceTemplateInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetInstanceTemplateInstanceGroupManagerRequest.
	}
	resp, err := c.SetInstanceTemplate(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupManagersClient) SetTargetPools

SetTargetPools modifies the target pools to which all instances in this managed instance group are assigned. The target pools automatically apply to all of the instances in the managed instance group. This operation is marked DONE when you make the request even if the instances have not yet been added to their target pools. The change might take some time to apply to all of the instances in the group depending on the size of the group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetTargetPoolsInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetTargetPoolsInstanceGroupManagerRequest.
	}
	resp, err := c.SetTargetPools(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupManagersClient) UpdatePerInstanceConfigs

UpdatePerInstanceConfigs inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdatePerInstanceConfigsInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdatePerInstanceConfigsInstanceGroupManagerRequest.
	}
	resp, err := c.UpdatePerInstanceConfigs(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

InstanceGroupManagersScopedListPair

type InstanceGroupManagersScopedListPair struct {
	Key   string
	Value *computepb.InstanceGroupManagersScopedList
}

InstanceGroupManagersScopedListPair is a holder type for string/*computepb.InstanceGroupManagersScopedList map entries

InstanceGroupManagersScopedListPairIterator

type InstanceGroupManagersScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []InstanceGroupManagersScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

InstanceGroupManagersScopedListPairIterator manages a stream of InstanceGroupManagersScopedListPair.

func (*InstanceGroupManagersScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*InstanceGroupManagersScopedListPairIterator) PageInfo

func (it *InstanceGroupManagersScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

InstanceGroupsCallOptions

type InstanceGroupsCallOptions struct {
	AddInstances    []gax.CallOption
	AggregatedList  []gax.CallOption
	Delete          []gax.CallOption
	Get             []gax.CallOption
	Insert          []gax.CallOption
	List            []gax.CallOption
	ListInstances   []gax.CallOption
	RemoveInstances []gax.CallOption
	SetNamedPorts   []gax.CallOption
}

InstanceGroupsCallOptions contains the retry settings for each method of InstanceGroupsClient.

InstanceGroupsClient

type InstanceGroupsClient struct {

	// The call options for this service.
	CallOptions *InstanceGroupsCallOptions
	// contains filtered or unexported fields
}

InstanceGroupsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The InstanceGroups API.

func NewInstanceGroupsRESTClient

func NewInstanceGroupsRESTClient(ctx context.Context, opts ...option.ClientOption) (*InstanceGroupsClient, error)

NewInstanceGroupsRESTClient creates a new instance groups rest client.

The InstanceGroups API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*InstanceGroupsClient) AddInstances

AddInstances adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AddInstancesInstanceGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AddInstancesInstanceGroupRequest.
	}
	resp, err := c.AddInstances(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupsClient) AggregatedList

AggregatedList retrieves the list of instance groups and sorts them by zone.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListInstanceGroupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListInstanceGroupsRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*InstanceGroupsClient) Close

func (c *InstanceGroupsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*InstanceGroupsClient) Connection

func (c *InstanceGroupsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*InstanceGroupsClient) Delete

Delete deletes the specified instance group. The instances in the group are not deleted. Note that instance group must not belong to a backend service. Read Deleting an instance group for more information.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteInstanceGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteInstanceGroupRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupsClient) Get

Get returns the specified zonal instance group. Get a list of available zonal instance groups by making a list() request. For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetInstanceGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetInstanceGroupRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupsClient) Insert

Insert creates an instance group in the specified project using the parameters that are included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertInstanceGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertInstanceGroupRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupsClient) List

List retrieves the list of zonal instance group resources contained within the specified zone. For managed instance groups, use the instanceGroupManagers or regionInstanceGroupManagers methods instead.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListInstanceGroupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListInstanceGroupsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*InstanceGroupsClient) ListInstances

ListInstances lists the instances in the specified instance group. The orderBy query parameter is not supported.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListInstancesInstanceGroupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListInstancesInstanceGroupsRequest.
	}
	it := c.ListInstances(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*InstanceGroupsClient) RemoveInstances

RemoveInstances removes one or more instances from the specified instance group, but does not delete those instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration before the VM instance is removed or deleted.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.RemoveInstancesInstanceGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#RemoveInstancesInstanceGroupRequest.
	}
	resp, err := c.RemoveInstances(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceGroupsClient) SetNamedPorts

SetNamedPorts sets the named ports for the specified instance group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetNamedPortsInstanceGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetNamedPortsInstanceGroupRequest.
	}
	resp, err := c.SetNamedPorts(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

InstanceGroupsScopedListPair

type InstanceGroupsScopedListPair struct {
	Key   string
	Value *computepb.InstanceGroupsScopedList
}

InstanceGroupsScopedListPair is a holder type for string/*computepb.InstanceGroupsScopedList map entries

InstanceGroupsScopedListPairIterator

type InstanceGroupsScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []InstanceGroupsScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

InstanceGroupsScopedListPairIterator manages a stream of InstanceGroupsScopedListPair.

func (*InstanceGroupsScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*InstanceGroupsScopedListPairIterator) PageInfo

func (it *InstanceGroupsScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

InstanceIterator

type InstanceIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Instance, nextPageToken string, err error)
	// contains filtered or unexported fields
}

InstanceIterator manages a stream of *computepb.Instance.

func (*InstanceIterator) Next

func (it *InstanceIterator) Next() (*computepb.Instance, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*InstanceIterator) PageInfo

func (it *InstanceIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

InstanceManagedByIgmErrorIterator

type InstanceManagedByIgmErrorIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.InstanceManagedByIgmError, nextPageToken string, err error)
	// contains filtered or unexported fields
}

InstanceManagedByIgmErrorIterator manages a stream of *computepb.InstanceManagedByIgmError.

func (*InstanceManagedByIgmErrorIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*InstanceManagedByIgmErrorIterator) PageInfo

func (it *InstanceManagedByIgmErrorIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

InstanceTemplateIterator

type InstanceTemplateIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.InstanceTemplate, nextPageToken string, err error)
	// contains filtered or unexported fields
}

InstanceTemplateIterator manages a stream of *computepb.InstanceTemplate.

func (*InstanceTemplateIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*InstanceTemplateIterator) PageInfo

func (it *InstanceTemplateIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

InstanceTemplatesCallOptions

type InstanceTemplatesCallOptions struct {
	Delete             []gax.CallOption
	Get                []gax.CallOption
	GetIamPolicy       []gax.CallOption
	Insert             []gax.CallOption
	List               []gax.CallOption
	SetIamPolicy       []gax.CallOption
	TestIamPermissions []gax.CallOption
}

InstanceTemplatesCallOptions contains the retry settings for each method of InstanceTemplatesClient.

InstanceTemplatesClient

type InstanceTemplatesClient struct {

	// The call options for this service.
	CallOptions *InstanceTemplatesCallOptions
	// contains filtered or unexported fields
}

InstanceTemplatesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The InstanceTemplates API.

func NewInstanceTemplatesRESTClient

func NewInstanceTemplatesRESTClient(ctx context.Context, opts ...option.ClientOption) (*InstanceTemplatesClient, error)

NewInstanceTemplatesRESTClient creates a new instance templates rest client.

The InstanceTemplates API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceTemplatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*InstanceTemplatesClient) Close

func (c *InstanceTemplatesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*InstanceTemplatesClient) Connection

func (c *InstanceTemplatesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*InstanceTemplatesClient) Delete

Delete deletes the specified instance template. Deleting an instance template is permanent and cannot be undone. It is not possible to delete templates that are already in use by a managed instance group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceTemplatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteInstanceTemplateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteInstanceTemplateRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceTemplatesClient) Get

Get returns the specified instance template. Gets a list of available instance templates by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceTemplatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetInstanceTemplateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetInstanceTemplateRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceTemplatesClient) GetIamPolicy

GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceTemplatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetIamPolicyInstanceTemplateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetIamPolicyInstanceTemplateRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceTemplatesClient) Insert

Insert creates an instance template in the specified project using the data that is included in the request. If you are creating a new template to update an existing instance group, your new instance template must use the same network or, if applicable, the same subnetwork as the original template.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceTemplatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertInstanceTemplateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertInstanceTemplateRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceTemplatesClient) List

List retrieves a list of instance templates that are contained within the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceTemplatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListInstanceTemplatesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListInstanceTemplatesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*InstanceTemplatesClient) SetIamPolicy

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceTemplatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetIamPolicyInstanceTemplateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetIamPolicyInstanceTemplateRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstanceTemplatesClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstanceTemplatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsInstanceTemplateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsInstanceTemplateRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

InstanceWithNamedPortsIterator

type InstanceWithNamedPortsIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.InstanceWithNamedPorts, nextPageToken string, err error)
	// contains filtered or unexported fields
}

InstanceWithNamedPortsIterator manages a stream of *computepb.InstanceWithNamedPorts.

func (*InstanceWithNamedPortsIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*InstanceWithNamedPortsIterator) PageInfo

func (it *InstanceWithNamedPortsIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

InstancesCallOptions

type InstancesCallOptions struct {
	AddAccessConfig                    []gax.CallOption
	AddResourcePolicies                []gax.CallOption
	AggregatedList                     []gax.CallOption
	AttachDisk                         []gax.CallOption
	BulkInsert                         []gax.CallOption
	Delete                             []gax.CallOption
	DeleteAccessConfig                 []gax.CallOption
	DetachDisk                         []gax.CallOption
	Get                                []gax.CallOption
	GetEffectiveFirewalls              []gax.CallOption
	GetGuestAttributes                 []gax.CallOption
	GetIamPolicy                       []gax.CallOption
	GetScreenshot                      []gax.CallOption
	GetSerialPortOutput                []gax.CallOption
	GetShieldedInstanceIdentity        []gax.CallOption
	Insert                             []gax.CallOption
	List                               []gax.CallOption
	ListReferrers                      []gax.CallOption
	RemoveResourcePolicies             []gax.CallOption
	Reset                              []gax.CallOption
	SendDiagnosticInterrupt            []gax.CallOption
	SetDeletionProtection              []gax.CallOption
	SetDiskAutoDelete                  []gax.CallOption
	SetIamPolicy                       []gax.CallOption
	SetLabels                          []gax.CallOption
	SetMachineResources                []gax.CallOption
	SetMachineType                     []gax.CallOption
	SetMetadata                        []gax.CallOption
	SetMinCpuPlatform                  []gax.CallOption
	SetScheduling                      []gax.CallOption
	SetServiceAccount                  []gax.CallOption
	SetShieldedInstanceIntegrityPolicy []gax.CallOption
	SetTags                            []gax.CallOption
	SimulateMaintenanceEvent           []gax.CallOption
	Start                              []gax.CallOption
	StartWithEncryptionKey             []gax.CallOption
	Stop                               []gax.CallOption
	TestIamPermissions                 []gax.CallOption
	Update                             []gax.CallOption
	UpdateAccessConfig                 []gax.CallOption
	UpdateDisplayDevice                []gax.CallOption
	UpdateNetworkInterface             []gax.CallOption
	UpdateShieldedInstanceConfig       []gax.CallOption
}

InstancesCallOptions contains the retry settings for each method of InstancesClient.

InstancesClient

type InstancesClient struct {

	// The call options for this service.
	CallOptions *InstancesCallOptions
	// contains filtered or unexported fields
}

InstancesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Instances API.

func NewInstancesRESTClient

func NewInstancesRESTClient(ctx context.Context, opts ...option.ClientOption) (*InstancesClient, error)

NewInstancesRESTClient creates a new instances rest client.

The Instances API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*InstancesClient) AddAccessConfig

AddAccessConfig adds an access config to an instance’s network interface.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AddAccessConfigInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AddAccessConfigInstanceRequest.
	}
	resp, err := c.AddAccessConfig(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) AddResourcePolicies

AddResourcePolicies adds existing resource policies to an instance. You can only add one policy right now which will be applied to this instance for scheduling live migrations.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AddResourcePoliciesInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AddResourcePoliciesInstanceRequest.
	}
	resp, err := c.AddResourcePolicies(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) AggregatedList

AggregatedList retrieves an aggregated list of all of the instances in your project across all regions and zones. The performance of this method degrades when a filter is specified on a project that has a very large number of instances.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListInstancesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListInstancesRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*InstancesClient) AttachDisk

AttachDisk attaches an existing Disk resource to an instance. You must first create the disk before you can attach it. It is not possible to create and attach a disk at the same time. For more information, read Adding a persistent disk to your instance.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AttachDiskInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AttachDiskInstanceRequest.
	}
	resp, err := c.AttachDisk(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) BulkInsert

BulkInsert creates multiple instances. Count specifies the number of instances to create.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.BulkInsertInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#BulkInsertInstanceRequest.
	}
	resp, err := c.BulkInsert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) Close

func (c *InstancesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*InstancesClient) Connection

func (c *InstancesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*InstancesClient) Delete

Delete deletes the specified Instance resource. For more information, see Deleting an instance.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteInstanceRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) DeleteAccessConfig

DeleteAccessConfig deletes an access config from an instance’s network interface.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteAccessConfigInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteAccessConfigInstanceRequest.
	}
	resp, err := c.DeleteAccessConfig(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) DetachDisk

DetachDisk detaches a disk from an instance.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DetachDiskInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DetachDiskInstanceRequest.
	}
	resp, err := c.DetachDisk(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) Get

Get returns the specified Instance resource. Gets a list of available instances by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetInstanceRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) GetEffectiveFirewalls

GetEffectiveFirewalls returns effective firewalls applied to an interface of the instance.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetEffectiveFirewallsInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetEffectiveFirewallsInstanceRequest.
	}
	resp, err := c.GetEffectiveFirewalls(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) GetGuestAttributes

GetGuestAttributes returns the specified guest attributes entry.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetGuestAttributesInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetGuestAttributesInstanceRequest.
	}
	resp, err := c.GetGuestAttributes(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) GetIamPolicy

GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetIamPolicyInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetIamPolicyInstanceRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) GetScreenshot

GetScreenshot returns the screenshot from the specified instance.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetScreenshotInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetScreenshotInstanceRequest.
	}
	resp, err := c.GetScreenshot(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) GetSerialPortOutput

GetSerialPortOutput returns the last 1 MB of serial port output from the specified instance.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetSerialPortOutputInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetSerialPortOutputInstanceRequest.
	}
	resp, err := c.GetSerialPortOutput(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) GetShieldedInstanceIdentity

GetShieldedInstanceIdentity returns the Shielded Instance Identity of an instance

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetShieldedInstanceIdentityInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetShieldedInstanceIdentityInstanceRequest.
	}
	resp, err := c.GetShieldedInstanceIdentity(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) Insert

Insert creates an instance resource in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertInstanceRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) List

List retrieves the list of instances contained within the specified zone.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListInstancesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListInstancesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*InstancesClient) ListReferrers

ListReferrers retrieves a list of resources that refer to the VM instance specified in the request. For example, if the VM instance is part of a managed or unmanaged instance group, the referrers list includes the instance group. For more information, read Viewing referrers to VM instances.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListReferrersInstancesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListReferrersInstancesRequest.
	}
	it := c.ListReferrers(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*InstancesClient) RemoveResourcePolicies

RemoveResourcePolicies removes resource policies from an instance.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.RemoveResourcePoliciesInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#RemoveResourcePoliciesInstanceRequest.
	}
	resp, err := c.RemoveResourcePolicies(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) Reset

Reset performs a reset on the instance. This is a hard reset the VM does not do a graceful shutdown. For more information, see Resetting an instance.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ResetInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ResetInstanceRequest.
	}
	resp, err := c.Reset(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) SendDiagnosticInterrupt

SendDiagnosticInterrupt sends diagnostic interrupt to the instance.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SendDiagnosticInterruptInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SendDiagnosticInterruptInstanceRequest.
	}
	resp, err := c.SendDiagnosticInterrupt(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) SetDeletionProtection

SetDeletionProtection sets deletion protection on the instance.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetDeletionProtectionInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetDeletionProtectionInstanceRequest.
	}
	resp, err := c.SetDeletionProtection(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) SetDiskAutoDelete

SetDiskAutoDelete sets the auto-delete flag for a disk attached to an instance.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetDiskAutoDeleteInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetDiskAutoDeleteInstanceRequest.
	}
	resp, err := c.SetDiskAutoDelete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) SetIamPolicy

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetIamPolicyInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetIamPolicyInstanceRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) SetLabels

SetLabels sets labels on an instance. To learn more about labels, read the Labeling Resources documentation.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetLabelsInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetLabelsInstanceRequest.
	}
	resp, err := c.SetLabels(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) SetMachineResources

SetMachineResources changes the number and/or type of accelerator for a stopped instance to the values specified in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetMachineResourcesInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetMachineResourcesInstanceRequest.
	}
	resp, err := c.SetMachineResources(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) SetMachineType

SetMachineType changes the machine type for a stopped instance to the machine type specified in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetMachineTypeInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetMachineTypeInstanceRequest.
	}
	resp, err := c.SetMachineType(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) SetMetadata

SetMetadata sets metadata for the specified instance to the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetMetadataInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetMetadataInstanceRequest.
	}
	resp, err := c.SetMetadata(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) SetMinCpuPlatform

SetMinCpuPlatform changes the minimum CPU platform that this instance should use. This method can only be called on a stopped instance. For more information, read Specifying a Minimum CPU Platform.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetMinCpuPlatformInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetMinCpuPlatformInstanceRequest.
	}
	resp, err := c.SetMinCpuPlatform(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) SetScheduling

SetScheduling sets an instance’s scheduling options. You can only call this method on a stopped instance, that is, a VM instance that is in a TERMINATED state. See Instance Life Cycle for more information on the possible instance states.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetSchedulingInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetSchedulingInstanceRequest.
	}
	resp, err := c.SetScheduling(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) SetServiceAccount

SetServiceAccount sets the service account on the instance. For more information, read Changing the service account and access scopes for an instance.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetServiceAccountInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetServiceAccountInstanceRequest.
	}
	resp, err := c.SetServiceAccount(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) SetShieldedInstanceIntegrityPolicy

func (c *InstancesClient) SetShieldedInstanceIntegrityPolicy(ctx context.Context, req *computepb.SetShieldedInstanceIntegrityPolicyInstanceRequest, opts ...gax.CallOption) (*Operation, error)

SetShieldedInstanceIntegrityPolicy sets the Shielded Instance integrity policy for an instance. You can only use this method on a running instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetShieldedInstanceIntegrityPolicyInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetShieldedInstanceIntegrityPolicyInstanceRequest.
	}
	resp, err := c.SetShieldedInstanceIntegrityPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) SetTags

SetTags sets network tags for the specified instance to the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetTagsInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetTagsInstanceRequest.
	}
	resp, err := c.SetTags(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) SimulateMaintenanceEvent

SimulateMaintenanceEvent simulates a maintenance event on the instance.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SimulateMaintenanceEventInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SimulateMaintenanceEventInstanceRequest.
	}
	resp, err := c.SimulateMaintenanceEvent(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) Start

Start starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.StartInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#StartInstanceRequest.
	}
	resp, err := c.Start(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) StartWithEncryptionKey

StartWithEncryptionKey starts an instance that was stopped using the instances().stop method. For more information, see Restart an instance.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.StartWithEncryptionKeyInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#StartWithEncryptionKeyInstanceRequest.
	}
	resp, err := c.StartWithEncryptionKey(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) Stop

Stop stops a running instance, shutting it down cleanly, and allows you to restart the instance at a later time. Stopped instances do not incur VM usage charges while they are stopped. However, resources that the VM 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.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.StopInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#StopInstanceRequest.
	}
	resp, err := c.Stop(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsInstanceRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) Update

Update updates an instance only if the necessary resources are available. This method can update only a specific set of instance properties. See Updating a running instance for a list of updatable instance properties.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdateInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdateInstanceRequest.
	}
	resp, err := c.Update(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) UpdateAccessConfig

UpdateAccessConfig updates the specified access config from an instance’s network interface with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdateAccessConfigInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdateAccessConfigInstanceRequest.
	}
	resp, err := c.UpdateAccessConfig(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) UpdateDisplayDevice

UpdateDisplayDevice updates the Display config for a VM instance. You can only use this method on a stopped VM instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdateDisplayDeviceInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdateDisplayDeviceInstanceRequest.
	}
	resp, err := c.UpdateDisplayDevice(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) UpdateNetworkInterface

UpdateNetworkInterface updates an instance’s network interface. This method can only update an interface’s alias IP range and attached network. See Modifying alias IP ranges for an existing instance for instructions on changing alias IP ranges. See Migrating a VM between networks for instructions on migrating an interface. This method follows PATCH semantics.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdateNetworkInterfaceInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdateNetworkInterfaceInstanceRequest.
	}
	resp, err := c.UpdateNetworkInterface(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InstancesClient) UpdateShieldedInstanceConfig

func (c *InstancesClient) UpdateShieldedInstanceConfig(ctx context.Context, req *computepb.UpdateShieldedInstanceConfigInstanceRequest, opts ...gax.CallOption) (*Operation, error)

UpdateShieldedInstanceConfig updates the Shielded Instance config for an instance. You can only use this method on a stopped instance. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdateShieldedInstanceConfigInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdateShieldedInstanceConfigInstanceRequest.
	}
	resp, err := c.UpdateShieldedInstanceConfig(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

InstancesScopedListPair

type InstancesScopedListPair struct {
	Key   string
	Value *computepb.InstancesScopedList
}

InstancesScopedListPair is a holder type for string/*computepb.InstancesScopedList map entries

InstancesScopedListPairIterator

type InstancesScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []InstancesScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

InstancesScopedListPairIterator manages a stream of InstancesScopedListPair.

func (*InstancesScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*InstancesScopedListPairIterator) PageInfo

func (it *InstancesScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

InterconnectAttachmentIterator

type InterconnectAttachmentIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.InterconnectAttachment, nextPageToken string, err error)
	// contains filtered or unexported fields
}

InterconnectAttachmentIterator manages a stream of *computepb.InterconnectAttachment.

func (*InterconnectAttachmentIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*InterconnectAttachmentIterator) PageInfo

func (it *InterconnectAttachmentIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

InterconnectAttachmentsCallOptions

type InterconnectAttachmentsCallOptions struct {
	AggregatedList []gax.CallOption
	Delete         []gax.CallOption
	Get            []gax.CallOption
	Insert         []gax.CallOption
	List           []gax.CallOption
	Patch          []gax.CallOption
}

InterconnectAttachmentsCallOptions contains the retry settings for each method of InterconnectAttachmentsClient.

InterconnectAttachmentsClient

type InterconnectAttachmentsClient struct {

	// The call options for this service.
	CallOptions *InterconnectAttachmentsCallOptions
	// contains filtered or unexported fields
}

InterconnectAttachmentsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The InterconnectAttachments API.

func NewInterconnectAttachmentsRESTClient

func NewInterconnectAttachmentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*InterconnectAttachmentsClient, error)

NewInterconnectAttachmentsRESTClient creates a new interconnect attachments rest client.

The InterconnectAttachments API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInterconnectAttachmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*InterconnectAttachmentsClient) AggregatedList

AggregatedList retrieves an aggregated list of interconnect attachments.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInterconnectAttachmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListInterconnectAttachmentsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListInterconnectAttachmentsRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*InterconnectAttachmentsClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*InterconnectAttachmentsClient) Connection

func (c *InterconnectAttachmentsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*InterconnectAttachmentsClient) Delete

Delete deletes the specified interconnect attachment.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInterconnectAttachmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteInterconnectAttachmentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteInterconnectAttachmentRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InterconnectAttachmentsClient) Get

Get returns the specified interconnect attachment.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInterconnectAttachmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetInterconnectAttachmentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetInterconnectAttachmentRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InterconnectAttachmentsClient) Insert

Insert creates an InterconnectAttachment in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInterconnectAttachmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertInterconnectAttachmentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertInterconnectAttachmentRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InterconnectAttachmentsClient) List

List retrieves the list of interconnect attachments contained within the specified region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInterconnectAttachmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListInterconnectAttachmentsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListInterconnectAttachmentsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*InterconnectAttachmentsClient) Patch

Patch updates the specified interconnect attachment with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInterconnectAttachmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchInterconnectAttachmentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchInterconnectAttachmentRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

InterconnectAttachmentsScopedListPair

type InterconnectAttachmentsScopedListPair struct {
	Key   string
	Value *computepb.InterconnectAttachmentsScopedList
}

InterconnectAttachmentsScopedListPair is a holder type for string/*computepb.InterconnectAttachmentsScopedList map entries

InterconnectAttachmentsScopedListPairIterator

type InterconnectAttachmentsScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []InterconnectAttachmentsScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

InterconnectAttachmentsScopedListPairIterator manages a stream of InterconnectAttachmentsScopedListPair.

func (*InterconnectAttachmentsScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*InterconnectAttachmentsScopedListPairIterator) PageInfo

func (it *InterconnectAttachmentsScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

InterconnectIterator

type InterconnectIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Interconnect, nextPageToken string, err error)
	// contains filtered or unexported fields
}

InterconnectIterator manages a stream of *computepb.Interconnect.

func (*InterconnectIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*InterconnectIterator) PageInfo

func (it *InterconnectIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

InterconnectLocationIterator

type InterconnectLocationIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.InterconnectLocation, nextPageToken string, err error)
	// contains filtered or unexported fields
}

InterconnectLocationIterator manages a stream of *computepb.InterconnectLocation.

func (*InterconnectLocationIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*InterconnectLocationIterator) PageInfo

func (it *InterconnectLocationIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

InterconnectLocationsCallOptions

type InterconnectLocationsCallOptions struct {
	Get  []gax.CallOption
	List []gax.CallOption
}

InterconnectLocationsCallOptions contains the retry settings for each method of InterconnectLocationsClient.

InterconnectLocationsClient

type InterconnectLocationsClient struct {

	// The call options for this service.
	CallOptions *InterconnectLocationsCallOptions
	// contains filtered or unexported fields
}

InterconnectLocationsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The InterconnectLocations API.

func NewInterconnectLocationsRESTClient

func NewInterconnectLocationsRESTClient(ctx context.Context, opts ...option.ClientOption) (*InterconnectLocationsClient, error)

NewInterconnectLocationsRESTClient creates a new interconnect locations rest client.

The InterconnectLocations API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInterconnectLocationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*InterconnectLocationsClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*InterconnectLocationsClient) Connection

func (c *InterconnectLocationsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*InterconnectLocationsClient) Get

Get returns the details for the specified interconnect location. Gets a list of available interconnect locations by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInterconnectLocationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetInterconnectLocationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetInterconnectLocationRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InterconnectLocationsClient) List

List retrieves the list of interconnect locations available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInterconnectLocationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListInterconnectLocationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListInterconnectLocationsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

InterconnectsCallOptions

type InterconnectsCallOptions struct {
	Delete         []gax.CallOption
	Get            []gax.CallOption
	GetDiagnostics []gax.CallOption
	Insert         []gax.CallOption
	List           []gax.CallOption
	Patch          []gax.CallOption
}

InterconnectsCallOptions contains the retry settings for each method of InterconnectsClient.

InterconnectsClient

type InterconnectsClient struct {

	// The call options for this service.
	CallOptions *InterconnectsCallOptions
	// contains filtered or unexported fields
}

InterconnectsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Interconnects API.

func NewInterconnectsRESTClient

func NewInterconnectsRESTClient(ctx context.Context, opts ...option.ClientOption) (*InterconnectsClient, error)

NewInterconnectsRESTClient creates a new interconnects rest client.

The Interconnects API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInterconnectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*InterconnectsClient) Close

func (c *InterconnectsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*InterconnectsClient) Connection

func (c *InterconnectsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*InterconnectsClient) Delete

Delete deletes the specified interconnect.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInterconnectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteInterconnectRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteInterconnectRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InterconnectsClient) Get

Get returns the specified interconnect. Get a list of available interconnects by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInterconnectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetInterconnectRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetInterconnectRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InterconnectsClient) GetDiagnostics

GetDiagnostics returns the interconnectDiagnostics for the specified interconnect.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInterconnectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetDiagnosticsInterconnectRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetDiagnosticsInterconnectRequest.
	}
	resp, err := c.GetDiagnostics(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InterconnectsClient) Insert

Insert creates a Interconnect in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInterconnectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertInterconnectRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertInterconnectRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*InterconnectsClient) List

List retrieves the list of interconnect available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInterconnectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListInterconnectsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListInterconnectsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*InterconnectsClient) Patch

Patch updates the specified interconnect with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewInterconnectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchInterconnectRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchInterconnectRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

LicenseCodesCallOptions

type LicenseCodesCallOptions struct {
	Get                []gax.CallOption
	TestIamPermissions []gax.CallOption
}

LicenseCodesCallOptions contains the retry settings for each method of LicenseCodesClient.

LicenseCodesClient

type LicenseCodesClient struct {

	// The call options for this service.
	CallOptions *LicenseCodesCallOptions
	// contains filtered or unexported fields
}

LicenseCodesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The LicenseCodes API.

func NewLicenseCodesRESTClient

func NewLicenseCodesRESTClient(ctx context.Context, opts ...option.ClientOption) (*LicenseCodesClient, error)

NewLicenseCodesRESTClient creates a new license codes rest client.

The LicenseCodes API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewLicenseCodesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*LicenseCodesClient) Close

func (c *LicenseCodesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*LicenseCodesClient) Connection

func (c *LicenseCodesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*LicenseCodesClient) Get

Get return a specified license code. License codes are mirrored across all projects that have permissions to read the License Code. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewLicenseCodesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetLicenseCodeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetLicenseCodeRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*LicenseCodesClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewLicenseCodesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsLicenseCodeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsLicenseCodeRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

LicenseIterator

type LicenseIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.License, nextPageToken string, err error)
	// contains filtered or unexported fields
}

LicenseIterator manages a stream of *computepb.License.

func (*LicenseIterator) Next

func (it *LicenseIterator) Next() (*computepb.License, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*LicenseIterator) PageInfo

func (it *LicenseIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

LicensesCallOptions

type LicensesCallOptions struct {
	Delete             []gax.CallOption
	Get                []gax.CallOption
	GetIamPolicy       []gax.CallOption
	Insert             []gax.CallOption
	List               []gax.CallOption
	SetIamPolicy       []gax.CallOption
	TestIamPermissions []gax.CallOption
}

LicensesCallOptions contains the retry settings for each method of LicensesClient.

LicensesClient

type LicensesClient struct {

	// The call options for this service.
	CallOptions *LicensesCallOptions
	// contains filtered or unexported fields
}

LicensesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Licenses API.

func NewLicensesRESTClient

func NewLicensesRESTClient(ctx context.Context, opts ...option.ClientOption) (*LicensesClient, error)

NewLicensesRESTClient creates a new licenses rest client.

The Licenses API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewLicensesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*LicensesClient) Close

func (c *LicensesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*LicensesClient) Connection

func (c *LicensesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*LicensesClient) Delete

Delete deletes the specified license. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewLicensesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteLicenseRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteLicenseRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*LicensesClient) Get

Get returns the specified License resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewLicensesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetLicenseRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetLicenseRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*LicensesClient) GetIamPolicy

GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewLicensesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetIamPolicyLicenseRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetIamPolicyLicenseRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*LicensesClient) Insert

Insert create a License resource in the specified project. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewLicensesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertLicenseRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertLicenseRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*LicensesClient) List

List retrieves the list of licenses available in the specified project. This method does not get any licenses that belong to other projects, including licenses attached to publicly-available images, like Debian 9. If you want to get a list of publicly-available licenses, use this method to make a request to the respective image project, such as debian-cloud or windows-cloud. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewLicensesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListLicensesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListLicensesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*LicensesClient) SetIamPolicy

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewLicensesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetIamPolicyLicenseRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetIamPolicyLicenseRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*LicensesClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource. Caution This resource is intended for use only by third-party partners who are creating Cloud Marketplace images.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewLicensesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsLicenseRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsLicenseRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

MachineTypeIterator

type MachineTypeIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.MachineType, nextPageToken string, err error)
	// contains filtered or unexported fields
}

MachineTypeIterator manages a stream of *computepb.MachineType.

func (*MachineTypeIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*MachineTypeIterator) PageInfo

func (it *MachineTypeIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

MachineTypesCallOptions

type MachineTypesCallOptions struct {
	AggregatedList []gax.CallOption
	Get            []gax.CallOption
	List           []gax.CallOption
}

MachineTypesCallOptions contains the retry settings for each method of MachineTypesClient.

MachineTypesClient

type MachineTypesClient struct {

	// The call options for this service.
	CallOptions *MachineTypesCallOptions
	// contains filtered or unexported fields
}

MachineTypesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The MachineTypes API.

func NewMachineTypesRESTClient

func NewMachineTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (*MachineTypesClient, error)

NewMachineTypesRESTClient creates a new machine types rest client.

The MachineTypes API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewMachineTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*MachineTypesClient) AggregatedList

AggregatedList retrieves an aggregated list of machine types.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewMachineTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListMachineTypesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListMachineTypesRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*MachineTypesClient) Close

func (c *MachineTypesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*MachineTypesClient) Connection

func (c *MachineTypesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*MachineTypesClient) Get

Get returns the specified machine type. Gets a list of available machine types by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewMachineTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetMachineTypeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetMachineTypeRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*MachineTypesClient) List

List retrieves a list of machine types available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewMachineTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListMachineTypesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListMachineTypesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

MachineTypesScopedListPair

type MachineTypesScopedListPair struct {
	Key   string
	Value *computepb.MachineTypesScopedList
}

MachineTypesScopedListPair is a holder type for string/*computepb.MachineTypesScopedList map entries

MachineTypesScopedListPairIterator

type MachineTypesScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []MachineTypesScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

MachineTypesScopedListPairIterator manages a stream of MachineTypesScopedListPair.

func (*MachineTypesScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*MachineTypesScopedListPairIterator) PageInfo

func (it *MachineTypesScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ManagedInstanceIterator

type ManagedInstanceIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.ManagedInstance, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ManagedInstanceIterator manages a stream of *computepb.ManagedInstance.

func (*ManagedInstanceIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ManagedInstanceIterator) PageInfo

func (it *ManagedInstanceIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

NetworkEndpointGroupIterator

type NetworkEndpointGroupIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.NetworkEndpointGroup, nextPageToken string, err error)
	// contains filtered or unexported fields
}

NetworkEndpointGroupIterator manages a stream of *computepb.NetworkEndpointGroup.

func (*NetworkEndpointGroupIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*NetworkEndpointGroupIterator) PageInfo

func (it *NetworkEndpointGroupIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

NetworkEndpointGroupsCallOptions

type NetworkEndpointGroupsCallOptions struct {
	AggregatedList         []gax.CallOption
	AttachNetworkEndpoints []gax.CallOption
	Delete                 []gax.CallOption
	DetachNetworkEndpoints []gax.CallOption
	Get                    []gax.CallOption
	Insert                 []gax.CallOption
	List                   []gax.CallOption
	ListNetworkEndpoints   []gax.CallOption
	TestIamPermissions     []gax.CallOption
}

NetworkEndpointGroupsCallOptions contains the retry settings for each method of NetworkEndpointGroupsClient.

NetworkEndpointGroupsClient

type NetworkEndpointGroupsClient struct {

	// The call options for this service.
	CallOptions *NetworkEndpointGroupsCallOptions
	// contains filtered or unexported fields
}

NetworkEndpointGroupsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The NetworkEndpointGroups API.

func NewNetworkEndpointGroupsRESTClient

func NewNetworkEndpointGroupsRESTClient(ctx context.Context, opts ...option.ClientOption) (*NetworkEndpointGroupsClient, error)

NewNetworkEndpointGroupsRESTClient creates a new network endpoint groups rest client.

The NetworkEndpointGroups API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*NetworkEndpointGroupsClient) AggregatedList

AggregatedList retrieves the list of network endpoint groups and sorts them by zone.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListNetworkEndpointGroupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListNetworkEndpointGroupsRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*NetworkEndpointGroupsClient) AttachNetworkEndpoints

AttachNetworkEndpoints attach a list of network endpoints to the specified network endpoint group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AttachNetworkEndpointsNetworkEndpointGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AttachNetworkEndpointsNetworkEndpointGroupRequest.
	}
	resp, err := c.AttachNetworkEndpoints(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NetworkEndpointGroupsClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*NetworkEndpointGroupsClient) Connection

func (c *NetworkEndpointGroupsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*NetworkEndpointGroupsClient) Delete

Delete deletes the specified network endpoint group. The network endpoints in the NEG and the VM instances they belong to are not terminated when the NEG is deleted. Note that the NEG cannot be deleted if there are backend services referencing it.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteNetworkEndpointGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteNetworkEndpointGroupRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NetworkEndpointGroupsClient) DetachNetworkEndpoints

DetachNetworkEndpoints detach a list of network endpoints from the specified network endpoint group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DetachNetworkEndpointsNetworkEndpointGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DetachNetworkEndpointsNetworkEndpointGroupRequest.
	}
	resp, err := c.DetachNetworkEndpoints(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NetworkEndpointGroupsClient) Get

Get returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetNetworkEndpointGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetNetworkEndpointGroupRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NetworkEndpointGroupsClient) Insert

Insert creates a network endpoint group in the specified project using the parameters that are included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertNetworkEndpointGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertNetworkEndpointGroupRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NetworkEndpointGroupsClient) List

List retrieves the list of network endpoint groups that are located in the specified project and zone.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListNetworkEndpointGroupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListNetworkEndpointGroupsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*NetworkEndpointGroupsClient) ListNetworkEndpoints

ListNetworkEndpoints lists the network endpoints in the specified network endpoint group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListNetworkEndpointsNetworkEndpointGroupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListNetworkEndpointsNetworkEndpointGroupsRequest.
	}
	it := c.ListNetworkEndpoints(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*NetworkEndpointGroupsClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsNetworkEndpointGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsNetworkEndpointGroupRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

NetworkEndpointGroupsScopedListPair

type NetworkEndpointGroupsScopedListPair struct {
	Key   string
	Value *computepb.NetworkEndpointGroupsScopedList
}

NetworkEndpointGroupsScopedListPair is a holder type for string/*computepb.NetworkEndpointGroupsScopedList map entries

NetworkEndpointGroupsScopedListPairIterator

type NetworkEndpointGroupsScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []NetworkEndpointGroupsScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

NetworkEndpointGroupsScopedListPairIterator manages a stream of NetworkEndpointGroupsScopedListPair.

func (*NetworkEndpointGroupsScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*NetworkEndpointGroupsScopedListPairIterator) PageInfo

func (it *NetworkEndpointGroupsScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

NetworkEndpointWithHealthStatusIterator

type NetworkEndpointWithHealthStatusIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.NetworkEndpointWithHealthStatus, nextPageToken string, err error)
	// contains filtered or unexported fields
}

NetworkEndpointWithHealthStatusIterator manages a stream of *computepb.NetworkEndpointWithHealthStatus.

func (*NetworkEndpointWithHealthStatusIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*NetworkEndpointWithHealthStatusIterator) PageInfo

func (it *NetworkEndpointWithHealthStatusIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

NetworkIterator

type NetworkIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Network, nextPageToken string, err error)
	// contains filtered or unexported fields
}

NetworkIterator manages a stream of *computepb.Network.

func (*NetworkIterator) Next

func (it *NetworkIterator) Next() (*computepb.Network, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*NetworkIterator) PageInfo

func (it *NetworkIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

NetworksCallOptions

type NetworksCallOptions struct {
	AddPeering            []gax.CallOption
	Delete                []gax.CallOption
	Get                   []gax.CallOption
	GetEffectiveFirewalls []gax.CallOption
	Insert                []gax.CallOption
	List                  []gax.CallOption
	ListPeeringRoutes     []gax.CallOption
	Patch                 []gax.CallOption
	RemovePeering         []gax.CallOption
	SwitchToCustomMode    []gax.CallOption
	UpdatePeering         []gax.CallOption
}

NetworksCallOptions contains the retry settings for each method of NetworksClient.

NetworksClient

type NetworksClient struct {

	// The call options for this service.
	CallOptions *NetworksCallOptions
	// contains filtered or unexported fields
}

NetworksClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Networks API.

func NewNetworksRESTClient

func NewNetworksRESTClient(ctx context.Context, opts ...option.ClientOption) (*NetworksClient, error)

NewNetworksRESTClient creates a new networks rest client.

The Networks API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*NetworksClient) AddPeering

AddPeering adds a peering to the specified network.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AddPeeringNetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AddPeeringNetworkRequest.
	}
	resp, err := c.AddPeering(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NetworksClient) Close

func (c *NetworksClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*NetworksClient) Connection

func (c *NetworksClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*NetworksClient) Delete

Delete deletes the specified network.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteNetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteNetworkRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NetworksClient) Get

Get returns the specified network. Gets a list of available networks by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetNetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetNetworkRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NetworksClient) GetEffectiveFirewalls

GetEffectiveFirewalls returns the effective firewalls on a given network.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetEffectiveFirewallsNetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetEffectiveFirewallsNetworkRequest.
	}
	resp, err := c.GetEffectiveFirewalls(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NetworksClient) Insert

Insert creates a network in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertNetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertNetworkRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NetworksClient) List

List retrieves the list of networks available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListNetworksRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListNetworksRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*NetworksClient) ListPeeringRoutes

ListPeeringRoutes lists the peering routes exchanged over peering connection.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListPeeringRoutesNetworksRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListPeeringRoutesNetworksRequest.
	}
	it := c.ListPeeringRoutes(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*NetworksClient) Patch

Patch patches the specified network with the data included in the request. Only the following fields can be modified: routingConfig.routingMode.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchNetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchNetworkRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NetworksClient) RemovePeering

RemovePeering removes a peering from the specified network.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.RemovePeeringNetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#RemovePeeringNetworkRequest.
	}
	resp, err := c.RemovePeering(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NetworksClient) SwitchToCustomMode

SwitchToCustomMode switches the network mode from auto subnet mode to custom subnet mode.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SwitchToCustomModeNetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SwitchToCustomModeNetworkRequest.
	}
	resp, err := c.SwitchToCustomMode(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NetworksClient) UpdatePeering

UpdatePeering updates the specified network peering with the data included in the request. You can only modify the NetworkPeering.export_custom_routes field and the NetworkPeering.import_custom_routes field.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdatePeeringNetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdatePeeringNetworkRequest.
	}
	resp, err := c.UpdatePeering(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

NodeGroupIterator

type NodeGroupIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.NodeGroup, nextPageToken string, err error)
	// contains filtered or unexported fields
}

NodeGroupIterator manages a stream of *computepb.NodeGroup.

func (*NodeGroupIterator) Next

func (it *NodeGroupIterator) Next() (*computepb.NodeGroup, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*NodeGroupIterator) PageInfo

func (it *NodeGroupIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

NodeGroupNodeIterator

type NodeGroupNodeIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.NodeGroupNode, nextPageToken string, err error)
	// contains filtered or unexported fields
}

NodeGroupNodeIterator manages a stream of *computepb.NodeGroupNode.

func (*NodeGroupNodeIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*NodeGroupNodeIterator) PageInfo

func (it *NodeGroupNodeIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

NodeGroupsCallOptions

type NodeGroupsCallOptions struct {
	AddNodes           []gax.CallOption
	AggregatedList     []gax.CallOption
	Delete             []gax.CallOption
	DeleteNodes        []gax.CallOption
	Get                []gax.CallOption
	GetIamPolicy       []gax.CallOption
	Insert             []gax.CallOption
	List               []gax.CallOption
	ListNodes          []gax.CallOption
	Patch              []gax.CallOption
	SetIamPolicy       []gax.CallOption
	SetNodeTemplate    []gax.CallOption
	TestIamPermissions []gax.CallOption
}

NodeGroupsCallOptions contains the retry settings for each method of NodeGroupsClient.

NodeGroupsClient

type NodeGroupsClient struct {

	// The call options for this service.
	CallOptions *NodeGroupsCallOptions
	// contains filtered or unexported fields
}

NodeGroupsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The NodeGroups API.

func NewNodeGroupsRESTClient

func NewNodeGroupsRESTClient(ctx context.Context, opts ...option.ClientOption) (*NodeGroupsClient, error)

NewNodeGroupsRESTClient creates a new node groups rest client.

The NodeGroups API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*NodeGroupsClient) AddNodes

AddNodes adds specified number of nodes to the node group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AddNodesNodeGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AddNodesNodeGroupRequest.
	}
	resp, err := c.AddNodes(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NodeGroupsClient) AggregatedList

AggregatedList retrieves an aggregated list of node groups. Note: use nodeGroups.listNodes for more details about each group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListNodeGroupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListNodeGroupsRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*NodeGroupsClient) Close

func (c *NodeGroupsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*NodeGroupsClient) Connection

func (c *NodeGroupsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*NodeGroupsClient) Delete

Delete deletes the specified NodeGroup resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteNodeGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteNodeGroupRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NodeGroupsClient) DeleteNodes

DeleteNodes deletes specified nodes from the node group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteNodesNodeGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteNodesNodeGroupRequest.
	}
	resp, err := c.DeleteNodes(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NodeGroupsClient) Get

Get returns the specified NodeGroup. Get a list of available NodeGroups by making a list() request. Note: the “nodes” field should not be used. Use nodeGroups.listNodes instead.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetNodeGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetNodeGroupRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NodeGroupsClient) GetIamPolicy

GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetIamPolicyNodeGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetIamPolicyNodeGroupRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NodeGroupsClient) Insert

Insert creates a NodeGroup resource in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertNodeGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertNodeGroupRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NodeGroupsClient) List

List retrieves a list of node groups available to the specified project. Note: use nodeGroups.listNodes for more details about each group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListNodeGroupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListNodeGroupsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*NodeGroupsClient) ListNodes

ListNodes lists nodes in the node group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListNodesNodeGroupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListNodesNodeGroupsRequest.
	}
	it := c.ListNodes(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*NodeGroupsClient) Patch

Patch updates the specified node group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchNodeGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchNodeGroupRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NodeGroupsClient) SetIamPolicy

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetIamPolicyNodeGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetIamPolicyNodeGroupRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NodeGroupsClient) SetNodeTemplate

SetNodeTemplate updates the node template of the node group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetNodeTemplateNodeGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetNodeTemplateNodeGroupRequest.
	}
	resp, err := c.SetNodeTemplate(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NodeGroupsClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsNodeGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsNodeGroupRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

NodeGroupsScopedListPair

type NodeGroupsScopedListPair struct {
	Key   string
	Value *computepb.NodeGroupsScopedList
}

NodeGroupsScopedListPair is a holder type for string/*computepb.NodeGroupsScopedList map entries

NodeGroupsScopedListPairIterator

type NodeGroupsScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []NodeGroupsScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

NodeGroupsScopedListPairIterator manages a stream of NodeGroupsScopedListPair.

func (*NodeGroupsScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*NodeGroupsScopedListPairIterator) PageInfo

func (it *NodeGroupsScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

NodeTemplateIterator

type NodeTemplateIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.NodeTemplate, nextPageToken string, err error)
	// contains filtered or unexported fields
}

NodeTemplateIterator manages a stream of *computepb.NodeTemplate.

func (*NodeTemplateIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*NodeTemplateIterator) PageInfo

func (it *NodeTemplateIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

NodeTemplatesCallOptions

type NodeTemplatesCallOptions struct {
	AggregatedList     []gax.CallOption
	Delete             []gax.CallOption
	Get                []gax.CallOption
	GetIamPolicy       []gax.CallOption
	Insert             []gax.CallOption
	List               []gax.CallOption
	SetIamPolicy       []gax.CallOption
	TestIamPermissions []gax.CallOption
}

NodeTemplatesCallOptions contains the retry settings for each method of NodeTemplatesClient.

NodeTemplatesClient

type NodeTemplatesClient struct {

	// The call options for this service.
	CallOptions *NodeTemplatesCallOptions
	// contains filtered or unexported fields
}

NodeTemplatesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The NodeTemplates API.

func NewNodeTemplatesRESTClient

func NewNodeTemplatesRESTClient(ctx context.Context, opts ...option.ClientOption) (*NodeTemplatesClient, error)

NewNodeTemplatesRESTClient creates a new node templates rest client.

The NodeTemplates API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeTemplatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*NodeTemplatesClient) AggregatedList

AggregatedList retrieves an aggregated list of node templates.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeTemplatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListNodeTemplatesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListNodeTemplatesRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*NodeTemplatesClient) Close

func (c *NodeTemplatesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*NodeTemplatesClient) Connection

func (c *NodeTemplatesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*NodeTemplatesClient) Delete

Delete deletes the specified NodeTemplate resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeTemplatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteNodeTemplateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteNodeTemplateRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NodeTemplatesClient) Get

Get returns the specified node template. Gets a list of available node templates by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeTemplatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetNodeTemplateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetNodeTemplateRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NodeTemplatesClient) GetIamPolicy

GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeTemplatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetIamPolicyNodeTemplateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetIamPolicyNodeTemplateRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NodeTemplatesClient) Insert

Insert creates a NodeTemplate resource in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeTemplatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertNodeTemplateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertNodeTemplateRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NodeTemplatesClient) List

List retrieves a list of node templates available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeTemplatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListNodeTemplatesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListNodeTemplatesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*NodeTemplatesClient) SetIamPolicy

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeTemplatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetIamPolicyNodeTemplateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetIamPolicyNodeTemplateRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NodeTemplatesClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeTemplatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsNodeTemplateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsNodeTemplateRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

NodeTemplatesScopedListPair

type NodeTemplatesScopedListPair struct {
	Key   string
	Value *computepb.NodeTemplatesScopedList
}

NodeTemplatesScopedListPair is a holder type for string/*computepb.NodeTemplatesScopedList map entries

NodeTemplatesScopedListPairIterator

type NodeTemplatesScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []NodeTemplatesScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

NodeTemplatesScopedListPairIterator manages a stream of NodeTemplatesScopedListPair.

func (*NodeTemplatesScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*NodeTemplatesScopedListPairIterator) PageInfo

func (it *NodeTemplatesScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

NodeTypeIterator

type NodeTypeIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.NodeType, nextPageToken string, err error)
	// contains filtered or unexported fields
}

NodeTypeIterator manages a stream of *computepb.NodeType.

func (*NodeTypeIterator) Next

func (it *NodeTypeIterator) Next() (*computepb.NodeType, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*NodeTypeIterator) PageInfo

func (it *NodeTypeIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

NodeTypesCallOptions

type NodeTypesCallOptions struct {
	AggregatedList []gax.CallOption
	Get            []gax.CallOption
	List           []gax.CallOption
}

NodeTypesCallOptions contains the retry settings for each method of NodeTypesClient.

NodeTypesClient

type NodeTypesClient struct {

	// The call options for this service.
	CallOptions *NodeTypesCallOptions
	// contains filtered or unexported fields
}

NodeTypesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The NodeTypes API.

func NewNodeTypesRESTClient

func NewNodeTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (*NodeTypesClient, error)

NewNodeTypesRESTClient creates a new node types rest client.

The NodeTypes API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*NodeTypesClient) AggregatedList

AggregatedList retrieves an aggregated list of node types.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListNodeTypesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListNodeTypesRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*NodeTypesClient) Close

func (c *NodeTypesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*NodeTypesClient) Connection

func (c *NodeTypesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*NodeTypesClient) Get

Get returns the specified node type. Gets a list of available node types by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetNodeTypeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetNodeTypeRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*NodeTypesClient) List

List retrieves a list of node types available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewNodeTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListNodeTypesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListNodeTypesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

NodeTypesScopedListPair

type NodeTypesScopedListPair struct {
	Key   string
	Value *computepb.NodeTypesScopedList
}

NodeTypesScopedListPair is a holder type for string/*computepb.NodeTypesScopedList map entries

NodeTypesScopedListPairIterator

type NodeTypesScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []NodeTypesScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

NodeTypesScopedListPairIterator manages a stream of NodeTypesScopedListPair.

func (*NodeTypesScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*NodeTypesScopedListPairIterator) PageInfo

func (it *NodeTypesScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

NotificationEndpointIterator

type NotificationEndpointIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.NotificationEndpoint, nextPageToken string, err error)
	// contains filtered or unexported fields
}

NotificationEndpointIterator manages a stream of *computepb.NotificationEndpoint.

func (*NotificationEndpointIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*NotificationEndpointIterator) PageInfo

func (it *NotificationEndpointIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

Operation

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

Operation represents a long running operation for this API.

func (*Operation) Proto

func (o *Operation) Proto() *computepb.Operation

Proto returns the raw type this wraps.

OperationIterator

type OperationIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Operation, nextPageToken string, err error)
	// contains filtered or unexported fields
}

OperationIterator manages a stream of *computepb.Operation.

func (*OperationIterator) Next

func (it *OperationIterator) Next() (*computepb.Operation, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*OperationIterator) PageInfo

func (it *OperationIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

OperationsScopedListPair

type OperationsScopedListPair struct {
	Key   string
	Value *computepb.OperationsScopedList
}

OperationsScopedListPair is a holder type for string/*computepb.OperationsScopedList map entries

OperationsScopedListPairIterator

type OperationsScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []OperationsScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

OperationsScopedListPairIterator manages a stream of OperationsScopedListPair.

func (*OperationsScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*OperationsScopedListPairIterator) PageInfo

func (it *OperationsScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

PacketMirroringIterator

type PacketMirroringIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.PacketMirroring, nextPageToken string, err error)
	// contains filtered or unexported fields
}

PacketMirroringIterator manages a stream of *computepb.PacketMirroring.

func (*PacketMirroringIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*PacketMirroringIterator) PageInfo

func (it *PacketMirroringIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

PacketMirroringsCallOptions

type PacketMirroringsCallOptions struct {
	AggregatedList     []gax.CallOption
	Delete             []gax.CallOption
	Get                []gax.CallOption
	Insert             []gax.CallOption
	List               []gax.CallOption
	Patch              []gax.CallOption
	TestIamPermissions []gax.CallOption
}

PacketMirroringsCallOptions contains the retry settings for each method of PacketMirroringsClient.

PacketMirroringsClient

type PacketMirroringsClient struct {

	// The call options for this service.
	CallOptions *PacketMirroringsCallOptions
	// contains filtered or unexported fields
}

PacketMirroringsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The PacketMirrorings API.

func NewPacketMirroringsRESTClient

func NewPacketMirroringsRESTClient(ctx context.Context, opts ...option.ClientOption) (*PacketMirroringsClient, error)

NewPacketMirroringsRESTClient creates a new packet mirrorings rest client.

The PacketMirrorings API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPacketMirroringsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*PacketMirroringsClient) AggregatedList

AggregatedList retrieves an aggregated list of packetMirrorings.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPacketMirroringsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListPacketMirroringsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListPacketMirroringsRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*PacketMirroringsClient) Close

func (c *PacketMirroringsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*PacketMirroringsClient) Connection

func (c *PacketMirroringsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*PacketMirroringsClient) Delete

Delete deletes the specified PacketMirroring resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPacketMirroringsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeletePacketMirroringRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeletePacketMirroringRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PacketMirroringsClient) Get

Get returns the specified PacketMirroring resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPacketMirroringsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetPacketMirroringRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetPacketMirroringRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PacketMirroringsClient) Insert

Insert creates a PacketMirroring resource in the specified project and region using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPacketMirroringsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertPacketMirroringRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertPacketMirroringRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PacketMirroringsClient) List

List retrieves a list of PacketMirroring resources available to the specified project and region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPacketMirroringsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListPacketMirroringsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListPacketMirroringsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*PacketMirroringsClient) Patch

Patch patches the specified PacketMirroring resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPacketMirroringsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchPacketMirroringRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchPacketMirroringRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PacketMirroringsClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPacketMirroringsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsPacketMirroringRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsPacketMirroringRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

PacketMirroringsScopedListPair

type PacketMirroringsScopedListPair struct {
	Key   string
	Value *computepb.PacketMirroringsScopedList
}

PacketMirroringsScopedListPair is a holder type for string/*computepb.PacketMirroringsScopedList map entries

PacketMirroringsScopedListPairIterator

type PacketMirroringsScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []PacketMirroringsScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

PacketMirroringsScopedListPairIterator manages a stream of PacketMirroringsScopedListPair.

func (*PacketMirroringsScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*PacketMirroringsScopedListPairIterator) PageInfo

func (it *PacketMirroringsScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

PerInstanceConfigIterator

type PerInstanceConfigIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.PerInstanceConfig, nextPageToken string, err error)
	// contains filtered or unexported fields
}

PerInstanceConfigIterator manages a stream of *computepb.PerInstanceConfig.

func (*PerInstanceConfigIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*PerInstanceConfigIterator) PageInfo

func (it *PerInstanceConfigIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ProjectIterator

type ProjectIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Project, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ProjectIterator manages a stream of *computepb.Project.

func (*ProjectIterator) Next

func (it *ProjectIterator) Next() (*computepb.Project, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ProjectIterator) PageInfo

func (it *ProjectIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ProjectsCallOptions

type ProjectsCallOptions struct {
	DisableXpnHost            []gax.CallOption
	DisableXpnResource        []gax.CallOption
	EnableXpnHost             []gax.CallOption
	EnableXpnResource         []gax.CallOption
	Get                       []gax.CallOption
	GetXpnHost                []gax.CallOption
	GetXpnResources           []gax.CallOption
	ListXpnHosts              []gax.CallOption
	MoveDisk                  []gax.CallOption
	MoveInstance              []gax.CallOption
	SetCommonInstanceMetadata []gax.CallOption
	SetDefaultNetworkTier     []gax.CallOption
	SetUsageExportBucket      []gax.CallOption
}

ProjectsCallOptions contains the retry settings for each method of ProjectsClient.

ProjectsClient

type ProjectsClient struct {

	// The call options for this service.
	CallOptions *ProjectsCallOptions
	// contains filtered or unexported fields
}

ProjectsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Projects API.

func NewProjectsRESTClient

func NewProjectsRESTClient(ctx context.Context, opts ...option.ClientOption) (*ProjectsClient, error)

NewProjectsRESTClient creates a new projects rest client.

The Projects API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewProjectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*ProjectsClient) Close

func (c *ProjectsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*ProjectsClient) Connection

func (c *ProjectsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*ProjectsClient) DisableXpnHost

DisableXpnHost disable this project as a shared VPC host project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewProjectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DisableXpnHostProjectRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DisableXpnHostProjectRequest.
	}
	resp, err := c.DisableXpnHost(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ProjectsClient) DisableXpnResource

DisableXpnResource disable a service resource (also known as service project) associated with this host project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewProjectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DisableXpnResourceProjectRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DisableXpnResourceProjectRequest.
	}
	resp, err := c.DisableXpnResource(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ProjectsClient) EnableXpnHost

EnableXpnHost enable this project as a shared VPC host project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewProjectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.EnableXpnHostProjectRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#EnableXpnHostProjectRequest.
	}
	resp, err := c.EnableXpnHost(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ProjectsClient) EnableXpnResource

EnableXpnResource enable service resource (a.k.a service project) for a host project, so that subnets in the host project can be used by instances in the service project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewProjectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.EnableXpnResourceProjectRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#EnableXpnResourceProjectRequest.
	}
	resp, err := c.EnableXpnResource(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ProjectsClient) Get

Get returns the specified Project resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewProjectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetProjectRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetProjectRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ProjectsClient) GetXpnHost

GetXpnHost gets the shared VPC host project that this project links to. May be empty if no link exists.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewProjectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetXpnHostProjectRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetXpnHostProjectRequest.
	}
	resp, err := c.GetXpnHost(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ProjectsClient) GetXpnResources

GetXpnResources gets service resources (a.k.a service project) associated with this host project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewProjectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetXpnResourcesProjectsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetXpnResourcesProjectsRequest.
	}
	it := c.GetXpnResources(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ProjectsClient) ListXpnHosts

ListXpnHosts lists all shared VPC host projects visible to the user in an organization.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewProjectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListXpnHostsProjectsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListXpnHostsProjectsRequest.
	}
	it := c.ListXpnHosts(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ProjectsClient) MoveDisk

MoveDisk moves a persistent disk from one zone to another.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewProjectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.MoveDiskProjectRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#MoveDiskProjectRequest.
	}
	resp, err := c.MoveDisk(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ProjectsClient) MoveInstance

MoveInstance moves an instance and its attached persistent disks from one zone to another.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewProjectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.MoveInstanceProjectRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#MoveInstanceProjectRequest.
	}
	resp, err := c.MoveInstance(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ProjectsClient) SetCommonInstanceMetadata

func (c *ProjectsClient) SetCommonInstanceMetadata(ctx context.Context, req *computepb.SetCommonInstanceMetadataProjectRequest, opts ...gax.CallOption) (*Operation, error)

SetCommonInstanceMetadata sets metadata common to all instances within the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewProjectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetCommonInstanceMetadataProjectRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetCommonInstanceMetadataProjectRequest.
	}
	resp, err := c.SetCommonInstanceMetadata(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ProjectsClient) SetDefaultNetworkTier

func (c *ProjectsClient) SetDefaultNetworkTier(ctx context.Context, req *computepb.SetDefaultNetworkTierProjectRequest, opts ...gax.CallOption) (*Operation, error)

SetDefaultNetworkTier sets the default network tier of the project. The default network tier is used when an address/forwardingRule/instance is created without specifying the network tier field.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewProjectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetDefaultNetworkTierProjectRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetDefaultNetworkTierProjectRequest.
	}
	resp, err := c.SetDefaultNetworkTier(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ProjectsClient) SetUsageExportBucket

SetUsageExportBucket 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.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewProjectsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetUsageExportBucketProjectRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetUsageExportBucketProjectRequest.
	}
	resp, err := c.SetUsageExportBucket(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

PublicAdvertisedPrefixIterator

type PublicAdvertisedPrefixIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.PublicAdvertisedPrefix, nextPageToken string, err error)
	// contains filtered or unexported fields
}

PublicAdvertisedPrefixIterator manages a stream of *computepb.PublicAdvertisedPrefix.

func (*PublicAdvertisedPrefixIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*PublicAdvertisedPrefixIterator) PageInfo

func (it *PublicAdvertisedPrefixIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

PublicAdvertisedPrefixesCallOptions

type PublicAdvertisedPrefixesCallOptions struct {
	Delete []gax.CallOption
	Get    []gax.CallOption
	Insert []gax.CallOption
	List   []gax.CallOption
	Patch  []gax.CallOption
}

PublicAdvertisedPrefixesCallOptions contains the retry settings for each method of PublicAdvertisedPrefixesClient.

PublicAdvertisedPrefixesClient

type PublicAdvertisedPrefixesClient struct {

	// The call options for this service.
	CallOptions *PublicAdvertisedPrefixesCallOptions
	// contains filtered or unexported fields
}

PublicAdvertisedPrefixesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The PublicAdvertisedPrefixes API.

func NewPublicAdvertisedPrefixesRESTClient

func NewPublicAdvertisedPrefixesRESTClient(ctx context.Context, opts ...option.ClientOption) (*PublicAdvertisedPrefixesClient, error)

NewPublicAdvertisedPrefixesRESTClient creates a new public advertised prefixes rest client.

The PublicAdvertisedPrefixes API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*PublicAdvertisedPrefixesClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*PublicAdvertisedPrefixesClient) Connection

func (c *PublicAdvertisedPrefixesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*PublicAdvertisedPrefixesClient) Delete

Delete deletes the specified PublicAdvertisedPrefix

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeletePublicAdvertisedPrefixeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeletePublicAdvertisedPrefixeRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PublicAdvertisedPrefixesClient) Get

Get returns the specified PublicAdvertisedPrefix resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetPublicAdvertisedPrefixeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetPublicAdvertisedPrefixeRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PublicAdvertisedPrefixesClient) Insert

Insert creates a PublicAdvertisedPrefix in the specified project using the parameters that are included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertPublicAdvertisedPrefixeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertPublicAdvertisedPrefixeRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PublicAdvertisedPrefixesClient) List

List lists the PublicAdvertisedPrefixes for a project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListPublicAdvertisedPrefixesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListPublicAdvertisedPrefixesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*PublicAdvertisedPrefixesClient) Patch

Patch patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPublicAdvertisedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchPublicAdvertisedPrefixeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchPublicAdvertisedPrefixeRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

PublicDelegatedPrefixIterator

type PublicDelegatedPrefixIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.PublicDelegatedPrefix, nextPageToken string, err error)
	// contains filtered or unexported fields
}

PublicDelegatedPrefixIterator manages a stream of *computepb.PublicDelegatedPrefix.

func (*PublicDelegatedPrefixIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*PublicDelegatedPrefixIterator) PageInfo

func (it *PublicDelegatedPrefixIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

PublicDelegatedPrefixesCallOptions

type PublicDelegatedPrefixesCallOptions struct {
	AggregatedList []gax.CallOption
	Delete         []gax.CallOption
	Get            []gax.CallOption
	Insert         []gax.CallOption
	List           []gax.CallOption
	Patch          []gax.CallOption
}

PublicDelegatedPrefixesCallOptions contains the retry settings for each method of PublicDelegatedPrefixesClient.

PublicDelegatedPrefixesClient

type PublicDelegatedPrefixesClient struct {

	// The call options for this service.
	CallOptions *PublicDelegatedPrefixesCallOptions
	// contains filtered or unexported fields
}

PublicDelegatedPrefixesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The PublicDelegatedPrefixes API.

func NewPublicDelegatedPrefixesRESTClient

func NewPublicDelegatedPrefixesRESTClient(ctx context.Context, opts ...option.ClientOption) (*PublicDelegatedPrefixesClient, error)

NewPublicDelegatedPrefixesRESTClient creates a new public delegated prefixes rest client.

The PublicDelegatedPrefixes API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*PublicDelegatedPrefixesClient) AggregatedList

AggregatedList lists all PublicDelegatedPrefix resources owned by the specific project across all scopes.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListPublicDelegatedPrefixesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListPublicDelegatedPrefixesRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*PublicDelegatedPrefixesClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*PublicDelegatedPrefixesClient) Connection

func (c *PublicDelegatedPrefixesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*PublicDelegatedPrefixesClient) Delete

Delete deletes the specified PublicDelegatedPrefix in the given region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeletePublicDelegatedPrefixeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeletePublicDelegatedPrefixeRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PublicDelegatedPrefixesClient) Get

Get returns the specified PublicDelegatedPrefix resource in the given region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetPublicDelegatedPrefixeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetPublicDelegatedPrefixeRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PublicDelegatedPrefixesClient) Insert

Insert creates a PublicDelegatedPrefix in the specified project in the given region using the parameters that are included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertPublicDelegatedPrefixeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertPublicDelegatedPrefixeRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*PublicDelegatedPrefixesClient) List

List lists the PublicDelegatedPrefixes for a project in the given region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListPublicDelegatedPrefixesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListPublicDelegatedPrefixesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*PublicDelegatedPrefixesClient) Patch

Patch patches the specified PublicDelegatedPrefix resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewPublicDelegatedPrefixesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchPublicDelegatedPrefixeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchPublicDelegatedPrefixeRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

PublicDelegatedPrefixesScopedListPair

type PublicDelegatedPrefixesScopedListPair struct {
	Key   string
	Value *computepb.PublicDelegatedPrefixesScopedList
}

PublicDelegatedPrefixesScopedListPair is a holder type for string/*computepb.PublicDelegatedPrefixesScopedList map entries

PublicDelegatedPrefixesScopedListPairIterator

type PublicDelegatedPrefixesScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []PublicDelegatedPrefixesScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

PublicDelegatedPrefixesScopedListPairIterator manages a stream of PublicDelegatedPrefixesScopedListPair.

func (*PublicDelegatedPrefixesScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*PublicDelegatedPrefixesScopedListPairIterator) PageInfo

func (it *PublicDelegatedPrefixesScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ReferenceIterator

type ReferenceIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Reference, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ReferenceIterator manages a stream of *computepb.Reference.

func (*ReferenceIterator) Next

func (it *ReferenceIterator) Next() (*computepb.Reference, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ReferenceIterator) PageInfo

func (it *ReferenceIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

RegionAutoscalersCallOptions

type RegionAutoscalersCallOptions struct {
	Delete []gax.CallOption
	Get    []gax.CallOption
	Insert []gax.CallOption
	List   []gax.CallOption
	Patch  []gax.CallOption
	Update []gax.CallOption
}

RegionAutoscalersCallOptions contains the retry settings for each method of RegionAutoscalersClient.

RegionAutoscalersClient

type RegionAutoscalersClient struct {

	// The call options for this service.
	CallOptions *RegionAutoscalersCallOptions
	// contains filtered or unexported fields
}

RegionAutoscalersClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The RegionAutoscalers API.

func NewRegionAutoscalersRESTClient

func NewRegionAutoscalersRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionAutoscalersClient, error)

NewRegionAutoscalersRESTClient creates a new region autoscalers rest client.

The RegionAutoscalers API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionAutoscalersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionAutoscalersClient) Close

func (c *RegionAutoscalersClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionAutoscalersClient) Connection

func (c *RegionAutoscalersClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RegionAutoscalersClient) Delete

Delete deletes the specified autoscaler.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionAutoscalersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteRegionAutoscalerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteRegionAutoscalerRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionAutoscalersClient) Get

Get returns the specified autoscaler.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionAutoscalersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRegionAutoscalerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionAutoscalerRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionAutoscalersClient) Insert

Insert creates an autoscaler in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionAutoscalersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertRegionAutoscalerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertRegionAutoscalerRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionAutoscalersClient) List

List retrieves a list of autoscalers contained within the specified region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionAutoscalersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRegionAutoscalersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionAutoscalersRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RegionAutoscalersClient) Patch

Patch updates an autoscaler in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionAutoscalersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchRegionAutoscalerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchRegionAutoscalerRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionAutoscalersClient) Update

Update updates an autoscaler in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionAutoscalersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdateRegionAutoscalerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdateRegionAutoscalerRequest.
	}
	resp, err := c.Update(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

RegionBackendServicesCallOptions

type RegionBackendServicesCallOptions struct {
	Delete    []gax.CallOption
	Get       []gax.CallOption
	GetHealth []gax.CallOption
	Insert    []gax.CallOption
	List      []gax.CallOption
	Patch     []gax.CallOption
	Update    []gax.CallOption
}

RegionBackendServicesCallOptions contains the retry settings for each method of RegionBackendServicesClient.

RegionBackendServicesClient

type RegionBackendServicesClient struct {

	// The call options for this service.
	CallOptions *RegionBackendServicesCallOptions
	// contains filtered or unexported fields
}

RegionBackendServicesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The RegionBackendServices API.

func NewRegionBackendServicesRESTClient

func NewRegionBackendServicesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionBackendServicesClient, error)

NewRegionBackendServicesRESTClient creates a new region backend services rest client.

The RegionBackendServices API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionBackendServicesClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionBackendServicesClient) Connection

func (c *RegionBackendServicesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RegionBackendServicesClient) Delete

Delete deletes the specified regional BackendService resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteRegionBackendServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteRegionBackendServiceRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionBackendServicesClient) Get

Get returns the specified regional BackendService resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRegionBackendServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionBackendServiceRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionBackendServicesClient) GetHealth

GetHealth gets the most recent health check results for this regional BackendService.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetHealthRegionBackendServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetHealthRegionBackendServiceRequest.
	}
	resp, err := c.GetHealth(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionBackendServicesClient) Insert

Insert creates a regional BackendService resource in the specified project using the data included in the request. For more information, see Backend services overview.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertRegionBackendServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertRegionBackendServiceRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionBackendServicesClient) List

List retrieves the list of regional BackendService resources available to the specified project in the given region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRegionBackendServicesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionBackendServicesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RegionBackendServicesClient) Patch

Patch updates the specified regional BackendService resource with the data included in the request. For more information, see Understanding backend services This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchRegionBackendServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchRegionBackendServiceRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionBackendServicesClient) Update

Update updates the specified regional BackendService resource with the data included in the request. For more information, see Backend services overview .

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionBackendServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdateRegionBackendServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdateRegionBackendServiceRequest.
	}
	resp, err := c.Update(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

RegionCommitmentsCallOptions

type RegionCommitmentsCallOptions struct {
	AggregatedList []gax.CallOption
	Get            []gax.CallOption
	Insert         []gax.CallOption
	List           []gax.CallOption
}

RegionCommitmentsCallOptions contains the retry settings for each method of RegionCommitmentsClient.

RegionCommitmentsClient

type RegionCommitmentsClient struct {

	// The call options for this service.
	CallOptions *RegionCommitmentsCallOptions
	// contains filtered or unexported fields
}

RegionCommitmentsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The RegionCommitments API.

func NewRegionCommitmentsRESTClient

func NewRegionCommitmentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionCommitmentsClient, error)

NewRegionCommitmentsRESTClient creates a new region commitments rest client.

The RegionCommitments API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionCommitmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionCommitmentsClient) AggregatedList

AggregatedList retrieves an aggregated list of commitments by region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionCommitmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListRegionCommitmentsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListRegionCommitmentsRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RegionCommitmentsClient) Close

func (c *RegionCommitmentsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionCommitmentsClient) Connection

func (c *RegionCommitmentsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RegionCommitmentsClient) Get

Get returns the specified commitment resource. Gets a list of available commitments by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionCommitmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRegionCommitmentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionCommitmentRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionCommitmentsClient) Insert

Insert creates a commitment in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionCommitmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertRegionCommitmentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertRegionCommitmentRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionCommitmentsClient) List

List retrieves a list of commitments contained within the specified region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionCommitmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRegionCommitmentsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionCommitmentsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

RegionDiskTypesCallOptions

type RegionDiskTypesCallOptions struct {
	Get  []gax.CallOption
	List []gax.CallOption
}

RegionDiskTypesCallOptions contains the retry settings for each method of RegionDiskTypesClient.

RegionDiskTypesClient

type RegionDiskTypesClient struct {

	// The call options for this service.
	CallOptions *RegionDiskTypesCallOptions
	// contains filtered or unexported fields
}

RegionDiskTypesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The RegionDiskTypes API.

func NewRegionDiskTypesRESTClient

func NewRegionDiskTypesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionDiskTypesClient, error)

NewRegionDiskTypesRESTClient creates a new region disk types rest client.

The RegionDiskTypes API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionDiskTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionDiskTypesClient) Close

func (c *RegionDiskTypesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionDiskTypesClient) Connection

func (c *RegionDiskTypesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RegionDiskTypesClient) Get

Get returns the specified regional disk type. Gets a list of available disk types by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionDiskTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRegionDiskTypeRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionDiskTypeRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionDiskTypesClient) List

List retrieves a list of regional disk types available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionDiskTypesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRegionDiskTypesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionDiskTypesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

RegionDisksCallOptions

type RegionDisksCallOptions struct {
	AddResourcePolicies    []gax.CallOption
	CreateSnapshot         []gax.CallOption
	Delete                 []gax.CallOption
	Get                    []gax.CallOption
	GetIamPolicy           []gax.CallOption
	Insert                 []gax.CallOption
	List                   []gax.CallOption
	RemoveResourcePolicies []gax.CallOption
	Resize                 []gax.CallOption
	SetIamPolicy           []gax.CallOption
	SetLabels              []gax.CallOption
	TestIamPermissions     []gax.CallOption
}

RegionDisksCallOptions contains the retry settings for each method of RegionDisksClient.

RegionDisksClient

type RegionDisksClient struct {

	// The call options for this service.
	CallOptions *RegionDisksCallOptions
	// contains filtered or unexported fields
}

RegionDisksClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The RegionDisks API.

func NewRegionDisksRESTClient

func NewRegionDisksRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionDisksClient, error)

NewRegionDisksRESTClient creates a new region disks rest client.

The RegionDisks API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionDisksClient) AddResourcePolicies

AddResourcePolicies adds existing resource policies to a regional disk. You can only add one policy which will be applied to this disk for scheduling snapshot creation.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AddResourcePoliciesRegionDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AddResourcePoliciesRegionDiskRequest.
	}
	resp, err := c.AddResourcePolicies(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionDisksClient) Close

func (c *RegionDisksClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionDisksClient) Connection

func (c *RegionDisksClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RegionDisksClient) CreateSnapshot

CreateSnapshot creates a snapshot of this regional disk.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.CreateSnapshotRegionDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#CreateSnapshotRegionDiskRequest.
	}
	resp, err := c.CreateSnapshot(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionDisksClient) Delete

Delete deletes the specified regional persistent disk. Deleting a regional disk removes all the replicas of its data permanently and is irreversible. However, deleting a disk does not delete any snapshots previously made from the disk. You must separately delete snapshots.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteRegionDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteRegionDiskRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionDisksClient) Get

Get returns a specified regional persistent disk.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRegionDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionDiskRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionDisksClient) GetIamPolicy

GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetIamPolicyRegionDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetIamPolicyRegionDiskRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionDisksClient) Insert

Insert creates a persistent regional disk in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertRegionDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertRegionDiskRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionDisksClient) List

List retrieves the list of persistent disks contained within the specified region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRegionDisksRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionDisksRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RegionDisksClient) RemoveResourcePolicies

RemoveResourcePolicies removes resource policies from a regional disk.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.RemoveResourcePoliciesRegionDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#RemoveResourcePoliciesRegionDiskRequest.
	}
	resp, err := c.RemoveResourcePolicies(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionDisksClient) Resize

Resize resizes the specified regional persistent disk.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ResizeRegionDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ResizeRegionDiskRequest.
	}
	resp, err := c.Resize(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionDisksClient) SetIamPolicy

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetIamPolicyRegionDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetIamPolicyRegionDiskRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionDisksClient) SetLabels

SetLabels sets the labels on the target regional disk.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetLabelsRegionDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetLabelsRegionDiskRequest.
	}
	resp, err := c.SetLabels(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionDisksClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionDisksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsRegionDiskRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsRegionDiskRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

RegionHealthCheckServicesCallOptions

type RegionHealthCheckServicesCallOptions struct {
	Delete []gax.CallOption
	Get    []gax.CallOption
	Insert []gax.CallOption
	List   []gax.CallOption
	Patch  []gax.CallOption
}

RegionHealthCheckServicesCallOptions contains the retry settings for each method of RegionHealthCheckServicesClient.

RegionHealthCheckServicesClient

type RegionHealthCheckServicesClient struct {

	// The call options for this service.
	CallOptions *RegionHealthCheckServicesCallOptions
	// contains filtered or unexported fields
}

RegionHealthCheckServicesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The RegionHealthCheckServices API.

func NewRegionHealthCheckServicesRESTClient

func NewRegionHealthCheckServicesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionHealthCheckServicesClient, error)

NewRegionHealthCheckServicesRESTClient creates a new region health check services rest client.

The RegionHealthCheckServices API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionHealthCheckServicesClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionHealthCheckServicesClient) Connection

func (c *RegionHealthCheckServicesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RegionHealthCheckServicesClient) Delete

Delete deletes the specified regional HealthCheckService.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteRegionHealthCheckServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteRegionHealthCheckServiceRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionHealthCheckServicesClient) Get

Get returns the specified regional HealthCheckService resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRegionHealthCheckServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionHealthCheckServiceRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionHealthCheckServicesClient) Insert

Insert creates a regional HealthCheckService resource in the specified project and region using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertRegionHealthCheckServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertRegionHealthCheckServiceRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionHealthCheckServicesClient) List

List lists all the HealthCheckService resources that have been configured for the specified project in the given region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRegionHealthCheckServicesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionHealthCheckServicesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RegionHealthCheckServicesClient) Patch

Patch updates the specified regional HealthCheckService resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionHealthCheckServicesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchRegionHealthCheckServiceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchRegionHealthCheckServiceRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

RegionHealthChecksCallOptions

type RegionHealthChecksCallOptions struct {
	Delete []gax.CallOption
	Get    []gax.CallOption
	Insert []gax.CallOption
	List   []gax.CallOption
	Patch  []gax.CallOption
	Update []gax.CallOption
}

RegionHealthChecksCallOptions contains the retry settings for each method of RegionHealthChecksClient.

RegionHealthChecksClient

type RegionHealthChecksClient struct {

	// The call options for this service.
	CallOptions *RegionHealthChecksCallOptions
	// contains filtered or unexported fields
}

RegionHealthChecksClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The RegionHealthChecks API.

func NewRegionHealthChecksRESTClient

func NewRegionHealthChecksRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionHealthChecksClient, error)

NewRegionHealthChecksRESTClient creates a new region health checks rest client.

The RegionHealthChecks API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionHealthChecksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionHealthChecksClient) Close

func (c *RegionHealthChecksClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionHealthChecksClient) Connection

func (c *RegionHealthChecksClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RegionHealthChecksClient) Delete

Delete deletes the specified HealthCheck resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionHealthChecksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteRegionHealthCheckRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteRegionHealthCheckRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionHealthChecksClient) Get

Get returns the specified HealthCheck resource. Gets a list of available health checks by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionHealthChecksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRegionHealthCheckRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionHealthCheckRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionHealthChecksClient) Insert

Insert creates a HealthCheck resource in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionHealthChecksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertRegionHealthCheckRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertRegionHealthCheckRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionHealthChecksClient) List

List retrieves the list of HealthCheck resources available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionHealthChecksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRegionHealthChecksRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionHealthChecksRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RegionHealthChecksClient) Patch

Patch updates a HealthCheck resource in the specified project using the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionHealthChecksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchRegionHealthCheckRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchRegionHealthCheckRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionHealthChecksClient) Update

Update updates a HealthCheck resource in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionHealthChecksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdateRegionHealthCheckRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdateRegionHealthCheckRequest.
	}
	resp, err := c.Update(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

RegionInstanceGroupManagersCallOptions

type RegionInstanceGroupManagersCallOptions struct {
	AbandonInstances         []gax.CallOption
	ApplyUpdatesToInstances  []gax.CallOption
	CreateInstances          []gax.CallOption
	Delete                   []gax.CallOption
	DeleteInstances          []gax.CallOption
	DeletePerInstanceConfigs []gax.CallOption
	Get                      []gax.CallOption
	Insert                   []gax.CallOption
	List                     []gax.CallOption
	ListErrors               []gax.CallOption
	ListManagedInstances     []gax.CallOption
	ListPerInstanceConfigs   []gax.CallOption
	Patch                    []gax.CallOption
	PatchPerInstanceConfigs  []gax.CallOption
	RecreateInstances        []gax.CallOption
	Resize                   []gax.CallOption
	SetInstanceTemplate      []gax.CallOption
	SetTargetPools           []gax.CallOption
	UpdatePerInstanceConfigs []gax.CallOption
}

RegionInstanceGroupManagersCallOptions contains the retry settings for each method of RegionInstanceGroupManagersClient.

RegionInstanceGroupManagersClient

type RegionInstanceGroupManagersClient struct {

	// The call options for this service.
	CallOptions *RegionInstanceGroupManagersCallOptions
	// contains filtered or unexported fields
}

RegionInstanceGroupManagersClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The RegionInstanceGroupManagers API.

func NewRegionInstanceGroupManagersRESTClient

func NewRegionInstanceGroupManagersRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionInstanceGroupManagersClient, error)

NewRegionInstanceGroupManagersRESTClient creates a new region instance group managers rest client.

The RegionInstanceGroupManagers API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionInstanceGroupManagersClient) AbandonInstances

AbandonInstances flags the specified instances to be immediately removed from the managed instance group. Abandoning an instance does not delete the instance, but it does remove the instance from any target pools that are applied by the managed instance group. This method reduces the targetSize of the managed instance group by the number of instances that you abandon. This operation is marked as DONE when the action is scheduled even if the instances have not yet been removed from the group. You must separately verify the status of the abandoning action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AbandonInstancesRegionInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AbandonInstancesRegionInstanceGroupManagerRequest.
	}
	resp, err := c.AbandonInstances(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionInstanceGroupManagersClient) ApplyUpdatesToInstances

ApplyUpdatesToInstances apply updates to selected instances the managed instance group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ApplyUpdatesToInstancesRegionInstanceGroupManagerRequest.
	}
	resp, err := c.ApplyUpdatesToInstances(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionInstanceGroupManagersClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionInstanceGroupManagersClient) Connection

func (c *RegionInstanceGroupManagersClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RegionInstanceGroupManagersClient) CreateInstances

CreateInstances creates instances with per-instance configs in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of the creating or actions with the listmanagedinstances method.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.CreateInstancesRegionInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#CreateInstancesRegionInstanceGroupManagerRequest.
	}
	resp, err := c.CreateInstances(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionInstanceGroupManagersClient) Delete

Delete deletes the specified managed instance group and all of the instances in that group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteRegionInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteRegionInstanceGroupManagerRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionInstanceGroupManagersClient) DeleteInstances

DeleteInstances flags the specified instances in the managed instance group to be immediately deleted. The instances are also removed from any target pools of which they were a member. This method reduces the targetSize of the managed instance group by the number of instances that you delete. The deleteInstances operation is marked DONE if the deleteInstances request is successful. The underlying actions take additional time. You must separately verify the status of the deleting action with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteInstancesRegionInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteInstancesRegionInstanceGroupManagerRequest.
	}
	resp, err := c.DeleteInstances(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionInstanceGroupManagersClient) DeletePerInstanceConfigs

DeletePerInstanceConfigs deletes selected per-instance configs for the managed instance group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeletePerInstanceConfigsRegionInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeletePerInstanceConfigsRegionInstanceGroupManagerRequest.
	}
	resp, err := c.DeletePerInstanceConfigs(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionInstanceGroupManagersClient) Get

Get returns all of the details about the specified managed instance group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRegionInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionInstanceGroupManagerRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionInstanceGroupManagersClient) Insert

Insert creates a managed instance group using the information that you specify in the request. After the group is created, instances in the group are created using the specified instance template. This operation is marked as DONE when the group is created even if the instances in the group have not yet been created. You must separately verify the status of the individual instances with the listmanagedinstances method. A regional managed instance group can contain up to 2000 instances.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertRegionInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertRegionInstanceGroupManagerRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionInstanceGroupManagersClient) List

List retrieves the list of managed instance groups that are contained within the specified region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRegionInstanceGroupManagersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionInstanceGroupManagersRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RegionInstanceGroupManagersClient) ListErrors

ListErrors lists all errors thrown by actions on instances for a given regional managed instance group. The filter and orderBy query parameters are not supported.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListErrorsRegionInstanceGroupManagersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListErrorsRegionInstanceGroupManagersRequest.
	}
	it := c.ListErrors(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RegionInstanceGroupManagersClient) ListManagedInstances

ListManagedInstances lists the instances in the managed instance group and instances that are scheduled to be created. The list includes any current actions that the group has scheduled for its instances. The orderBy query parameter is not supported.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListManagedInstancesRegionInstanceGroupManagersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListManagedInstancesRegionInstanceGroupManagersRequest.
	}
	it := c.ListManagedInstances(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RegionInstanceGroupManagersClient) ListPerInstanceConfigs

ListPerInstanceConfigs lists all of the per-instance configs defined for the managed instance group. The orderBy query parameter is not supported.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListPerInstanceConfigsRegionInstanceGroupManagersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListPerInstanceConfigsRegionInstanceGroupManagersRequest.
	}
	it := c.ListPerInstanceConfigs(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RegionInstanceGroupManagersClient) Patch

Patch updates a managed instance group using the information that you specify in the request. This operation is marked as DONE when the group is patched even if the instances in the group are still in the process of being patched. You must separately verify the status of the individual instances with the listmanagedinstances method. This method supports PATCH semantics and uses the JSON merge patch format and processing rules. If you update your group to specify a new template or instance configuration, it’s possible that your intended specification for each VM in the group is different from the current state of that VM. To learn how to apply an updated configuration to the VMs in a MIG, see Updating instances in a MIG.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchRegionInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchRegionInstanceGroupManagerRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionInstanceGroupManagersClient) PatchPerInstanceConfigs

PatchPerInstanceConfigs inserts or patches per-instance configs for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchPerInstanceConfigsRegionInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchPerInstanceConfigsRegionInstanceGroupManagerRequest.
	}
	resp, err := c.PatchPerInstanceConfigs(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionInstanceGroupManagersClient) RecreateInstances

RecreateInstances flags the specified VM instances in the managed instance group to be immediately recreated. Each instance is recreated using the group’s current configuration. This operation is marked as DONE when the flag is set even if the instances have not yet been recreated. You must separately verify the status of each instance by checking its currentAction field; for more information, see Checking the status of managed instances. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted. You can specify a maximum of 1000 instances with this method per request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.RecreateInstancesRegionInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#RecreateInstancesRegionInstanceGroupManagerRequest.
	}
	resp, err := c.RecreateInstances(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionInstanceGroupManagersClient) Resize

Resize changes the intended size of the managed instance group. If you increase the size, the group creates new instances using the current instance template. If you decrease the size, the group deletes one or more instances. The resize operation is marked DONE if the resize request is successful. The underlying actions take additional time. You must separately verify the status of the creating or deleting actions with the listmanagedinstances method. If the group is part of a backend service that has enabled connection draining, it can take up to 60 seconds after the connection draining duration has elapsed before the VM instance is removed or deleted.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ResizeRegionInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ResizeRegionInstanceGroupManagerRequest.
	}
	resp, err := c.Resize(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionInstanceGroupManagersClient) SetInstanceTemplate

SetInstanceTemplate sets the instance template to use when creating new instances or recreating instances in this group. Existing instances are not affected.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetInstanceTemplateRegionInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetInstanceTemplateRegionInstanceGroupManagerRequest.
	}
	resp, err := c.SetInstanceTemplate(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionInstanceGroupManagersClient) SetTargetPools

SetTargetPools modifies the target pools to which all new instances in this group are assigned. Existing instances in the group are not affected.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetTargetPoolsRegionInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetTargetPoolsRegionInstanceGroupManagerRequest.
	}
	resp, err := c.SetTargetPools(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionInstanceGroupManagersClient) UpdatePerInstanceConfigs

UpdatePerInstanceConfigs inserts or updates per-instance configs for the managed instance group. perInstanceConfig.name (at http://perInstanceConfig.name) serves as a key used to distinguish whether to perform insert or patch.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupManagersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdatePerInstanceConfigsRegionInstanceGroupManagerRequest.
	}
	resp, err := c.UpdatePerInstanceConfigs(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

RegionInstanceGroupsCallOptions

type RegionInstanceGroupsCallOptions struct {
	Get           []gax.CallOption
	List          []gax.CallOption
	ListInstances []gax.CallOption
	SetNamedPorts []gax.CallOption
}

RegionInstanceGroupsCallOptions contains the retry settings for each method of RegionInstanceGroupsClient.

RegionInstanceGroupsClient

type RegionInstanceGroupsClient struct {

	// The call options for this service.
	CallOptions *RegionInstanceGroupsCallOptions
	// contains filtered or unexported fields
}

RegionInstanceGroupsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The RegionInstanceGroups API.

func NewRegionInstanceGroupsRESTClient

func NewRegionInstanceGroupsRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionInstanceGroupsClient, error)

NewRegionInstanceGroupsRESTClient creates a new region instance groups rest client.

The RegionInstanceGroups API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionInstanceGroupsClient) Close

func (c *RegionInstanceGroupsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionInstanceGroupsClient) Connection

func (c *RegionInstanceGroupsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RegionInstanceGroupsClient) Get

Get returns the specified instance group resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRegionInstanceGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionInstanceGroupRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionInstanceGroupsClient) List

List retrieves the list of instance group resources contained within the specified region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRegionInstanceGroupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionInstanceGroupsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RegionInstanceGroupsClient) ListInstances

ListInstances lists the instances in the specified instance group and displays information about the named ports. Depending on the specified options, this method can list all instances or only the instances that are running. The orderBy query parameter is not supported.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListInstancesRegionInstanceGroupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListInstancesRegionInstanceGroupsRequest.
	}
	it := c.ListInstances(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RegionInstanceGroupsClient) SetNamedPorts

SetNamedPorts sets the named ports for the specified regional instance group.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstanceGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetNamedPortsRegionInstanceGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetNamedPortsRegionInstanceGroupRequest.
	}
	resp, err := c.SetNamedPorts(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

RegionInstancesCallOptions

type RegionInstancesCallOptions struct {
	BulkInsert []gax.CallOption
}

RegionInstancesCallOptions contains the retry settings for each method of RegionInstancesClient.

RegionInstancesClient

type RegionInstancesClient struct {

	// The call options for this service.
	CallOptions *RegionInstancesCallOptions
	// contains filtered or unexported fields
}

RegionInstancesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The RegionInstances API.

func NewRegionInstancesRESTClient

func NewRegionInstancesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionInstancesClient, error)

NewRegionInstancesRESTClient creates a new region instances rest client.

The RegionInstances API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionInstancesClient) BulkInsert

BulkInsert creates multiple instances in a given region. Count specifies the number of instances to create.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.BulkInsertRegionInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#BulkInsertRegionInstanceRequest.
	}
	resp, err := c.BulkInsert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionInstancesClient) Close

func (c *RegionInstancesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionInstancesClient) Connection

func (c *RegionInstancesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

RegionIterator

type RegionIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Region, nextPageToken string, err error)
	// contains filtered or unexported fields
}

RegionIterator manages a stream of *computepb.Region.

func (*RegionIterator) Next

func (it *RegionIterator) Next() (*computepb.Region, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*RegionIterator) PageInfo

func (it *RegionIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

RegionNetworkEndpointGroupsCallOptions

type RegionNetworkEndpointGroupsCallOptions struct {
	Delete []gax.CallOption
	Get    []gax.CallOption
	Insert []gax.CallOption
	List   []gax.CallOption
}

RegionNetworkEndpointGroupsCallOptions contains the retry settings for each method of RegionNetworkEndpointGroupsClient.

RegionNetworkEndpointGroupsClient

type RegionNetworkEndpointGroupsClient struct {

	// The call options for this service.
	CallOptions *RegionNetworkEndpointGroupsCallOptions
	// contains filtered or unexported fields
}

RegionNetworkEndpointGroupsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The RegionNetworkEndpointGroups API.

func NewRegionNetworkEndpointGroupsRESTClient

func NewRegionNetworkEndpointGroupsRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionNetworkEndpointGroupsClient, error)

NewRegionNetworkEndpointGroupsRESTClient creates a new region network endpoint groups rest client.

The RegionNetworkEndpointGroups API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionNetworkEndpointGroupsClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionNetworkEndpointGroupsClient) Connection

func (c *RegionNetworkEndpointGroupsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RegionNetworkEndpointGroupsClient) Delete

Delete deletes the specified network endpoint group. Note that the NEG cannot be deleted if it is configured as a backend of a backend service.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteRegionNetworkEndpointGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteRegionNetworkEndpointGroupRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionNetworkEndpointGroupsClient) Get

Get returns the specified network endpoint group. Gets a list of available network endpoint groups by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRegionNetworkEndpointGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionNetworkEndpointGroupRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionNetworkEndpointGroupsClient) Insert

Insert creates a network endpoint group in the specified project using the parameters that are included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertRegionNetworkEndpointGroupRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertRegionNetworkEndpointGroupRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionNetworkEndpointGroupsClient) List

List retrieves the list of regional network endpoint groups available to the specified project in the given region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionNetworkEndpointGroupsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRegionNetworkEndpointGroupsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionNetworkEndpointGroupsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

RegionNotificationEndpointsCallOptions

type RegionNotificationEndpointsCallOptions struct {
	Delete []gax.CallOption
	Get    []gax.CallOption
	Insert []gax.CallOption
	List   []gax.CallOption
}

RegionNotificationEndpointsCallOptions contains the retry settings for each method of RegionNotificationEndpointsClient.

RegionNotificationEndpointsClient

type RegionNotificationEndpointsClient struct {

	// The call options for this service.
	CallOptions *RegionNotificationEndpointsCallOptions
	// contains filtered or unexported fields
}

RegionNotificationEndpointsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The RegionNotificationEndpoints API.

func NewRegionNotificationEndpointsRESTClient

func NewRegionNotificationEndpointsRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionNotificationEndpointsClient, error)

NewRegionNotificationEndpointsRESTClient creates a new region notification endpoints rest client.

The RegionNotificationEndpoints API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionNotificationEndpointsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionNotificationEndpointsClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionNotificationEndpointsClient) Connection

func (c *RegionNotificationEndpointsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RegionNotificationEndpointsClient) Delete

Delete deletes the specified NotificationEndpoint in the given region

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionNotificationEndpointsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteRegionNotificationEndpointRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteRegionNotificationEndpointRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionNotificationEndpointsClient) Get

Get returns the specified NotificationEndpoint resource in the given region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionNotificationEndpointsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRegionNotificationEndpointRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionNotificationEndpointRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionNotificationEndpointsClient) Insert

Insert create a NotificationEndpoint in the specified project in the given region using the parameters that are included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionNotificationEndpointsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertRegionNotificationEndpointRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertRegionNotificationEndpointRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionNotificationEndpointsClient) List

List lists the NotificationEndpoints for a project in the given region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionNotificationEndpointsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRegionNotificationEndpointsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionNotificationEndpointsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

RegionOperationsCallOptions

type RegionOperationsCallOptions struct {
	Delete []gax.CallOption
	Get    []gax.CallOption
	List   []gax.CallOption
	Wait   []gax.CallOption
}

RegionOperationsCallOptions contains the retry settings for each method of RegionOperationsClient.

RegionOperationsClient

type RegionOperationsClient struct {

	// The call options for this service.
	CallOptions *RegionOperationsCallOptions
	// contains filtered or unexported fields
}

RegionOperationsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The RegionOperations API.

func NewRegionOperationsRESTClient

func NewRegionOperationsRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionOperationsClient, error)

NewRegionOperationsRESTClient creates a new region operations rest client.

The RegionOperations API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionOperationsClient) Close

func (c *RegionOperationsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionOperationsClient) Connection

func (c *RegionOperationsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RegionOperationsClient) Delete

Delete deletes the specified region-specific Operations resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteRegionOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteRegionOperationRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionOperationsClient) Get

Get retrieves the specified region-specific Operations resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRegionOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionOperationRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionOperationsClient) List

List retrieves a list of Operation resources contained within the specified region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRegionOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionOperationsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RegionOperationsClient) Wait

Wait waits for the specified Operation resource to return as DONE or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method differs from the GET method in that it waits for no more than the default deadline (2 minutes) and then returns the current state of the operation, which might be DONE or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not DONE.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.WaitRegionOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#WaitRegionOperationRequest.
	}
	resp, err := c.Wait(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

RegionSslCertificatesCallOptions

type RegionSslCertificatesCallOptions struct {
	Delete []gax.CallOption
	Get    []gax.CallOption
	Insert []gax.CallOption
	List   []gax.CallOption
}

RegionSslCertificatesCallOptions contains the retry settings for each method of RegionSslCertificatesClient.

RegionSslCertificatesClient

type RegionSslCertificatesClient struct {

	// The call options for this service.
	CallOptions *RegionSslCertificatesCallOptions
	// contains filtered or unexported fields
}

RegionSslCertificatesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The RegionSslCertificates API.

func NewRegionSslCertificatesRESTClient

func NewRegionSslCertificatesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionSslCertificatesClient, error)

NewRegionSslCertificatesRESTClient creates a new region ssl certificates rest client.

The RegionSslCertificates API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionSslCertificatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionSslCertificatesClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionSslCertificatesClient) Connection

func (c *RegionSslCertificatesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RegionSslCertificatesClient) Delete

Delete deletes the specified SslCertificate resource in the region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionSslCertificatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteRegionSslCertificateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteRegionSslCertificateRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionSslCertificatesClient) Get

Get returns the specified SslCertificate resource in the specified region. Get a list of available SSL certificates by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionSslCertificatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRegionSslCertificateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionSslCertificateRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionSslCertificatesClient) Insert

Insert creates a SslCertificate resource in the specified project and region using the data included in the request

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionSslCertificatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertRegionSslCertificateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertRegionSslCertificateRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionSslCertificatesClient) List

List retrieves the list of SslCertificate resources available to the specified project in the specified region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionSslCertificatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRegionSslCertificatesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionSslCertificatesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

RegionTargetHttpProxiesCallOptions

type RegionTargetHttpProxiesCallOptions struct {
	Delete    []gax.CallOption
	Get       []gax.CallOption
	Insert    []gax.CallOption
	List      []gax.CallOption
	SetUrlMap []gax.CallOption
}

RegionTargetHttpProxiesCallOptions contains the retry settings for each method of RegionTargetHttpProxiesClient.

RegionTargetHttpProxiesClient

type RegionTargetHttpProxiesClient struct {

	// The call options for this service.
	CallOptions *RegionTargetHttpProxiesCallOptions
	// contains filtered or unexported fields
}

RegionTargetHttpProxiesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The RegionTargetHttpProxies API.

func NewRegionTargetHttpProxiesRESTClient

func NewRegionTargetHttpProxiesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionTargetHttpProxiesClient, error)

NewRegionTargetHttpProxiesRESTClient creates a new region target http proxies rest client.

The RegionTargetHttpProxies API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionTargetHttpProxiesClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionTargetHttpProxiesClient) Connection

func (c *RegionTargetHttpProxiesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RegionTargetHttpProxiesClient) Delete

Delete deletes the specified TargetHttpProxy resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteRegionTargetHttpProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteRegionTargetHttpProxyRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionTargetHttpProxiesClient) Get

Get returns the specified TargetHttpProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRegionTargetHttpProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionTargetHttpProxyRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionTargetHttpProxiesClient) Insert

Insert creates a TargetHttpProxy resource in the specified project and region using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertRegionTargetHttpProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertRegionTargetHttpProxyRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionTargetHttpProxiesClient) List

List retrieves the list of TargetHttpProxy resources available to the specified project in the specified region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRegionTargetHttpProxiesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionTargetHttpProxiesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RegionTargetHttpProxiesClient) SetUrlMap

SetUrlMap changes the URL map for TargetHttpProxy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionTargetHttpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetUrlMapRegionTargetHttpProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetUrlMapRegionTargetHttpProxyRequest.
	}
	resp, err := c.SetUrlMap(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

RegionTargetHttpsProxiesCallOptions

type RegionTargetHttpsProxiesCallOptions struct {
	Delete             []gax.CallOption
	Get                []gax.CallOption
	Insert             []gax.CallOption
	List               []gax.CallOption
	SetSslCertificates []gax.CallOption
	SetUrlMap          []gax.CallOption
}

RegionTargetHttpsProxiesCallOptions contains the retry settings for each method of RegionTargetHttpsProxiesClient.

RegionTargetHttpsProxiesClient

type RegionTargetHttpsProxiesClient struct {

	// The call options for this service.
	CallOptions *RegionTargetHttpsProxiesCallOptions
	// contains filtered or unexported fields
}

RegionTargetHttpsProxiesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The RegionTargetHttpsProxies API.

func NewRegionTargetHttpsProxiesRESTClient

func NewRegionTargetHttpsProxiesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionTargetHttpsProxiesClient, error)

NewRegionTargetHttpsProxiesRESTClient creates a new region target https proxies rest client.

The RegionTargetHttpsProxies API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionTargetHttpsProxiesClient) Close

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionTargetHttpsProxiesClient) Connection

func (c *RegionTargetHttpsProxiesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RegionTargetHttpsProxiesClient) Delete

Delete deletes the specified TargetHttpsProxy resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteRegionTargetHttpsProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteRegionTargetHttpsProxyRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionTargetHttpsProxiesClient) Get

Get returns the specified TargetHttpsProxy resource in the specified region. Gets a list of available target HTTP proxies by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRegionTargetHttpsProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionTargetHttpsProxyRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionTargetHttpsProxiesClient) Insert

Insert creates a TargetHttpsProxy resource in the specified project and region using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertRegionTargetHttpsProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertRegionTargetHttpsProxyRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionTargetHttpsProxiesClient) List

List retrieves the list of TargetHttpsProxy resources available to the specified project in the specified region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRegionTargetHttpsProxiesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionTargetHttpsProxiesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RegionTargetHttpsProxiesClient) SetSslCertificates

SetSslCertificates replaces SslCertificates for TargetHttpsProxy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetSslCertificatesRegionTargetHttpsProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetSslCertificatesRegionTargetHttpsProxyRequest.
	}
	resp, err := c.SetSslCertificates(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionTargetHttpsProxiesClient) SetUrlMap

SetUrlMap changes the URL map for TargetHttpsProxy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetUrlMapRegionTargetHttpsProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetUrlMapRegionTargetHttpsProxyRequest.
	}
	resp, err := c.SetUrlMap(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

RegionUrlMapsCallOptions

type RegionUrlMapsCallOptions struct {
	Delete   []gax.CallOption
	Get      []gax.CallOption
	Insert   []gax.CallOption
	List     []gax.CallOption
	Patch    []gax.CallOption
	Update   []gax.CallOption
	Validate []gax.CallOption
}

RegionUrlMapsCallOptions contains the retry settings for each method of RegionUrlMapsClient.

RegionUrlMapsClient

type RegionUrlMapsClient struct {

	// The call options for this service.
	CallOptions *RegionUrlMapsCallOptions
	// contains filtered or unexported fields
}

RegionUrlMapsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The RegionUrlMaps API.

func NewRegionUrlMapsRESTClient

func NewRegionUrlMapsRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionUrlMapsClient, error)

NewRegionUrlMapsRESTClient creates a new region url maps rest client.

The RegionUrlMaps API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionUrlMapsClient) Close

func (c *RegionUrlMapsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionUrlMapsClient) Connection

func (c *RegionUrlMapsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RegionUrlMapsClient) Delete

Delete deletes the specified UrlMap resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteRegionUrlMapRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteRegionUrlMapRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionUrlMapsClient) Get

Get returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRegionUrlMapRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionUrlMapRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionUrlMapsClient) Insert

Insert creates a UrlMap resource in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertRegionUrlMapRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertRegionUrlMapRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionUrlMapsClient) List

List retrieves the list of UrlMap resources available to the specified project in the specified region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRegionUrlMapsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionUrlMapsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RegionUrlMapsClient) Patch

Patch patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchRegionUrlMapRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchRegionUrlMapRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionUrlMapsClient) Update

Update updates the specified UrlMap resource with the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdateRegionUrlMapRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdateRegionUrlMapRequest.
	}
	resp, err := c.Update(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionUrlMapsClient) Validate

Validate runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ValidateRegionUrlMapRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ValidateRegionUrlMapRequest.
	}
	resp, err := c.Validate(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

RegionsCallOptions

type RegionsCallOptions struct {
	Get  []gax.CallOption
	List []gax.CallOption
}

RegionsCallOptions contains the retry settings for each method of RegionsClient.

RegionsClient

type RegionsClient struct {

	// The call options for this service.
	CallOptions *RegionsCallOptions
	// contains filtered or unexported fields
}

RegionsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Regions API.

func NewRegionsRESTClient

func NewRegionsRESTClient(ctx context.Context, opts ...option.ClientOption) (*RegionsClient, error)

NewRegionsRESTClient creates a new regions rest client.

The Regions API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RegionsClient) Close

func (c *RegionsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RegionsClient) Connection

func (c *RegionsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RegionsClient) Get

Get returns the specified Region resource. Gets a list of available regions by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRegionRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRegionRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RegionsClient) List

List retrieves the list of region resources available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRegionsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRegionsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRegionsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

ReservationIterator

type ReservationIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Reservation, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ReservationIterator manages a stream of *computepb.Reservation.

func (*ReservationIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ReservationIterator) PageInfo

func (it *ReservationIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ReservationsCallOptions

type ReservationsCallOptions struct {
	AggregatedList     []gax.CallOption
	Delete             []gax.CallOption
	Get                []gax.CallOption
	GetIamPolicy       []gax.CallOption
	Insert             []gax.CallOption
	List               []gax.CallOption
	Resize             []gax.CallOption
	SetIamPolicy       []gax.CallOption
	TestIamPermissions []gax.CallOption
}

ReservationsCallOptions contains the retry settings for each method of ReservationsClient.

ReservationsClient

type ReservationsClient struct {

	// The call options for this service.
	CallOptions *ReservationsCallOptions
	// contains filtered or unexported fields
}

ReservationsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Reservations API.

func NewReservationsRESTClient

func NewReservationsRESTClient(ctx context.Context, opts ...option.ClientOption) (*ReservationsClient, error)

NewReservationsRESTClient creates a new reservations rest client.

The Reservations API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewReservationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*ReservationsClient) AggregatedList

AggregatedList retrieves an aggregated list of reservations.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewReservationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListReservationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListReservationsRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ReservationsClient) Close

func (c *ReservationsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*ReservationsClient) Connection

func (c *ReservationsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*ReservationsClient) Delete

Delete deletes the specified reservation.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewReservationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteReservationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteReservationRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ReservationsClient) Get

Get retrieves information about the specified reservation.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewReservationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetReservationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetReservationRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ReservationsClient) GetIamPolicy

GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewReservationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetIamPolicyReservationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetIamPolicyReservationRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ReservationsClient) Insert

Insert creates a new reservation. For more information, read Reserving zonal resources.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewReservationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertReservationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertReservationRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ReservationsClient) List

List a list of all the reservations that have been configured for the specified project in specified zone.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewReservationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListReservationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListReservationsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ReservationsClient) Resize

Resize resizes the reservation (applicable to standalone reservations only). For more information, read Modifying reservations.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewReservationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ResizeReservationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ResizeReservationRequest.
	}
	resp, err := c.Resize(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ReservationsClient) SetIamPolicy

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewReservationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetIamPolicyReservationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetIamPolicyReservationRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ReservationsClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewReservationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsReservationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsReservationRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

ReservationsScopedListPair

type ReservationsScopedListPair struct {
	Key   string
	Value *computepb.ReservationsScopedList
}

ReservationsScopedListPair is a holder type for string/*computepb.ReservationsScopedList map entries

ReservationsScopedListPairIterator

type ReservationsScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []ReservationsScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ReservationsScopedListPairIterator manages a stream of ReservationsScopedListPair.

func (*ReservationsScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ReservationsScopedListPairIterator) PageInfo

func (it *ReservationsScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ResourcePoliciesCallOptions

type ResourcePoliciesCallOptions struct {
	AggregatedList     []gax.CallOption
	Delete             []gax.CallOption
	Get                []gax.CallOption
	GetIamPolicy       []gax.CallOption
	Insert             []gax.CallOption
	List               []gax.CallOption
	SetIamPolicy       []gax.CallOption
	TestIamPermissions []gax.CallOption
}

ResourcePoliciesCallOptions contains the retry settings for each method of ResourcePoliciesClient.

ResourcePoliciesClient

type ResourcePoliciesClient struct {

	// The call options for this service.
	CallOptions *ResourcePoliciesCallOptions
	// contains filtered or unexported fields
}

ResourcePoliciesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The ResourcePolicies API.

func NewResourcePoliciesRESTClient

func NewResourcePoliciesRESTClient(ctx context.Context, opts ...option.ClientOption) (*ResourcePoliciesClient, error)

NewResourcePoliciesRESTClient creates a new resource policies rest client.

The ResourcePolicies API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewResourcePoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*ResourcePoliciesClient) AggregatedList

AggregatedList retrieves an aggregated list of resource policies.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewResourcePoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListResourcePoliciesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListResourcePoliciesRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ResourcePoliciesClient) Close

func (c *ResourcePoliciesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*ResourcePoliciesClient) Connection

func (c *ResourcePoliciesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*ResourcePoliciesClient) Delete

Delete deletes the specified resource policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewResourcePoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteResourcePolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteResourcePolicyRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ResourcePoliciesClient) Get

Get retrieves all information of the specified resource policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewResourcePoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetResourcePolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetResourcePolicyRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ResourcePoliciesClient) GetIamPolicy

GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewResourcePoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetIamPolicyResourcePolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetIamPolicyResourcePolicyRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ResourcePoliciesClient) Insert

Insert creates a new resource policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewResourcePoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertResourcePolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertResourcePolicyRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ResourcePoliciesClient) List

List a list all the resource policies that have been configured for the specified project in specified region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewResourcePoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListResourcePoliciesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListResourcePoliciesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ResourcePoliciesClient) SetIamPolicy

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewResourcePoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetIamPolicyResourcePolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetIamPolicyResourcePolicyRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ResourcePoliciesClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewResourcePoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsResourcePolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsResourcePolicyRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

ResourcePoliciesScopedListPair

type ResourcePoliciesScopedListPair struct {
	Key   string
	Value *computepb.ResourcePoliciesScopedList
}

ResourcePoliciesScopedListPair is a holder type for string/*computepb.ResourcePoliciesScopedList map entries

ResourcePoliciesScopedListPairIterator

type ResourcePoliciesScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []ResourcePoliciesScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ResourcePoliciesScopedListPairIterator manages a stream of ResourcePoliciesScopedListPair.

func (*ResourcePoliciesScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ResourcePoliciesScopedListPairIterator) PageInfo

func (it *ResourcePoliciesScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ResourcePolicyIterator

type ResourcePolicyIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.ResourcePolicy, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ResourcePolicyIterator manages a stream of *computepb.ResourcePolicy.

func (*ResourcePolicyIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ResourcePolicyIterator) PageInfo

func (it *ResourcePolicyIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

RouteIterator

type RouteIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Route, nextPageToken string, err error)
	// contains filtered or unexported fields
}

RouteIterator manages a stream of *computepb.Route.

func (*RouteIterator) Next

func (it *RouteIterator) Next() (*computepb.Route, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*RouteIterator) PageInfo

func (it *RouteIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

RouterIterator

type RouterIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Router, nextPageToken string, err error)
	// contains filtered or unexported fields
}

RouterIterator manages a stream of *computepb.Router.

func (*RouterIterator) Next

func (it *RouterIterator) Next() (*computepb.Router, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*RouterIterator) PageInfo

func (it *RouterIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

RoutersCallOptions

type RoutersCallOptions struct {
	AggregatedList    []gax.CallOption
	Delete            []gax.CallOption
	Get               []gax.CallOption
	GetNatMappingInfo []gax.CallOption
	GetRouterStatus   []gax.CallOption
	Insert            []gax.CallOption
	List              []gax.CallOption
	Patch             []gax.CallOption
	Preview           []gax.CallOption
	Update            []gax.CallOption
}

RoutersCallOptions contains the retry settings for each method of RoutersClient.

RoutersClient

type RoutersClient struct {

	// The call options for this service.
	CallOptions *RoutersCallOptions
	// contains filtered or unexported fields
}

RoutersClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Routers API.

func NewRoutersRESTClient

func NewRoutersRESTClient(ctx context.Context, opts ...option.ClientOption) (*RoutersClient, error)

NewRoutersRESTClient creates a new routers rest client.

The Routers API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRoutersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RoutersClient) AggregatedList

AggregatedList retrieves an aggregated list of routers.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRoutersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListRoutersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListRoutersRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RoutersClient) Close

func (c *RoutersClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RoutersClient) Connection

func (c *RoutersClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RoutersClient) Delete

Delete deletes the specified Router resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRoutersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteRouterRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteRouterRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RoutersClient) Get

Get returns the specified Router resource. Gets a list of available routers by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRoutersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRouterRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRouterRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RoutersClient) GetNatMappingInfo

GetNatMappingInfo retrieves runtime Nat mapping information of VM endpoints.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRoutersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetNatMappingInfoRoutersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetNatMappingInfoRoutersRequest.
	}
	it := c.GetNatMappingInfo(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RoutersClient) GetRouterStatus

GetRouterStatus retrieves runtime information of the specified router.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRoutersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRouterStatusRouterRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRouterStatusRouterRequest.
	}
	resp, err := c.GetRouterStatus(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RoutersClient) Insert

Insert creates a Router resource in the specified project and region using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRoutersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertRouterRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertRouterRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RoutersClient) List

List retrieves a list of Router resources available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRoutersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRoutersRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRoutersRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*RoutersClient) Patch

Patch patches the specified Router resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRoutersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchRouterRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchRouterRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RoutersClient) Preview

Preview preview fields auto-generated during router create and update operations. Calling this method does NOT create or update the router.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRoutersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PreviewRouterRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PreviewRouterRequest.
	}
	resp, err := c.Preview(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RoutersClient) Update

Update updates the specified Router resource with the data included in the request. This method conforms to PUT semantics, which requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRoutersRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdateRouterRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdateRouterRequest.
	}
	resp, err := c.Update(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

RoutersScopedListPair

type RoutersScopedListPair struct {
	Key   string
	Value *computepb.RoutersScopedList
}

RoutersScopedListPair is a holder type for string/*computepb.RoutersScopedList map entries

RoutersScopedListPairIterator

type RoutersScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []RoutersScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

RoutersScopedListPairIterator manages a stream of RoutersScopedListPair.

func (*RoutersScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*RoutersScopedListPairIterator) PageInfo

func (it *RoutersScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

RoutesCallOptions

type RoutesCallOptions struct {
	Delete []gax.CallOption
	Get    []gax.CallOption
	Insert []gax.CallOption
	List   []gax.CallOption
}

RoutesCallOptions contains the retry settings for each method of RoutesClient.

RoutesClient

type RoutesClient struct {

	// The call options for this service.
	CallOptions *RoutesCallOptions
	// contains filtered or unexported fields
}

RoutesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Routes API.

func NewRoutesRESTClient

func NewRoutesRESTClient(ctx context.Context, opts ...option.ClientOption) (*RoutesClient, error)

NewRoutesRESTClient creates a new routes rest client.

The Routes API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRoutesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*RoutesClient) Close

func (c *RoutesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*RoutesClient) Connection

func (c *RoutesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*RoutesClient) Delete

Delete deletes the specified Route resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRoutesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteRouteRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteRouteRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RoutesClient) Get

Get returns the specified Route resource. Gets a list of available routes by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRoutesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRouteRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRouteRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RoutesClient) Insert

Insert creates a Route resource in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRoutesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertRouteRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertRouteRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*RoutesClient) List

List retrieves the list of Route resources available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewRoutesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListRoutesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListRoutesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

SecurityPoliciesCallOptions

type SecurityPoliciesCallOptions struct {
	AddRule                         []gax.CallOption
	Delete                          []gax.CallOption
	Get                             []gax.CallOption
	GetRule                         []gax.CallOption
	Insert                          []gax.CallOption
	List                            []gax.CallOption
	ListPreconfiguredExpressionSets []gax.CallOption
	Patch                           []gax.CallOption
	PatchRule                       []gax.CallOption
	RemoveRule                      []gax.CallOption
}

SecurityPoliciesCallOptions contains the retry settings for each method of SecurityPoliciesClient.

SecurityPoliciesClient

type SecurityPoliciesClient struct {

	// The call options for this service.
	CallOptions *SecurityPoliciesCallOptions
	// contains filtered or unexported fields
}

SecurityPoliciesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The SecurityPolicies API.

func NewSecurityPoliciesRESTClient

func NewSecurityPoliciesRESTClient(ctx context.Context, opts ...option.ClientOption) (*SecurityPoliciesClient, error)

NewSecurityPoliciesRESTClient creates a new security policies rest client.

The SecurityPolicies API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSecurityPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*SecurityPoliciesClient) AddRule

AddRule inserts a rule into a security policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSecurityPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AddRuleSecurityPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AddRuleSecurityPolicyRequest.
	}
	resp, err := c.AddRule(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SecurityPoliciesClient) Close

func (c *SecurityPoliciesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*SecurityPoliciesClient) Connection

func (c *SecurityPoliciesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*SecurityPoliciesClient) Delete

Delete deletes the specified policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSecurityPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteSecurityPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteSecurityPolicyRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SecurityPoliciesClient) Get

Get list all of the ordered rules present in a single specified policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSecurityPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetSecurityPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetSecurityPolicyRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SecurityPoliciesClient) GetRule

GetRule gets a rule at the specified priority.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSecurityPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetRuleSecurityPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetRuleSecurityPolicyRequest.
	}
	resp, err := c.GetRule(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SecurityPoliciesClient) Insert

Insert creates a new policy in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSecurityPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertSecurityPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertSecurityPolicyRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SecurityPoliciesClient) List

List list all the policies that have been configured for the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSecurityPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListSecurityPoliciesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListSecurityPoliciesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*SecurityPoliciesClient) ListPreconfiguredExpressionSets

ListPreconfiguredExpressionSets gets the current list of preconfigured Web Application Firewall (WAF) expressions.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSecurityPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListPreconfiguredExpressionSetsSecurityPoliciesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListPreconfiguredExpressionSetsSecurityPoliciesRequest.
	}
	resp, err := c.ListPreconfiguredExpressionSets(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SecurityPoliciesClient) Patch

Patch patches the specified policy with the data included in the request. This cannot be used to be update the rules in the policy. Please use the per rule methods like addRule, patchRule, and removeRule instead.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSecurityPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchSecurityPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchSecurityPolicyRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SecurityPoliciesClient) PatchRule

PatchRule patches a rule at the specified priority.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSecurityPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchRuleSecurityPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchRuleSecurityPolicyRequest.
	}
	resp, err := c.PatchRule(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SecurityPoliciesClient) RemoveRule

RemoveRule deletes a rule at the specified priority.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSecurityPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.RemoveRuleSecurityPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#RemoveRuleSecurityPolicyRequest.
	}
	resp, err := c.RemoveRule(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

SecurityPolicyIterator

type SecurityPolicyIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.SecurityPolicy, nextPageToken string, err error)
	// contains filtered or unexported fields
}

SecurityPolicyIterator manages a stream of *computepb.SecurityPolicy.

func (*SecurityPolicyIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*SecurityPolicyIterator) PageInfo

func (it *SecurityPolicyIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ServiceAttachmentIterator

type ServiceAttachmentIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.ServiceAttachment, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ServiceAttachmentIterator manages a stream of *computepb.ServiceAttachment.

func (*ServiceAttachmentIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ServiceAttachmentIterator) PageInfo

func (it *ServiceAttachmentIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ServiceAttachmentsCallOptions

type ServiceAttachmentsCallOptions struct {
	AggregatedList     []gax.CallOption
	Delete             []gax.CallOption
	Get                []gax.CallOption
	GetIamPolicy       []gax.CallOption
	Insert             []gax.CallOption
	List               []gax.CallOption
	Patch              []gax.CallOption
	SetIamPolicy       []gax.CallOption
	TestIamPermissions []gax.CallOption
}

ServiceAttachmentsCallOptions contains the retry settings for each method of ServiceAttachmentsClient.

ServiceAttachmentsClient

type ServiceAttachmentsClient struct {

	// The call options for this service.
	CallOptions *ServiceAttachmentsCallOptions
	// contains filtered or unexported fields
}

ServiceAttachmentsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The ServiceAttachments API.

func NewServiceAttachmentsRESTClient

func NewServiceAttachmentsRESTClient(ctx context.Context, opts ...option.ClientOption) (*ServiceAttachmentsClient, error)

NewServiceAttachmentsRESTClient creates a new service attachments rest client.

The ServiceAttachments API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewServiceAttachmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*ServiceAttachmentsClient) AggregatedList

AggregatedList retrieves the list of all ServiceAttachment resources, regional and global, available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewServiceAttachmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListServiceAttachmentsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListServiceAttachmentsRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ServiceAttachmentsClient) Close

func (c *ServiceAttachmentsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*ServiceAttachmentsClient) Connection

func (c *ServiceAttachmentsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*ServiceAttachmentsClient) Delete

Delete deletes the specified ServiceAttachment in the given scope

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewServiceAttachmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteServiceAttachmentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteServiceAttachmentRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ServiceAttachmentsClient) Get

Get returns the specified ServiceAttachment resource in the given scope.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewServiceAttachmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetServiceAttachmentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetServiceAttachmentRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ServiceAttachmentsClient) GetIamPolicy

GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewServiceAttachmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetIamPolicyServiceAttachmentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetIamPolicyServiceAttachmentRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ServiceAttachmentsClient) Insert

Insert creates a ServiceAttachment in the specified project in the given scope using the parameters that are included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewServiceAttachmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertServiceAttachmentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertServiceAttachmentRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ServiceAttachmentsClient) List

List lists the ServiceAttachments for a project in the given scope.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewServiceAttachmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListServiceAttachmentsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListServiceAttachmentsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ServiceAttachmentsClient) Patch

Patch patches the specified ServiceAttachment resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewServiceAttachmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchServiceAttachmentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchServiceAttachmentRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ServiceAttachmentsClient) SetIamPolicy

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewServiceAttachmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetIamPolicyServiceAttachmentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetIamPolicyServiceAttachmentRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ServiceAttachmentsClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewServiceAttachmentsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsServiceAttachmentRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsServiceAttachmentRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

ServiceAttachmentsScopedListPair

type ServiceAttachmentsScopedListPair struct {
	Key   string
	Value *computepb.ServiceAttachmentsScopedList
}

ServiceAttachmentsScopedListPair is a holder type for string/*computepb.ServiceAttachmentsScopedList map entries

ServiceAttachmentsScopedListPairIterator

type ServiceAttachmentsScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []ServiceAttachmentsScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ServiceAttachmentsScopedListPairIterator manages a stream of ServiceAttachmentsScopedListPair.

func (*ServiceAttachmentsScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ServiceAttachmentsScopedListPairIterator) PageInfo

func (it *ServiceAttachmentsScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

SnapshotIterator

type SnapshotIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Snapshot, nextPageToken string, err error)
	// contains filtered or unexported fields
}

SnapshotIterator manages a stream of *computepb.Snapshot.

func (*SnapshotIterator) Next

func (it *SnapshotIterator) Next() (*computepb.Snapshot, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*SnapshotIterator) PageInfo

func (it *SnapshotIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

SnapshotsCallOptions

type SnapshotsCallOptions struct {
	Delete             []gax.CallOption
	Get                []gax.CallOption
	GetIamPolicy       []gax.CallOption
	List               []gax.CallOption
	SetIamPolicy       []gax.CallOption
	SetLabels          []gax.CallOption
	TestIamPermissions []gax.CallOption
}

SnapshotsCallOptions contains the retry settings for each method of SnapshotsClient.

SnapshotsClient

type SnapshotsClient struct {

	// The call options for this service.
	CallOptions *SnapshotsCallOptions
	// contains filtered or unexported fields
}

SnapshotsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Snapshots API.

func NewSnapshotsRESTClient

func NewSnapshotsRESTClient(ctx context.Context, opts ...option.ClientOption) (*SnapshotsClient, error)

NewSnapshotsRESTClient creates a new snapshots rest client.

The Snapshots API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSnapshotsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*SnapshotsClient) Close

func (c *SnapshotsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*SnapshotsClient) Connection

func (c *SnapshotsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*SnapshotsClient) Delete

Delete deletes the specified Snapshot resource. Keep in mind that deleting a single snapshot might not necessarily delete all the data on that snapshot. If any data on the snapshot that is marked for deletion is needed for subsequent snapshots, the data will be moved to the next corresponding snapshot. For more information, see Deleting snapshots.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSnapshotsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteSnapshotRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteSnapshotRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SnapshotsClient) Get

Get returns the specified Snapshot resource. Gets a list of available snapshots by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSnapshotsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetSnapshotRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetSnapshotRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SnapshotsClient) GetIamPolicy

GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSnapshotsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetIamPolicySnapshotRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetIamPolicySnapshotRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SnapshotsClient) List

List retrieves the list of Snapshot resources contained within the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSnapshotsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListSnapshotsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListSnapshotsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*SnapshotsClient) SetIamPolicy

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSnapshotsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetIamPolicySnapshotRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetIamPolicySnapshotRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SnapshotsClient) SetLabels

SetLabels sets the labels on a snapshot. To learn more about labels, read the Labeling Resources documentation.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSnapshotsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetLabelsSnapshotRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetLabelsSnapshotRequest.
	}
	resp, err := c.SetLabels(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SnapshotsClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSnapshotsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsSnapshotRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsSnapshotRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

SslCertificateIterator

type SslCertificateIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.SslCertificate, nextPageToken string, err error)
	// contains filtered or unexported fields
}

SslCertificateIterator manages a stream of *computepb.SslCertificate.

func (*SslCertificateIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*SslCertificateIterator) PageInfo

func (it *SslCertificateIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

SslCertificatesCallOptions

type SslCertificatesCallOptions struct {
	AggregatedList []gax.CallOption
	Delete         []gax.CallOption
	Get            []gax.CallOption
	Insert         []gax.CallOption
	List           []gax.CallOption
}

SslCertificatesCallOptions contains the retry settings for each method of SslCertificatesClient.

SslCertificatesClient

type SslCertificatesClient struct {

	// The call options for this service.
	CallOptions *SslCertificatesCallOptions
	// contains filtered or unexported fields
}

SslCertificatesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The SslCertificates API.

func NewSslCertificatesRESTClient

func NewSslCertificatesRESTClient(ctx context.Context, opts ...option.ClientOption) (*SslCertificatesClient, error)

NewSslCertificatesRESTClient creates a new ssl certificates rest client.

The SslCertificates API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSslCertificatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*SslCertificatesClient) AggregatedList

AggregatedList retrieves the list of all SslCertificate resources, regional and global, available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSslCertificatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListSslCertificatesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListSslCertificatesRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*SslCertificatesClient) Close

func (c *SslCertificatesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*SslCertificatesClient) Connection

func (c *SslCertificatesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*SslCertificatesClient) Delete

Delete deletes the specified SslCertificate resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSslCertificatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteSslCertificateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteSslCertificateRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SslCertificatesClient) Get

Get returns the specified SslCertificate resource. Gets a list of available SSL certificates by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSslCertificatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetSslCertificateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetSslCertificateRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SslCertificatesClient) Insert

Insert creates a SslCertificate resource in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSslCertificatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertSslCertificateRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertSslCertificateRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SslCertificatesClient) List

List retrieves the list of SslCertificate resources available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSslCertificatesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListSslCertificatesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListSslCertificatesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

SslCertificatesScopedListPair

type SslCertificatesScopedListPair struct {
	Key   string
	Value *computepb.SslCertificatesScopedList
}

SslCertificatesScopedListPair is a holder type for string/*computepb.SslCertificatesScopedList map entries

SslCertificatesScopedListPairIterator

type SslCertificatesScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []SslCertificatesScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

SslCertificatesScopedListPairIterator manages a stream of SslCertificatesScopedListPair.

func (*SslCertificatesScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*SslCertificatesScopedListPairIterator) PageInfo

func (it *SslCertificatesScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

SslPoliciesCallOptions

type SslPoliciesCallOptions struct {
	Delete                []gax.CallOption
	Get                   []gax.CallOption
	Insert                []gax.CallOption
	List                  []gax.CallOption
	ListAvailableFeatures []gax.CallOption
	Patch                 []gax.CallOption
}

SslPoliciesCallOptions contains the retry settings for each method of SslPoliciesClient.

SslPoliciesClient

type SslPoliciesClient struct {

	// The call options for this service.
	CallOptions *SslPoliciesCallOptions
	// contains filtered or unexported fields
}

SslPoliciesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The SslPolicies API.

func NewSslPoliciesRESTClient

func NewSslPoliciesRESTClient(ctx context.Context, opts ...option.ClientOption) (*SslPoliciesClient, error)

NewSslPoliciesRESTClient creates a new ssl policies rest client.

The SslPolicies API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSslPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*SslPoliciesClient) Close

func (c *SslPoliciesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*SslPoliciesClient) Connection

func (c *SslPoliciesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*SslPoliciesClient) Delete

Delete deletes the specified SSL policy. The SSL policy resource can be deleted only if it is not in use by any TargetHttpsProxy or TargetSslProxy resources.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSslPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteSslPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteSslPolicyRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SslPoliciesClient) Get

Get lists all of the ordered rules present in a single specified policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSslPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetSslPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetSslPolicyRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SslPoliciesClient) Insert

Insert returns the specified SSL policy resource. Gets a list of available SSL policies by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSslPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertSslPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertSslPolicyRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SslPoliciesClient) List

List lists all the SSL policies that have been configured for the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSslPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListSslPoliciesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListSslPoliciesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*SslPoliciesClient) ListAvailableFeatures

ListAvailableFeatures lists all features that can be specified in the SSL policy when using custom profile.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSslPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListAvailableFeaturesSslPoliciesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListAvailableFeaturesSslPoliciesRequest.
	}
	resp, err := c.ListAvailableFeatures(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SslPoliciesClient) Patch

Patch patches the specified SSL policy with the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSslPoliciesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchSslPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchSslPolicyRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

SslPolicyIterator

type SslPolicyIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.SslPolicy, nextPageToken string, err error)
	// contains filtered or unexported fields
}

SslPolicyIterator manages a stream of *computepb.SslPolicy.

func (*SslPolicyIterator) Next

func (it *SslPolicyIterator) Next() (*computepb.SslPolicy, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*SslPolicyIterator) PageInfo

func (it *SslPolicyIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

SubnetworkIterator

type SubnetworkIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Subnetwork, nextPageToken string, err error)
	// contains filtered or unexported fields
}

SubnetworkIterator manages a stream of *computepb.Subnetwork.

func (*SubnetworkIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*SubnetworkIterator) PageInfo

func (it *SubnetworkIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

SubnetworksCallOptions

type SubnetworksCallOptions struct {
	AggregatedList           []gax.CallOption
	Delete                   []gax.CallOption
	ExpandIpCidrRange        []gax.CallOption
	Get                      []gax.CallOption
	GetIamPolicy             []gax.CallOption
	Insert                   []gax.CallOption
	List                     []gax.CallOption
	ListUsable               []gax.CallOption
	Patch                    []gax.CallOption
	SetIamPolicy             []gax.CallOption
	SetPrivateIpGoogleAccess []gax.CallOption
	TestIamPermissions       []gax.CallOption
}

SubnetworksCallOptions contains the retry settings for each method of SubnetworksClient.

SubnetworksClient

type SubnetworksClient struct {

	// The call options for this service.
	CallOptions *SubnetworksCallOptions
	// contains filtered or unexported fields
}

SubnetworksClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Subnetworks API.

func NewSubnetworksRESTClient

func NewSubnetworksRESTClient(ctx context.Context, opts ...option.ClientOption) (*SubnetworksClient, error)

NewSubnetworksRESTClient creates a new subnetworks rest client.

The Subnetworks API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSubnetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*SubnetworksClient) AggregatedList

AggregatedList retrieves an aggregated list of subnetworks.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSubnetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListSubnetworksRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListSubnetworksRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*SubnetworksClient) Close

func (c *SubnetworksClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*SubnetworksClient) Connection

func (c *SubnetworksClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*SubnetworksClient) Delete

Delete deletes the specified subnetwork.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSubnetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteSubnetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteSubnetworkRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SubnetworksClient) ExpandIpCidrRange

ExpandIpCidrRange expands the IP CIDR range of the subnetwork to a specified value.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSubnetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ExpandIpCidrRangeSubnetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ExpandIpCidrRangeSubnetworkRequest.
	}
	resp, err := c.ExpandIpCidrRange(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SubnetworksClient) Get

Get returns the specified subnetwork. Gets a list of available subnetworks list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSubnetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetSubnetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetSubnetworkRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SubnetworksClient) GetIamPolicy

GetIamPolicy gets the access control policy for a resource. May be empty if no such policy or resource exists.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSubnetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetIamPolicySubnetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetIamPolicySubnetworkRequest.
	}
	resp, err := c.GetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SubnetworksClient) Insert

Insert creates a subnetwork in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSubnetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertSubnetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertSubnetworkRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SubnetworksClient) List

List retrieves a list of subnetworks available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSubnetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListSubnetworksRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListSubnetworksRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*SubnetworksClient) ListUsable

ListUsable retrieves an aggregated list of all usable subnetworks in the project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSubnetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListUsableSubnetworksRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListUsableSubnetworksRequest.
	}
	it := c.ListUsable(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*SubnetworksClient) Patch

Patch patches the specified subnetwork with the data included in the request. Only certain fields can be updated with a patch request as indicated in the field descriptions. You must specify the current fingerprint of the subnetwork resource being patched.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSubnetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchSubnetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchSubnetworkRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SubnetworksClient) SetIamPolicy

SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSubnetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetIamPolicySubnetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetIamPolicySubnetworkRequest.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SubnetworksClient) SetPrivateIpGoogleAccess

SetPrivateIpGoogleAccess set whether VMs in this subnet can access Google services without assigning external IP addresses through Private Google Access.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSubnetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetPrivateIpGoogleAccessSubnetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetPrivateIpGoogleAccessSubnetworkRequest.
	}
	resp, err := c.SetPrivateIpGoogleAccess(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*SubnetworksClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewSubnetworksRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsSubnetworkRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsSubnetworkRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

SubnetworksScopedListPair

type SubnetworksScopedListPair struct {
	Key   string
	Value *computepb.SubnetworksScopedList
}

SubnetworksScopedListPair is a holder type for string/*computepb.SubnetworksScopedList map entries

SubnetworksScopedListPairIterator

type SubnetworksScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []SubnetworksScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

SubnetworksScopedListPairIterator manages a stream of SubnetworksScopedListPair.

func (*SubnetworksScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*SubnetworksScopedListPairIterator) PageInfo

func (it *SubnetworksScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

TargetGrpcProxiesCallOptions

type TargetGrpcProxiesCallOptions struct {
	Delete []gax.CallOption
	Get    []gax.CallOption
	Insert []gax.CallOption
	List   []gax.CallOption
	Patch  []gax.CallOption
}

TargetGrpcProxiesCallOptions contains the retry settings for each method of TargetGrpcProxiesClient.

TargetGrpcProxiesClient

type TargetGrpcProxiesClient struct {

	// The call options for this service.
	CallOptions *TargetGrpcProxiesCallOptions
	// contains filtered or unexported fields
}

TargetGrpcProxiesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The TargetGrpcProxies API.

func NewTargetGrpcProxiesRESTClient

func NewTargetGrpcProxiesRESTClient(ctx context.Context, opts ...option.ClientOption) (*TargetGrpcProxiesClient, error)

NewTargetGrpcProxiesRESTClient creates a new target grpc proxies rest client.

The TargetGrpcProxies API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetGrpcProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*TargetGrpcProxiesClient) Close

func (c *TargetGrpcProxiesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*TargetGrpcProxiesClient) Connection

func (c *TargetGrpcProxiesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*TargetGrpcProxiesClient) Delete

Delete deletes the specified TargetGrpcProxy in the given scope

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetGrpcProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteTargetGrpcProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteTargetGrpcProxyRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetGrpcProxiesClient) Get

Get returns the specified TargetGrpcProxy resource in the given scope.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetGrpcProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetTargetGrpcProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetTargetGrpcProxyRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetGrpcProxiesClient) Insert

Insert creates a TargetGrpcProxy in the specified project in the given scope using the parameters that are included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetGrpcProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertTargetGrpcProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertTargetGrpcProxyRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetGrpcProxiesClient) List

List lists the TargetGrpcProxies for a project in the given scope.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetGrpcProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListTargetGrpcProxiesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListTargetGrpcProxiesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TargetGrpcProxiesClient) Patch

Patch patches the specified TargetGrpcProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetGrpcProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchTargetGrpcProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchTargetGrpcProxyRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

TargetGrpcProxyIterator

type TargetGrpcProxyIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.TargetGrpcProxy, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TargetGrpcProxyIterator manages a stream of *computepb.TargetGrpcProxy.

func (*TargetGrpcProxyIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*TargetGrpcProxyIterator) PageInfo

func (it *TargetGrpcProxyIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

TargetHttpProxiesCallOptions

type TargetHttpProxiesCallOptions struct {
	AggregatedList []gax.CallOption
	Delete         []gax.CallOption
	Get            []gax.CallOption
	Insert         []gax.CallOption
	List           []gax.CallOption
	Patch          []gax.CallOption
	SetUrlMap      []gax.CallOption
}

TargetHttpProxiesCallOptions contains the retry settings for each method of TargetHttpProxiesClient.

TargetHttpProxiesClient

type TargetHttpProxiesClient struct {

	// The call options for this service.
	CallOptions *TargetHttpProxiesCallOptions
	// contains filtered or unexported fields
}

TargetHttpProxiesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The TargetHttpProxies API.

func NewTargetHttpProxiesRESTClient

func NewTargetHttpProxiesRESTClient(ctx context.Context, opts ...option.ClientOption) (*TargetHttpProxiesClient, error)

NewTargetHttpProxiesRESTClient creates a new target http proxies rest client.

The TargetHttpProxies API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*TargetHttpProxiesClient) AggregatedList

AggregatedList retrieves the list of all TargetHttpProxy resources, regional and global, available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListTargetHttpProxiesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListTargetHttpProxiesRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TargetHttpProxiesClient) Close

func (c *TargetHttpProxiesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*TargetHttpProxiesClient) Connection

func (c *TargetHttpProxiesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*TargetHttpProxiesClient) Delete

Delete deletes the specified TargetHttpProxy resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteTargetHttpProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteTargetHttpProxyRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetHttpProxiesClient) Get

Get returns the specified TargetHttpProxy resource. Gets a list of available target HTTP proxies by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetTargetHttpProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetTargetHttpProxyRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetHttpProxiesClient) Insert

Insert creates a TargetHttpProxy resource in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertTargetHttpProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertTargetHttpProxyRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetHttpProxiesClient) List

List retrieves the list of TargetHttpProxy resources available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListTargetHttpProxiesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListTargetHttpProxiesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TargetHttpProxiesClient) Patch

Patch patches the specified TargetHttpProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchTargetHttpProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchTargetHttpProxyRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetHttpProxiesClient) SetUrlMap

SetUrlMap changes the URL map for TargetHttpProxy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetUrlMapTargetHttpProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetUrlMapTargetHttpProxyRequest.
	}
	resp, err := c.SetUrlMap(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

TargetHttpProxiesScopedListPair

type TargetHttpProxiesScopedListPair struct {
	Key   string
	Value *computepb.TargetHttpProxiesScopedList
}

TargetHttpProxiesScopedListPair is a holder type for string/*computepb.TargetHttpProxiesScopedList map entries

TargetHttpProxiesScopedListPairIterator

type TargetHttpProxiesScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []TargetHttpProxiesScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TargetHttpProxiesScopedListPairIterator manages a stream of TargetHttpProxiesScopedListPair.

func (*TargetHttpProxiesScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*TargetHttpProxiesScopedListPairIterator) PageInfo

func (it *TargetHttpProxiesScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

TargetHttpProxyIterator

type TargetHttpProxyIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.TargetHttpProxy, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TargetHttpProxyIterator manages a stream of *computepb.TargetHttpProxy.

func (*TargetHttpProxyIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*TargetHttpProxyIterator) PageInfo

func (it *TargetHttpProxyIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

TargetHttpsProxiesCallOptions

type TargetHttpsProxiesCallOptions struct {
	AggregatedList     []gax.CallOption
	Delete             []gax.CallOption
	Get                []gax.CallOption
	Insert             []gax.CallOption
	List               []gax.CallOption
	Patch              []gax.CallOption
	SetQuicOverride    []gax.CallOption
	SetSslCertificates []gax.CallOption
	SetSslPolicy       []gax.CallOption
	SetUrlMap          []gax.CallOption
}

TargetHttpsProxiesCallOptions contains the retry settings for each method of TargetHttpsProxiesClient.

TargetHttpsProxiesClient

type TargetHttpsProxiesClient struct {

	// The call options for this service.
	CallOptions *TargetHttpsProxiesCallOptions
	// contains filtered or unexported fields
}

TargetHttpsProxiesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The TargetHttpsProxies API.

func NewTargetHttpsProxiesRESTClient

func NewTargetHttpsProxiesRESTClient(ctx context.Context, opts ...option.ClientOption) (*TargetHttpsProxiesClient, error)

NewTargetHttpsProxiesRESTClient creates a new target https proxies rest client.

The TargetHttpsProxies API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*TargetHttpsProxiesClient) AggregatedList

AggregatedList retrieves the list of all TargetHttpsProxy resources, regional and global, available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListTargetHttpsProxiesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListTargetHttpsProxiesRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TargetHttpsProxiesClient) Close

func (c *TargetHttpsProxiesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*TargetHttpsProxiesClient) Connection

func (c *TargetHttpsProxiesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*TargetHttpsProxiesClient) Delete

Delete deletes the specified TargetHttpsProxy resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteTargetHttpsProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteTargetHttpsProxyRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetHttpsProxiesClient) Get

Get returns the specified TargetHttpsProxy resource. Gets a list of available target HTTPS proxies by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetTargetHttpsProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetTargetHttpsProxyRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetHttpsProxiesClient) Insert

Insert creates a TargetHttpsProxy resource in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertTargetHttpsProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertTargetHttpsProxyRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetHttpsProxiesClient) List

List retrieves the list of TargetHttpsProxy resources available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListTargetHttpsProxiesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListTargetHttpsProxiesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TargetHttpsProxiesClient) Patch

Patch patches the specified TargetHttpsProxy resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchTargetHttpsProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchTargetHttpsProxyRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetHttpsProxiesClient) SetQuicOverride

SetQuicOverride sets the QUIC override policy for TargetHttpsProxy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetQuicOverrideTargetHttpsProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetQuicOverrideTargetHttpsProxyRequest.
	}
	resp, err := c.SetQuicOverride(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetHttpsProxiesClient) SetSslCertificates

SetSslCertificates replaces SslCertificates for TargetHttpsProxy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetSslCertificatesTargetHttpsProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetSslCertificatesTargetHttpsProxyRequest.
	}
	resp, err := c.SetSslCertificates(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetHttpsProxiesClient) SetSslPolicy

SetSslPolicy sets the SSL policy for TargetHttpsProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the HTTPS proxy load balancer. They do not affect the connection between the load balancer and the backends.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetSslPolicyTargetHttpsProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetSslPolicyTargetHttpsProxyRequest.
	}
	resp, err := c.SetSslPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetHttpsProxiesClient) SetUrlMap

SetUrlMap changes the URL map for TargetHttpsProxy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetHttpsProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetUrlMapTargetHttpsProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetUrlMapTargetHttpsProxyRequest.
	}
	resp, err := c.SetUrlMap(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

TargetHttpsProxiesScopedListPair

type TargetHttpsProxiesScopedListPair struct {
	Key   string
	Value *computepb.TargetHttpsProxiesScopedList
}

TargetHttpsProxiesScopedListPair is a holder type for string/*computepb.TargetHttpsProxiesScopedList map entries

TargetHttpsProxiesScopedListPairIterator

type TargetHttpsProxiesScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []TargetHttpsProxiesScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TargetHttpsProxiesScopedListPairIterator manages a stream of TargetHttpsProxiesScopedListPair.

func (*TargetHttpsProxiesScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*TargetHttpsProxiesScopedListPairIterator) PageInfo

func (it *TargetHttpsProxiesScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

TargetHttpsProxyIterator

type TargetHttpsProxyIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.TargetHttpsProxy, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TargetHttpsProxyIterator manages a stream of *computepb.TargetHttpsProxy.

func (*TargetHttpsProxyIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*TargetHttpsProxyIterator) PageInfo

func (it *TargetHttpsProxyIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

TargetInstanceIterator

type TargetInstanceIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.TargetInstance, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TargetInstanceIterator manages a stream of *computepb.TargetInstance.

func (*TargetInstanceIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*TargetInstanceIterator) PageInfo

func (it *TargetInstanceIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

TargetInstancesCallOptions

type TargetInstancesCallOptions struct {
	AggregatedList []gax.CallOption
	Delete         []gax.CallOption
	Get            []gax.CallOption
	Insert         []gax.CallOption
	List           []gax.CallOption
}

TargetInstancesCallOptions contains the retry settings for each method of TargetInstancesClient.

TargetInstancesClient

type TargetInstancesClient struct {

	// The call options for this service.
	CallOptions *TargetInstancesCallOptions
	// contains filtered or unexported fields
}

TargetInstancesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The TargetInstances API.

func NewTargetInstancesRESTClient

func NewTargetInstancesRESTClient(ctx context.Context, opts ...option.ClientOption) (*TargetInstancesClient, error)

NewTargetInstancesRESTClient creates a new target instances rest client.

The TargetInstances API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*TargetInstancesClient) AggregatedList

AggregatedList retrieves an aggregated list of target instances.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListTargetInstancesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListTargetInstancesRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TargetInstancesClient) Close

func (c *TargetInstancesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*TargetInstancesClient) Connection

func (c *TargetInstancesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*TargetInstancesClient) Delete

Delete deletes the specified TargetInstance resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteTargetInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteTargetInstanceRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetInstancesClient) Get

Get returns the specified TargetInstance resource. Gets a list of available target instances by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetTargetInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetTargetInstanceRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetInstancesClient) Insert

Insert creates a TargetInstance resource in the specified project and zone using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertTargetInstanceRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertTargetInstanceRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetInstancesClient) List

List retrieves a list of TargetInstance resources available to the specified project and zone.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetInstancesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListTargetInstancesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListTargetInstancesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

TargetInstancesScopedListPair

type TargetInstancesScopedListPair struct {
	Key   string
	Value *computepb.TargetInstancesScopedList
}

TargetInstancesScopedListPair is a holder type for string/*computepb.TargetInstancesScopedList map entries

TargetInstancesScopedListPairIterator

type TargetInstancesScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []TargetInstancesScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TargetInstancesScopedListPairIterator manages a stream of TargetInstancesScopedListPair.

func (*TargetInstancesScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*TargetInstancesScopedListPairIterator) PageInfo

func (it *TargetInstancesScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

TargetPoolIterator

type TargetPoolIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.TargetPool, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TargetPoolIterator manages a stream of *computepb.TargetPool.

func (*TargetPoolIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*TargetPoolIterator) PageInfo

func (it *TargetPoolIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

TargetPoolsCallOptions

type TargetPoolsCallOptions struct {
	AddHealthCheck    []gax.CallOption
	AddInstance       []gax.CallOption
	AggregatedList    []gax.CallOption
	Delete            []gax.CallOption
	Get               []gax.CallOption
	GetHealth         []gax.CallOption
	Insert            []gax.CallOption
	List              []gax.CallOption
	RemoveHealthCheck []gax.CallOption
	RemoveInstance    []gax.CallOption
	SetBackup         []gax.CallOption
}

TargetPoolsCallOptions contains the retry settings for each method of TargetPoolsClient.

TargetPoolsClient

type TargetPoolsClient struct {

	// The call options for this service.
	CallOptions *TargetPoolsCallOptions
	// contains filtered or unexported fields
}

TargetPoolsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The TargetPools API.

func NewTargetPoolsRESTClient

func NewTargetPoolsRESTClient(ctx context.Context, opts ...option.ClientOption) (*TargetPoolsClient, error)

NewTargetPoolsRESTClient creates a new target pools rest client.

The TargetPools API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetPoolsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*TargetPoolsClient) AddHealthCheck

AddHealthCheck adds health check URLs to a target pool.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetPoolsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AddHealthCheckTargetPoolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AddHealthCheckTargetPoolRequest.
	}
	resp, err := c.AddHealthCheck(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetPoolsClient) AddInstance

AddInstance adds an instance to a target pool.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetPoolsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AddInstanceTargetPoolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AddInstanceTargetPoolRequest.
	}
	resp, err := c.AddInstance(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetPoolsClient) AggregatedList

AggregatedList retrieves an aggregated list of target pools.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetPoolsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListTargetPoolsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListTargetPoolsRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TargetPoolsClient) Close

func (c *TargetPoolsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*TargetPoolsClient) Connection

func (c *TargetPoolsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*TargetPoolsClient) Delete

Delete deletes the specified target pool.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetPoolsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteTargetPoolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteTargetPoolRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetPoolsClient) Get

Get returns the specified target pool. Gets a list of available target pools by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetPoolsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetTargetPoolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetTargetPoolRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetPoolsClient) GetHealth

GetHealth gets the most recent health check results for each IP for the instance that is referenced by the given target pool.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetPoolsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetHealthTargetPoolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetHealthTargetPoolRequest.
	}
	resp, err := c.GetHealth(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetPoolsClient) Insert

Insert creates a target pool in the specified project and region using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetPoolsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertTargetPoolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertTargetPoolRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetPoolsClient) List

List retrieves a list of target pools available to the specified project and region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetPoolsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListTargetPoolsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListTargetPoolsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TargetPoolsClient) RemoveHealthCheck

RemoveHealthCheck removes health check URL from a target pool.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetPoolsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.RemoveHealthCheckTargetPoolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#RemoveHealthCheckTargetPoolRequest.
	}
	resp, err := c.RemoveHealthCheck(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetPoolsClient) RemoveInstance

RemoveInstance removes instance URL from a target pool.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetPoolsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.RemoveInstanceTargetPoolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#RemoveInstanceTargetPoolRequest.
	}
	resp, err := c.RemoveInstance(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetPoolsClient) SetBackup

SetBackup changes a backup target pool’s configurations.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetPoolsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetBackupTargetPoolRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetBackupTargetPoolRequest.
	}
	resp, err := c.SetBackup(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

TargetPoolsScopedListPair

type TargetPoolsScopedListPair struct {
	Key   string
	Value *computepb.TargetPoolsScopedList
}

TargetPoolsScopedListPair is a holder type for string/*computepb.TargetPoolsScopedList map entries

TargetPoolsScopedListPairIterator

type TargetPoolsScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []TargetPoolsScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TargetPoolsScopedListPairIterator manages a stream of TargetPoolsScopedListPair.

func (*TargetPoolsScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*TargetPoolsScopedListPairIterator) PageInfo

func (it *TargetPoolsScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

TargetSslProxiesCallOptions

type TargetSslProxiesCallOptions struct {
	Delete             []gax.CallOption
	Get                []gax.CallOption
	Insert             []gax.CallOption
	List               []gax.CallOption
	SetBackendService  []gax.CallOption
	SetProxyHeader     []gax.CallOption
	SetSslCertificates []gax.CallOption
	SetSslPolicy       []gax.CallOption
}

TargetSslProxiesCallOptions contains the retry settings for each method of TargetSslProxiesClient.

TargetSslProxiesClient

type TargetSslProxiesClient struct {

	// The call options for this service.
	CallOptions *TargetSslProxiesCallOptions
	// contains filtered or unexported fields
}

TargetSslProxiesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The TargetSslProxies API.

func NewTargetSslProxiesRESTClient

func NewTargetSslProxiesRESTClient(ctx context.Context, opts ...option.ClientOption) (*TargetSslProxiesClient, error)

NewTargetSslProxiesRESTClient creates a new target ssl proxies rest client.

The TargetSslProxies API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetSslProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*TargetSslProxiesClient) Close

func (c *TargetSslProxiesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*TargetSslProxiesClient) Connection

func (c *TargetSslProxiesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*TargetSslProxiesClient) Delete

Delete deletes the specified TargetSslProxy resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetSslProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteTargetSslProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteTargetSslProxyRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetSslProxiesClient) Get

Get returns the specified TargetSslProxy resource. Gets a list of available target SSL proxies by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetSslProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetTargetSslProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetTargetSslProxyRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetSslProxiesClient) Insert

Insert creates a TargetSslProxy resource in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetSslProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertTargetSslProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertTargetSslProxyRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetSslProxiesClient) List

List retrieves the list of TargetSslProxy resources available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetSslProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListTargetSslProxiesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListTargetSslProxiesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TargetSslProxiesClient) SetBackendService

SetBackendService changes the BackendService for TargetSslProxy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetSslProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetBackendServiceTargetSslProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetBackendServiceTargetSslProxyRequest.
	}
	resp, err := c.SetBackendService(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetSslProxiesClient) SetProxyHeader

SetProxyHeader changes the ProxyHeaderType for TargetSslProxy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetSslProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetProxyHeaderTargetSslProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetProxyHeaderTargetSslProxyRequest.
	}
	resp, err := c.SetProxyHeader(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetSslProxiesClient) SetSslCertificates

SetSslCertificates changes SslCertificates for TargetSslProxy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetSslProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetSslCertificatesTargetSslProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetSslCertificatesTargetSslProxyRequest.
	}
	resp, err := c.SetSslCertificates(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetSslProxiesClient) SetSslPolicy

SetSslPolicy sets the SSL policy for TargetSslProxy. The SSL policy specifies the server-side support for SSL features. This affects connections between clients and the SSL proxy load balancer. They do not affect the connection between the load balancer and the backends.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetSslProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetSslPolicyTargetSslProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetSslPolicyTargetSslProxyRequest.
	}
	resp, err := c.SetSslPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

TargetSslProxyIterator

type TargetSslProxyIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.TargetSslProxy, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TargetSslProxyIterator manages a stream of *computepb.TargetSslProxy.

func (*TargetSslProxyIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*TargetSslProxyIterator) PageInfo

func (it *TargetSslProxyIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

TargetTcpProxiesCallOptions

type TargetTcpProxiesCallOptions struct {
	Delete            []gax.CallOption
	Get               []gax.CallOption
	Insert            []gax.CallOption
	List              []gax.CallOption
	SetBackendService []gax.CallOption
	SetProxyHeader    []gax.CallOption
}

TargetTcpProxiesCallOptions contains the retry settings for each method of TargetTcpProxiesClient.

TargetTcpProxiesClient

type TargetTcpProxiesClient struct {

	// The call options for this service.
	CallOptions *TargetTcpProxiesCallOptions
	// contains filtered or unexported fields
}

TargetTcpProxiesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The TargetTcpProxies API.

func NewTargetTcpProxiesRESTClient

func NewTargetTcpProxiesRESTClient(ctx context.Context, opts ...option.ClientOption) (*TargetTcpProxiesClient, error)

NewTargetTcpProxiesRESTClient creates a new target tcp proxies rest client.

The TargetTcpProxies API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetTcpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*TargetTcpProxiesClient) Close

func (c *TargetTcpProxiesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*TargetTcpProxiesClient) Connection

func (c *TargetTcpProxiesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*TargetTcpProxiesClient) Delete

Delete deletes the specified TargetTcpProxy resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetTcpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteTargetTcpProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteTargetTcpProxyRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetTcpProxiesClient) Get

Get returns the specified TargetTcpProxy resource. Gets a list of available target TCP proxies by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetTcpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetTargetTcpProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetTargetTcpProxyRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetTcpProxiesClient) Insert

Insert creates a TargetTcpProxy resource in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetTcpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertTargetTcpProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertTargetTcpProxyRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetTcpProxiesClient) List

List retrieves the list of TargetTcpProxy resources available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetTcpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListTargetTcpProxiesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListTargetTcpProxiesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TargetTcpProxiesClient) SetBackendService

SetBackendService changes the BackendService for TargetTcpProxy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetTcpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetBackendServiceTargetTcpProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetBackendServiceTargetTcpProxyRequest.
	}
	resp, err := c.SetBackendService(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetTcpProxiesClient) SetProxyHeader

SetProxyHeader changes the ProxyHeaderType for TargetTcpProxy.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetTcpProxiesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetProxyHeaderTargetTcpProxyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetProxyHeaderTargetTcpProxyRequest.
	}
	resp, err := c.SetProxyHeader(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

TargetTcpProxyIterator

type TargetTcpProxyIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.TargetTcpProxy, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TargetTcpProxyIterator manages a stream of *computepb.TargetTcpProxy.

func (*TargetTcpProxyIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*TargetTcpProxyIterator) PageInfo

func (it *TargetTcpProxyIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

TargetVpnGatewayIterator

type TargetVpnGatewayIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.TargetVpnGateway, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TargetVpnGatewayIterator manages a stream of *computepb.TargetVpnGateway.

func (*TargetVpnGatewayIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*TargetVpnGatewayIterator) PageInfo

func (it *TargetVpnGatewayIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

TargetVpnGatewaysCallOptions

type TargetVpnGatewaysCallOptions struct {
	AggregatedList []gax.CallOption
	Delete         []gax.CallOption
	Get            []gax.CallOption
	Insert         []gax.CallOption
	List           []gax.CallOption
}

TargetVpnGatewaysCallOptions contains the retry settings for each method of TargetVpnGatewaysClient.

TargetVpnGatewaysClient

type TargetVpnGatewaysClient struct {

	// The call options for this service.
	CallOptions *TargetVpnGatewaysCallOptions
	// contains filtered or unexported fields
}

TargetVpnGatewaysClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The TargetVpnGateways API.

func NewTargetVpnGatewaysRESTClient

func NewTargetVpnGatewaysRESTClient(ctx context.Context, opts ...option.ClientOption) (*TargetVpnGatewaysClient, error)

NewTargetVpnGatewaysRESTClient creates a new target vpn gateways rest client.

The TargetVpnGateways API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*TargetVpnGatewaysClient) AggregatedList

AggregatedList retrieves an aggregated list of target VPN gateways.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListTargetVpnGatewaysRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListTargetVpnGatewaysRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*TargetVpnGatewaysClient) Close

func (c *TargetVpnGatewaysClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*TargetVpnGatewaysClient) Connection

func (c *TargetVpnGatewaysClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*TargetVpnGatewaysClient) Delete

Delete deletes the specified target VPN gateway.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteTargetVpnGatewayRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteTargetVpnGatewayRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetVpnGatewaysClient) Get

Get returns the specified target VPN gateway. Gets a list of available target VPN gateways by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetTargetVpnGatewayRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetTargetVpnGatewayRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetVpnGatewaysClient) Insert

Insert creates a target VPN gateway in the specified project and region using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertTargetVpnGatewayRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertTargetVpnGatewayRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*TargetVpnGatewaysClient) List

List retrieves a list of target VPN gateways available to the specified project and region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewTargetVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListTargetVpnGatewaysRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListTargetVpnGatewaysRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

TargetVpnGatewaysScopedListPair

type TargetVpnGatewaysScopedListPair struct {
	Key   string
	Value *computepb.TargetVpnGatewaysScopedList
}

TargetVpnGatewaysScopedListPair is a holder type for string/*computepb.TargetVpnGatewaysScopedList map entries

TargetVpnGatewaysScopedListPairIterator

type TargetVpnGatewaysScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []TargetVpnGatewaysScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

TargetVpnGatewaysScopedListPairIterator manages a stream of TargetVpnGatewaysScopedListPair.

func (*TargetVpnGatewaysScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*TargetVpnGatewaysScopedListPairIterator) PageInfo

func (it *TargetVpnGatewaysScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

UrlMapIterator

type UrlMapIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.UrlMap, nextPageToken string, err error)
	// contains filtered or unexported fields
}

UrlMapIterator manages a stream of *computepb.UrlMap.

func (*UrlMapIterator) Next

func (it *UrlMapIterator) Next() (*computepb.UrlMap, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*UrlMapIterator) PageInfo

func (it *UrlMapIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

UrlMapsCallOptions

type UrlMapsCallOptions struct {
	AggregatedList  []gax.CallOption
	Delete          []gax.CallOption
	Get             []gax.CallOption
	Insert          []gax.CallOption
	InvalidateCache []gax.CallOption
	List            []gax.CallOption
	Patch           []gax.CallOption
	Update          []gax.CallOption
	Validate        []gax.CallOption
}

UrlMapsCallOptions contains the retry settings for each method of UrlMapsClient.

UrlMapsClient

type UrlMapsClient struct {

	// The call options for this service.
	CallOptions *UrlMapsCallOptions
	// contains filtered or unexported fields
}

UrlMapsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The UrlMaps API.

func NewUrlMapsRESTClient

func NewUrlMapsRESTClient(ctx context.Context, opts ...option.ClientOption) (*UrlMapsClient, error)

NewUrlMapsRESTClient creates a new url maps rest client.

The UrlMaps API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*UrlMapsClient) AggregatedList

AggregatedList retrieves the list of all UrlMap resources, regional and global, available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListUrlMapsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListUrlMapsRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*UrlMapsClient) Close

func (c *UrlMapsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*UrlMapsClient) Connection

func (c *UrlMapsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*UrlMapsClient) Delete

Delete deletes the specified UrlMap resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteUrlMapRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteUrlMapRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*UrlMapsClient) Get

Get returns the specified UrlMap resource. Gets a list of available URL maps by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetUrlMapRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetUrlMapRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*UrlMapsClient) Insert

Insert creates a UrlMap resource in the specified project using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertUrlMapRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertUrlMapRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*UrlMapsClient) InvalidateCache

InvalidateCache initiates a cache invalidation operation, invalidating the specified path, scoped to the specified UrlMap. For more information, see Invalidating cached content (at /cdn/docs/invalidating-cached-content).

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InvalidateCacheUrlMapRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InvalidateCacheUrlMapRequest.
	}
	resp, err := c.InvalidateCache(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*UrlMapsClient) List

List retrieves the list of UrlMap resources available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListUrlMapsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListUrlMapsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*UrlMapsClient) Patch

Patch patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses the JSON merge patch format and processing rules.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.PatchUrlMapRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#PatchUrlMapRequest.
	}
	resp, err := c.Patch(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*UrlMapsClient) Update

Update updates the specified UrlMap resource with the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.UpdateUrlMapRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#UpdateUrlMapRequest.
	}
	resp, err := c.Update(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*UrlMapsClient) Validate

Validate runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewUrlMapsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ValidateUrlMapRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ValidateUrlMapRequest.
	}
	resp, err := c.Validate(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

UrlMapsScopedListPair

type UrlMapsScopedListPair struct {
	Key   string
	Value *computepb.UrlMapsScopedList
}

UrlMapsScopedListPair is a holder type for string/*computepb.UrlMapsScopedList map entries

UrlMapsScopedListPairIterator

type UrlMapsScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []UrlMapsScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

UrlMapsScopedListPairIterator manages a stream of UrlMapsScopedListPair.

func (*UrlMapsScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*UrlMapsScopedListPairIterator) PageInfo

func (it *UrlMapsScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

UsableSubnetworkIterator

type UsableSubnetworkIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.UsableSubnetwork, nextPageToken string, err error)
	// contains filtered or unexported fields
}

UsableSubnetworkIterator manages a stream of *computepb.UsableSubnetwork.

func (*UsableSubnetworkIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*UsableSubnetworkIterator) PageInfo

func (it *UsableSubnetworkIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

VmEndpointNatMappingsIterator

type VmEndpointNatMappingsIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.VmEndpointNatMappings, nextPageToken string, err error)
	// contains filtered or unexported fields
}

VmEndpointNatMappingsIterator manages a stream of *computepb.VmEndpointNatMappings.

func (*VmEndpointNatMappingsIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*VmEndpointNatMappingsIterator) PageInfo

func (it *VmEndpointNatMappingsIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

VpnGatewayIterator

type VpnGatewayIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.VpnGateway, nextPageToken string, err error)
	// contains filtered or unexported fields
}

VpnGatewayIterator manages a stream of *computepb.VpnGateway.

func (*VpnGatewayIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*VpnGatewayIterator) PageInfo

func (it *VpnGatewayIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

VpnGatewaysCallOptions

type VpnGatewaysCallOptions struct {
	AggregatedList     []gax.CallOption
	Delete             []gax.CallOption
	Get                []gax.CallOption
	GetStatus          []gax.CallOption
	Insert             []gax.CallOption
	List               []gax.CallOption
	SetLabels          []gax.CallOption
	TestIamPermissions []gax.CallOption
}

VpnGatewaysCallOptions contains the retry settings for each method of VpnGatewaysClient.

VpnGatewaysClient

type VpnGatewaysClient struct {

	// The call options for this service.
	CallOptions *VpnGatewaysCallOptions
	// contains filtered or unexported fields
}

VpnGatewaysClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The VpnGateways API.

func NewVpnGatewaysRESTClient

func NewVpnGatewaysRESTClient(ctx context.Context, opts ...option.ClientOption) (*VpnGatewaysClient, error)

NewVpnGatewaysRESTClient creates a new vpn gateways rest client.

The VpnGateways API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*VpnGatewaysClient) AggregatedList

AggregatedList retrieves an aggregated list of VPN gateways.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListVpnGatewaysRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListVpnGatewaysRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*VpnGatewaysClient) Close

func (c *VpnGatewaysClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*VpnGatewaysClient) Connection

func (c *VpnGatewaysClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*VpnGatewaysClient) Delete

Delete deletes the specified VPN gateway.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteVpnGatewayRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteVpnGatewayRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VpnGatewaysClient) Get

Get returns the specified VPN gateway. Gets a list of available VPN gateways by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetVpnGatewayRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetVpnGatewayRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VpnGatewaysClient) GetStatus

GetStatus returns the status for the specified VPN gateway.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetStatusVpnGatewayRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetStatusVpnGatewayRequest.
	}
	resp, err := c.GetStatus(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VpnGatewaysClient) Insert

Insert creates a VPN gateway in the specified project and region using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertVpnGatewayRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertVpnGatewayRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VpnGatewaysClient) List

List retrieves a list of VPN gateways available to the specified project and region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListVpnGatewaysRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListVpnGatewaysRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*VpnGatewaysClient) SetLabels

SetLabels sets the labels on a VpnGateway. To learn more about labels, read the Labeling Resources documentation.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.SetLabelsVpnGatewayRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#SetLabelsVpnGatewayRequest.
	}
	resp, err := c.SetLabels(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VpnGatewaysClient) TestIamPermissions

TestIamPermissions returns permissions that a caller has on the specified resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewVpnGatewaysRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.TestIamPermissionsVpnGatewayRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#TestIamPermissionsVpnGatewayRequest.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

VpnGatewaysScopedListPair

type VpnGatewaysScopedListPair struct {
	Key   string
	Value *computepb.VpnGatewaysScopedList
}

VpnGatewaysScopedListPair is a holder type for string/*computepb.VpnGatewaysScopedList map entries

VpnGatewaysScopedListPairIterator

type VpnGatewaysScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []VpnGatewaysScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

VpnGatewaysScopedListPairIterator manages a stream of VpnGatewaysScopedListPair.

func (*VpnGatewaysScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*VpnGatewaysScopedListPairIterator) PageInfo

func (it *VpnGatewaysScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

VpnTunnelIterator

type VpnTunnelIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.VpnTunnel, nextPageToken string, err error)
	// contains filtered or unexported fields
}

VpnTunnelIterator manages a stream of *computepb.VpnTunnel.

func (*VpnTunnelIterator) Next

func (it *VpnTunnelIterator) Next() (*computepb.VpnTunnel, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*VpnTunnelIterator) PageInfo

func (it *VpnTunnelIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

VpnTunnelsCallOptions

type VpnTunnelsCallOptions struct {
	AggregatedList []gax.CallOption
	Delete         []gax.CallOption
	Get            []gax.CallOption
	Insert         []gax.CallOption
	List           []gax.CallOption
}

VpnTunnelsCallOptions contains the retry settings for each method of VpnTunnelsClient.

VpnTunnelsClient

type VpnTunnelsClient struct {

	// The call options for this service.
	CallOptions *VpnTunnelsCallOptions
	// contains filtered or unexported fields
}

VpnTunnelsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The VpnTunnels API.

func NewVpnTunnelsRESTClient

func NewVpnTunnelsRESTClient(ctx context.Context, opts ...option.ClientOption) (*VpnTunnelsClient, error)

NewVpnTunnelsRESTClient creates a new vpn tunnels rest client.

The VpnTunnels API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewVpnTunnelsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*VpnTunnelsClient) AggregatedList

AggregatedList retrieves an aggregated list of VPN tunnels.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewVpnTunnelsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.AggregatedListVpnTunnelsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#AggregatedListVpnTunnelsRequest.
	}
	it := c.AggregatedList(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*VpnTunnelsClient) Close

func (c *VpnTunnelsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*VpnTunnelsClient) Connection

func (c *VpnTunnelsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*VpnTunnelsClient) Delete

Delete deletes the specified VpnTunnel resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewVpnTunnelsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteVpnTunnelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteVpnTunnelRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VpnTunnelsClient) Get

Get returns the specified VpnTunnel resource. Gets a list of available VPN tunnels by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewVpnTunnelsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetVpnTunnelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetVpnTunnelRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VpnTunnelsClient) Insert

Insert creates a VpnTunnel resource in the specified project and region using the data included in the request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewVpnTunnelsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.InsertVpnTunnelRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#InsertVpnTunnelRequest.
	}
	resp, err := c.Insert(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*VpnTunnelsClient) List

List retrieves a list of VpnTunnel resources contained in the specified project and region.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewVpnTunnelsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListVpnTunnelsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListVpnTunnelsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

VpnTunnelsScopedListPair

type VpnTunnelsScopedListPair struct {
	Key   string
	Value *computepb.VpnTunnelsScopedList
}

VpnTunnelsScopedListPair is a holder type for string/*computepb.VpnTunnelsScopedList map entries

VpnTunnelsScopedListPairIterator

type VpnTunnelsScopedListPairIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []VpnTunnelsScopedListPair, nextPageToken string, err error)
	// contains filtered or unexported fields
}

VpnTunnelsScopedListPairIterator manages a stream of VpnTunnelsScopedListPair.

func (*VpnTunnelsScopedListPairIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*VpnTunnelsScopedListPairIterator) PageInfo

func (it *VpnTunnelsScopedListPairIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

XpnResourceIdIterator

type XpnResourceIdIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.XpnResourceId, nextPageToken string, err error)
	// contains filtered or unexported fields
}

XpnResourceIdIterator manages a stream of *computepb.XpnResourceId.

func (*XpnResourceIdIterator) Next

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*XpnResourceIdIterator) PageInfo

func (it *XpnResourceIdIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ZoneIterator

type ZoneIterator struct {

	// Response is the raw response for the current page.
	// It must be cast to the RPC response type.
	// Calling Next() or InternalFetch() updates this value.
	Response interface{}

	// InternalFetch is for use by the Google Cloud Libraries only.
	// It is not part of the stable interface of this package.
	//
	// InternalFetch returns results from a single call to the underlying RPC.
	// The number of results is no greater than pageSize.
	// If there are no more results, nextPageToken is empty and err is nil.
	InternalFetch func(pageSize int, pageToken string) (results []*computepb.Zone, nextPageToken string, err error)
	// contains filtered or unexported fields
}

ZoneIterator manages a stream of *computepb.Zone.

func (*ZoneIterator) Next

func (it *ZoneIterator) Next() (*computepb.Zone, error)

Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.

func (*ZoneIterator) PageInfo

func (it *ZoneIterator) PageInfo() *iterator.PageInfo

PageInfo supports pagination. See the google.golang.org/api/iterator package for details.

ZoneOperationsCallOptions

type ZoneOperationsCallOptions struct {
	Delete []gax.CallOption
	Get    []gax.CallOption
	List   []gax.CallOption
	Wait   []gax.CallOption
}

ZoneOperationsCallOptions contains the retry settings for each method of ZoneOperationsClient.

ZoneOperationsClient

type ZoneOperationsClient struct {

	// The call options for this service.
	CallOptions *ZoneOperationsCallOptions
	// contains filtered or unexported fields
}

ZoneOperationsClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The ZoneOperations API.

func NewZoneOperationsRESTClient

func NewZoneOperationsRESTClient(ctx context.Context, opts ...option.ClientOption) (*ZoneOperationsClient, error)

NewZoneOperationsRESTClient creates a new zone operations rest client.

The ZoneOperations API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewZoneOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*ZoneOperationsClient) Close

func (c *ZoneOperationsClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*ZoneOperationsClient) Connection

func (c *ZoneOperationsClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*ZoneOperationsClient) Delete

Delete deletes the specified zone-specific Operations resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewZoneOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.DeleteZoneOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#DeleteZoneOperationRequest.
	}
	resp, err := c.Delete(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ZoneOperationsClient) Get

Get retrieves the specified zone-specific Operations resource.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewZoneOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetZoneOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetZoneOperationRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ZoneOperationsClient) List

List retrieves a list of Operation resources contained within the specified zone.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewZoneOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListZoneOperationsRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListZoneOperationsRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*ZoneOperationsClient) Wait

Wait waits for the specified Operation resource to return as DONE or for the request to approach the 2 minute deadline, and retrieves the specified Operation resource. This method waits for no more than the 2 minutes and then returns the current state of the operation, which might be DONE or still in progress. This method is called on a best-effort basis. Specifically: - In uncommon cases, when the server is overloaded, the request might return before the default deadline is reached, or might return after zero seconds. - If the default deadline is reached, there is no guarantee that the operation is actually done when the method returns. Be prepared to retry if the operation is not DONE.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewZoneOperationsRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.WaitZoneOperationRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#WaitZoneOperationRequest.
	}
	resp, err := c.Wait(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

ZonesCallOptions

type ZonesCallOptions struct {
	Get  []gax.CallOption
	List []gax.CallOption
}

ZonesCallOptions contains the retry settings for each method of ZonesClient.

ZonesClient

type ZonesClient struct {

	// The call options for this service.
	CallOptions *ZonesCallOptions
	// contains filtered or unexported fields
}

ZonesClient is a client for interacting with Google Compute Engine API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

The Zones API.

func NewZonesRESTClient

func NewZonesRESTClient(ctx context.Context, opts ...option.ClientOption) (*ZonesClient, error)

NewZonesRESTClient creates a new zones rest client.

The Zones API.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewZonesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func (*ZonesClient) Close

func (c *ZonesClient) Close() error

Close closes the connection to the API service. The user should invoke this when the client is no longer required.

func (*ZonesClient) Connection

func (c *ZonesClient) Connection() *grpc.ClientConn

Connection returns a connection to the API service.

Deprecated.

func (*ZonesClient) Get

Get returns the specified Zone resource. Gets a list of available zones by making a list() request.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewZonesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.GetZoneRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#GetZoneRequest.
	}
	resp, err := c.Get(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*ZonesClient) List

List retrieves the list of Zone resources available to the specified project.

Example

package main

import (
	"context"

	compute "cloud.google.com/go/compute/apiv1"
	"google.golang.org/api/iterator"

	computepb "google.golang.org/genproto/googleapis/cloud/compute/v1"
)

func main() {
	ctx := context.Background()
	c, err := compute.NewZonesRESTClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &computepb.ListZonesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/compute/v1#ListZonesRequest.
	}
	it := c.List(ctx, req)
	for {
		resp, err := it.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}