Network Security API v1beta1 - Package cloud.google.com/go/networksecurity/apiv1beta1 (v0.10.2)

Package networksecurity is an auto-generated package for the Network Security API.

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

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:

Example usage

To get started with this package, create a client.

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 := networksecurity.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}
defer c.Close()

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

Using the Client

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

ctx := context.Background()
// 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 := networksecurity.NewClient(ctx)
if err != nil {
    // TODO: Handle error.
}
defer c.Close()

req := &networksecuritypb.CreateAuthorizationPolicyRequest{
    // TODO: Fill request struct fields.
    // See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#CreateAuthorizationPolicyRequest.
}
op, err := c.CreateAuthorizationPolicy(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 NewClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.

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

Functions

func DefaultAuthScopes

func DefaultAuthScopes() []string

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

AuthorizationPolicyIterator

type AuthorizationPolicyIterator struct {

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

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

AuthorizationPolicyIterator manages a stream of *networksecuritypb.AuthorizationPolicy.

func (*AuthorizationPolicyIterator) All

func (it *AuthorizationPolicyIterator) All() iter.Seq2[*networksecuritypb.AuthorizationPolicy, error]

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*AuthorizationPolicyIterator) Next

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

func (*AuthorizationPolicyIterator) PageInfo

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

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

CallOptions

type CallOptions struct {
	ListAuthorizationPolicies []gax.CallOption
	GetAuthorizationPolicy    []gax.CallOption
	CreateAuthorizationPolicy []gax.CallOption
	UpdateAuthorizationPolicy []gax.CallOption
	DeleteAuthorizationPolicy []gax.CallOption
	ListServerTlsPolicies     []gax.CallOption
	GetServerTlsPolicy        []gax.CallOption
	CreateServerTlsPolicy     []gax.CallOption
	UpdateServerTlsPolicy     []gax.CallOption
	DeleteServerTlsPolicy     []gax.CallOption
	ListClientTlsPolicies     []gax.CallOption
	GetClientTlsPolicy        []gax.CallOption
	CreateClientTlsPolicy     []gax.CallOption
	UpdateClientTlsPolicy     []gax.CallOption
	DeleteClientTlsPolicy     []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 Security API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.

Network Security API provides resources to configure authentication and authorization policies. Refer to per API resource documentation for more information.

func NewClient

func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

NewClient creates a new network security client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.

Network Security API provides resources to configure authentication and authorization policies. Refer to per API resource documentation for more information.

Example

package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"
)

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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	// TODO: Use client.
	_ = c
}

func NewRESTClient

func NewRESTClient(ctx context.Context, opts ...option.ClientOption) (*Client, error)

NewRESTClient creates a new network security rest client.

Network Security API provides resources to configure authentication and authorization policies. Refer to per API resource documentation for more information.

Example

package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"
)

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 := networksecurity.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"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"
)

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 := networksecurity.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

func (c *Client) Close() error

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) CreateAuthorizationPolicy

CreateAuthorizationPolicy creates a new AuthorizationPolicy in a given project and location.

Example

package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
)

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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.CreateAuthorizationPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#CreateAuthorizationPolicyRequest.
	}
	op, err := c.CreateAuthorizationPolicy(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) CreateAuthorizationPolicyOperation

func (c *Client) CreateAuthorizationPolicyOperation(name string) *CreateAuthorizationPolicyOperation

CreateAuthorizationPolicyOperation returns a new CreateAuthorizationPolicyOperation from a given name. The name must be that of a previously created CreateAuthorizationPolicyOperation, possibly from a different process.

func (*Client) CreateClientTlsPolicy

CreateClientTlsPolicy creates a new ClientTlsPolicy in a given project and location.

Example

package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
)

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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.CreateClientTlsPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#CreateClientTlsPolicyRequest.
	}
	op, err := c.CreateClientTlsPolicy(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) CreateClientTlsPolicyOperation

func (c *Client) CreateClientTlsPolicyOperation(name string) *CreateClientTlsPolicyOperation

CreateClientTlsPolicyOperation returns a new CreateClientTlsPolicyOperation from a given name. The name must be that of a previously created CreateClientTlsPolicyOperation, possibly from a different process.

func (*Client) CreateServerTlsPolicy

CreateServerTlsPolicy creates a new ServerTlsPolicy in a given project and location.

Example

package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
)

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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.CreateServerTlsPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#CreateServerTlsPolicyRequest.
	}
	op, err := c.CreateServerTlsPolicy(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) CreateServerTlsPolicyOperation

func (c *Client) CreateServerTlsPolicyOperation(name string) *CreateServerTlsPolicyOperation

CreateServerTlsPolicyOperation returns a new CreateServerTlsPolicyOperation from a given name. The name must be that of a previously created CreateServerTlsPolicyOperation, possibly from a different process.

func (*Client) DeleteAuthorizationPolicy

DeleteAuthorizationPolicy deletes a single AuthorizationPolicy.

Example

package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
)

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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.DeleteAuthorizationPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#DeleteAuthorizationPolicyRequest.
	}
	op, err := c.DeleteAuthorizationPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*Client) DeleteAuthorizationPolicyOperation

func (c *Client) DeleteAuthorizationPolicyOperation(name string) *DeleteAuthorizationPolicyOperation

DeleteAuthorizationPolicyOperation returns a new DeleteAuthorizationPolicyOperation from a given name. The name must be that of a previously created DeleteAuthorizationPolicyOperation, possibly from a different process.

func (*Client) DeleteClientTlsPolicy

DeleteClientTlsPolicy deletes a single ClientTlsPolicy.

Example

package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
)

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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.DeleteClientTlsPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#DeleteClientTlsPolicyRequest.
	}
	op, err := c.DeleteClientTlsPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*Client) DeleteClientTlsPolicyOperation

func (c *Client) DeleteClientTlsPolicyOperation(name string) *DeleteClientTlsPolicyOperation

DeleteClientTlsPolicyOperation returns a new DeleteClientTlsPolicyOperation from a given name. The name must be that of a previously created DeleteClientTlsPolicyOperation, 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"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"
)

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 := networksecurity.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) DeleteServerTlsPolicy

DeleteServerTlsPolicy deletes a single ServerTlsPolicy.

Example

package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
)

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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.DeleteServerTlsPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#DeleteServerTlsPolicyRequest.
	}
	op, err := c.DeleteServerTlsPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}

	err = op.Wait(ctx)
	if err != nil {
		// TODO: Handle error.
	}
}

func (*Client) DeleteServerTlsPolicyOperation

func (c *Client) DeleteServerTlsPolicyOperation(name string) *DeleteServerTlsPolicyOperation

DeleteServerTlsPolicyOperation returns a new DeleteServerTlsPolicyOperation from a given name. The name must be that of a previously created DeleteServerTlsPolicyOperation, possibly from a different process.

func (*Client) GetAuthorizationPolicy

GetAuthorizationPolicy gets details of a single AuthorizationPolicy.

Example

package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
)

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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.GetAuthorizationPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#GetAuthorizationPolicyRequest.
	}
	resp, err := c.GetAuthorizationPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) GetClientTlsPolicy

GetClientTlsPolicy gets details of a single ClientTlsPolicy.

Example

package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
)

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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.GetClientTlsPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#GetClientTlsPolicyRequest.
	}
	resp, err := c.GetClientTlsPolicy(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"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"
)

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 := networksecurity.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"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	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 := networksecurity.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) GetOperation

GetOperation is a utility method from google.longrunning.Operations.

Example

package main

import (
	"context"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"
)

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 := networksecurity.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) GetServerTlsPolicy

GetServerTlsPolicy gets details of a single ServerTlsPolicy.

Example

package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
)

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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.GetServerTlsPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#GetServerTlsPolicyRequest.
	}
	resp, err := c.GetServerTlsPolicy(ctx, req)
	if err != nil {
		// TODO: Handle error.
	}
	// TODO: Use resp.
	_ = resp
}

func (*Client) ListAuthorizationPolicies

ListAuthorizationPolicies lists AuthorizationPolicies in a given project and location.

Examples

package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
	"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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.ListAuthorizationPoliciesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#ListAuthorizationPoliciesRequest.
	}
	it := c.ListAuthorizationPolicies(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.(*networksecuritypb.ListAuthorizationPoliciesResponse)
	}
}
all
package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
)

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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.ListAuthorizationPoliciesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#ListAuthorizationPoliciesRequest.
	}
	for resp, err := range c.ListAuthorizationPolicies(ctx, req).All() {
		if err != nil {
			// TODO: Handle error.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*Client) ListClientTlsPolicies

ListClientTlsPolicies lists ClientTlsPolicies in a given project and location.

Examples

package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
	"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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.ListClientTlsPoliciesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#ListClientTlsPoliciesRequest.
	}
	it := c.ListClientTlsPolicies(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.(*networksecuritypb.ListClientTlsPoliciesResponse)
	}
}
all
package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
)

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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.ListClientTlsPoliciesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#ListClientTlsPoliciesRequest.
	}
	for resp, err := range c.ListClientTlsPolicies(ctx, req).All() {
		if err != nil {
			// TODO: Handle 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"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"
	"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 := networksecurity.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"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	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 := networksecurity.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.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*Client) ListOperations

ListOperations is a utility method from google.longrunning.Operations.

Examples

package main

import (
	"context"

	longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"
	"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 := networksecurity.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"
	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"
)

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 := networksecurity.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.
		}
		// TODO: Use resp.
		_ = resp
	}
}

func (*Client) ListServerTlsPolicies

ListServerTlsPolicies lists ServerTlsPolicies in a given project and location.

Examples

package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
	"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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.ListServerTlsPoliciesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#ListServerTlsPoliciesRequest.
	}
	it := c.ListServerTlsPolicies(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.(*networksecuritypb.ListServerTlsPoliciesResponse)
	}
}
all
package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
)

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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.ListServerTlsPoliciesRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#ListServerTlsPoliciesRequest.
	}
	for resp, err := range c.ListServerTlsPolicies(ctx, req).All() {
		if err != nil {
			// TODO: Handle 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"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"
)

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 := networksecurity.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

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"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"
)

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 := networksecurity.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) UpdateAuthorizationPolicy

UpdateAuthorizationPolicy updates the parameters of a single AuthorizationPolicy.

Example

package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
)

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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.UpdateAuthorizationPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#UpdateAuthorizationPolicyRequest.
	}
	op, err := c.UpdateAuthorizationPolicy(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) UpdateAuthorizationPolicyOperation

func (c *Client) UpdateAuthorizationPolicyOperation(name string) *UpdateAuthorizationPolicyOperation

UpdateAuthorizationPolicyOperation returns a new UpdateAuthorizationPolicyOperation from a given name. The name must be that of a previously created UpdateAuthorizationPolicyOperation, possibly from a different process.

func (*Client) UpdateClientTlsPolicy

UpdateClientTlsPolicy updates the parameters of a single ClientTlsPolicy.

Example

package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
)

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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.UpdateClientTlsPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#UpdateClientTlsPolicyRequest.
	}
	op, err := c.UpdateClientTlsPolicy(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) UpdateClientTlsPolicyOperation

func (c *Client) UpdateClientTlsPolicyOperation(name string) *UpdateClientTlsPolicyOperation

UpdateClientTlsPolicyOperation returns a new UpdateClientTlsPolicyOperation from a given name. The name must be that of a previously created UpdateClientTlsPolicyOperation, possibly from a different process.

func (*Client) UpdateServerTlsPolicy

UpdateServerTlsPolicy updates the parameters of a single ServerTlsPolicy.

Example

package main

import (
	"context"

	networksecurity "cloud.google.com/go/networksecurity/apiv1beta1"

	networksecuritypb "cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb"
)

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 := networksecurity.NewClient(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	defer c.Close()

	req := &networksecuritypb.UpdateServerTlsPolicyRequest{
		// TODO: Fill request struct fields.
		// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1beta1/networksecuritypb#UpdateServerTlsPolicyRequest.
	}
	op, err := c.UpdateServerTlsPolicy(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) UpdateServerTlsPolicyOperation

func (c *Client) UpdateServerTlsPolicyOperation(name string) *UpdateServerTlsPolicyOperation

UpdateServerTlsPolicyOperation returns a new UpdateServerTlsPolicyOperation from a given name. The name must be that of a previously created UpdateServerTlsPolicyOperation, possibly from a different process.

ClientTlsPolicyIterator

type ClientTlsPolicyIterator struct {

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

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

ClientTlsPolicyIterator manages a stream of *networksecuritypb.ClientTlsPolicy.

func (*ClientTlsPolicyIterator) All

func (it *ClientTlsPolicyIterator) All() iter.Seq2[*networksecuritypb.ClientTlsPolicy, error]

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*ClientTlsPolicyIterator) Next

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

func (*ClientTlsPolicyIterator) PageInfo

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

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

CreateAuthorizationPolicyOperation

type CreateAuthorizationPolicyOperation struct {
	// contains filtered or unexported fields
}

CreateAuthorizationPolicyOperation manages a long-running operation from CreateAuthorizationPolicy.

func (*CreateAuthorizationPolicyOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateAuthorizationPolicyOperation) Metadata

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 (*CreateAuthorizationPolicyOperation) Name

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 (*CreateAuthorizationPolicyOperation) Poll

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 (*CreateAuthorizationPolicyOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateClientTlsPolicyOperation

type CreateClientTlsPolicyOperation struct {
	// contains filtered or unexported fields
}

CreateClientTlsPolicyOperation manages a long-running operation from CreateClientTlsPolicy.

func (*CreateClientTlsPolicyOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateClientTlsPolicyOperation) Metadata

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 (*CreateClientTlsPolicyOperation) Name

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 (*CreateClientTlsPolicyOperation) Poll

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 (*CreateClientTlsPolicyOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

CreateServerTlsPolicyOperation

type CreateServerTlsPolicyOperation struct {
	// contains filtered or unexported fields
}

CreateServerTlsPolicyOperation manages a long-running operation from CreateServerTlsPolicy.

func (*CreateServerTlsPolicyOperation) Done

Done reports whether the long-running operation has completed.

func (*CreateServerTlsPolicyOperation) Metadata

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 (*CreateServerTlsPolicyOperation) Name

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 (*CreateServerTlsPolicyOperation) Poll

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 (*CreateServerTlsPolicyOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteAuthorizationPolicyOperation

type DeleteAuthorizationPolicyOperation struct {
	// contains filtered or unexported fields
}

DeleteAuthorizationPolicyOperation manages a long-running operation from DeleteAuthorizationPolicy.

func (*DeleteAuthorizationPolicyOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteAuthorizationPolicyOperation) Metadata

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 (*DeleteAuthorizationPolicyOperation) Name

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 (*DeleteAuthorizationPolicyOperation) Poll

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 (*DeleteAuthorizationPolicyOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteClientTlsPolicyOperation

type DeleteClientTlsPolicyOperation struct {
	// contains filtered or unexported fields
}

DeleteClientTlsPolicyOperation manages a long-running operation from DeleteClientTlsPolicy.

func (*DeleteClientTlsPolicyOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteClientTlsPolicyOperation) Metadata

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 (*DeleteClientTlsPolicyOperation) Name

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 (*DeleteClientTlsPolicyOperation) Poll

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 (*DeleteClientTlsPolicyOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

DeleteServerTlsPolicyOperation

type DeleteServerTlsPolicyOperation struct {
	// contains filtered or unexported fields
}

DeleteServerTlsPolicyOperation manages a long-running operation from DeleteServerTlsPolicy.

func (*DeleteServerTlsPolicyOperation) Done

Done reports whether the long-running operation has completed.

func (*DeleteServerTlsPolicyOperation) Metadata

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 (*DeleteServerTlsPolicyOperation) Name

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 (*DeleteServerTlsPolicyOperation) Poll

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 (*DeleteServerTlsPolicyOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

LocationIterator

type LocationIterator struct {

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

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

LocationIterator manages a stream of *locationpb.Location.

func (*LocationIterator) All

func (it *LocationIterator) All() iter.Seq2[*locationpb.Location, error]

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*LocationIterator) Next

func (it *LocationIterator) Next() (*locationpb.Location, error)

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

func (*LocationIterator) PageInfo

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

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

OperationIterator

type OperationIterator struct {

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

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

OperationIterator manages a stream of *longrunningpb.Operation.

func (*OperationIterator) All

func (it *OperationIterator) All() iter.Seq2[*longrunningpb.Operation, error]

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*OperationIterator) Next

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

func (*OperationIterator) PageInfo

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

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

ServerTlsPolicyIterator

type ServerTlsPolicyIterator struct {

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

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

ServerTlsPolicyIterator manages a stream of *networksecuritypb.ServerTlsPolicy.

func (*ServerTlsPolicyIterator) All

func (it *ServerTlsPolicyIterator) All() iter.Seq2[*networksecuritypb.ServerTlsPolicy, error]

All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.

func (*ServerTlsPolicyIterator) Next

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

func (*ServerTlsPolicyIterator) PageInfo

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

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

UpdateAuthorizationPolicyOperation

type UpdateAuthorizationPolicyOperation struct {
	// contains filtered or unexported fields
}

UpdateAuthorizationPolicyOperation manages a long-running operation from UpdateAuthorizationPolicy.

func (*UpdateAuthorizationPolicyOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateAuthorizationPolicyOperation) Metadata

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 (*UpdateAuthorizationPolicyOperation) Name

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 (*UpdateAuthorizationPolicyOperation) Poll

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 (*UpdateAuthorizationPolicyOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateClientTlsPolicyOperation

type UpdateClientTlsPolicyOperation struct {
	// contains filtered or unexported fields
}

UpdateClientTlsPolicyOperation manages a long-running operation from UpdateClientTlsPolicy.

func (*UpdateClientTlsPolicyOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateClientTlsPolicyOperation) Metadata

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 (*UpdateClientTlsPolicyOperation) Name

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 (*UpdateClientTlsPolicyOperation) Poll

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 (*UpdateClientTlsPolicyOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.

UpdateServerTlsPolicyOperation

type UpdateServerTlsPolicyOperation struct {
	// contains filtered or unexported fields
}

UpdateServerTlsPolicyOperation manages a long-running operation from UpdateServerTlsPolicy.

func (*UpdateServerTlsPolicyOperation) Done

Done reports whether the long-running operation has completed.

func (*UpdateServerTlsPolicyOperation) Metadata

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 (*UpdateServerTlsPolicyOperation) Name

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 (*UpdateServerTlsPolicyOperation) Poll

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 (*UpdateServerTlsPolicyOperation) Wait

Wait blocks until the long-running operation is completed, returning the response and any errors encountered.

See documentation of Poll for error-handling information.