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

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

NOTE: This package is in alpha. It is not stable, and is likely to change.

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.

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
)

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.AggregatedList(ctx, req)
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.List(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
)

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.AggregatedList(ctx, req)
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.List(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
)

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.AggregatedList(ctx, req)
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.List(ctx, req)
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.Update(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
)

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.List(ctx, req)
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.Update(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
)

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.AggregatedList(ctx, req)
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.List(ctx, req)
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.Update(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
)

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.AggregatedList(ctx, req)
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.List(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
)

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

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.AggregatedList(ctx, req)
	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

CreateSnapshot creates a snapshot of a specified persistent disk.

Example

package main

import (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.List(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DisksClient) RemoveResourcePolicies

RemoveResourcePolicies removes resource policies from a disk.

Example

package main

import (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.SetIamPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*DisksClient) SetLabels

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

Example

package main

import (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
)

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.List(ctx, req)
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
)

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 project.

Example

package main

import (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.List(ctx, req)
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.TestIamPermissions(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
)

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.List(ctx, req)
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.Update(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
)

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.AggregatedList(ctx, req)
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.List(ctx, req)
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.SetTarget(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
)

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.List(ctx, req)
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
)

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.List(ctx, req)
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
)

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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

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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.List(ctx, req)
	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 (
	compute "cloud.google.com/go/compute/apiv1"
	"context"
	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.
	}
	resp, err := c.ListNetworkEndpoints(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

GlobalOperationsCallOptions

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