Package networkservices is an auto-generated package for the Network Services API.
General documentation
For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage
To get started with this package, create a client.
// go get cloud.google.com/go/networkservices/apiv1@latest ctx := context.Background() // This snippet has been automatically generated and should be regarded as a code template only. // It will require modifications to work: // - It may require correct/in-range values for request initialization. // - It may require specifying regional endpoints when creating the service client as shown in: // https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options c, err := networkservices.NewDepClient(ctx) if err != nil { // TODO: Handle error. } defer c.Close()
The client will use your default application credentials. Clients should be reused instead of created as needed. The methods of Client are safe for concurrent use by multiple goroutines. The returned client must be Closed when it is done being used.
Using the Client
The following is an example of making an API call with the newly created client, mentioned above.
req := &networkservicespb.CreateLbRouteExtensionRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateLbRouteExtensionRequest. } op, err := c.CreateLbRouteExtension(ctx, req) if err != nil { // TODO: Handle error. } resp, err := op.Wait(ctx) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Use of Context
The ctx passed to NewDepClient 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.
Functions
func DefaultAuthScopes
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
CallOptions
type CallOptions struct {
ListEndpointPolicies []gax.CallOption
GetEndpointPolicy []gax.CallOption
CreateEndpointPolicy []gax.CallOption
UpdateEndpointPolicy []gax.CallOption
DeleteEndpointPolicy []gax.CallOption
ListGateways []gax.CallOption
GetGateway []gax.CallOption
CreateGateway []gax.CallOption
UpdateGateway []gax.CallOption
DeleteGateway []gax.CallOption
ListGrpcRoutes []gax.CallOption
GetGrpcRoute []gax.CallOption
CreateGrpcRoute []gax.CallOption
UpdateGrpcRoute []gax.CallOption
DeleteGrpcRoute []gax.CallOption
ListHttpRoutes []gax.CallOption
GetHttpRoute []gax.CallOption
CreateHttpRoute []gax.CallOption
UpdateHttpRoute []gax.CallOption
DeleteHttpRoute []gax.CallOption
ListTcpRoutes []gax.CallOption
GetTcpRoute []gax.CallOption
CreateTcpRoute []gax.CallOption
UpdateTcpRoute []gax.CallOption
DeleteTcpRoute []gax.CallOption
ListTlsRoutes []gax.CallOption
GetTlsRoute []gax.CallOption
CreateTlsRoute []gax.CallOption
UpdateTlsRoute []gax.CallOption
DeleteTlsRoute []gax.CallOption
ListServiceBindings []gax.CallOption
GetServiceBinding []gax.CallOption
CreateServiceBinding []gax.CallOption
DeleteServiceBinding []gax.CallOption
ListMeshes []gax.CallOption
GetMesh []gax.CallOption
CreateMesh []gax.CallOption
UpdateMesh []gax.CallOption
DeleteMesh []gax.CallOption
GetLocation []gax.CallOption
ListLocations []gax.CallOption
GetIamPolicy []gax.CallOption
SetIamPolicy []gax.CallOption
TestIamPermissions []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}
CallOptions contains the retry settings for each method of Client.
Client
type Client struct {
// The call options for this service.
CallOptions *CallOptions
// LROClient is used internally to handle long-running operations.
// It is exposed so that its CallOptions can be modified if required.
// Users should not Close this client.
LROClient *lroauto.OperationsClient
// contains filtered or unexported fields
}
Client is a client for interacting with Network Services API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service describing handlers for resources.
func NewClient
NewClient creates a new network services client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Service describing handlers for resources.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewRESTClient
NewRESTClient creates a new network services rest client.
Service describing handlers for resources.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*Client) CancelOperation
func (c *Client) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkservices "cloud.google.com/go/networkservices/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.CancelOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#CancelOperationRequest.
}
err = c.CancelOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) Close
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*Client) Connection (deprecated)
func (c *Client) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*Client) CreateEndpointPolicy
func (c *Client) CreateEndpointPolicy(ctx context.Context, req *networkservicespb.CreateEndpointPolicyRequest, opts ...gax.CallOption) (*CreateEndpointPolicyOperation, error)
CreateEndpointPolicy creates a new EndpointPolicy in a given project and location.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.CreateEndpointPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateEndpointPolicyRequest.
}
op, err := c.CreateEndpointPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateEndpointPolicyOperation
func (c *Client) CreateEndpointPolicyOperation(name string) *CreateEndpointPolicyOperation
CreateEndpointPolicyOperation returns a new CreateEndpointPolicyOperation from a given name. The name must be that of a previously created CreateEndpointPolicyOperation, possibly from a different process.
func (*Client) CreateGateway
func (c *Client) CreateGateway(ctx context.Context, req *networkservicespb.CreateGatewayRequest, opts ...gax.CallOption) (*CreateGatewayOperation, error)
CreateGateway creates a new Gateway in a given project and location.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.CreateGatewayRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateGatewayRequest.
}
op, err := c.CreateGateway(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateGatewayOperation
func (c *Client) CreateGatewayOperation(name string) *CreateGatewayOperation
CreateGatewayOperation returns a new CreateGatewayOperation from a given name. The name must be that of a previously created CreateGatewayOperation, possibly from a different process.
func (*Client) CreateGrpcRoute
func (c *Client) CreateGrpcRoute(ctx context.Context, req *networkservicespb.CreateGrpcRouteRequest, opts ...gax.CallOption) (*CreateGrpcRouteOperation, error)
CreateGrpcRoute creates a new GrpcRoute in a given project and location.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.CreateGrpcRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateGrpcRouteRequest.
}
op, err := c.CreateGrpcRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateGrpcRouteOperation
func (c *Client) CreateGrpcRouteOperation(name string) *CreateGrpcRouteOperation
CreateGrpcRouteOperation returns a new CreateGrpcRouteOperation from a given name. The name must be that of a previously created CreateGrpcRouteOperation, possibly from a different process.
func (*Client) CreateHttpRoute
func (c *Client) CreateHttpRoute(ctx context.Context, req *networkservicespb.CreateHttpRouteRequest, opts ...gax.CallOption) (*CreateHttpRouteOperation, error)
CreateHttpRoute creates a new HttpRoute in a given project and location.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.CreateHttpRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateHttpRouteRequest.
}
op, err := c.CreateHttpRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateHttpRouteOperation
func (c *Client) CreateHttpRouteOperation(name string) *CreateHttpRouteOperation
CreateHttpRouteOperation returns a new CreateHttpRouteOperation from a given name. The name must be that of a previously created CreateHttpRouteOperation, possibly from a different process.
func (*Client) CreateMesh
func (c *Client) CreateMesh(ctx context.Context, req *networkservicespb.CreateMeshRequest, opts ...gax.CallOption) (*CreateMeshOperation, error)
CreateMesh creates a new Mesh in a given project and location.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.CreateMeshRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateMeshRequest.
}
op, err := c.CreateMesh(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateMeshOperation
func (c *Client) CreateMeshOperation(name string) *CreateMeshOperation
CreateMeshOperation returns a new CreateMeshOperation from a given name. The name must be that of a previously created CreateMeshOperation, possibly from a different process.
func (*Client) CreateServiceBinding
func (c *Client) CreateServiceBinding(ctx context.Context, req *networkservicespb.CreateServiceBindingRequest, opts ...gax.CallOption) (*CreateServiceBindingOperation, error)
CreateServiceBinding creates a new ServiceBinding in a given project and location.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.CreateServiceBindingRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateServiceBindingRequest.
}
op, err := c.CreateServiceBinding(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateServiceBindingOperation
func (c *Client) CreateServiceBindingOperation(name string) *CreateServiceBindingOperation
CreateServiceBindingOperation returns a new CreateServiceBindingOperation from a given name. The name must be that of a previously created CreateServiceBindingOperation, possibly from a different process.
func (*Client) CreateTcpRoute
func (c *Client) CreateTcpRoute(ctx context.Context, req *networkservicespb.CreateTcpRouteRequest, opts ...gax.CallOption) (*CreateTcpRouteOperation, error)
CreateTcpRoute creates a new TcpRoute in a given project and location.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.CreateTcpRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateTcpRouteRequest.
}
op, err := c.CreateTcpRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateTcpRouteOperation
func (c *Client) CreateTcpRouteOperation(name string) *CreateTcpRouteOperation
CreateTcpRouteOperation returns a new CreateTcpRouteOperation from a given name. The name must be that of a previously created CreateTcpRouteOperation, possibly from a different process.
func (*Client) CreateTlsRoute
func (c *Client) CreateTlsRoute(ctx context.Context, req *networkservicespb.CreateTlsRouteRequest, opts ...gax.CallOption) (*CreateTlsRouteOperation, error)
CreateTlsRoute creates a new TlsRoute in a given project and location.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.CreateTlsRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#CreateTlsRouteRequest.
}
op, err := c.CreateTlsRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) CreateTlsRouteOperation
func (c *Client) CreateTlsRouteOperation(name string) *CreateTlsRouteOperation
CreateTlsRouteOperation returns a new CreateTlsRouteOperation from a given name. The name must be that of a previously created CreateTlsRouteOperation, possibly from a different process.
func (*Client) DeleteEndpointPolicy
func (c *Client) DeleteEndpointPolicy(ctx context.Context, req *networkservicespb.DeleteEndpointPolicyRequest, opts ...gax.CallOption) (*DeleteEndpointPolicyOperation, error)
DeleteEndpointPolicy deletes a single EndpointPolicy.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.DeleteEndpointPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#DeleteEndpointPolicyRequest.
}
op, err := c.DeleteEndpointPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteEndpointPolicyOperation
func (c *Client) DeleteEndpointPolicyOperation(name string) *DeleteEndpointPolicyOperation
DeleteEndpointPolicyOperation returns a new DeleteEndpointPolicyOperation from a given name. The name must be that of a previously created DeleteEndpointPolicyOperation, possibly from a different process.
func (*Client) DeleteGateway
func (c *Client) DeleteGateway(ctx context.Context, req *networkservicespb.DeleteGatewayRequest, opts ...gax.CallOption) (*DeleteGatewayOperation, error)
DeleteGateway deletes a single Gateway.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.DeleteGatewayRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#DeleteGatewayRequest.
}
op, err := c.DeleteGateway(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteGatewayOperation
func (c *Client) DeleteGatewayOperation(name string) *DeleteGatewayOperation
DeleteGatewayOperation returns a new DeleteGatewayOperation from a given name. The name must be that of a previously created DeleteGatewayOperation, possibly from a different process.
func (*Client) DeleteGrpcRoute
func (c *Client) DeleteGrpcRoute(ctx context.Context, req *networkservicespb.DeleteGrpcRouteRequest, opts ...gax.CallOption) (*DeleteGrpcRouteOperation, error)
DeleteGrpcRoute deletes a single GrpcRoute.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.DeleteGrpcRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#DeleteGrpcRouteRequest.
}
op, err := c.DeleteGrpcRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteGrpcRouteOperation
func (c *Client) DeleteGrpcRouteOperation(name string) *DeleteGrpcRouteOperation
DeleteGrpcRouteOperation returns a new DeleteGrpcRouteOperation from a given name. The name must be that of a previously created DeleteGrpcRouteOperation, possibly from a different process.
func (*Client) DeleteHttpRoute
func (c *Client) DeleteHttpRoute(ctx context.Context, req *networkservicespb.DeleteHttpRouteRequest, opts ...gax.CallOption) (*DeleteHttpRouteOperation, error)
DeleteHttpRoute deletes a single HttpRoute.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.DeleteHttpRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#DeleteHttpRouteRequest.
}
op, err := c.DeleteHttpRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteHttpRouteOperation
func (c *Client) DeleteHttpRouteOperation(name string) *DeleteHttpRouteOperation
DeleteHttpRouteOperation returns a new DeleteHttpRouteOperation from a given name. The name must be that of a previously created DeleteHttpRouteOperation, possibly from a different process.
func (*Client) DeleteMesh
func (c *Client) DeleteMesh(ctx context.Context, req *networkservicespb.DeleteMeshRequest, opts ...gax.CallOption) (*DeleteMeshOperation, error)
DeleteMesh deletes a single Mesh.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.DeleteMeshRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#DeleteMeshRequest.
}
op, err := c.DeleteMesh(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteMeshOperation
func (c *Client) DeleteMeshOperation(name string) *DeleteMeshOperation
DeleteMeshOperation returns a new DeleteMeshOperation from a given name. The name must be that of a previously created DeleteMeshOperation, possibly from a different process.
func (*Client) DeleteOperation
func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkservices "cloud.google.com/go/networkservices/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.DeleteOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#DeleteOperationRequest.
}
err = c.DeleteOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteServiceBinding
func (c *Client) DeleteServiceBinding(ctx context.Context, req *networkservicespb.DeleteServiceBindingRequest, opts ...gax.CallOption) (*DeleteServiceBindingOperation, error)
DeleteServiceBinding deletes a single ServiceBinding.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.DeleteServiceBindingRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#DeleteServiceBindingRequest.
}
op, err := c.DeleteServiceBinding(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteServiceBindingOperation
func (c *Client) DeleteServiceBindingOperation(name string) *DeleteServiceBindingOperation
DeleteServiceBindingOperation returns a new DeleteServiceBindingOperation from a given name. The name must be that of a previously created DeleteServiceBindingOperation, possibly from a different process.
func (*Client) DeleteTcpRoute
func (c *Client) DeleteTcpRoute(ctx context.Context, req *networkservicespb.DeleteTcpRouteRequest, opts ...gax.CallOption) (*DeleteTcpRouteOperation, error)
DeleteTcpRoute deletes a single TcpRoute.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.DeleteTcpRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#DeleteTcpRouteRequest.
}
op, err := c.DeleteTcpRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteTcpRouteOperation
func (c *Client) DeleteTcpRouteOperation(name string) *DeleteTcpRouteOperation
DeleteTcpRouteOperation returns a new DeleteTcpRouteOperation from a given name. The name must be that of a previously created DeleteTcpRouteOperation, possibly from a different process.
func (*Client) DeleteTlsRoute
func (c *Client) DeleteTlsRoute(ctx context.Context, req *networkservicespb.DeleteTlsRouteRequest, opts ...gax.CallOption) (*DeleteTlsRouteOperation, error)
DeleteTlsRoute deletes a single TlsRoute.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.DeleteTlsRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#DeleteTlsRouteRequest.
}
op, err := c.DeleteTlsRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteTlsRouteOperation
func (c *Client) DeleteTlsRouteOperation(name string) *DeleteTlsRouteOperation
DeleteTlsRouteOperation returns a new DeleteTlsRouteOperation from a given name. The name must be that of a previously created DeleteTlsRouteOperation, possibly from a different process.
func (*Client) GetEndpointPolicy
func (c *Client) GetEndpointPolicy(ctx context.Context, req *networkservicespb.GetEndpointPolicyRequest, opts ...gax.CallOption) (*networkservicespb.EndpointPolicy, error)
GetEndpointPolicy gets details of a single EndpointPolicy.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.GetEndpointPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#GetEndpointPolicyRequest.
}
resp, err := c.GetEndpointPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetGateway
func (c *Client) GetGateway(ctx context.Context, req *networkservicespb.GetGatewayRequest, opts ...gax.CallOption) (*networkservicespb.Gateway, error)
GetGateway gets details of a single Gateway.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.GetGatewayRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#GetGatewayRequest.
}
resp, err := c.GetGateway(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetGrpcRoute
func (c *Client) GetGrpcRoute(ctx context.Context, req *networkservicespb.GetGrpcRouteRequest, opts ...gax.CallOption) (*networkservicespb.GrpcRoute, error)
GetGrpcRoute gets details of a single GrpcRoute.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.GetGrpcRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#GetGrpcRouteRequest.
}
resp, err := c.GetGrpcRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetHttpRoute
func (c *Client) GetHttpRoute(ctx context.Context, req *networkservicespb.GetHttpRouteRequest, opts ...gax.CallOption) (*networkservicespb.HttpRoute, error)
GetHttpRoute gets details of a single HttpRoute.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.GetHttpRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#GetHttpRouteRequest.
}
resp, err := c.GetHttpRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetIamPolicy
func (c *Client) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
GetIamPolicy gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
Example
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
networkservices "cloud.google.com/go/networkservices/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.GetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#GetIamPolicyRequest.
}
resp, err := c.GetIamPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetLocation
func (c *Client) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.GetLocationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#GetLocationRequest.
}
resp, err := c.GetLocation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetMesh
func (c *Client) GetMesh(ctx context.Context, req *networkservicespb.GetMeshRequest, opts ...gax.CallOption) (*networkservicespb.Mesh, error)
GetMesh gets details of a single Mesh.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.GetMeshRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#GetMeshRequest.
}
resp, err := c.GetMesh(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetOperation
func (c *Client) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, opts ...gax.CallOption) (*longrunningpb.Operation, error)
GetOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkservices "cloud.google.com/go/networkservices/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.GetOperationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#GetOperationRequest.
}
resp, err := c.GetOperation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetServiceBinding
func (c *Client) GetServiceBinding(ctx context.Context, req *networkservicespb.GetServiceBindingRequest, opts ...gax.CallOption) (*networkservicespb.ServiceBinding, error)
GetServiceBinding gets details of a single ServiceBinding.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.GetServiceBindingRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#GetServiceBindingRequest.
}
resp, err := c.GetServiceBinding(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetTcpRoute
func (c *Client) GetTcpRoute(ctx context.Context, req *networkservicespb.GetTcpRouteRequest, opts ...gax.CallOption) (*networkservicespb.TcpRoute, error)
GetTcpRoute gets details of a single TcpRoute.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.GetTcpRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#GetTcpRouteRequest.
}
resp, err := c.GetTcpRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetTlsRoute
func (c *Client) GetTlsRoute(ctx context.Context, req *networkservicespb.GetTlsRouteRequest, opts ...gax.CallOption) (*networkservicespb.TlsRoute, error)
GetTlsRoute gets details of a single TlsRoute.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.GetTlsRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#GetTlsRouteRequest.
}
resp, err := c.GetTlsRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ListEndpointPolicies
func (c *Client) ListEndpointPolicies(ctx context.Context, req *networkservicespb.ListEndpointPoliciesRequest, opts ...gax.CallOption) *EndpointPolicyIterator
ListEndpointPolicies lists EndpointPolicies in a given project and location.
Examples
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.ListEndpointPoliciesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListEndpointPoliciesRequest.
}
it := c.ListEndpointPolicies(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*networkservicespb.ListEndpointPoliciesResponse)
}
}
all
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.ListEndpointPoliciesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListEndpointPoliciesRequest.
}
for resp, err := range c.ListEndpointPolicies(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListGateways
func (c *Client) ListGateways(ctx context.Context, req *networkservicespb.ListGatewaysRequest, opts ...gax.CallOption) *GatewayIterator
ListGateways lists Gateways in a given project and location.
Examples
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.ListGatewaysRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListGatewaysRequest.
}
it := c.ListGateways(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*networkservicespb.ListGatewaysResponse)
}
}
all
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.ListGatewaysRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListGatewaysRequest.
}
for resp, err := range c.ListGateways(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListGrpcRoutes
func (c *Client) ListGrpcRoutes(ctx context.Context, req *networkservicespb.ListGrpcRoutesRequest, opts ...gax.CallOption) *GrpcRouteIterator
ListGrpcRoutes lists GrpcRoutes in a given project and location.
Examples
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.ListGrpcRoutesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListGrpcRoutesRequest.
}
it := c.ListGrpcRoutes(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*networkservicespb.ListGrpcRoutesResponse)
}
}
all
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.ListGrpcRoutesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListGrpcRoutesRequest.
}
for resp, err := range c.ListGrpcRoutes(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListHttpRoutes
func (c *Client) ListHttpRoutes(ctx context.Context, req *networkservicespb.ListHttpRoutesRequest, opts ...gax.CallOption) *HttpRouteIterator
ListHttpRoutes lists HttpRoute in a given project and location.
Examples
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.ListHttpRoutesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListHttpRoutesRequest.
}
it := c.ListHttpRoutes(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*networkservicespb.ListHttpRoutesResponse)
}
}
all
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.ListHttpRoutesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListHttpRoutesRequest.
}
for resp, err := range c.ListHttpRoutes(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListLocations
func (c *Client) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Examples
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
"google.golang.org/api/iterator"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.ListLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
}
it := c.ListLocations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*locationpb.ListLocationsResponse)
}
}
all
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
locationpb "google.golang.org/genproto/googleapis/cloud/location"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &locationpb.ListLocationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/google.golang.org/genproto/googleapis/cloud/location#ListLocationsRequest.
}
for resp, err := range c.ListLocations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListMeshes
func (c *Client) ListMeshes(ctx context.Context, req *networkservicespb.ListMeshesRequest, opts ...gax.CallOption) *MeshIterator
ListMeshes lists Meshes in a given project and location.
Examples
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.ListMeshesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListMeshesRequest.
}
it := c.ListMeshes(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*networkservicespb.ListMeshesResponse)
}
}
all
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.ListMeshesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListMeshesRequest.
}
for resp, err := range c.ListMeshes(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListOperations
func (c *Client) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Examples
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkservices "cloud.google.com/go/networkservices/apiv1"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
all
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkservices "cloud.google.com/go/networkservices/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
for resp, err := range c.ListOperations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListServiceBindings
func (c *Client) ListServiceBindings(ctx context.Context, req *networkservicespb.ListServiceBindingsRequest, opts ...gax.CallOption) *ServiceBindingIterator
ListServiceBindings lists ServiceBinding in a given project and location.
Examples
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.ListServiceBindingsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListServiceBindingsRequest.
}
it := c.ListServiceBindings(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*networkservicespb.ListServiceBindingsResponse)
}
}
all
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.ListServiceBindingsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListServiceBindingsRequest.
}
for resp, err := range c.ListServiceBindings(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListTcpRoutes
func (c *Client) ListTcpRoutes(ctx context.Context, req *networkservicespb.ListTcpRoutesRequest, opts ...gax.CallOption) *TcpRouteIterator
ListTcpRoutes lists TcpRoute in a given project and location.
Examples
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.ListTcpRoutesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListTcpRoutesRequest.
}
it := c.ListTcpRoutes(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*networkservicespb.ListTcpRoutesResponse)
}
}
all
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.ListTcpRoutesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListTcpRoutesRequest.
}
for resp, err := range c.ListTcpRoutes(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListTlsRoutes
func (c *Client) ListTlsRoutes(ctx context.Context, req *networkservicespb.ListTlsRoutesRequest, opts ...gax.CallOption) *TlsRouteIterator
ListTlsRoutes lists TlsRoute in a given project and location.
Examples
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
"google.golang.org/api/iterator"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.ListTlsRoutesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListTlsRoutesRequest.
}
it := c.ListTlsRoutes(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*networkservicespb.ListTlsRoutesResponse)
}
}
all
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.ListTlsRoutesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#ListTlsRoutesRequest.
}
for resp, err := range c.ListTlsRoutes(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) SetIamPolicy
func (c *Client) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
SetIamPolicy sets the access control policy on the specified resource. Replaces any existing policy.
Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.
Example
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
networkservices "cloud.google.com/go/networkservices/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.SetIamPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#SetIamPolicyRequest.
}
resp, err := c.SetIamPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) TestIamPermissions
func (c *Client) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, opts ...gax.CallOption) (*iampb.TestIamPermissionsResponse, error)
TestIamPermissions returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error.
Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may “fail open” without warning.
Example
package main
import (
"context"
iampb "cloud.google.com/go/iam/apiv1/iampb"
networkservices "cloud.google.com/go/networkservices/apiv1"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &iampb.TestIamPermissionsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/iam/apiv1/iampb#TestIamPermissionsRequest.
}
resp, err := c.TestIamPermissions(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateEndpointPolicy
func (c *Client) UpdateEndpointPolicy(ctx context.Context, req *networkservicespb.UpdateEndpointPolicyRequest, opts ...gax.CallOption) (*UpdateEndpointPolicyOperation, error)
UpdateEndpointPolicy updates the parameters of a single EndpointPolicy.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.UpdateEndpointPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#UpdateEndpointPolicyRequest.
}
op, err := c.UpdateEndpointPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateEndpointPolicyOperation
func (c *Client) UpdateEndpointPolicyOperation(name string) *UpdateEndpointPolicyOperation
UpdateEndpointPolicyOperation returns a new UpdateEndpointPolicyOperation from a given name. The name must be that of a previously created UpdateEndpointPolicyOperation, possibly from a different process.
func (*Client) UpdateGateway
func (c *Client) UpdateGateway(ctx context.Context, req *networkservicespb.UpdateGatewayRequest, opts ...gax.CallOption) (*UpdateGatewayOperation, error)
UpdateGateway updates the parameters of a single Gateway.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.UpdateGatewayRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#UpdateGatewayRequest.
}
op, err := c.UpdateGateway(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateGatewayOperation
func (c *Client) UpdateGatewayOperation(name string) *UpdateGatewayOperation
UpdateGatewayOperation returns a new UpdateGatewayOperation from a given name. The name must be that of a previously created UpdateGatewayOperation, possibly from a different process.
func (*Client) UpdateGrpcRoute
func (c *Client) UpdateGrpcRoute(ctx context.Context, req *networkservicespb.UpdateGrpcRouteRequest, opts ...gax.CallOption) (*UpdateGrpcRouteOperation, error)
UpdateGrpcRoute updates the parameters of a single GrpcRoute.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.UpdateGrpcRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#UpdateGrpcRouteRequest.
}
op, err := c.UpdateGrpcRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateGrpcRouteOperation
func (c *Client) UpdateGrpcRouteOperation(name string) *UpdateGrpcRouteOperation
UpdateGrpcRouteOperation returns a new UpdateGrpcRouteOperation from a given name. The name must be that of a previously created UpdateGrpcRouteOperation, possibly from a different process.
func (*Client) UpdateHttpRoute
func (c *Client) UpdateHttpRoute(ctx context.Context, req *networkservicespb.UpdateHttpRouteRequest, opts ...gax.CallOption) (*UpdateHttpRouteOperation, error)
UpdateHttpRoute updates the parameters of a single HttpRoute.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.UpdateHttpRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#UpdateHttpRouteRequest.
}
op, err := c.UpdateHttpRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateHttpRouteOperation
func (c *Client) UpdateHttpRouteOperation(name string) *UpdateHttpRouteOperation
UpdateHttpRouteOperation returns a new UpdateHttpRouteOperation from a given name. The name must be that of a previously created UpdateHttpRouteOperation, possibly from a different process.
func (*Client) UpdateMesh
func (c *Client) UpdateMesh(ctx context.Context, req *networkservicespb.UpdateMeshRequest, opts ...gax.CallOption) (*UpdateMeshOperation, error)
UpdateMesh updates the parameters of a single Mesh.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.UpdateMeshRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#UpdateMeshRequest.
}
op, err := c.UpdateMesh(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateMeshOperation
func (c *Client) UpdateMeshOperation(name string) *UpdateMeshOperation
UpdateMeshOperation returns a new UpdateMeshOperation from a given name. The name must be that of a previously created UpdateMeshOperation, possibly from a different process.
func (*Client) UpdateTcpRoute
func (c *Client) UpdateTcpRoute(ctx context.Context, req *networkservicespb.UpdateTcpRouteRequest, opts ...gax.CallOption) (*UpdateTcpRouteOperation, error)
UpdateTcpRoute updates the parameters of a single TcpRoute.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.UpdateTcpRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#UpdateTcpRouteRequest.
}
op, err := c.UpdateTcpRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateTcpRouteOperation
func (c *Client) UpdateTcpRouteOperation(name string) *UpdateTcpRouteOperation
UpdateTcpRouteOperation returns a new UpdateTcpRouteOperation from a given name. The name must be that of a previously created UpdateTcpRouteOperation, possibly from a different process.
func (*Client) UpdateTlsRoute
func (c *Client) UpdateTlsRoute(ctx context.Context, req *networkservicespb.UpdateTlsRouteRequest, opts ...gax.CallOption) (*UpdateTlsRouteOperation, error)
UpdateTlsRoute updates the parameters of a single TlsRoute.
Example
package main
import (
"context"
networkservices "cloud.google.com/go/networkservices/apiv1"
networkservicespb "cloud.google.com/go/networkservices/apiv1/networkservicespb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkservices.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkservicespb.UpdateTlsRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkservices/apiv1/networkservicespb#UpdateTlsRouteRequest.
}
op, err := c.UpdateTlsRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) UpdateTlsRouteOperation
func (c *Client) UpdateTlsRouteOperation(name string) *UpdateTlsRouteOperation
UpdateTlsRouteOperation returns a new UpdateTlsRouteOperation from a given name. The name must be that of a previously created UpdateTlsRouteOperation, possibly from a different process.
CreateEndpointPolicyOperation
type CreateEndpointPolicyOperation struct {
// contains filtered or unexported fields
}
CreateEndpointPolicyOperation manages a long-running operation from CreateEndpointPolicy.
func (*CreateEndpointPolicyOperation) Done
func (op *CreateEndpointPolicyOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateEndpointPolicyOperation) Metadata
func (op *CreateEndpointPolicyOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateEndpointPolicyOperation) Name
func (op *CreateEndpointPolicyOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateEndpointPolicyOperation) Poll
func (op *CreateEndpointPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.EndpointPolicy, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateEndpointPolicyOperation) Wait
func (op *CreateEndpointPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.EndpointPolicy, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateGatewayOperation
type CreateGatewayOperation struct {
// contains filtered or unexported fields
}
CreateGatewayOperation manages a long-running operation from CreateGateway.
func (*CreateGatewayOperation) Done
func (op *CreateGatewayOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateGatewayOperation) Metadata
func (op *CreateGatewayOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateGatewayOperation) Name
func (op *CreateGatewayOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateGatewayOperation) Poll
func (op *CreateGatewayOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Gateway, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateGatewayOperation) Wait
func (op *CreateGatewayOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Gateway, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateGrpcRouteOperation
type CreateGrpcRouteOperation struct {
// contains filtered or unexported fields
}
CreateGrpcRouteOperation manages a long-running operation from CreateGrpcRoute.
func (*CreateGrpcRouteOperation) Done
func (op *CreateGrpcRouteOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateGrpcRouteOperation) Metadata
func (op *CreateGrpcRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateGrpcRouteOperation) Name
func (op *CreateGrpcRouteOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateGrpcRouteOperation) Poll
func (op *CreateGrpcRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.GrpcRoute, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateGrpcRouteOperation) Wait
func (op *CreateGrpcRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.GrpcRoute, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateHttpRouteOperation
type CreateHttpRouteOperation struct {
// contains filtered or unexported fields
}
CreateHttpRouteOperation manages a long-running operation from CreateHttpRoute.
func (*CreateHttpRouteOperation) Done
func (op *CreateHttpRouteOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateHttpRouteOperation) Metadata
func (op *CreateHttpRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateHttpRouteOperation) Name
func (op *CreateHttpRouteOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateHttpRouteOperation) Poll
func (op *CreateHttpRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.HttpRoute, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateHttpRouteOperation) Wait
func (op *CreateHttpRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.HttpRoute, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateLbRouteExtensionOperation
type CreateLbRouteExtensionOperation struct {
// contains filtered or unexported fields
}
CreateLbRouteExtensionOperation manages a long-running operation from CreateLbRouteExtension.
func (*CreateLbRouteExtensionOperation) Done
func (op *CreateLbRouteExtensionOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateLbRouteExtensionOperation) Metadata
func (op *CreateLbRouteExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateLbRouteExtensionOperation) Name
func (op *CreateLbRouteExtensionOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateLbRouteExtensionOperation) Poll
func (op *CreateLbRouteExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbRouteExtension, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateLbRouteExtensionOperation) Wait
func (op *CreateLbRouteExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbRouteExtension, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateLbTrafficExtensionOperation
type CreateLbTrafficExtensionOperation struct {
// contains filtered or unexported fields
}
CreateLbTrafficExtensionOperation manages a long-running operation from CreateLbTrafficExtension.
func (*CreateLbTrafficExtensionOperation) Done
func (op *CreateLbTrafficExtensionOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateLbTrafficExtensionOperation) Metadata
func (op *CreateLbTrafficExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateLbTrafficExtensionOperation) Name
func (op *CreateLbTrafficExtensionOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateLbTrafficExtensionOperation) Poll
func (op *CreateLbTrafficExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbTrafficExtension, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateLbTrafficExtensionOperation) Wait
func (op *CreateLbTrafficExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.LbTrafficExtension, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateMeshOperation
type CreateMeshOperation struct {
// contains filtered or unexported fields
}
CreateMeshOperation manages a long-running operation from CreateMesh.
func (*CreateMeshOperation) Done
func (op *CreateMeshOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateMeshOperation) Metadata
func (op *CreateMeshOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateMeshOperation) Name
func (op *CreateMeshOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateMeshOperation) Poll
func (op *CreateMeshOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Mesh, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateMeshOperation) Wait
func (op *CreateMeshOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.Mesh, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateServiceBindingOperation
type CreateServiceBindingOperation struct {
// contains filtered or unexported fields
}
CreateServiceBindingOperation manages a long-running operation from CreateServiceBinding.
func (*CreateServiceBindingOperation) Done
func (op *CreateServiceBindingOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateServiceBindingOperation) Metadata
func (op *CreateServiceBindingOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateServiceBindingOperation) Name
func (op *CreateServiceBindingOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateServiceBindingOperation) Poll
func (op *CreateServiceBindingOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceBinding, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateServiceBindingOperation) Wait
func (op *CreateServiceBindingOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.ServiceBinding, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateTcpRouteOperation
type CreateTcpRouteOperation struct {
// contains filtered or unexported fields
}
CreateTcpRouteOperation manages a long-running operation from CreateTcpRoute.
func (*CreateTcpRouteOperation) Done
func (op *CreateTcpRouteOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateTcpRouteOperation) Metadata
func (op *CreateTcpRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateTcpRouteOperation) Name
func (op *CreateTcpRouteOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateTcpRouteOperation) Poll
func (op *CreateTcpRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TcpRoute, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateTcpRouteOperation) Wait
func (op *CreateTcpRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TcpRoute, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
CreateTlsRouteOperation
type CreateTlsRouteOperation struct {
// contains filtered or unexported fields
}
CreateTlsRouteOperation manages a long-running operation from CreateTlsRoute.
func (*CreateTlsRouteOperation) Done
func (op *CreateTlsRouteOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateTlsRouteOperation) Metadata
func (op *CreateTlsRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*CreateTlsRouteOperation) Name
func (op *CreateTlsRouteOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateTlsRouteOperation) Poll
func (op *CreateTlsRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TlsRoute, error)
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*CreateTlsRouteOperation) Wait
func (op *CreateTlsRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkservicespb.TlsRoute, error)
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteEndpointPolicyOperation
type DeleteEndpointPolicyOperation struct {
// contains filtered or unexported fields
}
DeleteEndpointPolicyOperation manages a long-running operation from DeleteEndpointPolicy.
func (*DeleteEndpointPolicyOperation) Done
func (op *DeleteEndpointPolicyOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteEndpointPolicyOperation) Metadata
func (op *DeleteEndpointPolicyOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteEndpointPolicyOperation) Name
func (op *DeleteEndpointPolicyOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteEndpointPolicyOperation) Poll
func (op *DeleteEndpointPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteEndpointPolicyOperation) Wait
func (op *DeleteEndpointPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteGatewayOperation
type DeleteGatewayOperation struct {
// contains filtered or unexported fields
}
DeleteGatewayOperation manages a long-running operation from DeleteGateway.
func (*DeleteGatewayOperation) Done
func (op *DeleteGatewayOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteGatewayOperation) Metadata
func (op *DeleteGatewayOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteGatewayOperation) Name
func (op *DeleteGatewayOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteGatewayOperation) Poll
func (op *DeleteGatewayOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteGatewayOperation) Wait
func (op *DeleteGatewayOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteGrpcRouteOperation
type DeleteGrpcRouteOperation struct {
// contains filtered or unexported fields
}
DeleteGrpcRouteOperation manages a long-running operation from DeleteGrpcRoute.
func (*DeleteGrpcRouteOperation) Done
func (op *DeleteGrpcRouteOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteGrpcRouteOperation) Metadata
func (op *DeleteGrpcRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteGrpcRouteOperation) Name
func (op *DeleteGrpcRouteOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteGrpcRouteOperation) Poll
func (op *DeleteGrpcRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteGrpcRouteOperation) Wait
func (op *DeleteGrpcRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteHttpRouteOperation
type DeleteHttpRouteOperation struct {
// contains filtered or unexported fields
}
DeleteHttpRouteOperation manages a long-running operation from DeleteHttpRoute.
func (*DeleteHttpRouteOperation) Done
func (op *DeleteHttpRouteOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteHttpRouteOperation) Metadata
func (op *DeleteHttpRouteOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteHttpRouteOperation) Name
func (op *DeleteHttpRouteOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteHttpRouteOperation) Poll
func (op *DeleteHttpRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteHttpRouteOperation) Wait
func (op *DeleteHttpRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteLbRouteExtensionOperation
type DeleteLbRouteExtensionOperation struct {
// contains filtered or unexported fields
}
DeleteLbRouteExtensionOperation manages a long-running operation from DeleteLbRouteExtension.
func (*DeleteLbRouteExtensionOperation) Done
func (op *DeleteLbRouteExtensionOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteLbRouteExtensionOperation) Metadata
func (op *DeleteLbRouteExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteLbRouteExtensionOperation) Name
func (op *DeleteLbRouteExtensionOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteLbRouteExtensionOperation) Poll
func (op *DeleteLbRouteExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteLbRouteExtensionOperation) Wait
func (op *DeleteLbRouteExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteLbTrafficExtensionOperation
type DeleteLbTrafficExtensionOperation struct {
// contains filtered or unexported fields
}
DeleteLbTrafficExtensionOperation manages a long-running operation from DeleteLbTrafficExtension.
func (*DeleteLbTrafficExtensionOperation) Done
func (op *DeleteLbTrafficExtensionOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteLbTrafficExtensionOperation) Metadata
func (op *DeleteLbTrafficExtensionOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteLbTrafficExtensionOperation) Name
func (op *DeleteLbTrafficExtensionOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteLbTrafficExtensionOperation) Poll
func (op *DeleteLbTrafficExtensionOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteLbTrafficExtensionOperation) Wait
func (op *DeleteLbTrafficExtensionOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteMeshOperation
type DeleteMeshOperation struct {
// contains filtered or unexported fields
}
DeleteMeshOperation manages a long-running operation from DeleteMesh.
func (*DeleteMeshOperation) Done
func (op *DeleteMeshOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteMeshOperation) Metadata
func (op *DeleteMeshOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteMeshOperation) Name
func (op *DeleteMeshOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteMeshOperation) Poll
func (op *DeleteMeshOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteMeshOperation) Wait
func (op *DeleteMeshOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteServiceBindingOperation
type DeleteServiceBindingOperation struct {
// contains filtered or unexported fields
}
DeleteServiceBindingOperation manages a long-running operation from DeleteServiceBinding.
func (*DeleteServiceBindingOperation) Done
func (op *DeleteServiceBindingOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteServiceBindingOperation) Metadata
func (op *DeleteServiceBindingOperation) Metadata() (*networkservicespb.OperationMetadata, error)
Metadata returns metadata associated with the long-running operation. Metadata itself does not contact the server, but Poll does. To get the latest metadata, call this method after a successful call to Poll. If the metadata is not available, the returned metadata and error are both nil.
func (*DeleteServiceBindingOperation) Name
func (op *DeleteServiceBindingOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteServiceBindingOperation) Poll
func (op *DeleteServiceBindingOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteServiceBindingOperation) Wait
func (op *DeleteServiceBindingOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.