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:
- 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/networksecurity/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 := networksecurity.NewAddressGroupClient(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 := &networksecuritypb.AddAddressGroupItemsRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#AddAddressGroupItemsRequest. } op, err := c.AddAddressGroupItems(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 NewAddressGroupClient 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() []stringDefaultAuthScopes reports the default set of authentication scopes to use with this package.
AddAddressGroupItemsOperation
type AddAddressGroupItemsOperation struct {
// contains filtered or unexported fields
}AddAddressGroupItemsOperation manages a long-running operation from AddAddressGroupItems.
func (*AddAddressGroupItemsOperation) Done
func (op *AddAddressGroupItemsOperation) Done() boolDone reports whether the long-running operation has completed.
func (*AddAddressGroupItemsOperation) Metadata
func (op *AddAddressGroupItemsOperation) Metadata() (*networksecuritypb.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 (*AddAddressGroupItemsOperation) Name
func (op *AddAddressGroupItemsOperation) Name() stringName 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 (*AddAddressGroupItemsOperation) Poll
func (op *AddAddressGroupItemsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AddressGroup, 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 (*AddAddressGroupItemsOperation) Wait
func (op *AddAddressGroupItemsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AddressGroup, 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.
AddressGroupCallOptions
type AddressGroupCallOptions struct {
ListAddressGroups []gax.CallOption
GetAddressGroup []gax.CallOption
CreateAddressGroup []gax.CallOption
UpdateAddressGroup []gax.CallOption
AddAddressGroupItems []gax.CallOption
RemoveAddressGroupItems []gax.CallOption
CloneAddressGroupItems []gax.CallOption
DeleteAddressGroup []gax.CallOption
ListAddressGroupReferences []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
}AddressGroupCallOptions contains the retry settings for each method of AddressGroupClient.
AddressGroupClient
type AddressGroupClient struct {
// The call options for this service.
CallOptions *AddressGroupCallOptions
// 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
}AddressGroupClient 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.
AddressGroup is a resource that manages a collection of IP or Domain Names, it can be used in Firewall Policy to represent allow or deny traffic from all the IP or Domain Names from the Address Group.
func NewAddressGroupClient
func NewAddressGroupClient(ctx context.Context, opts ...option.ClientOption) (*AddressGroupClient, error)NewAddressGroupClient creates a new address group service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
AddressGroup is a resource that manages a collection of IP or Domain Names, it can be used in Firewall Policy to represent allow or deny traffic from all the IP or Domain Names from the Address Group.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewAddressGroupRESTClient
func NewAddressGroupRESTClient(ctx context.Context, opts ...option.ClientOption) (*AddressGroupClient, error)NewAddressGroupRESTClient creates a new address group service rest client.
AddressGroup is a resource that manages a collection of IP or Domain Names, it can be used in Firewall Policy to represent allow or deny traffic from all the IP or Domain Names from the Address Group.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewAddressGroupRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*AddressGroupClient) AddAddressGroupItems
func (c *AddressGroupClient) AddAddressGroupItems(ctx context.Context, req *networksecuritypb.AddAddressGroupItemsRequest, opts ...gax.CallOption) (*AddAddressGroupItemsOperation, error)AddAddressGroupItems adds items to an address group.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.AddAddressGroupItemsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#AddAddressGroupItemsRequest.
}
op, err := c.AddAddressGroupItems(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AddressGroupClient) AddAddressGroupItemsOperation
func (c *AddressGroupClient) AddAddressGroupItemsOperation(name string) *AddAddressGroupItemsOperationAddAddressGroupItemsOperation returns a new AddAddressGroupItemsOperation from a given name. The name must be that of a previously created AddAddressGroupItemsOperation, possibly from a different process.
func (*AddressGroupClient) CancelOperation
func (c *AddressGroupClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation 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/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 := networksecurity.NewAddressGroupClient(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 (*AddressGroupClient) CloneAddressGroupItems
func (c *AddressGroupClient) CloneAddressGroupItems(ctx context.Context, req *networksecuritypb.CloneAddressGroupItemsRequest, opts ...gax.CallOption) (*CloneAddressGroupItemsOperation, error)CloneAddressGroupItems clones items from one address group to another.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CloneAddressGroupItemsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CloneAddressGroupItemsRequest.
}
op, err := c.CloneAddressGroupItems(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AddressGroupClient) CloneAddressGroupItemsOperation
func (c *AddressGroupClient) CloneAddressGroupItemsOperation(name string) *CloneAddressGroupItemsOperationCloneAddressGroupItemsOperation returns a new CloneAddressGroupItemsOperation from a given name. The name must be that of a previously created CloneAddressGroupItemsOperation, possibly from a different process.
func (*AddressGroupClient) Close
func (c *AddressGroupClient) Close() errorClose closes the connection to the API service. Always call Close() when the client is no longer required.
func (*AddressGroupClient) Connection (deprecated)
func (c *AddressGroupClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*AddressGroupClient) CreateAddressGroup
func (c *AddressGroupClient) CreateAddressGroup(ctx context.Context, req *networksecuritypb.CreateAddressGroupRequest, opts ...gax.CallOption) (*CreateAddressGroupOperation, error)CreateAddressGroup creates a new address group in a given project and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateAddressGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateAddressGroupRequest.
}
op, err := c.CreateAddressGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AddressGroupClient) CreateAddressGroupOperation
func (c *AddressGroupClient) CreateAddressGroupOperation(name string) *CreateAddressGroupOperationCreateAddressGroupOperation returns a new CreateAddressGroupOperation from a given name. The name must be that of a previously created CreateAddressGroupOperation, possibly from a different process.
func (*AddressGroupClient) DeleteAddressGroup
func (c *AddressGroupClient) DeleteAddressGroup(ctx context.Context, req *networksecuritypb.DeleteAddressGroupRequest, opts ...gax.CallOption) (*DeleteAddressGroupOperation, error)DeleteAddressGroup deletes a single address group.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteAddressGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteAddressGroupRequest.
}
op, err := c.DeleteAddressGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*AddressGroupClient) DeleteAddressGroupOperation
func (c *AddressGroupClient) DeleteAddressGroupOperation(name string) *DeleteAddressGroupOperationDeleteAddressGroupOperation returns a new DeleteAddressGroupOperation from a given name. The name must be that of a previously created DeleteAddressGroupOperation, possibly from a different process.
func (*AddressGroupClient) DeleteOperation
func (c *AddressGroupClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation 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/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 := networksecurity.NewAddressGroupClient(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 (*AddressGroupClient) GetAddressGroup
func (c *AddressGroupClient) GetAddressGroup(ctx context.Context, req *networksecuritypb.GetAddressGroupRequest, opts ...gax.CallOption) (*networksecuritypb.AddressGroup, error)GetAddressGroup gets details of a single address group.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetAddressGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetAddressGroupRequest.
}
resp, err := c.GetAddressGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AddressGroupClient) GetIamPolicy
func (c *AddressGroupClient) 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/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 := networksecurity.NewAddressGroupClient(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 (*AddressGroupClient) GetLocation
func (c *AddressGroupClient) 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/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 := networksecurity.NewAddressGroupClient(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 (*AddressGroupClient) GetOperation
func (c *AddressGroupClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewAddressGroupClient(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 (*AddressGroupClient) ListAddressGroupReferences
func (c *AddressGroupClient) ListAddressGroupReferences(ctx context.Context, req *networksecuritypb.ListAddressGroupReferencesRequest, opts ...gax.CallOption) *ListAddressGroupReferencesResponse_AddressGroupReferenceIteratorListAddressGroupReferences lists references of an address group.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListAddressGroupReferencesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListAddressGroupReferencesRequest.
}
it := c.ListAddressGroupReferences(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.ListAddressGroupReferencesResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListAddressGroupReferencesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListAddressGroupReferencesRequest.
}
for resp, err := range c.ListAddressGroupReferences(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*AddressGroupClient) ListAddressGroups
func (c *AddressGroupClient) ListAddressGroups(ctx context.Context, req *networksecuritypb.ListAddressGroupsRequest, opts ...gax.CallOption) *AddressGroupIteratorListAddressGroups lists address groups in a given project and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListAddressGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListAddressGroupsRequest.
}
it := c.ListAddressGroups(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.ListAddressGroupsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListAddressGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListAddressGroupsRequest.
}
for resp, err := range c.ListAddressGroups(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*AddressGroupClient) ListLocations
func (c *AddressGroupClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIteratorListLocations lists information about the supported locations for this service.
This method lists locations based on the resource scope provided in the [ListLocationsRequest.name (at http://ListLocationsRequest.name)][google.cloud.location.ListLocationsRequest.name (at http://google.cloud.location.ListLocationsRequest.name)] field: * Global locations: If name is empty, the method lists the public locations available to all projects. * Project-specific locations: If name follows the format projects/{project}, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project.
For gRPC and client library implementations, the resource name is passed as the name field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewAddressGroupClient(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/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 := networksecurity.NewAddressGroupClient(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 (*AddressGroupClient) ListOperations
func (c *AddressGroupClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations 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/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 := networksecurity.NewAddressGroupClient(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/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 := networksecurity.NewAddressGroupClient(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 (*AddressGroupClient) RemoveAddressGroupItems
func (c *AddressGroupClient) RemoveAddressGroupItems(ctx context.Context, req *networksecuritypb.RemoveAddressGroupItemsRequest, opts ...gax.CallOption) (*RemoveAddressGroupItemsOperation, error)RemoveAddressGroupItems removes items from an address group.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.RemoveAddressGroupItemsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#RemoveAddressGroupItemsRequest.
}
op, err := c.RemoveAddressGroupItems(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AddressGroupClient) RemoveAddressGroupItemsOperation
func (c *AddressGroupClient) RemoveAddressGroupItemsOperation(name string) *RemoveAddressGroupItemsOperationRemoveAddressGroupItemsOperation returns a new RemoveAddressGroupItemsOperation from a given name. The name must be that of a previously created RemoveAddressGroupItemsOperation, possibly from a different process.
func (*AddressGroupClient) SetIamPolicy
func (c *AddressGroupClient) 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/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 := networksecurity.NewAddressGroupClient(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 (*AddressGroupClient) TestIamPermissions
func (c *AddressGroupClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewAddressGroupClient(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 (*AddressGroupClient) UpdateAddressGroup
func (c *AddressGroupClient) UpdateAddressGroup(ctx context.Context, req *networksecuritypb.UpdateAddressGroupRequest, opts ...gax.CallOption) (*UpdateAddressGroupOperation, error)UpdateAddressGroup updates the parameters of a single address group.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateAddressGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateAddressGroupRequest.
}
op, err := c.UpdateAddressGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*AddressGroupClient) UpdateAddressGroupOperation
func (c *AddressGroupClient) UpdateAddressGroupOperation(name string) *UpdateAddressGroupOperationUpdateAddressGroupOperation returns a new UpdateAddressGroupOperation from a given name. The name must be that of a previously created UpdateAddressGroupOperation, possibly from a different process.
AddressGroupIterator
type AddressGroupIterator 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.AddressGroup, nextPageToken string, err error)
// contains filtered or unexported fields
}AddressGroupIterator manages a stream of *networksecuritypb.AddressGroup.
func (*AddressGroupIterator) All
func (it *AddressGroupIterator) All() iter.Seq2[*networksecuritypb.AddressGroup, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*AddressGroupIterator) Next
func (it *AddressGroupIterator) Next() (*networksecuritypb.AddressGroup, 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 (*AddressGroupIterator) PageInfo
func (it *AddressGroupIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
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
func (it *AuthorizationPolicyIterator) Next() (*networksecuritypb.AuthorizationPolicy, 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 (*AuthorizationPolicyIterator) PageInfo
func (it *AuthorizationPolicyIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
AuthzPolicyIterator
type AuthzPolicyIterator 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.AuthzPolicy, nextPageToken string, err error)
// contains filtered or unexported fields
}AuthzPolicyIterator manages a stream of *networksecuritypb.AuthzPolicy.
func (*AuthzPolicyIterator) All
func (it *AuthzPolicyIterator) All() iter.Seq2[*networksecuritypb.AuthzPolicy, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*AuthzPolicyIterator) Next
func (it *AuthzPolicyIterator) Next() (*networksecuritypb.AuthzPolicy, 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 (*AuthzPolicyIterator) PageInfo
func (it *AuthzPolicyIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
BackendAuthenticationConfigIterator
type BackendAuthenticationConfigIterator 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.BackendAuthenticationConfig, nextPageToken string, err error)
// contains filtered or unexported fields
}BackendAuthenticationConfigIterator manages a stream of *networksecuritypb.BackendAuthenticationConfig.
func (*BackendAuthenticationConfigIterator) All
func (it *BackendAuthenticationConfigIterator) All() iter.Seq2[*networksecuritypb.BackendAuthenticationConfig, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*BackendAuthenticationConfigIterator) Next
func (it *BackendAuthenticationConfigIterator) Next() (*networksecuritypb.BackendAuthenticationConfig, 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 (*BackendAuthenticationConfigIterator) PageInfo
func (it *BackendAuthenticationConfigIterator) PageInfo() *iterator.PageInfoPageInfo 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
ListBackendAuthenticationConfigs []gax.CallOption
GetBackendAuthenticationConfig []gax.CallOption
CreateBackendAuthenticationConfig []gax.CallOption
UpdateBackendAuthenticationConfig []gax.CallOption
DeleteBackendAuthenticationConfig []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
ListGatewaySecurityPolicies []gax.CallOption
GetGatewaySecurityPolicy []gax.CallOption
CreateGatewaySecurityPolicy []gax.CallOption
UpdateGatewaySecurityPolicy []gax.CallOption
DeleteGatewaySecurityPolicy []gax.CallOption
ListGatewaySecurityPolicyRules []gax.CallOption
GetGatewaySecurityPolicyRule []gax.CallOption
CreateGatewaySecurityPolicyRule []gax.CallOption
UpdateGatewaySecurityPolicyRule []gax.CallOption
DeleteGatewaySecurityPolicyRule []gax.CallOption
ListUrlLists []gax.CallOption
GetUrlList []gax.CallOption
CreateUrlList []gax.CallOption
UpdateUrlList []gax.CallOption
DeleteUrlList []gax.CallOption
ListTlsInspectionPolicies []gax.CallOption
GetTlsInspectionPolicy []gax.CallOption
CreateTlsInspectionPolicy []gax.CallOption
UpdateTlsInspectionPolicy []gax.CallOption
DeleteTlsInspectionPolicy []gax.CallOption
ListAuthzPolicies []gax.CallOption
GetAuthzPolicy []gax.CallOption
CreateAuthzPolicy []gax.CallOption
UpdateAuthzPolicy []gax.CallOption
DeleteAuthzPolicy []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
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/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 := networksecurity.NewClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewRESTClient
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/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 := 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) errorCancelOperation 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/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 := 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
Close closes the connection to the API service. Always call Close() when the client is no longer required.
func (*Client) Connection (deprecated)
func (c *Client) Connection() *grpc.ClientConnConnection 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
func (c *Client) CreateAuthorizationPolicy(ctx context.Context, req *networksecuritypb.CreateAuthorizationPolicyRequest, opts ...gax.CallOption) (*CreateAuthorizationPolicyOperation, error)CreateAuthorizationPolicy creates a new AuthorizationPolicy in a given project and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/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) *CreateAuthorizationPolicyOperationCreateAuthorizationPolicyOperation 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) CreateAuthzPolicy
func (c *Client) CreateAuthzPolicy(ctx context.Context, req *networksecuritypb.CreateAuthzPolicyRequest, opts ...gax.CallOption) (*CreateAuthzPolicyOperation, error)CreateAuthzPolicy creates a new AuthzPolicy in a given project and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.CreateAuthzPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateAuthzPolicyRequest.
}
op, err := c.CreateAuthzPolicy(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) CreateAuthzPolicyOperation
func (c *Client) CreateAuthzPolicyOperation(name string) *CreateAuthzPolicyOperationCreateAuthzPolicyOperation returns a new CreateAuthzPolicyOperation from a given name. The name must be that of a previously created CreateAuthzPolicyOperation, possibly from a different process.
func (*Client) CreateBackendAuthenticationConfig
func (c *Client) CreateBackendAuthenticationConfig(ctx context.Context, req *networksecuritypb.CreateBackendAuthenticationConfigRequest, opts ...gax.CallOption) (*CreateBackendAuthenticationConfigOperation, error)CreateBackendAuthenticationConfig creates a new BackendAuthenticationConfig in a given project and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.CreateBackendAuthenticationConfigRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateBackendAuthenticationConfigRequest.
}
op, err := c.CreateBackendAuthenticationConfig(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) CreateBackendAuthenticationConfigOperation
func (c *Client) CreateBackendAuthenticationConfigOperation(name string) *CreateBackendAuthenticationConfigOperationCreateBackendAuthenticationConfigOperation returns a new CreateBackendAuthenticationConfigOperation from a given name. The name must be that of a previously created CreateBackendAuthenticationConfigOperation, possibly from a different process.
func (*Client) CreateClientTlsPolicy
func (c *Client) CreateClientTlsPolicy(ctx context.Context, req *networksecuritypb.CreateClientTlsPolicyRequest, opts ...gax.CallOption) (*CreateClientTlsPolicyOperation, error)CreateClientTlsPolicy creates a new ClientTlsPolicy in a given project and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/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) *CreateClientTlsPolicyOperationCreateClientTlsPolicyOperation 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) CreateGatewaySecurityPolicy
func (c *Client) CreateGatewaySecurityPolicy(ctx context.Context, req *networksecuritypb.CreateGatewaySecurityPolicyRequest, opts ...gax.CallOption) (*CreateGatewaySecurityPolicyOperation, error)CreateGatewaySecurityPolicy creates a new GatewaySecurityPolicy in a given project and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.CreateGatewaySecurityPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateGatewaySecurityPolicyRequest.
}
op, err := c.CreateGatewaySecurityPolicy(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) CreateGatewaySecurityPolicyOperation
func (c *Client) CreateGatewaySecurityPolicyOperation(name string) *CreateGatewaySecurityPolicyOperationCreateGatewaySecurityPolicyOperation returns a new CreateGatewaySecurityPolicyOperation from a given name. The name must be that of a previously created CreateGatewaySecurityPolicyOperation, possibly from a different process.
func (*Client) CreateGatewaySecurityPolicyRule
func (c *Client) CreateGatewaySecurityPolicyRule(ctx context.Context, req *networksecuritypb.CreateGatewaySecurityPolicyRuleRequest, opts ...gax.CallOption) (*CreateGatewaySecurityPolicyRuleOperation, error)CreateGatewaySecurityPolicyRule creates a new GatewaySecurityPolicy in a given project and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.CreateGatewaySecurityPolicyRuleRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateGatewaySecurityPolicyRuleRequest.
}
op, err := c.CreateGatewaySecurityPolicyRule(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) CreateGatewaySecurityPolicyRuleOperation
func (c *Client) CreateGatewaySecurityPolicyRuleOperation(name string) *CreateGatewaySecurityPolicyRuleOperationCreateGatewaySecurityPolicyRuleOperation returns a new CreateGatewaySecurityPolicyRuleOperation from a given name. The name must be that of a previously created CreateGatewaySecurityPolicyRuleOperation, possibly from a different process.
func (*Client) CreateServerTlsPolicy
func (c *Client) CreateServerTlsPolicy(ctx context.Context, req *networksecuritypb.CreateServerTlsPolicyRequest, opts ...gax.CallOption) (*CreateServerTlsPolicyOperation, error)CreateServerTlsPolicy creates a new ServerTlsPolicy in a given project and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/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) *CreateServerTlsPolicyOperationCreateServerTlsPolicyOperation 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) CreateTlsInspectionPolicy
func (c *Client) CreateTlsInspectionPolicy(ctx context.Context, req *networksecuritypb.CreateTlsInspectionPolicyRequest, opts ...gax.CallOption) (*CreateTlsInspectionPolicyOperation, error)CreateTlsInspectionPolicy creates a new TlsInspectionPolicy in a given project and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.CreateTlsInspectionPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateTlsInspectionPolicyRequest.
}
op, err := c.CreateTlsInspectionPolicy(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) CreateTlsInspectionPolicyOperation
func (c *Client) CreateTlsInspectionPolicyOperation(name string) *CreateTlsInspectionPolicyOperationCreateTlsInspectionPolicyOperation returns a new CreateTlsInspectionPolicyOperation from a given name. The name must be that of a previously created CreateTlsInspectionPolicyOperation, possibly from a different process.
func (*Client) CreateUrlList
func (c *Client) CreateUrlList(ctx context.Context, req *networksecuritypb.CreateUrlListRequest, opts ...gax.CallOption) (*CreateUrlListOperation, error)CreateUrlList creates a new UrlList in a given project and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.CreateUrlListRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateUrlListRequest.
}
op, err := c.CreateUrlList(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) CreateUrlListOperation
func (c *Client) CreateUrlListOperation(name string) *CreateUrlListOperationCreateUrlListOperation returns a new CreateUrlListOperation from a given name. The name must be that of a previously created CreateUrlListOperation, possibly from a different process.
func (*Client) DeleteAuthorizationPolicy
func (c *Client) DeleteAuthorizationPolicy(ctx context.Context, req *networksecuritypb.DeleteAuthorizationPolicyRequest, opts ...gax.CallOption) (*DeleteAuthorizationPolicyOperation, error)DeleteAuthorizationPolicy deletes a single AuthorizationPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/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) *DeleteAuthorizationPolicyOperationDeleteAuthorizationPolicyOperation 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) DeleteAuthzPolicy
func (c *Client) DeleteAuthzPolicy(ctx context.Context, req *networksecuritypb.DeleteAuthzPolicyRequest, opts ...gax.CallOption) (*DeleteAuthzPolicyOperation, error)DeleteAuthzPolicy deletes a single AuthzPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.DeleteAuthzPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteAuthzPolicyRequest.
}
op, err := c.DeleteAuthzPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteAuthzPolicyOperation
func (c *Client) DeleteAuthzPolicyOperation(name string) *DeleteAuthzPolicyOperationDeleteAuthzPolicyOperation returns a new DeleteAuthzPolicyOperation from a given name. The name must be that of a previously created DeleteAuthzPolicyOperation, possibly from a different process.
func (*Client) DeleteBackendAuthenticationConfig
func (c *Client) DeleteBackendAuthenticationConfig(ctx context.Context, req *networksecuritypb.DeleteBackendAuthenticationConfigRequest, opts ...gax.CallOption) (*DeleteBackendAuthenticationConfigOperation, error)DeleteBackendAuthenticationConfig deletes a single BackendAuthenticationConfig to BackendAuthenticationConfig.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.DeleteBackendAuthenticationConfigRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteBackendAuthenticationConfigRequest.
}
op, err := c.DeleteBackendAuthenticationConfig(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteBackendAuthenticationConfigOperation
func (c *Client) DeleteBackendAuthenticationConfigOperation(name string) *DeleteBackendAuthenticationConfigOperationDeleteBackendAuthenticationConfigOperation returns a new DeleteBackendAuthenticationConfigOperation from a given name. The name must be that of a previously created DeleteBackendAuthenticationConfigOperation, possibly from a different process.
func (*Client) DeleteClientTlsPolicy
func (c *Client) DeleteClientTlsPolicy(ctx context.Context, req *networksecuritypb.DeleteClientTlsPolicyRequest, opts ...gax.CallOption) (*DeleteClientTlsPolicyOperation, error)DeleteClientTlsPolicy deletes a single ClientTlsPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/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) *DeleteClientTlsPolicyOperationDeleteClientTlsPolicyOperation 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) DeleteGatewaySecurityPolicy
func (c *Client) DeleteGatewaySecurityPolicy(ctx context.Context, req *networksecuritypb.DeleteGatewaySecurityPolicyRequest, opts ...gax.CallOption) (*DeleteGatewaySecurityPolicyOperation, error)DeleteGatewaySecurityPolicy deletes a single GatewaySecurityPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.DeleteGatewaySecurityPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteGatewaySecurityPolicyRequest.
}
op, err := c.DeleteGatewaySecurityPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteGatewaySecurityPolicyOperation
func (c *Client) DeleteGatewaySecurityPolicyOperation(name string) *DeleteGatewaySecurityPolicyOperationDeleteGatewaySecurityPolicyOperation returns a new DeleteGatewaySecurityPolicyOperation from a given name. The name must be that of a previously created DeleteGatewaySecurityPolicyOperation, possibly from a different process.
func (*Client) DeleteGatewaySecurityPolicyRule
func (c *Client) DeleteGatewaySecurityPolicyRule(ctx context.Context, req *networksecuritypb.DeleteGatewaySecurityPolicyRuleRequest, opts ...gax.CallOption) (*DeleteGatewaySecurityPolicyRuleOperation, error)DeleteGatewaySecurityPolicyRule deletes a single GatewaySecurityPolicyRule.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.DeleteGatewaySecurityPolicyRuleRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteGatewaySecurityPolicyRuleRequest.
}
op, err := c.DeleteGatewaySecurityPolicyRule(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteGatewaySecurityPolicyRuleOperation
func (c *Client) DeleteGatewaySecurityPolicyRuleOperation(name string) *DeleteGatewaySecurityPolicyRuleOperationDeleteGatewaySecurityPolicyRuleOperation returns a new DeleteGatewaySecurityPolicyRuleOperation from a given name. The name must be that of a previously created DeleteGatewaySecurityPolicyRuleOperation, possibly from a different process.
func (*Client) DeleteOperation
func (c *Client) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation 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/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 := 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
func (c *Client) DeleteServerTlsPolicy(ctx context.Context, req *networksecuritypb.DeleteServerTlsPolicyRequest, opts ...gax.CallOption) (*DeleteServerTlsPolicyOperation, error)DeleteServerTlsPolicy deletes a single ServerTlsPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/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) *DeleteServerTlsPolicyOperationDeleteServerTlsPolicyOperation 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) DeleteTlsInspectionPolicy
func (c *Client) DeleteTlsInspectionPolicy(ctx context.Context, req *networksecuritypb.DeleteTlsInspectionPolicyRequest, opts ...gax.CallOption) (*DeleteTlsInspectionPolicyOperation, error)DeleteTlsInspectionPolicy deletes a single TlsInspectionPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.DeleteTlsInspectionPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteTlsInspectionPolicyRequest.
}
op, err := c.DeleteTlsInspectionPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteTlsInspectionPolicyOperation
func (c *Client) DeleteTlsInspectionPolicyOperation(name string) *DeleteTlsInspectionPolicyOperationDeleteTlsInspectionPolicyOperation returns a new DeleteTlsInspectionPolicyOperation from a given name. The name must be that of a previously created DeleteTlsInspectionPolicyOperation, possibly from a different process.
func (*Client) DeleteUrlList
func (c *Client) DeleteUrlList(ctx context.Context, req *networksecuritypb.DeleteUrlListRequest, opts ...gax.CallOption) (*DeleteUrlListOperation, error)DeleteUrlList deletes a single UrlList.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.DeleteUrlListRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteUrlListRequest.
}
op, err := c.DeleteUrlList(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*Client) DeleteUrlListOperation
func (c *Client) DeleteUrlListOperation(name string) *DeleteUrlListOperationDeleteUrlListOperation returns a new DeleteUrlListOperation from a given name. The name must be that of a previously created DeleteUrlListOperation, possibly from a different process.
func (*Client) GetAuthorizationPolicy
func (c *Client) GetAuthorizationPolicy(ctx context.Context, req *networksecuritypb.GetAuthorizationPolicyRequest, opts ...gax.CallOption) (*networksecuritypb.AuthorizationPolicy, error)GetAuthorizationPolicy gets details of a single AuthorizationPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/networksecuritypb#GetAuthorizationPolicyRequest.
}
resp, err := c.GetAuthorizationPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetAuthzPolicy
func (c *Client) GetAuthzPolicy(ctx context.Context, req *networksecuritypb.GetAuthzPolicyRequest, opts ...gax.CallOption) (*networksecuritypb.AuthzPolicy, error)GetAuthzPolicy gets details of a single AuthzPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.GetAuthzPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetAuthzPolicyRequest.
}
resp, err := c.GetAuthzPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetBackendAuthenticationConfig
func (c *Client) GetBackendAuthenticationConfig(ctx context.Context, req *networksecuritypb.GetBackendAuthenticationConfigRequest, opts ...gax.CallOption) (*networksecuritypb.BackendAuthenticationConfig, error)GetBackendAuthenticationConfig gets details of a single BackendAuthenticationConfig to BackendAuthenticationConfig.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.GetBackendAuthenticationConfigRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetBackendAuthenticationConfigRequest.
}
resp, err := c.GetBackendAuthenticationConfig(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetClientTlsPolicy
func (c *Client) GetClientTlsPolicy(ctx context.Context, req *networksecuritypb.GetClientTlsPolicyRequest, opts ...gax.CallOption) (*networksecuritypb.ClientTlsPolicy, error)GetClientTlsPolicy gets details of a single ClientTlsPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/networksecuritypb#GetClientTlsPolicyRequest.
}
resp, err := c.GetClientTlsPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetGatewaySecurityPolicy
func (c *Client) GetGatewaySecurityPolicy(ctx context.Context, req *networksecuritypb.GetGatewaySecurityPolicyRequest, opts ...gax.CallOption) (*networksecuritypb.GatewaySecurityPolicy, error)GetGatewaySecurityPolicy gets details of a single GatewaySecurityPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.GetGatewaySecurityPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetGatewaySecurityPolicyRequest.
}
resp, err := c.GetGatewaySecurityPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetGatewaySecurityPolicyRule
func (c *Client) GetGatewaySecurityPolicyRule(ctx context.Context, req *networksecuritypb.GetGatewaySecurityPolicyRuleRequest, opts ...gax.CallOption) (*networksecuritypb.GatewaySecurityPolicyRule, error)GetGatewaySecurityPolicyRule gets details of a single GatewaySecurityPolicyRule.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.GetGatewaySecurityPolicyRuleRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetGatewaySecurityPolicyRuleRequest.
}
resp, err := c.GetGatewaySecurityPolicyRule(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/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 := 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/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 := 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
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"
networksecurity "cloud.google.com/go/networksecurity/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 := 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
func (c *Client) GetServerTlsPolicy(ctx context.Context, req *networksecuritypb.GetServerTlsPolicyRequest, opts ...gax.CallOption) (*networksecuritypb.ServerTlsPolicy, error)GetServerTlsPolicy gets details of a single ServerTlsPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/networksecuritypb#GetServerTlsPolicyRequest.
}
resp, err := c.GetServerTlsPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetTlsInspectionPolicy
func (c *Client) GetTlsInspectionPolicy(ctx context.Context, req *networksecuritypb.GetTlsInspectionPolicyRequest, opts ...gax.CallOption) (*networksecuritypb.TlsInspectionPolicy, error)GetTlsInspectionPolicy gets details of a single TlsInspectionPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.GetTlsInspectionPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetTlsInspectionPolicyRequest.
}
resp, err := c.GetTlsInspectionPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) GetUrlList
func (c *Client) GetUrlList(ctx context.Context, req *networksecuritypb.GetUrlListRequest, opts ...gax.CallOption) (*networksecuritypb.UrlList, error)GetUrlList gets details of a single UrlList.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.GetUrlListRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetUrlListRequest.
}
resp, err := c.GetUrlList(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*Client) ListAuthorizationPolicies
func (c *Client) ListAuthorizationPolicies(ctx context.Context, req *networksecuritypb.ListAuthorizationPoliciesRequest, opts ...gax.CallOption) *AuthorizationPolicyIteratorListAuthorizationPolicies lists AuthorizationPolicies in a given project and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/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/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/networksecuritypb#ListAuthorizationPoliciesRequest.
}
for resp, err := range c.ListAuthorizationPolicies(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) ListAuthzPolicies
func (c *Client) ListAuthzPolicies(ctx context.Context, req *networksecuritypb.ListAuthzPoliciesRequest, opts ...gax.CallOption) *AuthzPolicyIteratorListAuthzPolicies lists AuthzPolicies in a given project and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.ListAuthzPoliciesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListAuthzPoliciesRequest.
}
it := c.ListAuthzPolicies(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.ListAuthzPoliciesResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.ListAuthzPoliciesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListAuthzPoliciesRequest.
}
for resp, err := range c.ListAuthzPolicies(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) ListBackendAuthenticationConfigs
func (c *Client) ListBackendAuthenticationConfigs(ctx context.Context, req *networksecuritypb.ListBackendAuthenticationConfigsRequest, opts ...gax.CallOption) *BackendAuthenticationConfigIteratorListBackendAuthenticationConfigs lists BackendAuthenticationConfigs in a given project and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.ListBackendAuthenticationConfigsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListBackendAuthenticationConfigsRequest.
}
it := c.ListBackendAuthenticationConfigs(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.ListBackendAuthenticationConfigsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.ListBackendAuthenticationConfigsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListBackendAuthenticationConfigsRequest.
}
for resp, err := range c.ListBackendAuthenticationConfigs(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) ListClientTlsPolicies
func (c *Client) ListClientTlsPolicies(ctx context.Context, req *networksecuritypb.ListClientTlsPoliciesRequest, opts ...gax.CallOption) *ClientTlsPolicyIteratorListClientTlsPolicies lists ClientTlsPolicies in a given project and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/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/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/networksecuritypb#ListClientTlsPoliciesRequest.
}
for resp, err := range c.ListClientTlsPolicies(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) ListGatewaySecurityPolicies
func (c *Client) ListGatewaySecurityPolicies(ctx context.Context, req *networksecuritypb.ListGatewaySecurityPoliciesRequest, opts ...gax.CallOption) *GatewaySecurityPolicyIteratorListGatewaySecurityPolicies lists GatewaySecurityPolicies in a given project and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.ListGatewaySecurityPoliciesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListGatewaySecurityPoliciesRequest.
}
it := c.ListGatewaySecurityPolicies(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.ListGatewaySecurityPoliciesResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.ListGatewaySecurityPoliciesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListGatewaySecurityPoliciesRequest.
}
for resp, err := range c.ListGatewaySecurityPolicies(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) ListGatewaySecurityPolicyRules
func (c *Client) ListGatewaySecurityPolicyRules(ctx context.Context, req *networksecuritypb.ListGatewaySecurityPolicyRulesRequest, opts ...gax.CallOption) *GatewaySecurityPolicyRuleIteratorListGatewaySecurityPolicyRules lists GatewaySecurityPolicyRules in a given project and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.ListGatewaySecurityPolicyRulesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListGatewaySecurityPolicyRulesRequest.
}
it := c.ListGatewaySecurityPolicyRules(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.ListGatewaySecurityPolicyRulesResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.ListGatewaySecurityPolicyRulesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListGatewaySecurityPolicyRulesRequest.
}
for resp, err := range c.ListGatewaySecurityPolicyRules(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) *LocationIteratorListLocations lists information about the supported locations for this service.
This method lists locations based on the resource scope provided in the [ListLocationsRequest.name (at http://ListLocationsRequest.name)][google.cloud.location.ListLocationsRequest.name (at http://google.cloud.location.ListLocationsRequest.name)] field: * Global locations: If name is empty, the method lists the public locations available to all projects. * Project-specific locations: If name follows the format projects/{project}, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project.
For gRPC and client library implementations, the resource name is passed as the name field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := 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/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 := 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 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) *OperationIteratorListOperations 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/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 := 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/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 := 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 and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*Client) ListServerTlsPolicies
func (c *Client) ListServerTlsPolicies(ctx context.Context, req *networksecuritypb.ListServerTlsPoliciesRequest, opts ...gax.CallOption) *ServerTlsPolicyIteratorListServerTlsPolicies lists ServerTlsPolicies in a given project and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/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/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/networksecuritypb#ListServerTlsPoliciesRequest.
}
for resp, err := range c.ListServerTlsPolicies(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) ListTlsInspectionPolicies
func (c *Client) ListTlsInspectionPolicies(ctx context.Context, req *networksecuritypb.ListTlsInspectionPoliciesRequest, opts ...gax.CallOption) *TlsInspectionPolicyIteratorListTlsInspectionPolicies lists TlsInspectionPolicies in a given project and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.ListTlsInspectionPoliciesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListTlsInspectionPoliciesRequest.
}
it := c.ListTlsInspectionPolicies(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.ListTlsInspectionPoliciesResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.ListTlsInspectionPoliciesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListTlsInspectionPoliciesRequest.
}
for resp, err := range c.ListTlsInspectionPolicies(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) ListUrlLists
func (c *Client) ListUrlLists(ctx context.Context, req *networksecuritypb.ListUrlListsRequest, opts ...gax.CallOption) *UrlListIteratorListUrlLists lists UrlLists in a given project and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.ListUrlListsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListUrlListsRequest.
}
it := c.ListUrlLists(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.ListUrlListsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.ListUrlListsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListUrlListsRequest.
}
for resp, err := range c.ListUrlLists(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"
networksecurity "cloud.google.com/go/networksecurity/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 := 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
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"
networksecurity "cloud.google.com/go/networksecurity/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 := 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
func (c *Client) UpdateAuthorizationPolicy(ctx context.Context, req *networksecuritypb.UpdateAuthorizationPolicyRequest, opts ...gax.CallOption) (*UpdateAuthorizationPolicyOperation, error)UpdateAuthorizationPolicy updates the parameters of a single AuthorizationPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/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) *UpdateAuthorizationPolicyOperationUpdateAuthorizationPolicyOperation 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) UpdateAuthzPolicy
func (c *Client) UpdateAuthzPolicy(ctx context.Context, req *networksecuritypb.UpdateAuthzPolicyRequest, opts ...gax.CallOption) (*UpdateAuthzPolicyOperation, error)UpdateAuthzPolicy updates the parameters of a single AuthzPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.UpdateAuthzPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateAuthzPolicyRequest.
}
op, err := c.UpdateAuthzPolicy(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) UpdateAuthzPolicyOperation
func (c *Client) UpdateAuthzPolicyOperation(name string) *UpdateAuthzPolicyOperationUpdateAuthzPolicyOperation returns a new UpdateAuthzPolicyOperation from a given name. The name must be that of a previously created UpdateAuthzPolicyOperation, possibly from a different process.
func (*Client) UpdateBackendAuthenticationConfig
func (c *Client) UpdateBackendAuthenticationConfig(ctx context.Context, req *networksecuritypb.UpdateBackendAuthenticationConfigRequest, opts ...gax.CallOption) (*UpdateBackendAuthenticationConfigOperation, error)UpdateBackendAuthenticationConfig updates the parameters of a single BackendAuthenticationConfig to BackendAuthenticationConfig.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.UpdateBackendAuthenticationConfigRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateBackendAuthenticationConfigRequest.
}
op, err := c.UpdateBackendAuthenticationConfig(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) UpdateBackendAuthenticationConfigOperation
func (c *Client) UpdateBackendAuthenticationConfigOperation(name string) *UpdateBackendAuthenticationConfigOperationUpdateBackendAuthenticationConfigOperation returns a new UpdateBackendAuthenticationConfigOperation from a given name. The name must be that of a previously created UpdateBackendAuthenticationConfigOperation, possibly from a different process.
func (*Client) UpdateClientTlsPolicy
func (c *Client) UpdateClientTlsPolicy(ctx context.Context, req *networksecuritypb.UpdateClientTlsPolicyRequest, opts ...gax.CallOption) (*UpdateClientTlsPolicyOperation, error)UpdateClientTlsPolicy updates the parameters of a single ClientTlsPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/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) *UpdateClientTlsPolicyOperationUpdateClientTlsPolicyOperation 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) UpdateGatewaySecurityPolicy
func (c *Client) UpdateGatewaySecurityPolicy(ctx context.Context, req *networksecuritypb.UpdateGatewaySecurityPolicyRequest, opts ...gax.CallOption) (*UpdateGatewaySecurityPolicyOperation, error)UpdateGatewaySecurityPolicy updates the parameters of a single GatewaySecurityPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.UpdateGatewaySecurityPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateGatewaySecurityPolicyRequest.
}
op, err := c.UpdateGatewaySecurityPolicy(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) UpdateGatewaySecurityPolicyOperation
func (c *Client) UpdateGatewaySecurityPolicyOperation(name string) *UpdateGatewaySecurityPolicyOperationUpdateGatewaySecurityPolicyOperation returns a new UpdateGatewaySecurityPolicyOperation from a given name. The name must be that of a previously created UpdateGatewaySecurityPolicyOperation, possibly from a different process.
func (*Client) UpdateGatewaySecurityPolicyRule
func (c *Client) UpdateGatewaySecurityPolicyRule(ctx context.Context, req *networksecuritypb.UpdateGatewaySecurityPolicyRuleRequest, opts ...gax.CallOption) (*UpdateGatewaySecurityPolicyRuleOperation, error)UpdateGatewaySecurityPolicyRule updates the parameters of a single GatewaySecurityPolicyRule.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.UpdateGatewaySecurityPolicyRuleRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateGatewaySecurityPolicyRuleRequest.
}
op, err := c.UpdateGatewaySecurityPolicyRule(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) UpdateGatewaySecurityPolicyRuleOperation
func (c *Client) UpdateGatewaySecurityPolicyRuleOperation(name string) *UpdateGatewaySecurityPolicyRuleOperationUpdateGatewaySecurityPolicyRuleOperation returns a new UpdateGatewaySecurityPolicyRuleOperation from a given name. The name must be that of a previously created UpdateGatewaySecurityPolicyRuleOperation, possibly from a different process.
func (*Client) UpdateServerTlsPolicy
func (c *Client) UpdateServerTlsPolicy(ctx context.Context, req *networksecuritypb.UpdateServerTlsPolicyRequest, opts ...gax.CallOption) (*UpdateServerTlsPolicyOperation, error)UpdateServerTlsPolicy updates the parameters of a single ServerTlsPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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/apiv1/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) *UpdateServerTlsPolicyOperationUpdateServerTlsPolicyOperation returns a new UpdateServerTlsPolicyOperation from a given name. The name must be that of a previously created UpdateServerTlsPolicyOperation, possibly from a different process.
func (*Client) UpdateTlsInspectionPolicy
func (c *Client) UpdateTlsInspectionPolicy(ctx context.Context, req *networksecuritypb.UpdateTlsInspectionPolicyRequest, opts ...gax.CallOption) (*UpdateTlsInspectionPolicyOperation, error)UpdateTlsInspectionPolicy updates the parameters of a single TlsInspectionPolicy.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.UpdateTlsInspectionPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateTlsInspectionPolicyRequest.
}
op, err := c.UpdateTlsInspectionPolicy(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) UpdateTlsInspectionPolicyOperation
func (c *Client) UpdateTlsInspectionPolicyOperation(name string) *UpdateTlsInspectionPolicyOperationUpdateTlsInspectionPolicyOperation returns a new UpdateTlsInspectionPolicyOperation from a given name. The name must be that of a previously created UpdateTlsInspectionPolicyOperation, possibly from a different process.
func (*Client) UpdateUrlList
func (c *Client) UpdateUrlList(ctx context.Context, req *networksecuritypb.UpdateUrlListRequest, opts ...gax.CallOption) (*UpdateUrlListOperation, error)UpdateUrlList updates the parameters of a single UrlList.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.UpdateUrlListRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateUrlListRequest.
}
op, err := c.UpdateUrlList(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) UpdateUrlListOperation
func (c *Client) UpdateUrlListOperation(name string) *UpdateUrlListOperationUpdateUrlListOperation returns a new UpdateUrlListOperation from a given name. The name must be that of a previously created UpdateUrlListOperation, 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
func (it *ClientTlsPolicyIterator) Next() (*networksecuritypb.ClientTlsPolicy, 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 (*ClientTlsPolicyIterator) PageInfo
func (it *ClientTlsPolicyIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
CloneAddressGroupItemsOperation
type CloneAddressGroupItemsOperation struct {
// contains filtered or unexported fields
}CloneAddressGroupItemsOperation manages a long-running operation from CloneAddressGroupItems.
func (*CloneAddressGroupItemsOperation) Done
func (op *CloneAddressGroupItemsOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CloneAddressGroupItemsOperation) Metadata
func (op *CloneAddressGroupItemsOperation) Metadata() (*networksecuritypb.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 (*CloneAddressGroupItemsOperation) Name
func (op *CloneAddressGroupItemsOperation) Name() stringName 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 (*CloneAddressGroupItemsOperation) Poll
func (op *CloneAddressGroupItemsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AddressGroup, 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 (*CloneAddressGroupItemsOperation) Wait
func (op *CloneAddressGroupItemsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AddressGroup, 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.
CreateAddressGroupOperation
type CreateAddressGroupOperation struct {
// contains filtered or unexported fields
}CreateAddressGroupOperation manages a long-running operation from CreateAddressGroup.
func (*CreateAddressGroupOperation) Done
func (op *CreateAddressGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateAddressGroupOperation) Metadata
func (op *CreateAddressGroupOperation) Metadata() (*networksecuritypb.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 (*CreateAddressGroupOperation) Name
func (op *CreateAddressGroupOperation) Name() stringName 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 (*CreateAddressGroupOperation) Poll
func (op *CreateAddressGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AddressGroup, 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 (*CreateAddressGroupOperation) Wait
func (op *CreateAddressGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AddressGroup, 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.
CreateAuthorizationPolicyOperation
type CreateAuthorizationPolicyOperation struct {
// contains filtered or unexported fields
}CreateAuthorizationPolicyOperation manages a long-running operation from CreateAuthorizationPolicy.
func (*CreateAuthorizationPolicyOperation) Done
func (op *CreateAuthorizationPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateAuthorizationPolicyOperation) Metadata
func (op *CreateAuthorizationPolicyOperation) Metadata() (*networksecuritypb.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 (*CreateAuthorizationPolicyOperation) Name
func (op *CreateAuthorizationPolicyOperation) Name() stringName 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
func (op *CreateAuthorizationPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AuthorizationPolicy, 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 (*CreateAuthorizationPolicyOperation) Wait
func (op *CreateAuthorizationPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AuthorizationPolicy, 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.
CreateAuthzPolicyOperation
type CreateAuthzPolicyOperation struct {
// contains filtered or unexported fields
}CreateAuthzPolicyOperation manages a long-running operation from CreateAuthzPolicy.
func (*CreateAuthzPolicyOperation) Done
func (op *CreateAuthzPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateAuthzPolicyOperation) Metadata
func (op *CreateAuthzPolicyOperation) Metadata() (*networksecuritypb.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 (*CreateAuthzPolicyOperation) Name
func (op *CreateAuthzPolicyOperation) Name() stringName 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 (*CreateAuthzPolicyOperation) Poll
func (op *CreateAuthzPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AuthzPolicy, 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 (*CreateAuthzPolicyOperation) Wait
func (op *CreateAuthzPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AuthzPolicy, 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.
CreateBackendAuthenticationConfigOperation
type CreateBackendAuthenticationConfigOperation struct {
// contains filtered or unexported fields
}CreateBackendAuthenticationConfigOperation manages a long-running operation from CreateBackendAuthenticationConfig.
func (*CreateBackendAuthenticationConfigOperation) Done
func (op *CreateBackendAuthenticationConfigOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateBackendAuthenticationConfigOperation) Metadata
func (op *CreateBackendAuthenticationConfigOperation) Metadata() (*networksecuritypb.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 (*CreateBackendAuthenticationConfigOperation) Name
func (op *CreateBackendAuthenticationConfigOperation) Name() stringName 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 (*CreateBackendAuthenticationConfigOperation) Poll
func (op *CreateBackendAuthenticationConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.BackendAuthenticationConfig, 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 (*CreateBackendAuthenticationConfigOperation) Wait
func (op *CreateBackendAuthenticationConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.BackendAuthenticationConfig, 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.
CreateClientTlsPolicyOperation
type CreateClientTlsPolicyOperation struct {
// contains filtered or unexported fields
}CreateClientTlsPolicyOperation manages a long-running operation from CreateClientTlsPolicy.
func (*CreateClientTlsPolicyOperation) Done
func (op *CreateClientTlsPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateClientTlsPolicyOperation) Metadata
func (op *CreateClientTlsPolicyOperation) Metadata() (*networksecuritypb.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 (*CreateClientTlsPolicyOperation) Name
func (op *CreateClientTlsPolicyOperation) Name() stringName 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
func (op *CreateClientTlsPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.ClientTlsPolicy, 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 (*CreateClientTlsPolicyOperation) Wait
func (op *CreateClientTlsPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.ClientTlsPolicy, 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.
CreateFirewallEndpointAssociationOperation
type CreateFirewallEndpointAssociationOperation struct {
// contains filtered or unexported fields
}CreateFirewallEndpointAssociationOperation manages a long-running operation from CreateFirewallEndpointAssociation.
func (*CreateFirewallEndpointAssociationOperation) Done
func (op *CreateFirewallEndpointAssociationOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateFirewallEndpointAssociationOperation) Metadata
func (op *CreateFirewallEndpointAssociationOperation) Metadata() (*networksecuritypb.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 (*CreateFirewallEndpointAssociationOperation) Name
func (op *CreateFirewallEndpointAssociationOperation) Name() stringName 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 (*CreateFirewallEndpointAssociationOperation) Poll
func (op *CreateFirewallEndpointAssociationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.FirewallEndpointAssociation, 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 (*CreateFirewallEndpointAssociationOperation) Wait
func (op *CreateFirewallEndpointAssociationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.FirewallEndpointAssociation, 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.
CreateFirewallEndpointOperation
type CreateFirewallEndpointOperation struct {
// contains filtered or unexported fields
}CreateFirewallEndpointOperation manages a long-running operation from CreateFirewallEndpoint.
func (*CreateFirewallEndpointOperation) Done
func (op *CreateFirewallEndpointOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateFirewallEndpointOperation) Metadata
func (op *CreateFirewallEndpointOperation) Metadata() (*networksecuritypb.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 (*CreateFirewallEndpointOperation) Name
func (op *CreateFirewallEndpointOperation) Name() stringName 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 (*CreateFirewallEndpointOperation) Poll
func (op *CreateFirewallEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.FirewallEndpoint, 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 (*CreateFirewallEndpointOperation) Wait
func (op *CreateFirewallEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.FirewallEndpoint, 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.
CreateGatewaySecurityPolicyOperation
type CreateGatewaySecurityPolicyOperation struct {
// contains filtered or unexported fields
}CreateGatewaySecurityPolicyOperation manages a long-running operation from CreateGatewaySecurityPolicy.
func (*CreateGatewaySecurityPolicyOperation) Done
func (op *CreateGatewaySecurityPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateGatewaySecurityPolicyOperation) Metadata
func (op *CreateGatewaySecurityPolicyOperation) Metadata() (*networksecuritypb.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 (*CreateGatewaySecurityPolicyOperation) Name
func (op *CreateGatewaySecurityPolicyOperation) Name() stringName 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 (*CreateGatewaySecurityPolicyOperation) Poll
func (op *CreateGatewaySecurityPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.GatewaySecurityPolicy, 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 (*CreateGatewaySecurityPolicyOperation) Wait
func (op *CreateGatewaySecurityPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.GatewaySecurityPolicy, 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.
CreateGatewaySecurityPolicyRuleOperation
type CreateGatewaySecurityPolicyRuleOperation struct {
// contains filtered or unexported fields
}CreateGatewaySecurityPolicyRuleOperation manages a long-running operation from CreateGatewaySecurityPolicyRule.
func (*CreateGatewaySecurityPolicyRuleOperation) Done
func (op *CreateGatewaySecurityPolicyRuleOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateGatewaySecurityPolicyRuleOperation) Metadata
func (op *CreateGatewaySecurityPolicyRuleOperation) Metadata() (*networksecuritypb.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 (*CreateGatewaySecurityPolicyRuleOperation) Name
func (op *CreateGatewaySecurityPolicyRuleOperation) Name() stringName 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 (*CreateGatewaySecurityPolicyRuleOperation) Poll
func (op *CreateGatewaySecurityPolicyRuleOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.GatewaySecurityPolicyRule, 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 (*CreateGatewaySecurityPolicyRuleOperation) Wait
func (op *CreateGatewaySecurityPolicyRuleOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.GatewaySecurityPolicyRule, 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.
CreateInterceptDeploymentGroupOperation
type CreateInterceptDeploymentGroupOperation struct {
// contains filtered or unexported fields
}CreateInterceptDeploymentGroupOperation manages a long-running operation from CreateInterceptDeploymentGroup.
func (*CreateInterceptDeploymentGroupOperation) Done
func (op *CreateInterceptDeploymentGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateInterceptDeploymentGroupOperation) Metadata
func (op *CreateInterceptDeploymentGroupOperation) Metadata() (*networksecuritypb.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 (*CreateInterceptDeploymentGroupOperation) Name
func (op *CreateInterceptDeploymentGroupOperation) Name() stringName 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 (*CreateInterceptDeploymentGroupOperation) Poll
func (op *CreateInterceptDeploymentGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.InterceptDeploymentGroup, 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 (*CreateInterceptDeploymentGroupOperation) Wait
func (op *CreateInterceptDeploymentGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.InterceptDeploymentGroup, 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.
CreateInterceptDeploymentOperation
type CreateInterceptDeploymentOperation struct {
// contains filtered or unexported fields
}CreateInterceptDeploymentOperation manages a long-running operation from CreateInterceptDeployment.
func (*CreateInterceptDeploymentOperation) Done
func (op *CreateInterceptDeploymentOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateInterceptDeploymentOperation) Metadata
func (op *CreateInterceptDeploymentOperation) Metadata() (*networksecuritypb.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 (*CreateInterceptDeploymentOperation) Name
func (op *CreateInterceptDeploymentOperation) Name() stringName 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 (*CreateInterceptDeploymentOperation) Poll
func (op *CreateInterceptDeploymentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.InterceptDeployment, 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 (*CreateInterceptDeploymentOperation) Wait
func (op *CreateInterceptDeploymentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.InterceptDeployment, 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.
CreateInterceptEndpointGroupAssociationOperation
type CreateInterceptEndpointGroupAssociationOperation struct {
// contains filtered or unexported fields
}CreateInterceptEndpointGroupAssociationOperation manages a long-running operation from CreateInterceptEndpointGroupAssociation.
func (*CreateInterceptEndpointGroupAssociationOperation) Done
func (op *CreateInterceptEndpointGroupAssociationOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateInterceptEndpointGroupAssociationOperation) Metadata
func (op *CreateInterceptEndpointGroupAssociationOperation) Metadata() (*networksecuritypb.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 (*CreateInterceptEndpointGroupAssociationOperation) Name
func (op *CreateInterceptEndpointGroupAssociationOperation) Name() stringName 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 (*CreateInterceptEndpointGroupAssociationOperation) Poll
func (op *CreateInterceptEndpointGroupAssociationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.InterceptEndpointGroupAssociation, 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 (*CreateInterceptEndpointGroupAssociationOperation) Wait
func (op *CreateInterceptEndpointGroupAssociationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.InterceptEndpointGroupAssociation, 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.
CreateInterceptEndpointGroupOperation
type CreateInterceptEndpointGroupOperation struct {
// contains filtered or unexported fields
}CreateInterceptEndpointGroupOperation manages a long-running operation from CreateInterceptEndpointGroup.
func (*CreateInterceptEndpointGroupOperation) Done
func (op *CreateInterceptEndpointGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateInterceptEndpointGroupOperation) Metadata
func (op *CreateInterceptEndpointGroupOperation) Metadata() (*networksecuritypb.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 (*CreateInterceptEndpointGroupOperation) Name
func (op *CreateInterceptEndpointGroupOperation) Name() stringName 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 (*CreateInterceptEndpointGroupOperation) Poll
func (op *CreateInterceptEndpointGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.InterceptEndpointGroup, 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 (*CreateInterceptEndpointGroupOperation) Wait
func (op *CreateInterceptEndpointGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.InterceptEndpointGroup, 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.
CreateMirroringDeploymentGroupOperation
type CreateMirroringDeploymentGroupOperation struct {
// contains filtered or unexported fields
}CreateMirroringDeploymentGroupOperation manages a long-running operation from CreateMirroringDeploymentGroup.
func (*CreateMirroringDeploymentGroupOperation) Done
func (op *CreateMirroringDeploymentGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateMirroringDeploymentGroupOperation) Metadata
func (op *CreateMirroringDeploymentGroupOperation) Metadata() (*networksecuritypb.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 (*CreateMirroringDeploymentGroupOperation) Name
func (op *CreateMirroringDeploymentGroupOperation) Name() stringName 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 (*CreateMirroringDeploymentGroupOperation) Poll
func (op *CreateMirroringDeploymentGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.MirroringDeploymentGroup, 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 (*CreateMirroringDeploymentGroupOperation) Wait
func (op *CreateMirroringDeploymentGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.MirroringDeploymentGroup, 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.
CreateMirroringDeploymentOperation
type CreateMirroringDeploymentOperation struct {
// contains filtered or unexported fields
}CreateMirroringDeploymentOperation manages a long-running operation from CreateMirroringDeployment.
func (*CreateMirroringDeploymentOperation) Done
func (op *CreateMirroringDeploymentOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateMirroringDeploymentOperation) Metadata
func (op *CreateMirroringDeploymentOperation) Metadata() (*networksecuritypb.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 (*CreateMirroringDeploymentOperation) Name
func (op *CreateMirroringDeploymentOperation) Name() stringName 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 (*CreateMirroringDeploymentOperation) Poll
func (op *CreateMirroringDeploymentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.MirroringDeployment, 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 (*CreateMirroringDeploymentOperation) Wait
func (op *CreateMirroringDeploymentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.MirroringDeployment, 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.
CreateMirroringEndpointGroupAssociationOperation
type CreateMirroringEndpointGroupAssociationOperation struct {
// contains filtered or unexported fields
}CreateMirroringEndpointGroupAssociationOperation manages a long-running operation from CreateMirroringEndpointGroupAssociation.
func (*CreateMirroringEndpointGroupAssociationOperation) Done
func (op *CreateMirroringEndpointGroupAssociationOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateMirroringEndpointGroupAssociationOperation) Metadata
func (op *CreateMirroringEndpointGroupAssociationOperation) Metadata() (*networksecuritypb.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 (*CreateMirroringEndpointGroupAssociationOperation) Name
func (op *CreateMirroringEndpointGroupAssociationOperation) Name() stringName 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 (*CreateMirroringEndpointGroupAssociationOperation) Poll
func (op *CreateMirroringEndpointGroupAssociationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.MirroringEndpointGroupAssociation, 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 (*CreateMirroringEndpointGroupAssociationOperation) Wait
func (op *CreateMirroringEndpointGroupAssociationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.MirroringEndpointGroupAssociation, 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.
CreateMirroringEndpointGroupOperation
type CreateMirroringEndpointGroupOperation struct {
// contains filtered or unexported fields
}CreateMirroringEndpointGroupOperation manages a long-running operation from CreateMirroringEndpointGroup.
func (*CreateMirroringEndpointGroupOperation) Done
func (op *CreateMirroringEndpointGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateMirroringEndpointGroupOperation) Metadata
func (op *CreateMirroringEndpointGroupOperation) Metadata() (*networksecuritypb.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 (*CreateMirroringEndpointGroupOperation) Name
func (op *CreateMirroringEndpointGroupOperation) Name() stringName 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 (*CreateMirroringEndpointGroupOperation) Poll
func (op *CreateMirroringEndpointGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.MirroringEndpointGroup, 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 (*CreateMirroringEndpointGroupOperation) Wait
func (op *CreateMirroringEndpointGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.MirroringEndpointGroup, 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.
CreateProjectFirewallEndpointOperation
type CreateProjectFirewallEndpointOperation struct {
// contains filtered or unexported fields
}CreateProjectFirewallEndpointOperation manages a long-running operation from CreateProjectFirewallEndpoint.
func (*CreateProjectFirewallEndpointOperation) Done
func (op *CreateProjectFirewallEndpointOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateProjectFirewallEndpointOperation) Metadata
func (op *CreateProjectFirewallEndpointOperation) Metadata() (*networksecuritypb.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 (*CreateProjectFirewallEndpointOperation) Name
func (op *CreateProjectFirewallEndpointOperation) Name() stringName 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 (*CreateProjectFirewallEndpointOperation) Poll
func (op *CreateProjectFirewallEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.FirewallEndpoint, 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 (*CreateProjectFirewallEndpointOperation) Wait
func (op *CreateProjectFirewallEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.FirewallEndpoint, 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.
CreateSACAttachmentOperation
type CreateSACAttachmentOperation struct {
// contains filtered or unexported fields
}CreateSACAttachmentOperation manages a long-running operation from CreateSACAttachment.
func (*CreateSACAttachmentOperation) Done
func (op *CreateSACAttachmentOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateSACAttachmentOperation) Metadata
func (op *CreateSACAttachmentOperation) Metadata() (*networksecuritypb.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 (*CreateSACAttachmentOperation) Name
func (op *CreateSACAttachmentOperation) Name() stringName 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 (*CreateSACAttachmentOperation) Poll
func (op *CreateSACAttachmentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.SACAttachment, 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 (*CreateSACAttachmentOperation) Wait
func (op *CreateSACAttachmentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.SACAttachment, 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.
CreateSACRealmOperation
type CreateSACRealmOperation struct {
// contains filtered or unexported fields
}CreateSACRealmOperation manages a long-running operation from CreateSACRealm.
func (*CreateSACRealmOperation) Done
func (op *CreateSACRealmOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateSACRealmOperation) Metadata
func (op *CreateSACRealmOperation) Metadata() (*networksecuritypb.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 (*CreateSACRealmOperation) Name
func (op *CreateSACRealmOperation) Name() stringName 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 (*CreateSACRealmOperation) Poll
func (op *CreateSACRealmOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.SACRealm, 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 (*CreateSACRealmOperation) Wait
func (op *CreateSACRealmOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.SACRealm, 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.
CreateSecurityProfileGroupOperation
type CreateSecurityProfileGroupOperation struct {
// contains filtered or unexported fields
}CreateSecurityProfileGroupOperation manages a long-running operation from CreateSecurityProfileGroup.
func (*CreateSecurityProfileGroupOperation) Done
func (op *CreateSecurityProfileGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateSecurityProfileGroupOperation) Metadata
func (op *CreateSecurityProfileGroupOperation) Metadata() (*networksecuritypb.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 (*CreateSecurityProfileGroupOperation) Name
func (op *CreateSecurityProfileGroupOperation) Name() stringName 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 (*CreateSecurityProfileGroupOperation) Poll
func (op *CreateSecurityProfileGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.SecurityProfileGroup, 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 (*CreateSecurityProfileGroupOperation) Wait
func (op *CreateSecurityProfileGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.SecurityProfileGroup, 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.
CreateSecurityProfileOperation
type CreateSecurityProfileOperation struct {
// contains filtered or unexported fields
}CreateSecurityProfileOperation manages a long-running operation from CreateSecurityProfile.
func (*CreateSecurityProfileOperation) Done
func (op *CreateSecurityProfileOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateSecurityProfileOperation) Metadata
func (op *CreateSecurityProfileOperation) Metadata() (*networksecuritypb.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 (*CreateSecurityProfileOperation) Name
func (op *CreateSecurityProfileOperation) Name() stringName 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 (*CreateSecurityProfileOperation) Poll
func (op *CreateSecurityProfileOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.SecurityProfile, 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 (*CreateSecurityProfileOperation) Wait
func (op *CreateSecurityProfileOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.SecurityProfile, 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.
CreateServerTlsPolicyOperation
type CreateServerTlsPolicyOperation struct {
// contains filtered or unexported fields
}CreateServerTlsPolicyOperation manages a long-running operation from CreateServerTlsPolicy.
func (*CreateServerTlsPolicyOperation) Done
func (op *CreateServerTlsPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateServerTlsPolicyOperation) Metadata
func (op *CreateServerTlsPolicyOperation) Metadata() (*networksecuritypb.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 (*CreateServerTlsPolicyOperation) Name
func (op *CreateServerTlsPolicyOperation) Name() stringName 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
func (op *CreateServerTlsPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.ServerTlsPolicy, 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 (*CreateServerTlsPolicyOperation) Wait
func (op *CreateServerTlsPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.ServerTlsPolicy, 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.
CreateTlsInspectionPolicyOperation
type CreateTlsInspectionPolicyOperation struct {
// contains filtered or unexported fields
}CreateTlsInspectionPolicyOperation manages a long-running operation from CreateTlsInspectionPolicy.
func (*CreateTlsInspectionPolicyOperation) Done
func (op *CreateTlsInspectionPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateTlsInspectionPolicyOperation) Metadata
func (op *CreateTlsInspectionPolicyOperation) Metadata() (*networksecuritypb.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 (*CreateTlsInspectionPolicyOperation) Name
func (op *CreateTlsInspectionPolicyOperation) Name() stringName 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 (*CreateTlsInspectionPolicyOperation) Poll
func (op *CreateTlsInspectionPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.TlsInspectionPolicy, 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 (*CreateTlsInspectionPolicyOperation) Wait
func (op *CreateTlsInspectionPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.TlsInspectionPolicy, 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.
CreateUrlListOperation
type CreateUrlListOperation struct {
// contains filtered or unexported fields
}CreateUrlListOperation manages a long-running operation from CreateUrlList.
func (*CreateUrlListOperation) Done
func (op *CreateUrlListOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateUrlListOperation) Metadata
func (op *CreateUrlListOperation) Metadata() (*networksecuritypb.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 (*CreateUrlListOperation) Name
func (op *CreateUrlListOperation) Name() stringName 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 (*CreateUrlListOperation) Poll
func (op *CreateUrlListOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.UrlList, 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 (*CreateUrlListOperation) Wait
func (op *CreateUrlListOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.UrlList, 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.
DeleteAddressGroupOperation
type DeleteAddressGroupOperation struct {
// contains filtered or unexported fields
}DeleteAddressGroupOperation manages a long-running operation from DeleteAddressGroup.
func (*DeleteAddressGroupOperation) Done
func (op *DeleteAddressGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteAddressGroupOperation) Metadata
func (op *DeleteAddressGroupOperation) Metadata() (*networksecuritypb.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 (*DeleteAddressGroupOperation) Name
func (op *DeleteAddressGroupOperation) Name() stringName 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 (*DeleteAddressGroupOperation) Poll
func (op *DeleteAddressGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteAddressGroupOperation) Wait
func (op *DeleteAddressGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait 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
func (op *DeleteAuthorizationPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteAuthorizationPolicyOperation) Metadata
func (op *DeleteAuthorizationPolicyOperation) Metadata() (*networksecuritypb.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 (*DeleteAuthorizationPolicyOperation) Name
func (op *DeleteAuthorizationPolicyOperation) Name() stringName 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
func (op *DeleteAuthorizationPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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
func (op *DeleteAuthorizationPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteAuthzPolicyOperation
type DeleteAuthzPolicyOperation struct {
// contains filtered or unexported fields
}DeleteAuthzPolicyOperation manages a long-running operation from DeleteAuthzPolicy.
func (*DeleteAuthzPolicyOperation) Done
func (op *DeleteAuthzPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteAuthzPolicyOperation) Metadata
func (op *DeleteAuthzPolicyOperation) Metadata() (*networksecuritypb.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 (*DeleteAuthzPolicyOperation) Name
func (op *DeleteAuthzPolicyOperation) Name() stringName 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 (*DeleteAuthzPolicyOperation) Poll
func (op *DeleteAuthzPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteAuthzPolicyOperation) Wait
func (op *DeleteAuthzPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteBackendAuthenticationConfigOperation
type DeleteBackendAuthenticationConfigOperation struct {
// contains filtered or unexported fields
}DeleteBackendAuthenticationConfigOperation manages a long-running operation from DeleteBackendAuthenticationConfig.
func (*DeleteBackendAuthenticationConfigOperation) Done
func (op *DeleteBackendAuthenticationConfigOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteBackendAuthenticationConfigOperation) Metadata
func (op *DeleteBackendAuthenticationConfigOperation) Metadata() (*networksecuritypb.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 (*DeleteBackendAuthenticationConfigOperation) Name
func (op *DeleteBackendAuthenticationConfigOperation) Name() stringName 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 (*DeleteBackendAuthenticationConfigOperation) Poll
func (op *DeleteBackendAuthenticationConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteBackendAuthenticationConfigOperation) Wait
func (op *DeleteBackendAuthenticationConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait 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
func (op *DeleteClientTlsPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteClientTlsPolicyOperation) Metadata
func (op *DeleteClientTlsPolicyOperation) Metadata() (*networksecuritypb.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 (*DeleteClientTlsPolicyOperation) Name
func (op *DeleteClientTlsPolicyOperation) Name() stringName 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
func (op *DeleteClientTlsPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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
func (op *DeleteClientTlsPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteFirewallEndpointAssociationOperation
type DeleteFirewallEndpointAssociationOperation struct {
// contains filtered or unexported fields
}DeleteFirewallEndpointAssociationOperation manages a long-running operation from DeleteFirewallEndpointAssociation.
func (*DeleteFirewallEndpointAssociationOperation) Done
func (op *DeleteFirewallEndpointAssociationOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteFirewallEndpointAssociationOperation) Metadata
func (op *DeleteFirewallEndpointAssociationOperation) Metadata() (*networksecuritypb.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 (*DeleteFirewallEndpointAssociationOperation) Name
func (op *DeleteFirewallEndpointAssociationOperation) Name() stringName 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 (*DeleteFirewallEndpointAssociationOperation) Poll
func (op *DeleteFirewallEndpointAssociationOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteFirewallEndpointAssociationOperation) Wait
func (op *DeleteFirewallEndpointAssociationOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteFirewallEndpointOperation
type DeleteFirewallEndpointOperation struct {
// contains filtered or unexported fields
}DeleteFirewallEndpointOperation manages a long-running operation from DeleteFirewallEndpoint.
func (*DeleteFirewallEndpointOperation) Done
func (op *DeleteFirewallEndpointOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteFirewallEndpointOperation) Metadata
func (op *DeleteFirewallEndpointOperation) Metadata() (*networksecuritypb.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 (*DeleteFirewallEndpointOperation) Name
func (op *DeleteFirewallEndpointOperation) Name() stringName 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 (*DeleteFirewallEndpointOperation) Poll
func (op *DeleteFirewallEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteFirewallEndpointOperation) Wait
func (op *DeleteFirewallEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteGatewaySecurityPolicyOperation
type DeleteGatewaySecurityPolicyOperation struct {
// contains filtered or unexported fields
}DeleteGatewaySecurityPolicyOperation manages a long-running operation from DeleteGatewaySecurityPolicy.
func (*DeleteGatewaySecurityPolicyOperation) Done
func (op *DeleteGatewaySecurityPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteGatewaySecurityPolicyOperation) Metadata
func (op *DeleteGatewaySecurityPolicyOperation) Metadata() (*networksecuritypb.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 (*DeleteGatewaySecurityPolicyOperation) Name
func (op *DeleteGatewaySecurityPolicyOperation) Name() stringName 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 (*DeleteGatewaySecurityPolicyOperation) Poll
func (op *DeleteGatewaySecurityPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteGatewaySecurityPolicyOperation) Wait
func (op *DeleteGatewaySecurityPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteGatewaySecurityPolicyRuleOperation
type DeleteGatewaySecurityPolicyRuleOperation struct {
// contains filtered or unexported fields
}DeleteGatewaySecurityPolicyRuleOperation manages a long-running operation from DeleteGatewaySecurityPolicyRule.
func (*DeleteGatewaySecurityPolicyRuleOperation) Done
func (op *DeleteGatewaySecurityPolicyRuleOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteGatewaySecurityPolicyRuleOperation) Metadata
func (op *DeleteGatewaySecurityPolicyRuleOperation) Metadata() (*networksecuritypb.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 (*DeleteGatewaySecurityPolicyRuleOperation) Name
func (op *DeleteGatewaySecurityPolicyRuleOperation) Name() stringName 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 (*DeleteGatewaySecurityPolicyRuleOperation) Poll
func (op *DeleteGatewaySecurityPolicyRuleOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteGatewaySecurityPolicyRuleOperation) Wait
func (op *DeleteGatewaySecurityPolicyRuleOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteInterceptDeploymentGroupOperation
type DeleteInterceptDeploymentGroupOperation struct {
// contains filtered or unexported fields
}DeleteInterceptDeploymentGroupOperation manages a long-running operation from DeleteInterceptDeploymentGroup.
func (*DeleteInterceptDeploymentGroupOperation) Done
func (op *DeleteInterceptDeploymentGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteInterceptDeploymentGroupOperation) Metadata
func (op *DeleteInterceptDeploymentGroupOperation) Metadata() (*networksecuritypb.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 (*DeleteInterceptDeploymentGroupOperation) Name
func (op *DeleteInterceptDeploymentGroupOperation) Name() stringName 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 (*DeleteInterceptDeploymentGroupOperation) Poll
func (op *DeleteInterceptDeploymentGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteInterceptDeploymentGroupOperation) Wait
func (op *DeleteInterceptDeploymentGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteInterceptDeploymentOperation
type DeleteInterceptDeploymentOperation struct {
// contains filtered or unexported fields
}DeleteInterceptDeploymentOperation manages a long-running operation from DeleteInterceptDeployment.
func (*DeleteInterceptDeploymentOperation) Done
func (op *DeleteInterceptDeploymentOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteInterceptDeploymentOperation) Metadata
func (op *DeleteInterceptDeploymentOperation) Metadata() (*networksecuritypb.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 (*DeleteInterceptDeploymentOperation) Name
func (op *DeleteInterceptDeploymentOperation) Name() stringName 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 (*DeleteInterceptDeploymentOperation) Poll
func (op *DeleteInterceptDeploymentOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteInterceptDeploymentOperation) Wait
func (op *DeleteInterceptDeploymentOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteInterceptEndpointGroupAssociationOperation
type DeleteInterceptEndpointGroupAssociationOperation struct {
// contains filtered or unexported fields
}DeleteInterceptEndpointGroupAssociationOperation manages a long-running operation from DeleteInterceptEndpointGroupAssociation.
func (*DeleteInterceptEndpointGroupAssociationOperation) Done
func (op *DeleteInterceptEndpointGroupAssociationOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteInterceptEndpointGroupAssociationOperation) Metadata
func (op *DeleteInterceptEndpointGroupAssociationOperation) Metadata() (*networksecuritypb.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 (*DeleteInterceptEndpointGroupAssociationOperation) Name
func (op *DeleteInterceptEndpointGroupAssociationOperation) Name() stringName 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 (*DeleteInterceptEndpointGroupAssociationOperation) Poll
func (op *DeleteInterceptEndpointGroupAssociationOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteInterceptEndpointGroupAssociationOperation) Wait
func (op *DeleteInterceptEndpointGroupAssociationOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteInterceptEndpointGroupOperation
type DeleteInterceptEndpointGroupOperation struct {
// contains filtered or unexported fields
}DeleteInterceptEndpointGroupOperation manages a long-running operation from DeleteInterceptEndpointGroup.
func (*DeleteInterceptEndpointGroupOperation) Done
func (op *DeleteInterceptEndpointGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteInterceptEndpointGroupOperation) Metadata
func (op *DeleteInterceptEndpointGroupOperation) Metadata() (*networksecuritypb.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 (*DeleteInterceptEndpointGroupOperation) Name
func (op *DeleteInterceptEndpointGroupOperation) Name() stringName 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 (*DeleteInterceptEndpointGroupOperation) Poll
func (op *DeleteInterceptEndpointGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteInterceptEndpointGroupOperation) Wait
func (op *DeleteInterceptEndpointGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteMirroringDeploymentGroupOperation
type DeleteMirroringDeploymentGroupOperation struct {
// contains filtered or unexported fields
}DeleteMirroringDeploymentGroupOperation manages a long-running operation from DeleteMirroringDeploymentGroup.
func (*DeleteMirroringDeploymentGroupOperation) Done
func (op *DeleteMirroringDeploymentGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteMirroringDeploymentGroupOperation) Metadata
func (op *DeleteMirroringDeploymentGroupOperation) Metadata() (*networksecuritypb.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 (*DeleteMirroringDeploymentGroupOperation) Name
func (op *DeleteMirroringDeploymentGroupOperation) Name() stringName 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 (*DeleteMirroringDeploymentGroupOperation) Poll
func (op *DeleteMirroringDeploymentGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteMirroringDeploymentGroupOperation) Wait
func (op *DeleteMirroringDeploymentGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteMirroringDeploymentOperation
type DeleteMirroringDeploymentOperation struct {
// contains filtered or unexported fields
}DeleteMirroringDeploymentOperation manages a long-running operation from DeleteMirroringDeployment.
func (*DeleteMirroringDeploymentOperation) Done
func (op *DeleteMirroringDeploymentOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteMirroringDeploymentOperation) Metadata
func (op *DeleteMirroringDeploymentOperation) Metadata() (*networksecuritypb.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 (*DeleteMirroringDeploymentOperation) Name
func (op *DeleteMirroringDeploymentOperation) Name() stringName 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 (*DeleteMirroringDeploymentOperation) Poll
func (op *DeleteMirroringDeploymentOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteMirroringDeploymentOperation) Wait
func (op *DeleteMirroringDeploymentOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteMirroringEndpointGroupAssociationOperation
type DeleteMirroringEndpointGroupAssociationOperation struct {
// contains filtered or unexported fields
}DeleteMirroringEndpointGroupAssociationOperation manages a long-running operation from DeleteMirroringEndpointGroupAssociation.
func (*DeleteMirroringEndpointGroupAssociationOperation) Done
func (op *DeleteMirroringEndpointGroupAssociationOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteMirroringEndpointGroupAssociationOperation) Metadata
func (op *DeleteMirroringEndpointGroupAssociationOperation) Metadata() (*networksecuritypb.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 (*DeleteMirroringEndpointGroupAssociationOperation) Name
func (op *DeleteMirroringEndpointGroupAssociationOperation) Name() stringName 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 (*DeleteMirroringEndpointGroupAssociationOperation) Poll
func (op *DeleteMirroringEndpointGroupAssociationOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteMirroringEndpointGroupAssociationOperation) Wait
func (op *DeleteMirroringEndpointGroupAssociationOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteMirroringEndpointGroupOperation
type DeleteMirroringEndpointGroupOperation struct {
// contains filtered or unexported fields
}DeleteMirroringEndpointGroupOperation manages a long-running operation from DeleteMirroringEndpointGroup.
func (*DeleteMirroringEndpointGroupOperation) Done
func (op *DeleteMirroringEndpointGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteMirroringEndpointGroupOperation) Metadata
func (op *DeleteMirroringEndpointGroupOperation) Metadata() (*networksecuritypb.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 (*DeleteMirroringEndpointGroupOperation) Name
func (op *DeleteMirroringEndpointGroupOperation) Name() stringName 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 (*DeleteMirroringEndpointGroupOperation) Poll
func (op *DeleteMirroringEndpointGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteMirroringEndpointGroupOperation) Wait
func (op *DeleteMirroringEndpointGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteProjectFirewallEndpointOperation
type DeleteProjectFirewallEndpointOperation struct {
// contains filtered or unexported fields
}DeleteProjectFirewallEndpointOperation manages a long-running operation from DeleteProjectFirewallEndpoint.
func (*DeleteProjectFirewallEndpointOperation) Done
func (op *DeleteProjectFirewallEndpointOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteProjectFirewallEndpointOperation) Metadata
func (op *DeleteProjectFirewallEndpointOperation) Metadata() (*networksecuritypb.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 (*DeleteProjectFirewallEndpointOperation) Name
func (op *DeleteProjectFirewallEndpointOperation) Name() stringName 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 (*DeleteProjectFirewallEndpointOperation) Poll
func (op *DeleteProjectFirewallEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteProjectFirewallEndpointOperation) Wait
func (op *DeleteProjectFirewallEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteSACAttachmentOperation
type DeleteSACAttachmentOperation struct {
// contains filtered or unexported fields
}DeleteSACAttachmentOperation manages a long-running operation from DeleteSACAttachment.
func (*DeleteSACAttachmentOperation) Done
func (op *DeleteSACAttachmentOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteSACAttachmentOperation) Metadata
func (op *DeleteSACAttachmentOperation) Metadata() (*networksecuritypb.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 (*DeleteSACAttachmentOperation) Name
func (op *DeleteSACAttachmentOperation) Name() stringName 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 (*DeleteSACAttachmentOperation) Poll
func (op *DeleteSACAttachmentOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteSACAttachmentOperation) Wait
func (op *DeleteSACAttachmentOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteSACRealmOperation
type DeleteSACRealmOperation struct {
// contains filtered or unexported fields
}DeleteSACRealmOperation manages a long-running operation from DeleteSACRealm.
func (*DeleteSACRealmOperation) Done
func (op *DeleteSACRealmOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteSACRealmOperation) Metadata
func (op *DeleteSACRealmOperation) Metadata() (*networksecuritypb.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 (*DeleteSACRealmOperation) Name
func (op *DeleteSACRealmOperation) Name() stringName 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 (*DeleteSACRealmOperation) Poll
func (op *DeleteSACRealmOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteSACRealmOperation) Wait
func (op *DeleteSACRealmOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteSecurityProfileGroupOperation
type DeleteSecurityProfileGroupOperation struct {
// contains filtered or unexported fields
}DeleteSecurityProfileGroupOperation manages a long-running operation from DeleteSecurityProfileGroup.
func (*DeleteSecurityProfileGroupOperation) Done
func (op *DeleteSecurityProfileGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteSecurityProfileGroupOperation) Metadata
func (op *DeleteSecurityProfileGroupOperation) Metadata() (*networksecuritypb.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 (*DeleteSecurityProfileGroupOperation) Name
func (op *DeleteSecurityProfileGroupOperation) Name() stringName 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 (*DeleteSecurityProfileGroupOperation) Poll
func (op *DeleteSecurityProfileGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteSecurityProfileGroupOperation) Wait
func (op *DeleteSecurityProfileGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteSecurityProfileOperation
type DeleteSecurityProfileOperation struct {
// contains filtered or unexported fields
}DeleteSecurityProfileOperation manages a long-running operation from DeleteSecurityProfile.
func (*DeleteSecurityProfileOperation) Done
func (op *DeleteSecurityProfileOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteSecurityProfileOperation) Metadata
func (op *DeleteSecurityProfileOperation) Metadata() (*networksecuritypb.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 (*DeleteSecurityProfileOperation) Name
func (op *DeleteSecurityProfileOperation) Name() stringName 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 (*DeleteSecurityProfileOperation) Poll
func (op *DeleteSecurityProfileOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteSecurityProfileOperation) Wait
func (op *DeleteSecurityProfileOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait 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
func (op *DeleteServerTlsPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteServerTlsPolicyOperation) Metadata
func (op *DeleteServerTlsPolicyOperation) Metadata() (*networksecuritypb.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 (*DeleteServerTlsPolicyOperation) Name
func (op *DeleteServerTlsPolicyOperation) Name() stringName 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
func (op *DeleteServerTlsPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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
func (op *DeleteServerTlsPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteTlsInspectionPolicyOperation
type DeleteTlsInspectionPolicyOperation struct {
// contains filtered or unexported fields
}DeleteTlsInspectionPolicyOperation manages a long-running operation from DeleteTlsInspectionPolicy.
func (*DeleteTlsInspectionPolicyOperation) Done
func (op *DeleteTlsInspectionPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteTlsInspectionPolicyOperation) Metadata
func (op *DeleteTlsInspectionPolicyOperation) Metadata() (*networksecuritypb.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 (*DeleteTlsInspectionPolicyOperation) Name
func (op *DeleteTlsInspectionPolicyOperation) Name() stringName 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 (*DeleteTlsInspectionPolicyOperation) Poll
func (op *DeleteTlsInspectionPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteTlsInspectionPolicyOperation) Wait
func (op *DeleteTlsInspectionPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DeleteUrlListOperation
type DeleteUrlListOperation struct {
// contains filtered or unexported fields
}DeleteUrlListOperation manages a long-running operation from DeleteUrlList.
func (*DeleteUrlListOperation) Done
func (op *DeleteUrlListOperation) Done() boolDone reports whether the long-running operation has completed.
func (*DeleteUrlListOperation) Metadata
func (op *DeleteUrlListOperation) Metadata() (*networksecuritypb.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 (*DeleteUrlListOperation) Name
func (op *DeleteUrlListOperation) Name() stringName 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 (*DeleteUrlListOperation) Poll
func (op *DeleteUrlListOperation) Poll(ctx context.Context, opts ...gax.CallOption) errorPoll 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 (*DeleteUrlListOperation) Wait
func (op *DeleteUrlListOperation) Wait(ctx context.Context, opts ...gax.CallOption) errorWait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
DnsThreatDetectorCallOptions
type DnsThreatDetectorCallOptions struct {
ListDnsThreatDetectors []gax.CallOption
GetDnsThreatDetector []gax.CallOption
CreateDnsThreatDetector []gax.CallOption
UpdateDnsThreatDetector []gax.CallOption
DeleteDnsThreatDetector []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
}DnsThreatDetectorCallOptions contains the retry settings for each method of DnsThreatDetectorClient.
DnsThreatDetectorClient
type DnsThreatDetectorClient struct {
// The call options for this service.
CallOptions *DnsThreatDetectorCallOptions
// contains filtered or unexported fields
}DnsThreatDetectorClient 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.
The Network Security API for DNS Threat Detectors.
func NewDnsThreatDetectorClient
func NewDnsThreatDetectorClient(ctx context.Context, opts ...option.ClientOption) (*DnsThreatDetectorClient, error)NewDnsThreatDetectorClient creates a new dns threat detector service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
The Network Security API for DNS Threat Detectors.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewDnsThreatDetectorClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewDnsThreatDetectorRESTClient
func NewDnsThreatDetectorRESTClient(ctx context.Context, opts ...option.ClientOption) (*DnsThreatDetectorClient, error)NewDnsThreatDetectorRESTClient creates a new dns threat detector service rest client.
The Network Security API for DNS Threat Detectors.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewDnsThreatDetectorRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*DnsThreatDetectorClient) CancelOperation
func (c *DnsThreatDetectorClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation 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/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 := networksecurity.NewDnsThreatDetectorClient(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 (*DnsThreatDetectorClient) Close
func (c *DnsThreatDetectorClient) Close() errorClose closes the connection to the API service. Always call Close() when the client is no longer required.
func (*DnsThreatDetectorClient) Connection (deprecated)
func (c *DnsThreatDetectorClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*DnsThreatDetectorClient) CreateDnsThreatDetector
func (c *DnsThreatDetectorClient) CreateDnsThreatDetector(ctx context.Context, req *networksecuritypb.CreateDnsThreatDetectorRequest, opts ...gax.CallOption) (*networksecuritypb.DnsThreatDetector, error)CreateDnsThreatDetector creates a new DnsThreatDetector in a given project and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewDnsThreatDetectorClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateDnsThreatDetectorRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateDnsThreatDetectorRequest.
}
resp, err := c.CreateDnsThreatDetector(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DnsThreatDetectorClient) DeleteDnsThreatDetector
func (c *DnsThreatDetectorClient) DeleteDnsThreatDetector(ctx context.Context, req *networksecuritypb.DeleteDnsThreatDetectorRequest, opts ...gax.CallOption) errorDeleteDnsThreatDetector deletes a single DnsThreatDetector.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewDnsThreatDetectorClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteDnsThreatDetectorRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteDnsThreatDetectorRequest.
}
err = c.DeleteDnsThreatDetector(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*DnsThreatDetectorClient) DeleteOperation
func (c *DnsThreatDetectorClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation 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/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 := networksecurity.NewDnsThreatDetectorClient(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 (*DnsThreatDetectorClient) GetDnsThreatDetector
func (c *DnsThreatDetectorClient) GetDnsThreatDetector(ctx context.Context, req *networksecuritypb.GetDnsThreatDetectorRequest, opts ...gax.CallOption) (*networksecuritypb.DnsThreatDetector, error)GetDnsThreatDetector gets the details of a single DnsThreatDetector.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewDnsThreatDetectorClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetDnsThreatDetectorRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetDnsThreatDetectorRequest.
}
resp, err := c.GetDnsThreatDetector(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DnsThreatDetectorClient) GetIamPolicy
func (c *DnsThreatDetectorClient) 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/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 := networksecurity.NewDnsThreatDetectorClient(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 (*DnsThreatDetectorClient) GetLocation
func (c *DnsThreatDetectorClient) 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/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 := networksecurity.NewDnsThreatDetectorClient(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 (*DnsThreatDetectorClient) GetOperation
func (c *DnsThreatDetectorClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewDnsThreatDetectorClient(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 (*DnsThreatDetectorClient) ListDnsThreatDetectors
func (c *DnsThreatDetectorClient) ListDnsThreatDetectors(ctx context.Context, req *networksecuritypb.ListDnsThreatDetectorsRequest, opts ...gax.CallOption) *DnsThreatDetectorIteratorListDnsThreatDetectors lists DnsThreatDetectors in a given project and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewDnsThreatDetectorClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListDnsThreatDetectorsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListDnsThreatDetectorsRequest.
}
it := c.ListDnsThreatDetectors(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.ListDnsThreatDetectorsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewDnsThreatDetectorClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListDnsThreatDetectorsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListDnsThreatDetectorsRequest.
}
for resp, err := range c.ListDnsThreatDetectors(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*DnsThreatDetectorClient) ListLocations
func (c *DnsThreatDetectorClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIteratorListLocations lists information about the supported locations for this service.
This method lists locations based on the resource scope provided in the [ListLocationsRequest.name (at http://ListLocationsRequest.name)][google.cloud.location.ListLocationsRequest.name (at http://google.cloud.location.ListLocationsRequest.name)] field: * Global locations: If name is empty, the method lists the public locations available to all projects. * Project-specific locations: If name follows the format projects/{project}, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project.
For gRPC and client library implementations, the resource name is passed as the name field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewDnsThreatDetectorClient(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/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 := networksecurity.NewDnsThreatDetectorClient(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 (*DnsThreatDetectorClient) ListOperations
func (c *DnsThreatDetectorClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations 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/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 := networksecurity.NewDnsThreatDetectorClient(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/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 := networksecurity.NewDnsThreatDetectorClient(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 (*DnsThreatDetectorClient) SetIamPolicy
func (c *DnsThreatDetectorClient) 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/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 := networksecurity.NewDnsThreatDetectorClient(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 (*DnsThreatDetectorClient) TestIamPermissions
func (c *DnsThreatDetectorClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewDnsThreatDetectorClient(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 (*DnsThreatDetectorClient) UpdateDnsThreatDetector
func (c *DnsThreatDetectorClient) UpdateDnsThreatDetector(ctx context.Context, req *networksecuritypb.UpdateDnsThreatDetectorRequest, opts ...gax.CallOption) (*networksecuritypb.DnsThreatDetector, error)UpdateDnsThreatDetector updates a single DnsThreatDetector.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewDnsThreatDetectorClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateDnsThreatDetectorRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateDnsThreatDetectorRequest.
}
resp, err := c.UpdateDnsThreatDetector(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
DnsThreatDetectorIterator
type DnsThreatDetectorIterator 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.DnsThreatDetector, nextPageToken string, err error)
// contains filtered or unexported fields
}DnsThreatDetectorIterator manages a stream of *networksecuritypb.DnsThreatDetector.
func (*DnsThreatDetectorIterator) All
func (it *DnsThreatDetectorIterator) All() iter.Seq2[*networksecuritypb.DnsThreatDetector, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*DnsThreatDetectorIterator) Next
func (it *DnsThreatDetectorIterator) Next() (*networksecuritypb.DnsThreatDetector, 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 (*DnsThreatDetectorIterator) PageInfo
func (it *DnsThreatDetectorIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
FirewallActivationCallOptions
type FirewallActivationCallOptions struct {
ListFirewallEndpoints []gax.CallOption
ListProjectFirewallEndpoints []gax.CallOption
GetFirewallEndpoint []gax.CallOption
GetProjectFirewallEndpoint []gax.CallOption
CreateFirewallEndpoint []gax.CallOption
CreateProjectFirewallEndpoint []gax.CallOption
DeleteFirewallEndpoint []gax.CallOption
DeleteProjectFirewallEndpoint []gax.CallOption
UpdateFirewallEndpoint []gax.CallOption
UpdateProjectFirewallEndpoint []gax.CallOption
ListFirewallEndpointAssociations []gax.CallOption
GetFirewallEndpointAssociation []gax.CallOption
CreateFirewallEndpointAssociation []gax.CallOption
DeleteFirewallEndpointAssociation []gax.CallOption
UpdateFirewallEndpointAssociation []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
}FirewallActivationCallOptions contains the retry settings for each method of FirewallActivationClient.
FirewallActivationClient
type FirewallActivationClient struct {
// The call options for this service.
CallOptions *FirewallActivationCallOptions
// 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
}FirewallActivationClient 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.
Service for managing Firewall Endpoints and Associations.
func NewFirewallActivationClient
func NewFirewallActivationClient(ctx context.Context, opts ...option.ClientOption) (*FirewallActivationClient, error)NewFirewallActivationClient creates a new firewall activation client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Service for managing Firewall Endpoints and Associations.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewFirewallActivationRESTClient
func NewFirewallActivationRESTClient(ctx context.Context, opts ...option.ClientOption) (*FirewallActivationClient, error)NewFirewallActivationRESTClient creates a new firewall activation rest client.
Service for managing Firewall Endpoints and Associations.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewFirewallActivationRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*FirewallActivationClient) CancelOperation
func (c *FirewallActivationClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation 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/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 := networksecurity.NewFirewallActivationClient(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 (*FirewallActivationClient) Close
func (c *FirewallActivationClient) Close() errorClose closes the connection to the API service. Always call Close() when the client is no longer required.
func (*FirewallActivationClient) Connection (deprecated)
func (c *FirewallActivationClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*FirewallActivationClient) CreateFirewallEndpoint
func (c *FirewallActivationClient) CreateFirewallEndpoint(ctx context.Context, req *networksecuritypb.CreateFirewallEndpointRequest, opts ...gax.CallOption) (*CreateFirewallEndpointOperation, error)CreateFirewallEndpoint creates a new FirewallEndpoint in a given organization and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateFirewallEndpointRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateFirewallEndpointRequest.
}
op, err := c.CreateFirewallEndpoint(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*FirewallActivationClient) CreateFirewallEndpointAssociation
func (c *FirewallActivationClient) CreateFirewallEndpointAssociation(ctx context.Context, req *networksecuritypb.CreateFirewallEndpointAssociationRequest, opts ...gax.CallOption) (*CreateFirewallEndpointAssociationOperation, error)CreateFirewallEndpointAssociation creates a new FirewallEndpointAssociation in a given project and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateFirewallEndpointAssociationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateFirewallEndpointAssociationRequest.
}
op, err := c.CreateFirewallEndpointAssociation(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*FirewallActivationClient) CreateFirewallEndpointAssociationOperation
func (c *FirewallActivationClient) CreateFirewallEndpointAssociationOperation(name string) *CreateFirewallEndpointAssociationOperationCreateFirewallEndpointAssociationOperation returns a new CreateFirewallEndpointAssociationOperation from a given name. The name must be that of a previously created CreateFirewallEndpointAssociationOperation, possibly from a different process.
func (*FirewallActivationClient) CreateFirewallEndpointOperation
func (c *FirewallActivationClient) CreateFirewallEndpointOperation(name string) *CreateFirewallEndpointOperationCreateFirewallEndpointOperation returns a new CreateFirewallEndpointOperation from a given name. The name must be that of a previously created CreateFirewallEndpointOperation, possibly from a different process.
func (*FirewallActivationClient) CreateProjectFirewallEndpoint
func (c *FirewallActivationClient) CreateProjectFirewallEndpoint(ctx context.Context, req *networksecuritypb.CreateFirewallEndpointRequest, opts ...gax.CallOption) (*CreateProjectFirewallEndpointOperation, error)CreateProjectFirewallEndpoint creates a new FirewallEndpoint in a given project and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateFirewallEndpointRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateFirewallEndpointRequest.
}
op, err := c.CreateProjectFirewallEndpoint(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*FirewallActivationClient) CreateProjectFirewallEndpointOperation
func (c *FirewallActivationClient) CreateProjectFirewallEndpointOperation(name string) *CreateProjectFirewallEndpointOperationCreateProjectFirewallEndpointOperation returns a new CreateProjectFirewallEndpointOperation from a given name. The name must be that of a previously created CreateProjectFirewallEndpointOperation, possibly from a different process.
func (*FirewallActivationClient) DeleteFirewallEndpoint
func (c *FirewallActivationClient) DeleteFirewallEndpoint(ctx context.Context, req *networksecuritypb.DeleteFirewallEndpointRequest, opts ...gax.CallOption) (*DeleteFirewallEndpointOperation, error)DeleteFirewallEndpoint deletes a single org Endpoint.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteFirewallEndpointRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteFirewallEndpointRequest.
}
op, err := c.DeleteFirewallEndpoint(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*FirewallActivationClient) DeleteFirewallEndpointAssociation
func (c *FirewallActivationClient) DeleteFirewallEndpointAssociation(ctx context.Context, req *networksecuritypb.DeleteFirewallEndpointAssociationRequest, opts ...gax.CallOption) (*DeleteFirewallEndpointAssociationOperation, error)DeleteFirewallEndpointAssociation deletes a single FirewallEndpointAssociation.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteFirewallEndpointAssociationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteFirewallEndpointAssociationRequest.
}
op, err := c.DeleteFirewallEndpointAssociation(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*FirewallActivationClient) DeleteFirewallEndpointAssociationOperation
func (c *FirewallActivationClient) DeleteFirewallEndpointAssociationOperation(name string) *DeleteFirewallEndpointAssociationOperationDeleteFirewallEndpointAssociationOperation returns a new DeleteFirewallEndpointAssociationOperation from a given name. The name must be that of a previously created DeleteFirewallEndpointAssociationOperation, possibly from a different process.
func (*FirewallActivationClient) DeleteFirewallEndpointOperation
func (c *FirewallActivationClient) DeleteFirewallEndpointOperation(name string) *DeleteFirewallEndpointOperationDeleteFirewallEndpointOperation returns a new DeleteFirewallEndpointOperation from a given name. The name must be that of a previously created DeleteFirewallEndpointOperation, possibly from a different process.
func (*FirewallActivationClient) DeleteOperation
func (c *FirewallActivationClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation 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/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 := networksecurity.NewFirewallActivationClient(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 (*FirewallActivationClient) DeleteProjectFirewallEndpoint
func (c *FirewallActivationClient) DeleteProjectFirewallEndpoint(ctx context.Context, req *networksecuritypb.DeleteFirewallEndpointRequest, opts ...gax.CallOption) (*DeleteProjectFirewallEndpointOperation, error)DeleteProjectFirewallEndpoint deletes a single project Endpoint.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteFirewallEndpointRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteFirewallEndpointRequest.
}
op, err := c.DeleteProjectFirewallEndpoint(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*FirewallActivationClient) DeleteProjectFirewallEndpointOperation
func (c *FirewallActivationClient) DeleteProjectFirewallEndpointOperation(name string) *DeleteProjectFirewallEndpointOperationDeleteProjectFirewallEndpointOperation returns a new DeleteProjectFirewallEndpointOperation from a given name. The name must be that of a previously created DeleteProjectFirewallEndpointOperation, possibly from a different process.
func (*FirewallActivationClient) GetFirewallEndpoint
func (c *FirewallActivationClient) GetFirewallEndpoint(ctx context.Context, req *networksecuritypb.GetFirewallEndpointRequest, opts ...gax.CallOption) (*networksecuritypb.FirewallEndpoint, error)GetFirewallEndpoint gets details of a single org Endpoint.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetFirewallEndpointRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetFirewallEndpointRequest.
}
resp, err := c.GetFirewallEndpoint(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*FirewallActivationClient) GetFirewallEndpointAssociation
func (c *FirewallActivationClient) GetFirewallEndpointAssociation(ctx context.Context, req *networksecuritypb.GetFirewallEndpointAssociationRequest, opts ...gax.CallOption) (*networksecuritypb.FirewallEndpointAssociation, error)GetFirewallEndpointAssociation gets details of a single FirewallEndpointAssociation.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetFirewallEndpointAssociationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetFirewallEndpointAssociationRequest.
}
resp, err := c.GetFirewallEndpointAssociation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*FirewallActivationClient) GetIamPolicy
func (c *FirewallActivationClient) 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/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 := networksecurity.NewFirewallActivationClient(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 (*FirewallActivationClient) GetLocation
func (c *FirewallActivationClient) 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/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 := networksecurity.NewFirewallActivationClient(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 (*FirewallActivationClient) GetOperation
func (c *FirewallActivationClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewFirewallActivationClient(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 (*FirewallActivationClient) GetProjectFirewallEndpoint
func (c *FirewallActivationClient) GetProjectFirewallEndpoint(ctx context.Context, req *networksecuritypb.GetFirewallEndpointRequest, opts ...gax.CallOption) (*networksecuritypb.FirewallEndpoint, error)GetProjectFirewallEndpoint gets details of a single project Endpoint.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetFirewallEndpointRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetFirewallEndpointRequest.
}
resp, err := c.GetProjectFirewallEndpoint(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*FirewallActivationClient) ListFirewallEndpointAssociations
func (c *FirewallActivationClient) ListFirewallEndpointAssociations(ctx context.Context, req *networksecuritypb.ListFirewallEndpointAssociationsRequest, opts ...gax.CallOption) *FirewallEndpointAssociationIteratorListFirewallEndpointAssociations lists Associations in a given project and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListFirewallEndpointAssociationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListFirewallEndpointAssociationsRequest.
}
it := c.ListFirewallEndpointAssociations(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.ListFirewallEndpointAssociationsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListFirewallEndpointAssociationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListFirewallEndpointAssociationsRequest.
}
for resp, err := range c.ListFirewallEndpointAssociations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*FirewallActivationClient) ListFirewallEndpoints
func (c *FirewallActivationClient) ListFirewallEndpoints(ctx context.Context, req *networksecuritypb.ListFirewallEndpointsRequest, opts ...gax.CallOption) *FirewallEndpointIteratorListFirewallEndpoints lists FirewallEndpoints in a given organization and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListFirewallEndpointsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListFirewallEndpointsRequest.
}
it := c.ListFirewallEndpoints(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.ListFirewallEndpointsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListFirewallEndpointsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListFirewallEndpointsRequest.
}
for resp, err := range c.ListFirewallEndpoints(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*FirewallActivationClient) ListLocations
func (c *FirewallActivationClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIteratorListLocations lists information about the supported locations for this service.
This method lists locations based on the resource scope provided in the [ListLocationsRequest.name (at http://ListLocationsRequest.name)][google.cloud.location.ListLocationsRequest.name (at http://google.cloud.location.ListLocationsRequest.name)] field: * Global locations: If name is empty, the method lists the public locations available to all projects. * Project-specific locations: If name follows the format projects/{project}, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project.
For gRPC and client library implementations, the resource name is passed as the name field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewFirewallActivationClient(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/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 := networksecurity.NewFirewallActivationClient(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 (*FirewallActivationClient) ListOperations
func (c *FirewallActivationClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations 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/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 := networksecurity.NewFirewallActivationClient(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/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 := networksecurity.NewFirewallActivationClient(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 (*FirewallActivationClient) ListProjectFirewallEndpoints
func (c *FirewallActivationClient) ListProjectFirewallEndpoints(ctx context.Context, req *networksecuritypb.ListFirewallEndpointsRequest, opts ...gax.CallOption) *FirewallEndpointIteratorListProjectFirewallEndpoints lists FirewallEndpoints in a given project and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListFirewallEndpointsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListFirewallEndpointsRequest.
}
it := c.ListProjectFirewallEndpoints(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.ListFirewallEndpointsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListFirewallEndpointsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListFirewallEndpointsRequest.
}
for resp, err := range c.ListProjectFirewallEndpoints(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*FirewallActivationClient) SetIamPolicy
func (c *FirewallActivationClient) 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/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 := networksecurity.NewFirewallActivationClient(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 (*FirewallActivationClient) TestIamPermissions
func (c *FirewallActivationClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewFirewallActivationClient(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 (*FirewallActivationClient) UpdateFirewallEndpoint
func (c *FirewallActivationClient) UpdateFirewallEndpoint(ctx context.Context, req *networksecuritypb.UpdateFirewallEndpointRequest, opts ...gax.CallOption) (*UpdateFirewallEndpointOperation, error)UpdateFirewallEndpoint update a single org Endpoint.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateFirewallEndpointRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateFirewallEndpointRequest.
}
op, err := c.UpdateFirewallEndpoint(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*FirewallActivationClient) UpdateFirewallEndpointAssociation
func (c *FirewallActivationClient) UpdateFirewallEndpointAssociation(ctx context.Context, req *networksecuritypb.UpdateFirewallEndpointAssociationRequest, opts ...gax.CallOption) (*UpdateFirewallEndpointAssociationOperation, error)UpdateFirewallEndpointAssociation update a single FirewallEndpointAssociation.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateFirewallEndpointAssociationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateFirewallEndpointAssociationRequest.
}
op, err := c.UpdateFirewallEndpointAssociation(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*FirewallActivationClient) UpdateFirewallEndpointAssociationOperation
func (c *FirewallActivationClient) UpdateFirewallEndpointAssociationOperation(name string) *UpdateFirewallEndpointAssociationOperationUpdateFirewallEndpointAssociationOperation returns a new UpdateFirewallEndpointAssociationOperation from a given name. The name must be that of a previously created UpdateFirewallEndpointAssociationOperation, possibly from a different process.
func (*FirewallActivationClient) UpdateFirewallEndpointOperation
func (c *FirewallActivationClient) UpdateFirewallEndpointOperation(name string) *UpdateFirewallEndpointOperationUpdateFirewallEndpointOperation returns a new UpdateFirewallEndpointOperation from a given name. The name must be that of a previously created UpdateFirewallEndpointOperation, possibly from a different process.
func (*FirewallActivationClient) UpdateProjectFirewallEndpoint
func (c *FirewallActivationClient) UpdateProjectFirewallEndpoint(ctx context.Context, req *networksecuritypb.UpdateFirewallEndpointRequest, opts ...gax.CallOption) (*UpdateProjectFirewallEndpointOperation, error)UpdateProjectFirewallEndpoint update a single project Endpoint.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewFirewallActivationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateFirewallEndpointRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateFirewallEndpointRequest.
}
op, err := c.UpdateProjectFirewallEndpoint(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*FirewallActivationClient) UpdateProjectFirewallEndpointOperation
func (c *FirewallActivationClient) UpdateProjectFirewallEndpointOperation(name string) *UpdateProjectFirewallEndpointOperationUpdateProjectFirewallEndpointOperation returns a new UpdateProjectFirewallEndpointOperation from a given name. The name must be that of a previously created UpdateProjectFirewallEndpointOperation, possibly from a different process.
FirewallEndpointAssociationIterator
type FirewallEndpointAssociationIterator 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.FirewallEndpointAssociation, nextPageToken string, err error)
// contains filtered or unexported fields
}FirewallEndpointAssociationIterator manages a stream of *networksecuritypb.FirewallEndpointAssociation.
func (*FirewallEndpointAssociationIterator) All
func (it *FirewallEndpointAssociationIterator) All() iter.Seq2[*networksecuritypb.FirewallEndpointAssociation, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*FirewallEndpointAssociationIterator) Next
func (it *FirewallEndpointAssociationIterator) Next() (*networksecuritypb.FirewallEndpointAssociation, 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 (*FirewallEndpointAssociationIterator) PageInfo
func (it *FirewallEndpointAssociationIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
FirewallEndpointIterator
type FirewallEndpointIterator 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.FirewallEndpoint, nextPageToken string, err error)
// contains filtered or unexported fields
}FirewallEndpointIterator manages a stream of *networksecuritypb.FirewallEndpoint.
func (*FirewallEndpointIterator) All
func (it *FirewallEndpointIterator) All() iter.Seq2[*networksecuritypb.FirewallEndpoint, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*FirewallEndpointIterator) Next
func (it *FirewallEndpointIterator) Next() (*networksecuritypb.FirewallEndpoint, 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 (*FirewallEndpointIterator) PageInfo
func (it *FirewallEndpointIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
GatewaySecurityPolicyIterator
type GatewaySecurityPolicyIterator 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.GatewaySecurityPolicy, nextPageToken string, err error)
// contains filtered or unexported fields
}GatewaySecurityPolicyIterator manages a stream of *networksecuritypb.GatewaySecurityPolicy.
func (*GatewaySecurityPolicyIterator) All
func (it *GatewaySecurityPolicyIterator) All() iter.Seq2[*networksecuritypb.GatewaySecurityPolicy, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*GatewaySecurityPolicyIterator) Next
func (it *GatewaySecurityPolicyIterator) Next() (*networksecuritypb.GatewaySecurityPolicy, 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 (*GatewaySecurityPolicyIterator) PageInfo
func (it *GatewaySecurityPolicyIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
GatewaySecurityPolicyRuleIterator
type GatewaySecurityPolicyRuleIterator 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.GatewaySecurityPolicyRule, nextPageToken string, err error)
// contains filtered or unexported fields
}GatewaySecurityPolicyRuleIterator manages a stream of *networksecuritypb.GatewaySecurityPolicyRule.
func (*GatewaySecurityPolicyRuleIterator) All
func (it *GatewaySecurityPolicyRuleIterator) All() iter.Seq2[*networksecuritypb.GatewaySecurityPolicyRule, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*GatewaySecurityPolicyRuleIterator) Next
func (it *GatewaySecurityPolicyRuleIterator) Next() (*networksecuritypb.GatewaySecurityPolicyRule, 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 (*GatewaySecurityPolicyRuleIterator) PageInfo
func (it *GatewaySecurityPolicyRuleIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
InterceptCallOptions
type InterceptCallOptions struct {
ListInterceptEndpointGroups []gax.CallOption
GetInterceptEndpointGroup []gax.CallOption
CreateInterceptEndpointGroup []gax.CallOption
UpdateInterceptEndpointGroup []gax.CallOption
DeleteInterceptEndpointGroup []gax.CallOption
ListInterceptEndpointGroupAssociations []gax.CallOption
GetInterceptEndpointGroupAssociation []gax.CallOption
CreateInterceptEndpointGroupAssociation []gax.CallOption
UpdateInterceptEndpointGroupAssociation []gax.CallOption
DeleteInterceptEndpointGroupAssociation []gax.CallOption
ListInterceptDeploymentGroups []gax.CallOption
GetInterceptDeploymentGroup []gax.CallOption
CreateInterceptDeploymentGroup []gax.CallOption
UpdateInterceptDeploymentGroup []gax.CallOption
DeleteInterceptDeploymentGroup []gax.CallOption
ListInterceptDeployments []gax.CallOption
GetInterceptDeployment []gax.CallOption
CreateInterceptDeployment []gax.CallOption
UpdateInterceptDeployment []gax.CallOption
DeleteInterceptDeployment []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
}InterceptCallOptions contains the retry settings for each method of InterceptClient.
InterceptClient
type InterceptClient struct {
// The call options for this service.
CallOptions *InterceptCallOptions
// 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
}InterceptClient 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.
Service for Third-Party Packet Intercept (TPPI). TPPI is the “in-band” flavor of the Network Security Integrations product.
func NewInterceptClient
func NewInterceptClient(ctx context.Context, opts ...option.ClientOption) (*InterceptClient, error)NewInterceptClient creates a new intercept client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Service for Third-Party Packet Intercept (TPPI). TPPI is the “in-band” flavor of the Network Security Integrations product.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewInterceptRESTClient
func NewInterceptRESTClient(ctx context.Context, opts ...option.ClientOption) (*InterceptClient, error)NewInterceptRESTClient creates a new intercept rest client.
Service for Third-Party Packet Intercept (TPPI). TPPI is the “in-band” flavor of the Network Security Integrations product.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewInterceptRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*InterceptClient) CancelOperation
func (c *InterceptClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation 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/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 := networksecurity.NewInterceptClient(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 (*InterceptClient) Close
func (c *InterceptClient) Close() errorClose closes the connection to the API service. Always call Close() when the client is no longer required.
func (*InterceptClient) Connection (deprecated)
func (c *InterceptClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*InterceptClient) CreateInterceptDeployment
func (c *InterceptClient) CreateInterceptDeployment(ctx context.Context, req *networksecuritypb.CreateInterceptDeploymentRequest, opts ...gax.CallOption) (*CreateInterceptDeploymentOperation, error)CreateInterceptDeployment creates a deployment in a given project and location. See https://google.aip.dev/133 (at https://google.aip.dev/133).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateInterceptDeploymentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateInterceptDeploymentRequest.
}
op, err := c.CreateInterceptDeployment(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InterceptClient) CreateInterceptDeploymentGroup
func (c *InterceptClient) CreateInterceptDeploymentGroup(ctx context.Context, req *networksecuritypb.CreateInterceptDeploymentGroupRequest, opts ...gax.CallOption) (*CreateInterceptDeploymentGroupOperation, error)CreateInterceptDeploymentGroup creates a deployment group in a given project and location. See https://google.aip.dev/133 (at https://google.aip.dev/133).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateInterceptDeploymentGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateInterceptDeploymentGroupRequest.
}
op, err := c.CreateInterceptDeploymentGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InterceptClient) CreateInterceptDeploymentGroupOperation
func (c *InterceptClient) CreateInterceptDeploymentGroupOperation(name string) *CreateInterceptDeploymentGroupOperationCreateInterceptDeploymentGroupOperation returns a new CreateInterceptDeploymentGroupOperation from a given name. The name must be that of a previously created CreateInterceptDeploymentGroupOperation, possibly from a different process.
func (*InterceptClient) CreateInterceptDeploymentOperation
func (c *InterceptClient) CreateInterceptDeploymentOperation(name string) *CreateInterceptDeploymentOperationCreateInterceptDeploymentOperation returns a new CreateInterceptDeploymentOperation from a given name. The name must be that of a previously created CreateInterceptDeploymentOperation, possibly from a different process.
func (*InterceptClient) CreateInterceptEndpointGroup
func (c *InterceptClient) CreateInterceptEndpointGroup(ctx context.Context, req *networksecuritypb.CreateInterceptEndpointGroupRequest, opts ...gax.CallOption) (*CreateInterceptEndpointGroupOperation, error)CreateInterceptEndpointGroup creates an endpoint group in a given project and location. See https://google.aip.dev/133 (at https://google.aip.dev/133).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateInterceptEndpointGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateInterceptEndpointGroupRequest.
}
op, err := c.CreateInterceptEndpointGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InterceptClient) CreateInterceptEndpointGroupAssociation
func (c *InterceptClient) CreateInterceptEndpointGroupAssociation(ctx context.Context, req *networksecuritypb.CreateInterceptEndpointGroupAssociationRequest, opts ...gax.CallOption) (*CreateInterceptEndpointGroupAssociationOperation, error)CreateInterceptEndpointGroupAssociation creates an association in a given project and location. See https://google.aip.dev/133 (at https://google.aip.dev/133).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateInterceptEndpointGroupAssociationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateInterceptEndpointGroupAssociationRequest.
}
op, err := c.CreateInterceptEndpointGroupAssociation(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InterceptClient) CreateInterceptEndpointGroupAssociationOperation
func (c *InterceptClient) CreateInterceptEndpointGroupAssociationOperation(name string) *CreateInterceptEndpointGroupAssociationOperationCreateInterceptEndpointGroupAssociationOperation returns a new CreateInterceptEndpointGroupAssociationOperation from a given name. The name must be that of a previously created CreateInterceptEndpointGroupAssociationOperation, possibly from a different process.
func (*InterceptClient) CreateInterceptEndpointGroupOperation
func (c *InterceptClient) CreateInterceptEndpointGroupOperation(name string) *CreateInterceptEndpointGroupOperationCreateInterceptEndpointGroupOperation returns a new CreateInterceptEndpointGroupOperation from a given name. The name must be that of a previously created CreateInterceptEndpointGroupOperation, possibly from a different process.
func (*InterceptClient) DeleteInterceptDeployment
func (c *InterceptClient) DeleteInterceptDeployment(ctx context.Context, req *networksecuritypb.DeleteInterceptDeploymentRequest, opts ...gax.CallOption) (*DeleteInterceptDeploymentOperation, error)DeleteInterceptDeployment deletes a deployment. See https://google.aip.dev/135 (at https://google.aip.dev/135).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteInterceptDeploymentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteInterceptDeploymentRequest.
}
op, err := c.DeleteInterceptDeployment(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*InterceptClient) DeleteInterceptDeploymentGroup
func (c *InterceptClient) DeleteInterceptDeploymentGroup(ctx context.Context, req *networksecuritypb.DeleteInterceptDeploymentGroupRequest, opts ...gax.CallOption) (*DeleteInterceptDeploymentGroupOperation, error)DeleteInterceptDeploymentGroup deletes a deployment group. See https://google.aip.dev/135 (at https://google.aip.dev/135).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteInterceptDeploymentGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteInterceptDeploymentGroupRequest.
}
op, err := c.DeleteInterceptDeploymentGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*InterceptClient) DeleteInterceptDeploymentGroupOperation
func (c *InterceptClient) DeleteInterceptDeploymentGroupOperation(name string) *DeleteInterceptDeploymentGroupOperationDeleteInterceptDeploymentGroupOperation returns a new DeleteInterceptDeploymentGroupOperation from a given name. The name must be that of a previously created DeleteInterceptDeploymentGroupOperation, possibly from a different process.
func (*InterceptClient) DeleteInterceptDeploymentOperation
func (c *InterceptClient) DeleteInterceptDeploymentOperation(name string) *DeleteInterceptDeploymentOperationDeleteInterceptDeploymentOperation returns a new DeleteInterceptDeploymentOperation from a given name. The name must be that of a previously created DeleteInterceptDeploymentOperation, possibly from a different process.
func (*InterceptClient) DeleteInterceptEndpointGroup
func (c *InterceptClient) DeleteInterceptEndpointGroup(ctx context.Context, req *networksecuritypb.DeleteInterceptEndpointGroupRequest, opts ...gax.CallOption) (*DeleteInterceptEndpointGroupOperation, error)DeleteInterceptEndpointGroup deletes an endpoint group. See https://google.aip.dev/135 (at https://google.aip.dev/135).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteInterceptEndpointGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteInterceptEndpointGroupRequest.
}
op, err := c.DeleteInterceptEndpointGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*InterceptClient) DeleteInterceptEndpointGroupAssociation
func (c *InterceptClient) DeleteInterceptEndpointGroupAssociation(ctx context.Context, req *networksecuritypb.DeleteInterceptEndpointGroupAssociationRequest, opts ...gax.CallOption) (*DeleteInterceptEndpointGroupAssociationOperation, error)DeleteInterceptEndpointGroupAssociation deletes an association. See https://google.aip.dev/135 (at https://google.aip.dev/135).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteInterceptEndpointGroupAssociationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteInterceptEndpointGroupAssociationRequest.
}
op, err := c.DeleteInterceptEndpointGroupAssociation(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*InterceptClient) DeleteInterceptEndpointGroupAssociationOperation
func (c *InterceptClient) DeleteInterceptEndpointGroupAssociationOperation(name string) *DeleteInterceptEndpointGroupAssociationOperationDeleteInterceptEndpointGroupAssociationOperation returns a new DeleteInterceptEndpointGroupAssociationOperation from a given name. The name must be that of a previously created DeleteInterceptEndpointGroupAssociationOperation, possibly from a different process.
func (*InterceptClient) DeleteInterceptEndpointGroupOperation
func (c *InterceptClient) DeleteInterceptEndpointGroupOperation(name string) *DeleteInterceptEndpointGroupOperationDeleteInterceptEndpointGroupOperation returns a new DeleteInterceptEndpointGroupOperation from a given name. The name must be that of a previously created DeleteInterceptEndpointGroupOperation, possibly from a different process.
func (*InterceptClient) DeleteOperation
func (c *InterceptClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation 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/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 := networksecurity.NewInterceptClient(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 (*InterceptClient) GetIamPolicy
func (c *InterceptClient) 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/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 := networksecurity.NewInterceptClient(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 (*InterceptClient) GetInterceptDeployment
func (c *InterceptClient) GetInterceptDeployment(ctx context.Context, req *networksecuritypb.GetInterceptDeploymentRequest, opts ...gax.CallOption) (*networksecuritypb.InterceptDeployment, error)GetInterceptDeployment gets a specific deployment. See https://google.aip.dev/131 (at https://google.aip.dev/131).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetInterceptDeploymentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetInterceptDeploymentRequest.
}
resp, err := c.GetInterceptDeployment(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InterceptClient) GetInterceptDeploymentGroup
func (c *InterceptClient) GetInterceptDeploymentGroup(ctx context.Context, req *networksecuritypb.GetInterceptDeploymentGroupRequest, opts ...gax.CallOption) (*networksecuritypb.InterceptDeploymentGroup, error)GetInterceptDeploymentGroup gets a specific deployment group. See https://google.aip.dev/131 (at https://google.aip.dev/131).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetInterceptDeploymentGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetInterceptDeploymentGroupRequest.
}
resp, err := c.GetInterceptDeploymentGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InterceptClient) GetInterceptEndpointGroup
func (c *InterceptClient) GetInterceptEndpointGroup(ctx context.Context, req *networksecuritypb.GetInterceptEndpointGroupRequest, opts ...gax.CallOption) (*networksecuritypb.InterceptEndpointGroup, error)GetInterceptEndpointGroup gets a specific endpoint group. See https://google.aip.dev/131 (at https://google.aip.dev/131).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetInterceptEndpointGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetInterceptEndpointGroupRequest.
}
resp, err := c.GetInterceptEndpointGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InterceptClient) GetInterceptEndpointGroupAssociation
func (c *InterceptClient) GetInterceptEndpointGroupAssociation(ctx context.Context, req *networksecuritypb.GetInterceptEndpointGroupAssociationRequest, opts ...gax.CallOption) (*networksecuritypb.InterceptEndpointGroupAssociation, error)GetInterceptEndpointGroupAssociation gets a specific association. See https://google.aip.dev/131 (at https://google.aip.dev/131).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetInterceptEndpointGroupAssociationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetInterceptEndpointGroupAssociationRequest.
}
resp, err := c.GetInterceptEndpointGroupAssociation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InterceptClient) GetLocation
func (c *InterceptClient) 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/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 := networksecurity.NewInterceptClient(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 (*InterceptClient) GetOperation
func (c *InterceptClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewInterceptClient(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 (*InterceptClient) ListInterceptDeploymentGroups
func (c *InterceptClient) ListInterceptDeploymentGroups(ctx context.Context, req *networksecuritypb.ListInterceptDeploymentGroupsRequest, opts ...gax.CallOption) *InterceptDeploymentGroupIteratorListInterceptDeploymentGroups lists deployment groups in a given project and location. See https://google.aip.dev/132 (at https://google.aip.dev/132).
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListInterceptDeploymentGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListInterceptDeploymentGroupsRequest.
}
it := c.ListInterceptDeploymentGroups(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.ListInterceptDeploymentGroupsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListInterceptDeploymentGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListInterceptDeploymentGroupsRequest.
}
for resp, err := range c.ListInterceptDeploymentGroups(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*InterceptClient) ListInterceptDeployments
func (c *InterceptClient) ListInterceptDeployments(ctx context.Context, req *networksecuritypb.ListInterceptDeploymentsRequest, opts ...gax.CallOption) *InterceptDeploymentIteratorListInterceptDeployments lists deployments in a given project and location. See https://google.aip.dev/132 (at https://google.aip.dev/132).
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListInterceptDeploymentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListInterceptDeploymentsRequest.
}
it := c.ListInterceptDeployments(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.ListInterceptDeploymentsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListInterceptDeploymentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListInterceptDeploymentsRequest.
}
for resp, err := range c.ListInterceptDeployments(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*InterceptClient) ListInterceptEndpointGroupAssociations
func (c *InterceptClient) ListInterceptEndpointGroupAssociations(ctx context.Context, req *networksecuritypb.ListInterceptEndpointGroupAssociationsRequest, opts ...gax.CallOption) *InterceptEndpointGroupAssociationIteratorListInterceptEndpointGroupAssociations lists associations in a given project and location. See https://google.aip.dev/132 (at https://google.aip.dev/132).
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListInterceptEndpointGroupAssociationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListInterceptEndpointGroupAssociationsRequest.
}
it := c.ListInterceptEndpointGroupAssociations(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.ListInterceptEndpointGroupAssociationsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListInterceptEndpointGroupAssociationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListInterceptEndpointGroupAssociationsRequest.
}
for resp, err := range c.ListInterceptEndpointGroupAssociations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*InterceptClient) ListInterceptEndpointGroups
func (c *InterceptClient) ListInterceptEndpointGroups(ctx context.Context, req *networksecuritypb.ListInterceptEndpointGroupsRequest, opts ...gax.CallOption) *InterceptEndpointGroupIteratorListInterceptEndpointGroups lists endpoint groups in a given project and location. See https://google.aip.dev/132 (at https://google.aip.dev/132).
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListInterceptEndpointGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListInterceptEndpointGroupsRequest.
}
it := c.ListInterceptEndpointGroups(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.ListInterceptEndpointGroupsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListInterceptEndpointGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListInterceptEndpointGroupsRequest.
}
for resp, err := range c.ListInterceptEndpointGroups(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*InterceptClient) ListLocations
func (c *InterceptClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIteratorListLocations lists information about the supported locations for this service.
This method lists locations based on the resource scope provided in the [ListLocationsRequest.name (at http://ListLocationsRequest.name)][google.cloud.location.ListLocationsRequest.name (at http://google.cloud.location.ListLocationsRequest.name)] field: * Global locations: If name is empty, the method lists the public locations available to all projects. * Project-specific locations: If name follows the format projects/{project}, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project.
For gRPC and client library implementations, the resource name is passed as the name field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewInterceptClient(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/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 := networksecurity.NewInterceptClient(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 (*InterceptClient) ListOperations
func (c *InterceptClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations 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/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 := networksecurity.NewInterceptClient(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/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 := networksecurity.NewInterceptClient(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 (*InterceptClient) SetIamPolicy
func (c *InterceptClient) 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/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 := networksecurity.NewInterceptClient(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 (*InterceptClient) TestIamPermissions
func (c *InterceptClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewInterceptClient(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 (*InterceptClient) UpdateInterceptDeployment
func (c *InterceptClient) UpdateInterceptDeployment(ctx context.Context, req *networksecuritypb.UpdateInterceptDeploymentRequest, opts ...gax.CallOption) (*UpdateInterceptDeploymentOperation, error)UpdateInterceptDeployment updates a deployment. See https://google.aip.dev/134 (at https://google.aip.dev/134).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateInterceptDeploymentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateInterceptDeploymentRequest.
}
op, err := c.UpdateInterceptDeployment(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InterceptClient) UpdateInterceptDeploymentGroup
func (c *InterceptClient) UpdateInterceptDeploymentGroup(ctx context.Context, req *networksecuritypb.UpdateInterceptDeploymentGroupRequest, opts ...gax.CallOption) (*UpdateInterceptDeploymentGroupOperation, error)UpdateInterceptDeploymentGroup updates a deployment group. See https://google.aip.dev/134 (at https://google.aip.dev/134).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateInterceptDeploymentGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateInterceptDeploymentGroupRequest.
}
op, err := c.UpdateInterceptDeploymentGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InterceptClient) UpdateInterceptDeploymentGroupOperation
func (c *InterceptClient) UpdateInterceptDeploymentGroupOperation(name string) *UpdateInterceptDeploymentGroupOperationUpdateInterceptDeploymentGroupOperation returns a new UpdateInterceptDeploymentGroupOperation from a given name. The name must be that of a previously created UpdateInterceptDeploymentGroupOperation, possibly from a different process.
func (*InterceptClient) UpdateInterceptDeploymentOperation
func (c *InterceptClient) UpdateInterceptDeploymentOperation(name string) *UpdateInterceptDeploymentOperationUpdateInterceptDeploymentOperation returns a new UpdateInterceptDeploymentOperation from a given name. The name must be that of a previously created UpdateInterceptDeploymentOperation, possibly from a different process.
func (*InterceptClient) UpdateInterceptEndpointGroup
func (c *InterceptClient) UpdateInterceptEndpointGroup(ctx context.Context, req *networksecuritypb.UpdateInterceptEndpointGroupRequest, opts ...gax.CallOption) (*UpdateInterceptEndpointGroupOperation, error)UpdateInterceptEndpointGroup updates an endpoint group. See https://google.aip.dev/134 (at https://google.aip.dev/134).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateInterceptEndpointGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateInterceptEndpointGroupRequest.
}
op, err := c.UpdateInterceptEndpointGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InterceptClient) UpdateInterceptEndpointGroupAssociation
func (c *InterceptClient) UpdateInterceptEndpointGroupAssociation(ctx context.Context, req *networksecuritypb.UpdateInterceptEndpointGroupAssociationRequest, opts ...gax.CallOption) (*UpdateInterceptEndpointGroupAssociationOperation, error)UpdateInterceptEndpointGroupAssociation updates an association. See https://google.aip.dev/134 (at https://google.aip.dev/134).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewInterceptClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateInterceptEndpointGroupAssociationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateInterceptEndpointGroupAssociationRequest.
}
op, err := c.UpdateInterceptEndpointGroupAssociation(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InterceptClient) UpdateInterceptEndpointGroupAssociationOperation
func (c *InterceptClient) UpdateInterceptEndpointGroupAssociationOperation(name string) *UpdateInterceptEndpointGroupAssociationOperationUpdateInterceptEndpointGroupAssociationOperation returns a new UpdateInterceptEndpointGroupAssociationOperation from a given name. The name must be that of a previously created UpdateInterceptEndpointGroupAssociationOperation, possibly from a different process.
func (*InterceptClient) UpdateInterceptEndpointGroupOperation
func (c *InterceptClient) UpdateInterceptEndpointGroupOperation(name string) *UpdateInterceptEndpointGroupOperationUpdateInterceptEndpointGroupOperation returns a new UpdateInterceptEndpointGroupOperation from a given name. The name must be that of a previously created UpdateInterceptEndpointGroupOperation, possibly from a different process.
InterceptDeploymentGroupIterator
type InterceptDeploymentGroupIterator 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.InterceptDeploymentGroup, nextPageToken string, err error)
// contains filtered or unexported fields
}InterceptDeploymentGroupIterator manages a stream of *networksecuritypb.InterceptDeploymentGroup.
func (*InterceptDeploymentGroupIterator) All
func (it *InterceptDeploymentGroupIterator) All() iter.Seq2[*networksecuritypb.InterceptDeploymentGroup, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*InterceptDeploymentGroupIterator) Next
func (it *InterceptDeploymentGroupIterator) Next() (*networksecuritypb.InterceptDeploymentGroup, 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 (*InterceptDeploymentGroupIterator) PageInfo
func (it *InterceptDeploymentGroupIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
InterceptDeploymentIterator
type InterceptDeploymentIterator 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.InterceptDeployment, nextPageToken string, err error)
// contains filtered or unexported fields
}InterceptDeploymentIterator manages a stream of *networksecuritypb.InterceptDeployment.
func (*InterceptDeploymentIterator) All
func (it *InterceptDeploymentIterator) All() iter.Seq2[*networksecuritypb.InterceptDeployment, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*InterceptDeploymentIterator) Next
func (it *InterceptDeploymentIterator) Next() (*networksecuritypb.InterceptDeployment, 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 (*InterceptDeploymentIterator) PageInfo
func (it *InterceptDeploymentIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
InterceptEndpointGroupAssociationIterator
type InterceptEndpointGroupAssociationIterator 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.InterceptEndpointGroupAssociation, nextPageToken string, err error)
// contains filtered or unexported fields
}InterceptEndpointGroupAssociationIterator manages a stream of *networksecuritypb.InterceptEndpointGroupAssociation.
func (*InterceptEndpointGroupAssociationIterator) All
func (it *InterceptEndpointGroupAssociationIterator) All() iter.Seq2[*networksecuritypb.InterceptEndpointGroupAssociation, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*InterceptEndpointGroupAssociationIterator) Next
func (it *InterceptEndpointGroupAssociationIterator) Next() (*networksecuritypb.InterceptEndpointGroupAssociation, 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 (*InterceptEndpointGroupAssociationIterator) PageInfo
func (it *InterceptEndpointGroupAssociationIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
InterceptEndpointGroupIterator
type InterceptEndpointGroupIterator 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.InterceptEndpointGroup, nextPageToken string, err error)
// contains filtered or unexported fields
}InterceptEndpointGroupIterator manages a stream of *networksecuritypb.InterceptEndpointGroup.
func (*InterceptEndpointGroupIterator) All
func (it *InterceptEndpointGroupIterator) All() iter.Seq2[*networksecuritypb.InterceptEndpointGroup, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*InterceptEndpointGroupIterator) Next
func (it *InterceptEndpointGroupIterator) Next() (*networksecuritypb.InterceptEndpointGroup, 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 (*InterceptEndpointGroupIterator) PageInfo
func (it *InterceptEndpointGroupIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ListAddressGroupReferencesResponse_AddressGroupReferenceIterator
type ListAddressGroupReferencesResponse_AddressGroupReferenceIterator 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.ListAddressGroupReferencesResponse_AddressGroupReference, nextPageToken string, err error)
// contains filtered or unexported fields
}ListAddressGroupReferencesResponse_AddressGroupReferenceIterator manages a stream of *networksecuritypb.ListAddressGroupReferencesResponse_AddressGroupReference.
func (*ListAddressGroupReferencesResponse_AddressGroupReferenceIterator) All
func (it *ListAddressGroupReferencesResponse_AddressGroupReferenceIterator) All() iter.Seq2[*networksecuritypb.ListAddressGroupReferencesResponse_AddressGroupReference, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*ListAddressGroupReferencesResponse_AddressGroupReferenceIterator) Next
func (it *ListAddressGroupReferencesResponse_AddressGroupReferenceIterator) Next() (*networksecuritypb.ListAddressGroupReferencesResponse_AddressGroupReference, 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 (*ListAddressGroupReferencesResponse_AddressGroupReferenceIterator) PageInfo
func (it *ListAddressGroupReferencesResponse_AddressGroupReferenceIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
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.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
MirroringCallOptions
type MirroringCallOptions struct {
ListMirroringEndpointGroups []gax.CallOption
GetMirroringEndpointGroup []gax.CallOption
CreateMirroringEndpointGroup []gax.CallOption
UpdateMirroringEndpointGroup []gax.CallOption
DeleteMirroringEndpointGroup []gax.CallOption
ListMirroringEndpointGroupAssociations []gax.CallOption
GetMirroringEndpointGroupAssociation []gax.CallOption
CreateMirroringEndpointGroupAssociation []gax.CallOption
UpdateMirroringEndpointGroupAssociation []gax.CallOption
DeleteMirroringEndpointGroupAssociation []gax.CallOption
ListMirroringDeploymentGroups []gax.CallOption
GetMirroringDeploymentGroup []gax.CallOption
CreateMirroringDeploymentGroup []gax.CallOption
UpdateMirroringDeploymentGroup []gax.CallOption
DeleteMirroringDeploymentGroup []gax.CallOption
ListMirroringDeployments []gax.CallOption
GetMirroringDeployment []gax.CallOption
CreateMirroringDeployment []gax.CallOption
UpdateMirroringDeployment []gax.CallOption
DeleteMirroringDeployment []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
}MirroringCallOptions contains the retry settings for each method of MirroringClient.
MirroringClient
type MirroringClient struct {
// The call options for this service.
CallOptions *MirroringCallOptions
// 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
}MirroringClient 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.
PM2 is the “out-of-band” flavor of the Network Security Integrations product.
func NewMirroringClient
func NewMirroringClient(ctx context.Context, opts ...option.ClientOption) (*MirroringClient, error)NewMirroringClient creates a new mirroring client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
PM2 is the “out-of-band” flavor of the Network Security Integrations product.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewMirroringRESTClient
func NewMirroringRESTClient(ctx context.Context, opts ...option.ClientOption) (*MirroringClient, error)NewMirroringRESTClient creates a new mirroring rest client.
PM2 is the “out-of-band” flavor of the Network Security Integrations product.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewMirroringRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*MirroringClient) CancelOperation
func (c *MirroringClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation 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/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 := networksecurity.NewMirroringClient(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 (*MirroringClient) Close
func (c *MirroringClient) Close() errorClose closes the connection to the API service. Always call Close() when the client is no longer required.
func (*MirroringClient) Connection (deprecated)
func (c *MirroringClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*MirroringClient) CreateMirroringDeployment
func (c *MirroringClient) CreateMirroringDeployment(ctx context.Context, req *networksecuritypb.CreateMirroringDeploymentRequest, opts ...gax.CallOption) (*CreateMirroringDeploymentOperation, error)CreateMirroringDeployment creates a deployment in a given project and location. See https://google.aip.dev/133 (at https://google.aip.dev/133).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateMirroringDeploymentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateMirroringDeploymentRequest.
}
op, err := c.CreateMirroringDeployment(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*MirroringClient) CreateMirroringDeploymentGroup
func (c *MirroringClient) CreateMirroringDeploymentGroup(ctx context.Context, req *networksecuritypb.CreateMirroringDeploymentGroupRequest, opts ...gax.CallOption) (*CreateMirroringDeploymentGroupOperation, error)CreateMirroringDeploymentGroup creates a deployment group in a given project and location. See https://google.aip.dev/133 (at https://google.aip.dev/133).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateMirroringDeploymentGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateMirroringDeploymentGroupRequest.
}
op, err := c.CreateMirroringDeploymentGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*MirroringClient) CreateMirroringDeploymentGroupOperation
func (c *MirroringClient) CreateMirroringDeploymentGroupOperation(name string) *CreateMirroringDeploymentGroupOperationCreateMirroringDeploymentGroupOperation returns a new CreateMirroringDeploymentGroupOperation from a given name. The name must be that of a previously created CreateMirroringDeploymentGroupOperation, possibly from a different process.
func (*MirroringClient) CreateMirroringDeploymentOperation
func (c *MirroringClient) CreateMirroringDeploymentOperation(name string) *CreateMirroringDeploymentOperationCreateMirroringDeploymentOperation returns a new CreateMirroringDeploymentOperation from a given name. The name must be that of a previously created CreateMirroringDeploymentOperation, possibly from a different process.
func (*MirroringClient) CreateMirroringEndpointGroup
func (c *MirroringClient) CreateMirroringEndpointGroup(ctx context.Context, req *networksecuritypb.CreateMirroringEndpointGroupRequest, opts ...gax.CallOption) (*CreateMirroringEndpointGroupOperation, error)CreateMirroringEndpointGroup creates an endpoint group in a given project and location. See https://google.aip.dev/133 (at https://google.aip.dev/133).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateMirroringEndpointGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateMirroringEndpointGroupRequest.
}
op, err := c.CreateMirroringEndpointGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*MirroringClient) CreateMirroringEndpointGroupAssociation
func (c *MirroringClient) CreateMirroringEndpointGroupAssociation(ctx context.Context, req *networksecuritypb.CreateMirroringEndpointGroupAssociationRequest, opts ...gax.CallOption) (*CreateMirroringEndpointGroupAssociationOperation, error)CreateMirroringEndpointGroupAssociation creates an association in a given project and location. See https://google.aip.dev/133 (at https://google.aip.dev/133).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateMirroringEndpointGroupAssociationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateMirroringEndpointGroupAssociationRequest.
}
op, err := c.CreateMirroringEndpointGroupAssociation(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*MirroringClient) CreateMirroringEndpointGroupAssociationOperation
func (c *MirroringClient) CreateMirroringEndpointGroupAssociationOperation(name string) *CreateMirroringEndpointGroupAssociationOperationCreateMirroringEndpointGroupAssociationOperation returns a new CreateMirroringEndpointGroupAssociationOperation from a given name. The name must be that of a previously created CreateMirroringEndpointGroupAssociationOperation, possibly from a different process.
func (*MirroringClient) CreateMirroringEndpointGroupOperation
func (c *MirroringClient) CreateMirroringEndpointGroupOperation(name string) *CreateMirroringEndpointGroupOperationCreateMirroringEndpointGroupOperation returns a new CreateMirroringEndpointGroupOperation from a given name. The name must be that of a previously created CreateMirroringEndpointGroupOperation, possibly from a different process.
func (*MirroringClient) DeleteMirroringDeployment
func (c *MirroringClient) DeleteMirroringDeployment(ctx context.Context, req *networksecuritypb.DeleteMirroringDeploymentRequest, opts ...gax.CallOption) (*DeleteMirroringDeploymentOperation, error)DeleteMirroringDeployment deletes a deployment. See https://google.aip.dev/135 (at https://google.aip.dev/135).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteMirroringDeploymentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteMirroringDeploymentRequest.
}
op, err := c.DeleteMirroringDeployment(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*MirroringClient) DeleteMirroringDeploymentGroup
func (c *MirroringClient) DeleteMirroringDeploymentGroup(ctx context.Context, req *networksecuritypb.DeleteMirroringDeploymentGroupRequest, opts ...gax.CallOption) (*DeleteMirroringDeploymentGroupOperation, error)DeleteMirroringDeploymentGroup deletes a deployment group. See https://google.aip.dev/135 (at https://google.aip.dev/135).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteMirroringDeploymentGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteMirroringDeploymentGroupRequest.
}
op, err := c.DeleteMirroringDeploymentGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*MirroringClient) DeleteMirroringDeploymentGroupOperation
func (c *MirroringClient) DeleteMirroringDeploymentGroupOperation(name string) *DeleteMirroringDeploymentGroupOperationDeleteMirroringDeploymentGroupOperation returns a new DeleteMirroringDeploymentGroupOperation from a given name. The name must be that of a previously created DeleteMirroringDeploymentGroupOperation, possibly from a different process.
func (*MirroringClient) DeleteMirroringDeploymentOperation
func (c *MirroringClient) DeleteMirroringDeploymentOperation(name string) *DeleteMirroringDeploymentOperationDeleteMirroringDeploymentOperation returns a new DeleteMirroringDeploymentOperation from a given name. The name must be that of a previously created DeleteMirroringDeploymentOperation, possibly from a different process.
func (*MirroringClient) DeleteMirroringEndpointGroup
func (c *MirroringClient) DeleteMirroringEndpointGroup(ctx context.Context, req *networksecuritypb.DeleteMirroringEndpointGroupRequest, opts ...gax.CallOption) (*DeleteMirroringEndpointGroupOperation, error)DeleteMirroringEndpointGroup deletes an endpoint group. See https://google.aip.dev/135 (at https://google.aip.dev/135).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteMirroringEndpointGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteMirroringEndpointGroupRequest.
}
op, err := c.DeleteMirroringEndpointGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*MirroringClient) DeleteMirroringEndpointGroupAssociation
func (c *MirroringClient) DeleteMirroringEndpointGroupAssociation(ctx context.Context, req *networksecuritypb.DeleteMirroringEndpointGroupAssociationRequest, opts ...gax.CallOption) (*DeleteMirroringEndpointGroupAssociationOperation, error)DeleteMirroringEndpointGroupAssociation deletes an association. See https://google.aip.dev/135 (at https://google.aip.dev/135).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteMirroringEndpointGroupAssociationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteMirroringEndpointGroupAssociationRequest.
}
op, err := c.DeleteMirroringEndpointGroupAssociation(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*MirroringClient) DeleteMirroringEndpointGroupAssociationOperation
func (c *MirroringClient) DeleteMirroringEndpointGroupAssociationOperation(name string) *DeleteMirroringEndpointGroupAssociationOperationDeleteMirroringEndpointGroupAssociationOperation returns a new DeleteMirroringEndpointGroupAssociationOperation from a given name. The name must be that of a previously created DeleteMirroringEndpointGroupAssociationOperation, possibly from a different process.
func (*MirroringClient) DeleteMirroringEndpointGroupOperation
func (c *MirroringClient) DeleteMirroringEndpointGroupOperation(name string) *DeleteMirroringEndpointGroupOperationDeleteMirroringEndpointGroupOperation returns a new DeleteMirroringEndpointGroupOperation from a given name. The name must be that of a previously created DeleteMirroringEndpointGroupOperation, possibly from a different process.
func (*MirroringClient) DeleteOperation
func (c *MirroringClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation 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/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 := networksecurity.NewMirroringClient(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 (*MirroringClient) GetIamPolicy
func (c *MirroringClient) 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/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 := networksecurity.NewMirroringClient(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 (*MirroringClient) GetLocation
func (c *MirroringClient) 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/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 := networksecurity.NewMirroringClient(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 (*MirroringClient) GetMirroringDeployment
func (c *MirroringClient) GetMirroringDeployment(ctx context.Context, req *networksecuritypb.GetMirroringDeploymentRequest, opts ...gax.CallOption) (*networksecuritypb.MirroringDeployment, error)GetMirroringDeployment gets a specific deployment. See https://google.aip.dev/131 (at https://google.aip.dev/131).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetMirroringDeploymentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetMirroringDeploymentRequest.
}
resp, err := c.GetMirroringDeployment(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*MirroringClient) GetMirroringDeploymentGroup
func (c *MirroringClient) GetMirroringDeploymentGroup(ctx context.Context, req *networksecuritypb.GetMirroringDeploymentGroupRequest, opts ...gax.CallOption) (*networksecuritypb.MirroringDeploymentGroup, error)GetMirroringDeploymentGroup gets a specific deployment group. See https://google.aip.dev/131 (at https://google.aip.dev/131).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetMirroringDeploymentGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetMirroringDeploymentGroupRequest.
}
resp, err := c.GetMirroringDeploymentGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*MirroringClient) GetMirroringEndpointGroup
func (c *MirroringClient) GetMirroringEndpointGroup(ctx context.Context, req *networksecuritypb.GetMirroringEndpointGroupRequest, opts ...gax.CallOption) (*networksecuritypb.MirroringEndpointGroup, error)GetMirroringEndpointGroup gets a specific endpoint group. See https://google.aip.dev/131 (at https://google.aip.dev/131).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetMirroringEndpointGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetMirroringEndpointGroupRequest.
}
resp, err := c.GetMirroringEndpointGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*MirroringClient) GetMirroringEndpointGroupAssociation
func (c *MirroringClient) GetMirroringEndpointGroupAssociation(ctx context.Context, req *networksecuritypb.GetMirroringEndpointGroupAssociationRequest, opts ...gax.CallOption) (*networksecuritypb.MirroringEndpointGroupAssociation, error)GetMirroringEndpointGroupAssociation gets a specific association. See https://google.aip.dev/131 (at https://google.aip.dev/131).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetMirroringEndpointGroupAssociationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetMirroringEndpointGroupAssociationRequest.
}
resp, err := c.GetMirroringEndpointGroupAssociation(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*MirroringClient) GetOperation
func (c *MirroringClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewMirroringClient(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 (*MirroringClient) ListLocations
func (c *MirroringClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIteratorListLocations lists information about the supported locations for this service.
This method lists locations based on the resource scope provided in the [ListLocationsRequest.name (at http://ListLocationsRequest.name)][google.cloud.location.ListLocationsRequest.name (at http://google.cloud.location.ListLocationsRequest.name)] field: * Global locations: If name is empty, the method lists the public locations available to all projects. * Project-specific locations: If name follows the format projects/{project}, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project.
For gRPC and client library implementations, the resource name is passed as the name field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewMirroringClient(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/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 := networksecurity.NewMirroringClient(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 (*MirroringClient) ListMirroringDeploymentGroups
func (c *MirroringClient) ListMirroringDeploymentGroups(ctx context.Context, req *networksecuritypb.ListMirroringDeploymentGroupsRequest, opts ...gax.CallOption) *MirroringDeploymentGroupIteratorListMirroringDeploymentGroups lists deployment groups in a given project and location. See https://google.aip.dev/132 (at https://google.aip.dev/132).
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListMirroringDeploymentGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListMirroringDeploymentGroupsRequest.
}
it := c.ListMirroringDeploymentGroups(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.ListMirroringDeploymentGroupsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListMirroringDeploymentGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListMirroringDeploymentGroupsRequest.
}
for resp, err := range c.ListMirroringDeploymentGroups(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*MirroringClient) ListMirroringDeployments
func (c *MirroringClient) ListMirroringDeployments(ctx context.Context, req *networksecuritypb.ListMirroringDeploymentsRequest, opts ...gax.CallOption) *MirroringDeploymentIteratorListMirroringDeployments lists deployments in a given project and location. See https://google.aip.dev/132 (at https://google.aip.dev/132).
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListMirroringDeploymentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListMirroringDeploymentsRequest.
}
it := c.ListMirroringDeployments(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.ListMirroringDeploymentsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListMirroringDeploymentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListMirroringDeploymentsRequest.
}
for resp, err := range c.ListMirroringDeployments(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*MirroringClient) ListMirroringEndpointGroupAssociations
func (c *MirroringClient) ListMirroringEndpointGroupAssociations(ctx context.Context, req *networksecuritypb.ListMirroringEndpointGroupAssociationsRequest, opts ...gax.CallOption) *MirroringEndpointGroupAssociationIteratorListMirroringEndpointGroupAssociations lists associations in a given project and location. See https://google.aip.dev/132 (at https://google.aip.dev/132).
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListMirroringEndpointGroupAssociationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListMirroringEndpointGroupAssociationsRequest.
}
it := c.ListMirroringEndpointGroupAssociations(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.ListMirroringEndpointGroupAssociationsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListMirroringEndpointGroupAssociationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListMirroringEndpointGroupAssociationsRequest.
}
for resp, err := range c.ListMirroringEndpointGroupAssociations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*MirroringClient) ListMirroringEndpointGroups
func (c *MirroringClient) ListMirroringEndpointGroups(ctx context.Context, req *networksecuritypb.ListMirroringEndpointGroupsRequest, opts ...gax.CallOption) *MirroringEndpointGroupIteratorListMirroringEndpointGroups lists endpoint groups in a given project and location. See https://google.aip.dev/132 (at https://google.aip.dev/132).
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListMirroringEndpointGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListMirroringEndpointGroupsRequest.
}
it := c.ListMirroringEndpointGroups(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.ListMirroringEndpointGroupsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListMirroringEndpointGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListMirroringEndpointGroupsRequest.
}
for resp, err := range c.ListMirroringEndpointGroups(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*MirroringClient) ListOperations
func (c *MirroringClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations 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/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 := networksecurity.NewMirroringClient(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/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 := networksecurity.NewMirroringClient(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 (*MirroringClient) SetIamPolicy
func (c *MirroringClient) 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/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 := networksecurity.NewMirroringClient(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 (*MirroringClient) TestIamPermissions
func (c *MirroringClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewMirroringClient(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 (*MirroringClient) UpdateMirroringDeployment
func (c *MirroringClient) UpdateMirroringDeployment(ctx context.Context, req *networksecuritypb.UpdateMirroringDeploymentRequest, opts ...gax.CallOption) (*UpdateMirroringDeploymentOperation, error)UpdateMirroringDeployment updates a deployment. See https://google.aip.dev/134 (at https://google.aip.dev/134).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateMirroringDeploymentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateMirroringDeploymentRequest.
}
op, err := c.UpdateMirroringDeployment(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*MirroringClient) UpdateMirroringDeploymentGroup
func (c *MirroringClient) UpdateMirroringDeploymentGroup(ctx context.Context, req *networksecuritypb.UpdateMirroringDeploymentGroupRequest, opts ...gax.CallOption) (*UpdateMirroringDeploymentGroupOperation, error)UpdateMirroringDeploymentGroup updates a deployment group. See https://google.aip.dev/134 (at https://google.aip.dev/134).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateMirroringDeploymentGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateMirroringDeploymentGroupRequest.
}
op, err := c.UpdateMirroringDeploymentGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*MirroringClient) UpdateMirroringDeploymentGroupOperation
func (c *MirroringClient) UpdateMirroringDeploymentGroupOperation(name string) *UpdateMirroringDeploymentGroupOperationUpdateMirroringDeploymentGroupOperation returns a new UpdateMirroringDeploymentGroupOperation from a given name. The name must be that of a previously created UpdateMirroringDeploymentGroupOperation, possibly from a different process.
func (*MirroringClient) UpdateMirroringDeploymentOperation
func (c *MirroringClient) UpdateMirroringDeploymentOperation(name string) *UpdateMirroringDeploymentOperationUpdateMirroringDeploymentOperation returns a new UpdateMirroringDeploymentOperation from a given name. The name must be that of a previously created UpdateMirroringDeploymentOperation, possibly from a different process.
func (*MirroringClient) UpdateMirroringEndpointGroup
func (c *MirroringClient) UpdateMirroringEndpointGroup(ctx context.Context, req *networksecuritypb.UpdateMirroringEndpointGroupRequest, opts ...gax.CallOption) (*UpdateMirroringEndpointGroupOperation, error)UpdateMirroringEndpointGroup updates an endpoint group. See https://google.aip.dev/134 (at https://google.aip.dev/134).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateMirroringEndpointGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateMirroringEndpointGroupRequest.
}
op, err := c.UpdateMirroringEndpointGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*MirroringClient) UpdateMirroringEndpointGroupAssociation
func (c *MirroringClient) UpdateMirroringEndpointGroupAssociation(ctx context.Context, req *networksecuritypb.UpdateMirroringEndpointGroupAssociationRequest, opts ...gax.CallOption) (*UpdateMirroringEndpointGroupAssociationOperation, error)UpdateMirroringEndpointGroupAssociation updates an association. See https://google.aip.dev/134 (at https://google.aip.dev/134).
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewMirroringClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateMirroringEndpointGroupAssociationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateMirroringEndpointGroupAssociationRequest.
}
op, err := c.UpdateMirroringEndpointGroupAssociation(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*MirroringClient) UpdateMirroringEndpointGroupAssociationOperation
func (c *MirroringClient) UpdateMirroringEndpointGroupAssociationOperation(name string) *UpdateMirroringEndpointGroupAssociationOperationUpdateMirroringEndpointGroupAssociationOperation returns a new UpdateMirroringEndpointGroupAssociationOperation from a given name. The name must be that of a previously created UpdateMirroringEndpointGroupAssociationOperation, possibly from a different process.
func (*MirroringClient) UpdateMirroringEndpointGroupOperation
func (c *MirroringClient) UpdateMirroringEndpointGroupOperation(name string) *UpdateMirroringEndpointGroupOperationUpdateMirroringEndpointGroupOperation returns a new UpdateMirroringEndpointGroupOperation from a given name. The name must be that of a previously created UpdateMirroringEndpointGroupOperation, possibly from a different process.
MirroringDeploymentGroupIterator
type MirroringDeploymentGroupIterator 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.MirroringDeploymentGroup, nextPageToken string, err error)
// contains filtered or unexported fields
}MirroringDeploymentGroupIterator manages a stream of *networksecuritypb.MirroringDeploymentGroup.
func (*MirroringDeploymentGroupIterator) All
func (it *MirroringDeploymentGroupIterator) All() iter.Seq2[*networksecuritypb.MirroringDeploymentGroup, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*MirroringDeploymentGroupIterator) Next
func (it *MirroringDeploymentGroupIterator) Next() (*networksecuritypb.MirroringDeploymentGroup, 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 (*MirroringDeploymentGroupIterator) PageInfo
func (it *MirroringDeploymentGroupIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
MirroringDeploymentIterator
type MirroringDeploymentIterator 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.MirroringDeployment, nextPageToken string, err error)
// contains filtered or unexported fields
}MirroringDeploymentIterator manages a stream of *networksecuritypb.MirroringDeployment.
func (*MirroringDeploymentIterator) All
func (it *MirroringDeploymentIterator) All() iter.Seq2[*networksecuritypb.MirroringDeployment, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*MirroringDeploymentIterator) Next
func (it *MirroringDeploymentIterator) Next() (*networksecuritypb.MirroringDeployment, 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 (*MirroringDeploymentIterator) PageInfo
func (it *MirroringDeploymentIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
MirroringEndpointGroupAssociationIterator
type MirroringEndpointGroupAssociationIterator 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.MirroringEndpointGroupAssociation, nextPageToken string, err error)
// contains filtered or unexported fields
}MirroringEndpointGroupAssociationIterator manages a stream of *networksecuritypb.MirroringEndpointGroupAssociation.
func (*MirroringEndpointGroupAssociationIterator) All
func (it *MirroringEndpointGroupAssociationIterator) All() iter.Seq2[*networksecuritypb.MirroringEndpointGroupAssociation, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*MirroringEndpointGroupAssociationIterator) Next
func (it *MirroringEndpointGroupAssociationIterator) Next() (*networksecuritypb.MirroringEndpointGroupAssociation, 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 (*MirroringEndpointGroupAssociationIterator) PageInfo
func (it *MirroringEndpointGroupAssociationIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
MirroringEndpointGroupIterator
type MirroringEndpointGroupIterator 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.MirroringEndpointGroup, nextPageToken string, err error)
// contains filtered or unexported fields
}MirroringEndpointGroupIterator manages a stream of *networksecuritypb.MirroringEndpointGroup.
func (*MirroringEndpointGroupIterator) All
func (it *MirroringEndpointGroupIterator) All() iter.Seq2[*networksecuritypb.MirroringEndpointGroup, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*MirroringEndpointGroupIterator) Next
func (it *MirroringEndpointGroupIterator) Next() (*networksecuritypb.MirroringEndpointGroup, 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 (*MirroringEndpointGroupIterator) PageInfo
func (it *MirroringEndpointGroupIterator) PageInfo() *iterator.PageInfoPageInfo 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
func (it *OperationIterator) Next() (*longrunningpb.Operation, error)Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*OperationIterator) PageInfo
func (it *OperationIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
OrganizationAddressGroupCallOptions
type OrganizationAddressGroupCallOptions struct {
ListAddressGroups []gax.CallOption
GetAddressGroup []gax.CallOption
CreateAddressGroup []gax.CallOption
UpdateAddressGroup []gax.CallOption
AddAddressGroupItems []gax.CallOption
RemoveAddressGroupItems []gax.CallOption
CloneAddressGroupItems []gax.CallOption
DeleteAddressGroup []gax.CallOption
ListAddressGroupReferences []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
}OrganizationAddressGroupCallOptions contains the retry settings for each method of OrganizationAddressGroupClient.
OrganizationAddressGroupClient
type OrganizationAddressGroupClient struct {
// The call options for this service.
CallOptions *OrganizationAddressGroupCallOptions
// 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
}OrganizationAddressGroupClient 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.
Organization AddressGroup is created under organization. Requests against Organization AddressGroup will use project from request credential for activation/quota/visibility check.
func NewOrganizationAddressGroupClient
func NewOrganizationAddressGroupClient(ctx context.Context, opts ...option.ClientOption) (*OrganizationAddressGroupClient, error)NewOrganizationAddressGroupClient creates a new organization address group service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Organization AddressGroup is created under organization. Requests against Organization AddressGroup will use project from request credential for activation/quota/visibility check.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewOrganizationAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewOrganizationAddressGroupRESTClient
func NewOrganizationAddressGroupRESTClient(ctx context.Context, opts ...option.ClientOption) (*OrganizationAddressGroupClient, error)NewOrganizationAddressGroupRESTClient creates a new organization address group service rest client.
Organization AddressGroup is created under organization. Requests against Organization AddressGroup will use project from request credential for activation/quota/visibility check.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewOrganizationAddressGroupRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*OrganizationAddressGroupClient) AddAddressGroupItems
func (c *OrganizationAddressGroupClient) AddAddressGroupItems(ctx context.Context, req *networksecuritypb.AddAddressGroupItemsRequest, opts ...gax.CallOption) (*AddAddressGroupItemsOperation, error)AddAddressGroupItems adds items to an address group.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.AddAddressGroupItemsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#AddAddressGroupItemsRequest.
}
op, err := c.AddAddressGroupItems(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*OrganizationAddressGroupClient) AddAddressGroupItemsOperation
func (c *OrganizationAddressGroupClient) AddAddressGroupItemsOperation(name string) *AddAddressGroupItemsOperationAddAddressGroupItemsOperation returns a new AddAddressGroupItemsOperation from a given name. The name must be that of a previously created AddAddressGroupItemsOperation, possibly from a different process.
func (*OrganizationAddressGroupClient) CancelOperation
func (c *OrganizationAddressGroupClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation 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/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 := networksecurity.NewOrganizationAddressGroupClient(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 (*OrganizationAddressGroupClient) CloneAddressGroupItems
func (c *OrganizationAddressGroupClient) CloneAddressGroupItems(ctx context.Context, req *networksecuritypb.CloneAddressGroupItemsRequest, opts ...gax.CallOption) (*CloneAddressGroupItemsOperation, error)CloneAddressGroupItems clones items from one address group to another.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CloneAddressGroupItemsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CloneAddressGroupItemsRequest.
}
op, err := c.CloneAddressGroupItems(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*OrganizationAddressGroupClient) CloneAddressGroupItemsOperation
func (c *OrganizationAddressGroupClient) CloneAddressGroupItemsOperation(name string) *CloneAddressGroupItemsOperationCloneAddressGroupItemsOperation returns a new CloneAddressGroupItemsOperation from a given name. The name must be that of a previously created CloneAddressGroupItemsOperation, possibly from a different process.
func (*OrganizationAddressGroupClient) Close
func (c *OrganizationAddressGroupClient) Close() errorClose closes the connection to the API service. Always call Close() when the client is no longer required.
func (*OrganizationAddressGroupClient) Connection (deprecated)
func (c *OrganizationAddressGroupClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*OrganizationAddressGroupClient) CreateAddressGroup
func (c *OrganizationAddressGroupClient) CreateAddressGroup(ctx context.Context, req *networksecuritypb.CreateAddressGroupRequest, opts ...gax.CallOption) (*CreateAddressGroupOperation, error)CreateAddressGroup creates a new address group in a given project and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateAddressGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateAddressGroupRequest.
}
op, err := c.CreateAddressGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*OrganizationAddressGroupClient) CreateAddressGroupOperation
func (c *OrganizationAddressGroupClient) CreateAddressGroupOperation(name string) *CreateAddressGroupOperationCreateAddressGroupOperation returns a new CreateAddressGroupOperation from a given name. The name must be that of a previously created CreateAddressGroupOperation, possibly from a different process.
func (*OrganizationAddressGroupClient) DeleteAddressGroup
func (c *OrganizationAddressGroupClient) DeleteAddressGroup(ctx context.Context, req *networksecuritypb.DeleteAddressGroupRequest, opts ...gax.CallOption) (*DeleteAddressGroupOperation, error)DeleteAddressGroup deletes an address group.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteAddressGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteAddressGroupRequest.
}
op, err := c.DeleteAddressGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*OrganizationAddressGroupClient) DeleteAddressGroupOperation
func (c *OrganizationAddressGroupClient) DeleteAddressGroupOperation(name string) *DeleteAddressGroupOperationDeleteAddressGroupOperation returns a new DeleteAddressGroupOperation from a given name. The name must be that of a previously created DeleteAddressGroupOperation, possibly from a different process.
func (*OrganizationAddressGroupClient) DeleteOperation
func (c *OrganizationAddressGroupClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation 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/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 := networksecurity.NewOrganizationAddressGroupClient(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 (*OrganizationAddressGroupClient) GetAddressGroup
func (c *OrganizationAddressGroupClient) GetAddressGroup(ctx context.Context, req *networksecuritypb.GetAddressGroupRequest, opts ...gax.CallOption) (*networksecuritypb.AddressGroup, error)GetAddressGroup gets details of a single address group.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetAddressGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetAddressGroupRequest.
}
resp, err := c.GetAddressGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*OrganizationAddressGroupClient) GetIamPolicy
func (c *OrganizationAddressGroupClient) 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/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 := networksecurity.NewOrganizationAddressGroupClient(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 (*OrganizationAddressGroupClient) GetLocation
func (c *OrganizationAddressGroupClient) 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/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 := networksecurity.NewOrganizationAddressGroupClient(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 (*OrganizationAddressGroupClient) GetOperation
func (c *OrganizationAddressGroupClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewOrganizationAddressGroupClient(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 (*OrganizationAddressGroupClient) ListAddressGroupReferences
func (c *OrganizationAddressGroupClient) ListAddressGroupReferences(ctx context.Context, req *networksecuritypb.ListAddressGroupReferencesRequest, opts ...gax.CallOption) *ListAddressGroupReferencesResponse_AddressGroupReferenceIteratorListAddressGroupReferences lists references of an address group.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListAddressGroupReferencesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListAddressGroupReferencesRequest.
}
it := c.ListAddressGroupReferences(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.ListAddressGroupReferencesResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListAddressGroupReferencesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListAddressGroupReferencesRequest.
}
for resp, err := range c.ListAddressGroupReferences(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*OrganizationAddressGroupClient) ListAddressGroups
func (c *OrganizationAddressGroupClient) ListAddressGroups(ctx context.Context, req *networksecuritypb.ListAddressGroupsRequest, opts ...gax.CallOption) *AddressGroupIteratorListAddressGroups lists address groups in a given project and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListAddressGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListAddressGroupsRequest.
}
it := c.ListAddressGroups(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.ListAddressGroupsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListAddressGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListAddressGroupsRequest.
}
for resp, err := range c.ListAddressGroups(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*OrganizationAddressGroupClient) ListLocations
func (c *OrganizationAddressGroupClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIteratorListLocations lists information about the supported locations for this service.
This method lists locations based on the resource scope provided in the [ListLocationsRequest.name (at http://ListLocationsRequest.name)][google.cloud.location.ListLocationsRequest.name (at http://google.cloud.location.ListLocationsRequest.name)] field: * Global locations: If name is empty, the method lists the public locations available to all projects. * Project-specific locations: If name follows the format projects/{project}, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project.
For gRPC and client library implementations, the resource name is passed as the name field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewOrganizationAddressGroupClient(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/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 := networksecurity.NewOrganizationAddressGroupClient(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 (*OrganizationAddressGroupClient) ListOperations
func (c *OrganizationAddressGroupClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations 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/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 := networksecurity.NewOrganizationAddressGroupClient(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/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 := networksecurity.NewOrganizationAddressGroupClient(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 (*OrganizationAddressGroupClient) RemoveAddressGroupItems
func (c *OrganizationAddressGroupClient) RemoveAddressGroupItems(ctx context.Context, req *networksecuritypb.RemoveAddressGroupItemsRequest, opts ...gax.CallOption) (*RemoveAddressGroupItemsOperation, error)RemoveAddressGroupItems removes items from an address group.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.RemoveAddressGroupItemsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#RemoveAddressGroupItemsRequest.
}
op, err := c.RemoveAddressGroupItems(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*OrganizationAddressGroupClient) RemoveAddressGroupItemsOperation
func (c *OrganizationAddressGroupClient) RemoveAddressGroupItemsOperation(name string) *RemoveAddressGroupItemsOperationRemoveAddressGroupItemsOperation returns a new RemoveAddressGroupItemsOperation from a given name. The name must be that of a previously created RemoveAddressGroupItemsOperation, possibly from a different process.
func (*OrganizationAddressGroupClient) SetIamPolicy
func (c *OrganizationAddressGroupClient) 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/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 := networksecurity.NewOrganizationAddressGroupClient(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 (*OrganizationAddressGroupClient) TestIamPermissions
func (c *OrganizationAddressGroupClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewOrganizationAddressGroupClient(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 (*OrganizationAddressGroupClient) UpdateAddressGroup
func (c *OrganizationAddressGroupClient) UpdateAddressGroup(ctx context.Context, req *networksecuritypb.UpdateAddressGroupRequest, opts ...gax.CallOption) (*UpdateAddressGroupOperation, error)UpdateAddressGroup updates parameters of an address group.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationAddressGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateAddressGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateAddressGroupRequest.
}
op, err := c.UpdateAddressGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*OrganizationAddressGroupClient) UpdateAddressGroupOperation
func (c *OrganizationAddressGroupClient) UpdateAddressGroupOperation(name string) *UpdateAddressGroupOperationUpdateAddressGroupOperation returns a new UpdateAddressGroupOperation from a given name. The name must be that of a previously created UpdateAddressGroupOperation, possibly from a different process.
OrganizationSecurityProfileGroupCallOptions
type OrganizationSecurityProfileGroupCallOptions struct {
ListSecurityProfileGroups []gax.CallOption
GetSecurityProfileGroup []gax.CallOption
CreateSecurityProfileGroup []gax.CallOption
UpdateSecurityProfileGroup []gax.CallOption
DeleteSecurityProfileGroup []gax.CallOption
ListSecurityProfiles []gax.CallOption
GetSecurityProfile []gax.CallOption
CreateSecurityProfile []gax.CallOption
UpdateSecurityProfile []gax.CallOption
DeleteSecurityProfile []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
}OrganizationSecurityProfileGroupCallOptions contains the retry settings for each method of OrganizationSecurityProfileGroupClient.
OrganizationSecurityProfileGroupClient
type OrganizationSecurityProfileGroupClient struct {
// The call options for this service.
CallOptions *OrganizationSecurityProfileGroupCallOptions
// 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
}OrganizationSecurityProfileGroupClient 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.
Organization SecurityProfileGroup is created under organization.
func NewOrganizationSecurityProfileGroupClient
func NewOrganizationSecurityProfileGroupClient(ctx context.Context, opts ...option.ClientOption) (*OrganizationSecurityProfileGroupClient, error)NewOrganizationSecurityProfileGroupClient creates a new organization security profile group service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Organization SecurityProfileGroup is created under organization.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewOrganizationSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewOrganizationSecurityProfileGroupRESTClient
func NewOrganizationSecurityProfileGroupRESTClient(ctx context.Context, opts ...option.ClientOption) (*OrganizationSecurityProfileGroupClient, error)NewOrganizationSecurityProfileGroupRESTClient creates a new organization security profile group service rest client.
Organization SecurityProfileGroup is created under organization.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewOrganizationSecurityProfileGroupRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*OrganizationSecurityProfileGroupClient) CancelOperation
func (c *OrganizationSecurityProfileGroupClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation 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/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 := networksecurity.NewOrganizationSecurityProfileGroupClient(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 (*OrganizationSecurityProfileGroupClient) Close
func (c *OrganizationSecurityProfileGroupClient) Close() errorClose closes the connection to the API service. Always call Close() when the client is no longer required.
func (*OrganizationSecurityProfileGroupClient) Connection (deprecated)
func (c *OrganizationSecurityProfileGroupClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*OrganizationSecurityProfileGroupClient) CreateSecurityProfile
func (c *OrganizationSecurityProfileGroupClient) CreateSecurityProfile(ctx context.Context, req *networksecuritypb.CreateSecurityProfileRequest, opts ...gax.CallOption) (*CreateSecurityProfileOperation, error)CreateSecurityProfile creates a new SecurityProfile in a given organization and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateSecurityProfileRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateSecurityProfileRequest.
}
op, err := c.CreateSecurityProfile(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*OrganizationSecurityProfileGroupClient) CreateSecurityProfileGroup
func (c *OrganizationSecurityProfileGroupClient) CreateSecurityProfileGroup(ctx context.Context, req *networksecuritypb.CreateSecurityProfileGroupRequest, opts ...gax.CallOption) (*CreateSecurityProfileGroupOperation, error)CreateSecurityProfileGroup creates a new SecurityProfileGroup in a given organization and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateSecurityProfileGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateSecurityProfileGroupRequest.
}
op, err := c.CreateSecurityProfileGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*OrganizationSecurityProfileGroupClient) CreateSecurityProfileGroupOperation
func (c *OrganizationSecurityProfileGroupClient) CreateSecurityProfileGroupOperation(name string) *CreateSecurityProfileGroupOperationCreateSecurityProfileGroupOperation returns a new CreateSecurityProfileGroupOperation from a given name. The name must be that of a previously created CreateSecurityProfileGroupOperation, possibly from a different process.
func (*OrganizationSecurityProfileGroupClient) CreateSecurityProfileOperation
func (c *OrganizationSecurityProfileGroupClient) CreateSecurityProfileOperation(name string) *CreateSecurityProfileOperationCreateSecurityProfileOperation returns a new CreateSecurityProfileOperation from a given name. The name must be that of a previously created CreateSecurityProfileOperation, possibly from a different process.
func (*OrganizationSecurityProfileGroupClient) DeleteOperation
func (c *OrganizationSecurityProfileGroupClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation 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/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 := networksecurity.NewOrganizationSecurityProfileGroupClient(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 (*OrganizationSecurityProfileGroupClient) DeleteSecurityProfile
func (c *OrganizationSecurityProfileGroupClient) DeleteSecurityProfile(ctx context.Context, req *networksecuritypb.DeleteSecurityProfileRequest, opts ...gax.CallOption) (*DeleteSecurityProfileOperation, error)DeleteSecurityProfile deletes a single SecurityProfile.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteSecurityProfileRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteSecurityProfileRequest.
}
op, err := c.DeleteSecurityProfile(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*OrganizationSecurityProfileGroupClient) DeleteSecurityProfileGroup
func (c *OrganizationSecurityProfileGroupClient) DeleteSecurityProfileGroup(ctx context.Context, req *networksecuritypb.DeleteSecurityProfileGroupRequest, opts ...gax.CallOption) (*DeleteSecurityProfileGroupOperation, error)DeleteSecurityProfileGroup deletes a single SecurityProfileGroup.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteSecurityProfileGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteSecurityProfileGroupRequest.
}
op, err := c.DeleteSecurityProfileGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*OrganizationSecurityProfileGroupClient) DeleteSecurityProfileGroupOperation
func (c *OrganizationSecurityProfileGroupClient) DeleteSecurityProfileGroupOperation(name string) *DeleteSecurityProfileGroupOperationDeleteSecurityProfileGroupOperation returns a new DeleteSecurityProfileGroupOperation from a given name. The name must be that of a previously created DeleteSecurityProfileGroupOperation, possibly from a different process.
func (*OrganizationSecurityProfileGroupClient) DeleteSecurityProfileOperation
func (c *OrganizationSecurityProfileGroupClient) DeleteSecurityProfileOperation(name string) *DeleteSecurityProfileOperationDeleteSecurityProfileOperation returns a new DeleteSecurityProfileOperation from a given name. The name must be that of a previously created DeleteSecurityProfileOperation, possibly from a different process.
func (*OrganizationSecurityProfileGroupClient) GetIamPolicy
func (c *OrganizationSecurityProfileGroupClient) 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/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 := networksecurity.NewOrganizationSecurityProfileGroupClient(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 (*OrganizationSecurityProfileGroupClient) GetLocation
func (c *OrganizationSecurityProfileGroupClient) 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/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 := networksecurity.NewOrganizationSecurityProfileGroupClient(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 (*OrganizationSecurityProfileGroupClient) GetOperation
func (c *OrganizationSecurityProfileGroupClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewOrganizationSecurityProfileGroupClient(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 (*OrganizationSecurityProfileGroupClient) GetSecurityProfile
func (c *OrganizationSecurityProfileGroupClient) GetSecurityProfile(ctx context.Context, req *networksecuritypb.GetSecurityProfileRequest, opts ...gax.CallOption) (*networksecuritypb.SecurityProfile, error)GetSecurityProfile gets details of a single SecurityProfile.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetSecurityProfileRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetSecurityProfileRequest.
}
resp, err := c.GetSecurityProfile(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*OrganizationSecurityProfileGroupClient) GetSecurityProfileGroup
func (c *OrganizationSecurityProfileGroupClient) GetSecurityProfileGroup(ctx context.Context, req *networksecuritypb.GetSecurityProfileGroupRequest, opts ...gax.CallOption) (*networksecuritypb.SecurityProfileGroup, error)GetSecurityProfileGroup gets details of a single SecurityProfileGroup.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetSecurityProfileGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetSecurityProfileGroupRequest.
}
resp, err := c.GetSecurityProfileGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*OrganizationSecurityProfileGroupClient) ListLocations
func (c *OrganizationSecurityProfileGroupClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIteratorListLocations lists information about the supported locations for this service.
This method lists locations based on the resource scope provided in the [ListLocationsRequest.name (at http://ListLocationsRequest.name)][google.cloud.location.ListLocationsRequest.name (at http://google.cloud.location.ListLocationsRequest.name)] field: * Global locations: If name is empty, the method lists the public locations available to all projects. * Project-specific locations: If name follows the format projects/{project}, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project.
For gRPC and client library implementations, the resource name is passed as the name field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewOrganizationSecurityProfileGroupClient(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/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 := networksecurity.NewOrganizationSecurityProfileGroupClient(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 (*OrganizationSecurityProfileGroupClient) ListOperations
func (c *OrganizationSecurityProfileGroupClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations 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/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 := networksecurity.NewOrganizationSecurityProfileGroupClient(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/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 := networksecurity.NewOrganizationSecurityProfileGroupClient(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 (*OrganizationSecurityProfileGroupClient) ListSecurityProfileGroups
func (c *OrganizationSecurityProfileGroupClient) ListSecurityProfileGroups(ctx context.Context, req *networksecuritypb.ListSecurityProfileGroupsRequest, opts ...gax.CallOption) *SecurityProfileGroupIteratorListSecurityProfileGroups lists SecurityProfileGroups in a given organization and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListSecurityProfileGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListSecurityProfileGroupsRequest.
}
it := c.ListSecurityProfileGroups(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.ListSecurityProfileGroupsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListSecurityProfileGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListSecurityProfileGroupsRequest.
}
for resp, err := range c.ListSecurityProfileGroups(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*OrganizationSecurityProfileGroupClient) ListSecurityProfiles
func (c *OrganizationSecurityProfileGroupClient) ListSecurityProfiles(ctx context.Context, req *networksecuritypb.ListSecurityProfilesRequest, opts ...gax.CallOption) *SecurityProfileIteratorListSecurityProfiles lists SecurityProfiles in a given organization and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListSecurityProfilesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListSecurityProfilesRequest.
}
it := c.ListSecurityProfiles(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.ListSecurityProfilesResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListSecurityProfilesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListSecurityProfilesRequest.
}
for resp, err := range c.ListSecurityProfiles(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*OrganizationSecurityProfileGroupClient) SetIamPolicy
func (c *OrganizationSecurityProfileGroupClient) 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/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 := networksecurity.NewOrganizationSecurityProfileGroupClient(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 (*OrganizationSecurityProfileGroupClient) TestIamPermissions
func (c *OrganizationSecurityProfileGroupClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewOrganizationSecurityProfileGroupClient(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 (*OrganizationSecurityProfileGroupClient) UpdateSecurityProfile
func (c *OrganizationSecurityProfileGroupClient) UpdateSecurityProfile(ctx context.Context, req *networksecuritypb.UpdateSecurityProfileRequest, opts ...gax.CallOption) (*UpdateSecurityProfileOperation, error)UpdateSecurityProfile updates the parameters of a single SecurityProfile.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateSecurityProfileRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateSecurityProfileRequest.
}
op, err := c.UpdateSecurityProfile(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*OrganizationSecurityProfileGroupClient) UpdateSecurityProfileGroup
func (c *OrganizationSecurityProfileGroupClient) UpdateSecurityProfileGroup(ctx context.Context, req *networksecuritypb.UpdateSecurityProfileGroupRequest, opts ...gax.CallOption) (*UpdateSecurityProfileGroupOperation, error)UpdateSecurityProfileGroup updates the parameters of a single SecurityProfileGroup.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewOrganizationSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateSecurityProfileGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateSecurityProfileGroupRequest.
}
op, err := c.UpdateSecurityProfileGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*OrganizationSecurityProfileGroupClient) UpdateSecurityProfileGroupOperation
func (c *OrganizationSecurityProfileGroupClient) UpdateSecurityProfileGroupOperation(name string) *UpdateSecurityProfileGroupOperationUpdateSecurityProfileGroupOperation returns a new UpdateSecurityProfileGroupOperation from a given name. The name must be that of a previously created UpdateSecurityProfileGroupOperation, possibly from a different process.
func (*OrganizationSecurityProfileGroupClient) UpdateSecurityProfileOperation
func (c *OrganizationSecurityProfileGroupClient) UpdateSecurityProfileOperation(name string) *UpdateSecurityProfileOperationUpdateSecurityProfileOperation returns a new UpdateSecurityProfileOperation from a given name. The name must be that of a previously created UpdateSecurityProfileOperation, possibly from a different process.
RemoveAddressGroupItemsOperation
type RemoveAddressGroupItemsOperation struct {
// contains filtered or unexported fields
}RemoveAddressGroupItemsOperation manages a long-running operation from RemoveAddressGroupItems.
func (*RemoveAddressGroupItemsOperation) Done
func (op *RemoveAddressGroupItemsOperation) Done() boolDone reports whether the long-running operation has completed.
func (*RemoveAddressGroupItemsOperation) Metadata
func (op *RemoveAddressGroupItemsOperation) Metadata() (*networksecuritypb.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 (*RemoveAddressGroupItemsOperation) Name
func (op *RemoveAddressGroupItemsOperation) Name() stringName 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 (*RemoveAddressGroupItemsOperation) Poll
func (op *RemoveAddressGroupItemsOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AddressGroup, 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 (*RemoveAddressGroupItemsOperation) Wait
func (op *RemoveAddressGroupItemsOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AddressGroup, 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.
SACAttachmentIterator
type SACAttachmentIterator 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.SACAttachment, nextPageToken string, err error)
// contains filtered or unexported fields
}SACAttachmentIterator manages a stream of *networksecuritypb.SACAttachment.
func (*SACAttachmentIterator) All
func (it *SACAttachmentIterator) All() iter.Seq2[*networksecuritypb.SACAttachment, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*SACAttachmentIterator) Next
func (it *SACAttachmentIterator) Next() (*networksecuritypb.SACAttachment, 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 (*SACAttachmentIterator) PageInfo
func (it *SACAttachmentIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
SACRealmIterator
type SACRealmIterator 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.SACRealm, nextPageToken string, err error)
// contains filtered or unexported fields
}SACRealmIterator manages a stream of *networksecuritypb.SACRealm.
func (*SACRealmIterator) All
func (it *SACRealmIterator) All() iter.Seq2[*networksecuritypb.SACRealm, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*SACRealmIterator) Next
func (it *SACRealmIterator) Next() (*networksecuritypb.SACRealm, 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 (*SACRealmIterator) PageInfo
func (it *SACRealmIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
SSERealmCallOptions
type SSERealmCallOptions struct {
ListSACRealms []gax.CallOption
GetSACRealm []gax.CallOption
CreateSACRealm []gax.CallOption
DeleteSACRealm []gax.CallOption
ListSACAttachments []gax.CallOption
GetSACAttachment []gax.CallOption
CreateSACAttachment []gax.CallOption
DeleteSACAttachment []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
}SSERealmCallOptions contains the retry settings for each method of SSERealmClient.
SSERealmClient
type SSERealmClient struct {
// The call options for this service.
CallOptions *SSERealmCallOptions
// 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
}SSERealmClient 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.
Service describing handlers for resources
func NewSSERealmClient
func NewSSERealmClient(ctx context.Context, opts ...option.ClientOption) (*SSERealmClient, error)NewSSERealmClient creates a new sse realm service 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewSSERealmClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewSSERealmRESTClient
func NewSSERealmRESTClient(ctx context.Context, opts ...option.ClientOption) (*SSERealmClient, error)NewSSERealmRESTClient creates a new sse realm service rest client.
Service describing handlers for resources
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewSSERealmRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*SSERealmClient) CancelOperation
func (c *SSERealmClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation 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/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 := networksecurity.NewSSERealmClient(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 (*SSERealmClient) Close
func (c *SSERealmClient) Close() errorClose closes the connection to the API service. Always call Close() when the client is no longer required.
func (*SSERealmClient) Connection (deprecated)
func (c *SSERealmClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*SSERealmClient) CreateSACAttachment
func (c *SSERealmClient) CreateSACAttachment(ctx context.Context, req *networksecuritypb.CreateSACAttachmentRequest, opts ...gax.CallOption) (*CreateSACAttachmentOperation, error)CreateSACAttachment creates a new SACAttachment in a given project and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSSERealmClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateSACAttachmentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateSACAttachmentRequest.
}
op, err := c.CreateSACAttachment(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*SSERealmClient) CreateSACAttachmentOperation
func (c *SSERealmClient) CreateSACAttachmentOperation(name string) *CreateSACAttachmentOperationCreateSACAttachmentOperation returns a new CreateSACAttachmentOperation from a given name. The name must be that of a previously created CreateSACAttachmentOperation, possibly from a different process.
func (*SSERealmClient) CreateSACRealm
func (c *SSERealmClient) CreateSACRealm(ctx context.Context, req *networksecuritypb.CreateSACRealmRequest, opts ...gax.CallOption) (*CreateSACRealmOperation, error)CreateSACRealm creates a new SACRealm in a given project.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSSERealmClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateSACRealmRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateSACRealmRequest.
}
op, err := c.CreateSACRealm(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*SSERealmClient) CreateSACRealmOperation
func (c *SSERealmClient) CreateSACRealmOperation(name string) *CreateSACRealmOperationCreateSACRealmOperation returns a new CreateSACRealmOperation from a given name. The name must be that of a previously created CreateSACRealmOperation, possibly from a different process.
func (*SSERealmClient) DeleteOperation
func (c *SSERealmClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation 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/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 := networksecurity.NewSSERealmClient(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 (*SSERealmClient) DeleteSACAttachment
func (c *SSERealmClient) DeleteSACAttachment(ctx context.Context, req *networksecuritypb.DeleteSACAttachmentRequest, opts ...gax.CallOption) (*DeleteSACAttachmentOperation, error)DeleteSACAttachment deletes the specified attachment.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSSERealmClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteSACAttachmentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteSACAttachmentRequest.
}
op, err := c.DeleteSACAttachment(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*SSERealmClient) DeleteSACAttachmentOperation
func (c *SSERealmClient) DeleteSACAttachmentOperation(name string) *DeleteSACAttachmentOperationDeleteSACAttachmentOperation returns a new DeleteSACAttachmentOperation from a given name. The name must be that of a previously created DeleteSACAttachmentOperation, possibly from a different process.
func (*SSERealmClient) DeleteSACRealm
func (c *SSERealmClient) DeleteSACRealm(ctx context.Context, req *networksecuritypb.DeleteSACRealmRequest, opts ...gax.CallOption) (*DeleteSACRealmOperation, error)DeleteSACRealm deletes the specified realm.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSSERealmClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteSACRealmRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteSACRealmRequest.
}
op, err := c.DeleteSACRealm(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*SSERealmClient) DeleteSACRealmOperation
func (c *SSERealmClient) DeleteSACRealmOperation(name string) *DeleteSACRealmOperationDeleteSACRealmOperation returns a new DeleteSACRealmOperation from a given name. The name must be that of a previously created DeleteSACRealmOperation, possibly from a different process.
func (*SSERealmClient) GetIamPolicy
func (c *SSERealmClient) 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/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 := networksecurity.NewSSERealmClient(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 (*SSERealmClient) GetLocation
func (c *SSERealmClient) 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/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 := networksecurity.NewSSERealmClient(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 (*SSERealmClient) GetOperation
func (c *SSERealmClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewSSERealmClient(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 (*SSERealmClient) GetSACAttachment
func (c *SSERealmClient) GetSACAttachment(ctx context.Context, req *networksecuritypb.GetSACAttachmentRequest, opts ...gax.CallOption) (*networksecuritypb.SACAttachment, error)GetSACAttachment returns the specified attachment.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSSERealmClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetSACAttachmentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetSACAttachmentRequest.
}
resp, err := c.GetSACAttachment(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*SSERealmClient) GetSACRealm
func (c *SSERealmClient) GetSACRealm(ctx context.Context, req *networksecuritypb.GetSACRealmRequest, opts ...gax.CallOption) (*networksecuritypb.SACRealm, error)GetSACRealm returns the specified realm.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSSERealmClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetSACRealmRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetSACRealmRequest.
}
resp, err := c.GetSACRealm(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*SSERealmClient) ListLocations
func (c *SSERealmClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIteratorListLocations lists information about the supported locations for this service.
This method lists locations based on the resource scope provided in the [ListLocationsRequest.name (at http://ListLocationsRequest.name)][google.cloud.location.ListLocationsRequest.name (at http://google.cloud.location.ListLocationsRequest.name)] field: * Global locations: If name is empty, the method lists the public locations available to all projects. * Project-specific locations: If name follows the format projects/{project}, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project.
For gRPC and client library implementations, the resource name is passed as the name field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewSSERealmClient(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/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 := networksecurity.NewSSERealmClient(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 (*SSERealmClient) ListOperations
func (c *SSERealmClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations 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/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 := networksecurity.NewSSERealmClient(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/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 := networksecurity.NewSSERealmClient(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 (*SSERealmClient) ListSACAttachments
func (c *SSERealmClient) ListSACAttachments(ctx context.Context, req *networksecuritypb.ListSACAttachmentsRequest, opts ...gax.CallOption) *SACAttachmentIteratorListSACAttachments lists SACAttachments in a given project and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSSERealmClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListSACAttachmentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListSACAttachmentsRequest.
}
it := c.ListSACAttachments(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.ListSACAttachmentsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSSERealmClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListSACAttachmentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListSACAttachmentsRequest.
}
for resp, err := range c.ListSACAttachments(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*SSERealmClient) ListSACRealms
func (c *SSERealmClient) ListSACRealms(ctx context.Context, req *networksecuritypb.ListSACRealmsRequest, opts ...gax.CallOption) *SACRealmIteratorListSACRealms lists SACRealms in a given project.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSSERealmClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListSACRealmsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListSACRealmsRequest.
}
it := c.ListSACRealms(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.ListSACRealmsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSSERealmClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListSACRealmsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListSACRealmsRequest.
}
for resp, err := range c.ListSACRealms(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*SSERealmClient) SetIamPolicy
func (c *SSERealmClient) 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/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 := networksecurity.NewSSERealmClient(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 (*SSERealmClient) TestIamPermissions
func (c *SSERealmClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewSSERealmClient(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
}
SecurityProfileGroupCallOptions
type SecurityProfileGroupCallOptions struct {
ListSecurityProfileGroups []gax.CallOption
GetSecurityProfileGroup []gax.CallOption
CreateSecurityProfileGroup []gax.CallOption
UpdateSecurityProfileGroup []gax.CallOption
DeleteSecurityProfileGroup []gax.CallOption
ListSecurityProfiles []gax.CallOption
GetSecurityProfile []gax.CallOption
CreateSecurityProfile []gax.CallOption
UpdateSecurityProfile []gax.CallOption
DeleteSecurityProfile []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
}SecurityProfileGroupCallOptions contains the retry settings for each method of SecurityProfileGroupClient.
SecurityProfileGroupClient
type SecurityProfileGroupClient struct {
// The call options for this service.
CallOptions *SecurityProfileGroupCallOptions
// 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
}SecurityProfileGroupClient 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.
SecurityProfileGroup is a resource that defines an action for specific threat signatures or severity levels.
func NewSecurityProfileGroupClient
func NewSecurityProfileGroupClient(ctx context.Context, opts ...option.ClientOption) (*SecurityProfileGroupClient, error)NewSecurityProfileGroupClient creates a new security profile group service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
SecurityProfileGroup is a resource that defines an action for specific threat signatures or severity levels.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewSecurityProfileGroupRESTClient
func NewSecurityProfileGroupRESTClient(ctx context.Context, opts ...option.ClientOption) (*SecurityProfileGroupClient, error)NewSecurityProfileGroupRESTClient creates a new security profile group service rest client.
SecurityProfileGroup is a resource that defines an action for specific threat signatures or severity levels.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewSecurityProfileGroupRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*SecurityProfileGroupClient) CancelOperation
func (c *SecurityProfileGroupClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation 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/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 := networksecurity.NewSecurityProfileGroupClient(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 (*SecurityProfileGroupClient) Close
func (c *SecurityProfileGroupClient) Close() errorClose closes the connection to the API service. Always call Close() when the client is no longer required.
func (*SecurityProfileGroupClient) Connection (deprecated)
func (c *SecurityProfileGroupClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*SecurityProfileGroupClient) CreateSecurityProfile
func (c *SecurityProfileGroupClient) CreateSecurityProfile(ctx context.Context, req *networksecuritypb.CreateSecurityProfileRequest, opts ...gax.CallOption) (*CreateSecurityProfileOperation, error)CreateSecurityProfile creates a new SecurityProfile in a given project and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateSecurityProfileRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateSecurityProfileRequest.
}
op, err := c.CreateSecurityProfile(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*SecurityProfileGroupClient) CreateSecurityProfileGroup
func (c *SecurityProfileGroupClient) CreateSecurityProfileGroup(ctx context.Context, req *networksecuritypb.CreateSecurityProfileGroupRequest, opts ...gax.CallOption) (*CreateSecurityProfileGroupOperation, error)CreateSecurityProfileGroup creates a new SecurityProfileGroup in a given project and location.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.CreateSecurityProfileGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#CreateSecurityProfileGroupRequest.
}
op, err := c.CreateSecurityProfileGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*SecurityProfileGroupClient) CreateSecurityProfileGroupOperation
func (c *SecurityProfileGroupClient) CreateSecurityProfileGroupOperation(name string) *CreateSecurityProfileGroupOperationCreateSecurityProfileGroupOperation returns a new CreateSecurityProfileGroupOperation from a given name. The name must be that of a previously created CreateSecurityProfileGroupOperation, possibly from a different process.
func (*SecurityProfileGroupClient) CreateSecurityProfileOperation
func (c *SecurityProfileGroupClient) CreateSecurityProfileOperation(name string) *CreateSecurityProfileOperationCreateSecurityProfileOperation returns a new CreateSecurityProfileOperation from a given name. The name must be that of a previously created CreateSecurityProfileOperation, possibly from a different process.
func (*SecurityProfileGroupClient) DeleteOperation
func (c *SecurityProfileGroupClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation 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/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 := networksecurity.NewSecurityProfileGroupClient(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 (*SecurityProfileGroupClient) DeleteSecurityProfile
func (c *SecurityProfileGroupClient) DeleteSecurityProfile(ctx context.Context, req *networksecuritypb.DeleteSecurityProfileRequest, opts ...gax.CallOption) (*DeleteSecurityProfileOperation, error)DeleteSecurityProfile deletes a single SecurityProfile.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteSecurityProfileRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteSecurityProfileRequest.
}
op, err := c.DeleteSecurityProfile(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*SecurityProfileGroupClient) DeleteSecurityProfileGroup
func (c *SecurityProfileGroupClient) DeleteSecurityProfileGroup(ctx context.Context, req *networksecuritypb.DeleteSecurityProfileGroupRequest, opts ...gax.CallOption) (*DeleteSecurityProfileGroupOperation, error)DeleteSecurityProfileGroup deletes a single SecurityProfileGroup.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.DeleteSecurityProfileGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#DeleteSecurityProfileGroupRequest.
}
op, err := c.DeleteSecurityProfileGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*SecurityProfileGroupClient) DeleteSecurityProfileGroupOperation
func (c *SecurityProfileGroupClient) DeleteSecurityProfileGroupOperation(name string) *DeleteSecurityProfileGroupOperationDeleteSecurityProfileGroupOperation returns a new DeleteSecurityProfileGroupOperation from a given name. The name must be that of a previously created DeleteSecurityProfileGroupOperation, possibly from a different process.
func (*SecurityProfileGroupClient) DeleteSecurityProfileOperation
func (c *SecurityProfileGroupClient) DeleteSecurityProfileOperation(name string) *DeleteSecurityProfileOperationDeleteSecurityProfileOperation returns a new DeleteSecurityProfileOperation from a given name. The name must be that of a previously created DeleteSecurityProfileOperation, possibly from a different process.
func (*SecurityProfileGroupClient) GetIamPolicy
func (c *SecurityProfileGroupClient) 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/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 := networksecurity.NewSecurityProfileGroupClient(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 (*SecurityProfileGroupClient) GetLocation
func (c *SecurityProfileGroupClient) 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/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 := networksecurity.NewSecurityProfileGroupClient(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 (*SecurityProfileGroupClient) GetOperation
func (c *SecurityProfileGroupClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewSecurityProfileGroupClient(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 (*SecurityProfileGroupClient) GetSecurityProfile
func (c *SecurityProfileGroupClient) GetSecurityProfile(ctx context.Context, req *networksecuritypb.GetSecurityProfileRequest, opts ...gax.CallOption) (*networksecuritypb.SecurityProfile, error)GetSecurityProfile gets details of a single SecurityProfile.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetSecurityProfileRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetSecurityProfileRequest.
}
resp, err := c.GetSecurityProfile(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*SecurityProfileGroupClient) GetSecurityProfileGroup
func (c *SecurityProfileGroupClient) GetSecurityProfileGroup(ctx context.Context, req *networksecuritypb.GetSecurityProfileGroupRequest, opts ...gax.CallOption) (*networksecuritypb.SecurityProfileGroup, error)GetSecurityProfileGroup gets details of a single SecurityProfileGroup.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.GetSecurityProfileGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#GetSecurityProfileGroupRequest.
}
resp, err := c.GetSecurityProfileGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*SecurityProfileGroupClient) ListLocations
func (c *SecurityProfileGroupClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIteratorListLocations lists information about the supported locations for this service.
This method lists locations based on the resource scope provided in the [ListLocationsRequest.name (at http://ListLocationsRequest.name)][google.cloud.location.ListLocationsRequest.name (at http://google.cloud.location.ListLocationsRequest.name)] field: * Global locations: If name is empty, the method lists the public locations available to all projects. * Project-specific locations: If name follows the format projects/{project}, the method lists locations visible to that specific project. This includes public, private, or other project-specific locations enabled for the project.
For gRPC and client library implementations, the resource name is passed as the name field. For direct service calls, the resource name is incorporated into the request path based on the specific service implementation and version.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewSecurityProfileGroupClient(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/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 := networksecurity.NewSecurityProfileGroupClient(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 (*SecurityProfileGroupClient) ListOperations
func (c *SecurityProfileGroupClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations 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/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 := networksecurity.NewSecurityProfileGroupClient(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/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 := networksecurity.NewSecurityProfileGroupClient(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 (*SecurityProfileGroupClient) ListSecurityProfileGroups
func (c *SecurityProfileGroupClient) ListSecurityProfileGroups(ctx context.Context, req *networksecuritypb.ListSecurityProfileGroupsRequest, opts ...gax.CallOption) *SecurityProfileGroupIteratorListSecurityProfileGroups lists SecurityProfileGroups in a given project and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListSecurityProfileGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListSecurityProfileGroupsRequest.
}
it := c.ListSecurityProfileGroups(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.ListSecurityProfileGroupsResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListSecurityProfileGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListSecurityProfileGroupsRequest.
}
for resp, err := range c.ListSecurityProfileGroups(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*SecurityProfileGroupClient) ListSecurityProfiles
func (c *SecurityProfileGroupClient) ListSecurityProfiles(ctx context.Context, req *networksecuritypb.ListSecurityProfilesRequest, opts ...gax.CallOption) *SecurityProfileIteratorListSecurityProfiles lists SecurityProfiles in a given project and location.
Examples
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListSecurityProfilesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListSecurityProfilesRequest.
}
it := c.ListSecurityProfiles(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.ListSecurityProfilesResponse)
}
}
all
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.ListSecurityProfilesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#ListSecurityProfilesRequest.
}
for resp, err := range c.ListSecurityProfiles(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*SecurityProfileGroupClient) SetIamPolicy
func (c *SecurityProfileGroupClient) 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/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 := networksecurity.NewSecurityProfileGroupClient(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 (*SecurityProfileGroupClient) TestIamPermissions
func (c *SecurityProfileGroupClient) 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"
networksecurity "cloud.google.com/go/networksecurity/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 := networksecurity.NewSecurityProfileGroupClient(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 (*SecurityProfileGroupClient) UpdateSecurityProfile
func (c *SecurityProfileGroupClient) UpdateSecurityProfile(ctx context.Context, req *networksecuritypb.UpdateSecurityProfileRequest, opts ...gax.CallOption) (*UpdateSecurityProfileOperation, error)UpdateSecurityProfile updates the parameters of a single SecurityProfile.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateSecurityProfileRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateSecurityProfileRequest.
}
op, err := c.UpdateSecurityProfile(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*SecurityProfileGroupClient) UpdateSecurityProfileGroup
func (c *SecurityProfileGroupClient) UpdateSecurityProfileGroup(ctx context.Context, req *networksecuritypb.UpdateSecurityProfileGroupRequest, opts ...gax.CallOption) (*UpdateSecurityProfileGroupOperation, error)UpdateSecurityProfileGroup updates the parameters of a single SecurityProfileGroup.
Example
package main
import (
"context"
networksecurity "cloud.google.com/go/networksecurity/apiv1"
networksecuritypb "cloud.google.com/go/networksecurity/apiv1/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.NewSecurityProfileGroupClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networksecuritypb.UpdateSecurityProfileGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networksecurity/apiv1/networksecuritypb#UpdateSecurityProfileGroupRequest.
}
op, err := c.UpdateSecurityProfileGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*SecurityProfileGroupClient) UpdateSecurityProfileGroupOperation
func (c *SecurityProfileGroupClient) UpdateSecurityProfileGroupOperation(name string) *UpdateSecurityProfileGroupOperationUpdateSecurityProfileGroupOperation returns a new UpdateSecurityProfileGroupOperation from a given name. The name must be that of a previously created UpdateSecurityProfileGroupOperation, possibly from a different process.
func (*SecurityProfileGroupClient) UpdateSecurityProfileOperation
func (c *SecurityProfileGroupClient) UpdateSecurityProfileOperation(name string) *UpdateSecurityProfileOperationUpdateSecurityProfileOperation returns a new UpdateSecurityProfileOperation from a given name. The name must be that of a previously created UpdateSecurityProfileOperation, possibly from a different process.
SecurityProfileGroupIterator
type SecurityProfileGroupIterator 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.SecurityProfileGroup, nextPageToken string, err error)
// contains filtered or unexported fields
}SecurityProfileGroupIterator manages a stream of *networksecuritypb.SecurityProfileGroup.
func (*SecurityProfileGroupIterator) All
func (it *SecurityProfileGroupIterator) All() iter.Seq2[*networksecuritypb.SecurityProfileGroup, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*SecurityProfileGroupIterator) Next
func (it *SecurityProfileGroupIterator) Next() (*networksecuritypb.SecurityProfileGroup, 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 (*SecurityProfileGroupIterator) PageInfo
func (it *SecurityProfileGroupIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
SecurityProfileIterator
type SecurityProfileIterator 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.SecurityProfile, nextPageToken string, err error)
// contains filtered or unexported fields
}SecurityProfileIterator manages a stream of *networksecuritypb.SecurityProfile.
func (*SecurityProfileIterator) All
func (it *SecurityProfileIterator) All() iter.Seq2[*networksecuritypb.SecurityProfile, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*SecurityProfileIterator) Next
func (it *SecurityProfileIterator) Next() (*networksecuritypb.SecurityProfile, 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 (*SecurityProfileIterator) PageInfo
func (it *SecurityProfileIterator) PageInfo() *iterator.PageInfoPageInfo 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
func (it *ServerTlsPolicyIterator) Next() (*networksecuritypb.ServerTlsPolicy, 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 (*ServerTlsPolicyIterator) PageInfo
func (it *ServerTlsPolicyIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
TlsInspectionPolicyIterator
type TlsInspectionPolicyIterator 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.TlsInspectionPolicy, nextPageToken string, err error)
// contains filtered or unexported fields
}TlsInspectionPolicyIterator manages a stream of *networksecuritypb.TlsInspectionPolicy.
func (*TlsInspectionPolicyIterator) All
func (it *TlsInspectionPolicyIterator) All() iter.Seq2[*networksecuritypb.TlsInspectionPolicy, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*TlsInspectionPolicyIterator) Next
func (it *TlsInspectionPolicyIterator) Next() (*networksecuritypb.TlsInspectionPolicy, 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 (*TlsInspectionPolicyIterator) PageInfo
func (it *TlsInspectionPolicyIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
UpdateAddressGroupOperation
type UpdateAddressGroupOperation struct {
// contains filtered or unexported fields
}UpdateAddressGroupOperation manages a long-running operation from UpdateAddressGroup.
func (*UpdateAddressGroupOperation) Done
func (op *UpdateAddressGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateAddressGroupOperation) Metadata
func (op *UpdateAddressGroupOperation) Metadata() (*networksecuritypb.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 (*UpdateAddressGroupOperation) Name
func (op *UpdateAddressGroupOperation) Name() stringName 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 (*UpdateAddressGroupOperation) Poll
func (op *UpdateAddressGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AddressGroup, 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 (*UpdateAddressGroupOperation) Wait
func (op *UpdateAddressGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AddressGroup, 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.
UpdateAuthorizationPolicyOperation
type UpdateAuthorizationPolicyOperation struct {
// contains filtered or unexported fields
}UpdateAuthorizationPolicyOperation manages a long-running operation from UpdateAuthorizationPolicy.
func (*UpdateAuthorizationPolicyOperation) Done
func (op *UpdateAuthorizationPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateAuthorizationPolicyOperation) Metadata
func (op *UpdateAuthorizationPolicyOperation) Metadata() (*networksecuritypb.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 (*UpdateAuthorizationPolicyOperation) Name
func (op *UpdateAuthorizationPolicyOperation) Name() stringName 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
func (op *UpdateAuthorizationPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AuthorizationPolicy, 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 (*UpdateAuthorizationPolicyOperation) Wait
func (op *UpdateAuthorizationPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AuthorizationPolicy, 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.
UpdateAuthzPolicyOperation
type UpdateAuthzPolicyOperation struct {
// contains filtered or unexported fields
}UpdateAuthzPolicyOperation manages a long-running operation from UpdateAuthzPolicy.
func (*UpdateAuthzPolicyOperation) Done
func (op *UpdateAuthzPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateAuthzPolicyOperation) Metadata
func (op *UpdateAuthzPolicyOperation) Metadata() (*networksecuritypb.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 (*UpdateAuthzPolicyOperation) Name
func (op *UpdateAuthzPolicyOperation) Name() stringName 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 (*UpdateAuthzPolicyOperation) Poll
func (op *UpdateAuthzPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AuthzPolicy, 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 (*UpdateAuthzPolicyOperation) Wait
func (op *UpdateAuthzPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.AuthzPolicy, 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.
UpdateBackendAuthenticationConfigOperation
type UpdateBackendAuthenticationConfigOperation struct {
// contains filtered or unexported fields
}UpdateBackendAuthenticationConfigOperation manages a long-running operation from UpdateBackendAuthenticationConfig.
func (*UpdateBackendAuthenticationConfigOperation) Done
func (op *UpdateBackendAuthenticationConfigOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateBackendAuthenticationConfigOperation) Metadata
func (op *UpdateBackendAuthenticationConfigOperation) Metadata() (*networksecuritypb.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 (*UpdateBackendAuthenticationConfigOperation) Name
func (op *UpdateBackendAuthenticationConfigOperation) Name() stringName 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 (*UpdateBackendAuthenticationConfigOperation) Poll
func (op *UpdateBackendAuthenticationConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.BackendAuthenticationConfig, 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 (*UpdateBackendAuthenticationConfigOperation) Wait
func (op *UpdateBackendAuthenticationConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.BackendAuthenticationConfig, 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.
UpdateClientTlsPolicyOperation
type UpdateClientTlsPolicyOperation struct {
// contains filtered or unexported fields
}UpdateClientTlsPolicyOperation manages a long-running operation from UpdateClientTlsPolicy.
func (*UpdateClientTlsPolicyOperation) Done
func (op *UpdateClientTlsPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateClientTlsPolicyOperation) Metadata
func (op *UpdateClientTlsPolicyOperation) Metadata() (*networksecuritypb.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 (*UpdateClientTlsPolicyOperation) Name
func (op *UpdateClientTlsPolicyOperation) Name() stringName 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
func (op *UpdateClientTlsPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.ClientTlsPolicy, 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 (*UpdateClientTlsPolicyOperation) Wait
func (op *UpdateClientTlsPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.ClientTlsPolicy, 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.
UpdateFirewallEndpointAssociationOperation
type UpdateFirewallEndpointAssociationOperation struct {
// contains filtered or unexported fields
}UpdateFirewallEndpointAssociationOperation manages a long-running operation from UpdateFirewallEndpointAssociation.
func (*UpdateFirewallEndpointAssociationOperation) Done
func (op *UpdateFirewallEndpointAssociationOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateFirewallEndpointAssociationOperation) Metadata
func (op *UpdateFirewallEndpointAssociationOperation) Metadata() (*networksecuritypb.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 (*UpdateFirewallEndpointAssociationOperation) Name
func (op *UpdateFirewallEndpointAssociationOperation) Name() stringName 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 (*UpdateFirewallEndpointAssociationOperation) Poll
func (op *UpdateFirewallEndpointAssociationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.FirewallEndpointAssociation, 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 (*UpdateFirewallEndpointAssociationOperation) Wait
func (op *UpdateFirewallEndpointAssociationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.FirewallEndpointAssociation, 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.
UpdateFirewallEndpointOperation
type UpdateFirewallEndpointOperation struct {
// contains filtered or unexported fields
}UpdateFirewallEndpointOperation manages a long-running operation from UpdateFirewallEndpoint.
func (*UpdateFirewallEndpointOperation) Done
func (op *UpdateFirewallEndpointOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateFirewallEndpointOperation) Metadata
func (op *UpdateFirewallEndpointOperation) Metadata() (*networksecuritypb.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 (*UpdateFirewallEndpointOperation) Name
func (op *UpdateFirewallEndpointOperation) Name() stringName 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 (*UpdateFirewallEndpointOperation) Poll
func (op *UpdateFirewallEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.FirewallEndpoint, 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 (*UpdateFirewallEndpointOperation) Wait
func (op *UpdateFirewallEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.FirewallEndpoint, 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.
UpdateGatewaySecurityPolicyOperation
type UpdateGatewaySecurityPolicyOperation struct {
// contains filtered or unexported fields
}UpdateGatewaySecurityPolicyOperation manages a long-running operation from UpdateGatewaySecurityPolicy.
func (*UpdateGatewaySecurityPolicyOperation) Done
func (op *UpdateGatewaySecurityPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateGatewaySecurityPolicyOperation) Metadata
func (op *UpdateGatewaySecurityPolicyOperation) Metadata() (*networksecuritypb.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 (*UpdateGatewaySecurityPolicyOperation) Name
func (op *UpdateGatewaySecurityPolicyOperation) Name() stringName 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 (*UpdateGatewaySecurityPolicyOperation) Poll
func (op *UpdateGatewaySecurityPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.GatewaySecurityPolicy, 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 (*UpdateGatewaySecurityPolicyOperation) Wait
func (op *UpdateGatewaySecurityPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.GatewaySecurityPolicy, 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.
UpdateGatewaySecurityPolicyRuleOperation
type UpdateGatewaySecurityPolicyRuleOperation struct {
// contains filtered or unexported fields
}UpdateGatewaySecurityPolicyRuleOperation manages a long-running operation from UpdateGatewaySecurityPolicyRule.
func (*UpdateGatewaySecurityPolicyRuleOperation) Done
func (op *UpdateGatewaySecurityPolicyRuleOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateGatewaySecurityPolicyRuleOperation) Metadata
func (op *UpdateGatewaySecurityPolicyRuleOperation) Metadata() (*networksecuritypb.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 (*UpdateGatewaySecurityPolicyRuleOperation) Name
func (op *UpdateGatewaySecurityPolicyRuleOperation) Name() stringName 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 (*UpdateGatewaySecurityPolicyRuleOperation) Poll
func (op *UpdateGatewaySecurityPolicyRuleOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.GatewaySecurityPolicyRule, 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 (*UpdateGatewaySecurityPolicyRuleOperation) Wait
func (op *UpdateGatewaySecurityPolicyRuleOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.GatewaySecurityPolicyRule, 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.
UpdateInterceptDeploymentGroupOperation
type UpdateInterceptDeploymentGroupOperation struct {
// contains filtered or unexported fields
}UpdateInterceptDeploymentGroupOperation manages a long-running operation from UpdateInterceptDeploymentGroup.
func (*UpdateInterceptDeploymentGroupOperation) Done
func (op *UpdateInterceptDeploymentGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateInterceptDeploymentGroupOperation) Metadata
func (op *UpdateInterceptDeploymentGroupOperation) Metadata() (*networksecuritypb.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 (*UpdateInterceptDeploymentGroupOperation) Name
func (op *UpdateInterceptDeploymentGroupOperation) Name() stringName 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 (*UpdateInterceptDeploymentGroupOperation) Poll
func (op *UpdateInterceptDeploymentGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.InterceptDeploymentGroup, 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 (*UpdateInterceptDeploymentGroupOperation) Wait
func (op *UpdateInterceptDeploymentGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.InterceptDeploymentGroup, 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.
UpdateInterceptDeploymentOperation
type UpdateInterceptDeploymentOperation struct {
// contains filtered or unexported fields
}UpdateInterceptDeploymentOperation manages a long-running operation from UpdateInterceptDeployment.
func (*UpdateInterceptDeploymentOperation) Done
func (op *UpdateInterceptDeploymentOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateInterceptDeploymentOperation) Metadata
func (op *UpdateInterceptDeploymentOperation) Metadata() (*networksecuritypb.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 (*UpdateInterceptDeploymentOperation) Name
func (op *UpdateInterceptDeploymentOperation) Name() stringName 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 (*UpdateInterceptDeploymentOperation) Poll
func (op *UpdateInterceptDeploymentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.InterceptDeployment, 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 (*UpdateInterceptDeploymentOperation) Wait
func (op *UpdateInterceptDeploymentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.InterceptDeployment, 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.
UpdateInterceptEndpointGroupAssociationOperation
type UpdateInterceptEndpointGroupAssociationOperation struct {
// contains filtered or unexported fields
}UpdateInterceptEndpointGroupAssociationOperation manages a long-running operation from UpdateInterceptEndpointGroupAssociation.
func (*UpdateInterceptEndpointGroupAssociationOperation) Done
func (op *UpdateInterceptEndpointGroupAssociationOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateInterceptEndpointGroupAssociationOperation) Metadata
func (op *UpdateInterceptEndpointGroupAssociationOperation) Metadata() (*networksecuritypb.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 (*UpdateInterceptEndpointGroupAssociationOperation) Name
func (op *UpdateInterceptEndpointGroupAssociationOperation) Name() stringName 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 (*UpdateInterceptEndpointGroupAssociationOperation) Poll
func (op *UpdateInterceptEndpointGroupAssociationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.InterceptEndpointGroupAssociation, 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 (*UpdateInterceptEndpointGroupAssociationOperation) Wait
func (op *UpdateInterceptEndpointGroupAssociationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.InterceptEndpointGroupAssociation, 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.
UpdateInterceptEndpointGroupOperation
type UpdateInterceptEndpointGroupOperation struct {
// contains filtered or unexported fields
}UpdateInterceptEndpointGroupOperation manages a long-running operation from UpdateInterceptEndpointGroup.
func (*UpdateInterceptEndpointGroupOperation) Done
func (op *UpdateInterceptEndpointGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateInterceptEndpointGroupOperation) Metadata
func (op *UpdateInterceptEndpointGroupOperation) Metadata() (*networksecuritypb.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 (*UpdateInterceptEndpointGroupOperation) Name
func (op *UpdateInterceptEndpointGroupOperation) Name() stringName 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 (*UpdateInterceptEndpointGroupOperation) Poll
func (op *UpdateInterceptEndpointGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.InterceptEndpointGroup, 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 (*UpdateInterceptEndpointGroupOperation) Wait
func (op *UpdateInterceptEndpointGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.InterceptEndpointGroup, 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.
UpdateMirroringDeploymentGroupOperation
type UpdateMirroringDeploymentGroupOperation struct {
// contains filtered or unexported fields
}UpdateMirroringDeploymentGroupOperation manages a long-running operation from UpdateMirroringDeploymentGroup.
func (*UpdateMirroringDeploymentGroupOperation) Done
func (op *UpdateMirroringDeploymentGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateMirroringDeploymentGroupOperation) Metadata
func (op *UpdateMirroringDeploymentGroupOperation) Metadata() (*networksecuritypb.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 (*UpdateMirroringDeploymentGroupOperation) Name
func (op *UpdateMirroringDeploymentGroupOperation) Name() stringName 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 (*UpdateMirroringDeploymentGroupOperation) Poll
func (op *UpdateMirroringDeploymentGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.MirroringDeploymentGroup, 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 (*UpdateMirroringDeploymentGroupOperation) Wait
func (op *UpdateMirroringDeploymentGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.MirroringDeploymentGroup, 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.
UpdateMirroringDeploymentOperation
type UpdateMirroringDeploymentOperation struct {
// contains filtered or unexported fields
}UpdateMirroringDeploymentOperation manages a long-running operation from UpdateMirroringDeployment.
func (*UpdateMirroringDeploymentOperation) Done
func (op *UpdateMirroringDeploymentOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateMirroringDeploymentOperation) Metadata
func (op *UpdateMirroringDeploymentOperation) Metadata() (*networksecuritypb.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 (*UpdateMirroringDeploymentOperation) Name
func (op *UpdateMirroringDeploymentOperation) Name() stringName 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 (*UpdateMirroringDeploymentOperation) Poll
func (op *UpdateMirroringDeploymentOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.MirroringDeployment, 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 (*UpdateMirroringDeploymentOperation) Wait
func (op *UpdateMirroringDeploymentOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.MirroringDeployment, 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.
UpdateMirroringEndpointGroupAssociationOperation
type UpdateMirroringEndpointGroupAssociationOperation struct {
// contains filtered or unexported fields
}UpdateMirroringEndpointGroupAssociationOperation manages a long-running operation from UpdateMirroringEndpointGroupAssociation.
func (*UpdateMirroringEndpointGroupAssociationOperation) Done
func (op *UpdateMirroringEndpointGroupAssociationOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateMirroringEndpointGroupAssociationOperation) Metadata
func (op *UpdateMirroringEndpointGroupAssociationOperation) Metadata() (*networksecuritypb.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 (*UpdateMirroringEndpointGroupAssociationOperation) Name
func (op *UpdateMirroringEndpointGroupAssociationOperation) Name() stringName 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 (*UpdateMirroringEndpointGroupAssociationOperation) Poll
func (op *UpdateMirroringEndpointGroupAssociationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.MirroringEndpointGroupAssociation, 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 (*UpdateMirroringEndpointGroupAssociationOperation) Wait
func (op *UpdateMirroringEndpointGroupAssociationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.MirroringEndpointGroupAssociation, 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.
UpdateMirroringEndpointGroupOperation
type UpdateMirroringEndpointGroupOperation struct {
// contains filtered or unexported fields
}UpdateMirroringEndpointGroupOperation manages a long-running operation from UpdateMirroringEndpointGroup.
func (*UpdateMirroringEndpointGroupOperation) Done
func (op *UpdateMirroringEndpointGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateMirroringEndpointGroupOperation) Metadata
func (op *UpdateMirroringEndpointGroupOperation) Metadata() (*networksecuritypb.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 (*UpdateMirroringEndpointGroupOperation) Name
func (op *UpdateMirroringEndpointGroupOperation) Name() stringName 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 (*UpdateMirroringEndpointGroupOperation) Poll
func (op *UpdateMirroringEndpointGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.MirroringEndpointGroup, 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 (*UpdateMirroringEndpointGroupOperation) Wait
func (op *UpdateMirroringEndpointGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.MirroringEndpointGroup, 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.
UpdateProjectFirewallEndpointOperation
type UpdateProjectFirewallEndpointOperation struct {
// contains filtered or unexported fields
}UpdateProjectFirewallEndpointOperation manages a long-running operation from UpdateProjectFirewallEndpoint.
func (*UpdateProjectFirewallEndpointOperation) Done
func (op *UpdateProjectFirewallEndpointOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateProjectFirewallEndpointOperation) Metadata
func (op *UpdateProjectFirewallEndpointOperation) Metadata() (*networksecuritypb.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 (*UpdateProjectFirewallEndpointOperation) Name
func (op *UpdateProjectFirewallEndpointOperation) Name() stringName 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 (*UpdateProjectFirewallEndpointOperation) Poll
func (op *UpdateProjectFirewallEndpointOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.FirewallEndpoint, 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 (*UpdateProjectFirewallEndpointOperation) Wait
func (op *UpdateProjectFirewallEndpointOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.FirewallEndpoint, 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.
UpdateSecurityProfileGroupOperation
type UpdateSecurityProfileGroupOperation struct {
// contains filtered or unexported fields
}UpdateSecurityProfileGroupOperation manages a long-running operation from UpdateSecurityProfileGroup.
func (*UpdateSecurityProfileGroupOperation) Done
func (op *UpdateSecurityProfileGroupOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateSecurityProfileGroupOperation) Metadata
func (op *UpdateSecurityProfileGroupOperation) Metadata() (*networksecuritypb.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 (*UpdateSecurityProfileGroupOperation) Name
func (op *UpdateSecurityProfileGroupOperation) Name() stringName 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 (*UpdateSecurityProfileGroupOperation) Poll
func (op *UpdateSecurityProfileGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.SecurityProfileGroup, 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 (*UpdateSecurityProfileGroupOperation) Wait
func (op *UpdateSecurityProfileGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.SecurityProfileGroup, 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.
UpdateSecurityProfileOperation
type UpdateSecurityProfileOperation struct {
// contains filtered or unexported fields
}UpdateSecurityProfileOperation manages a long-running operation from UpdateSecurityProfile.
func (*UpdateSecurityProfileOperation) Done
func (op *UpdateSecurityProfileOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateSecurityProfileOperation) Metadata
func (op *UpdateSecurityProfileOperation) Metadata() (*networksecuritypb.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 (*UpdateSecurityProfileOperation) Name
func (op *UpdateSecurityProfileOperation) Name() stringName 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 (*UpdateSecurityProfileOperation) Poll
func (op *UpdateSecurityProfileOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.SecurityProfile, 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 (*UpdateSecurityProfileOperation) Wait
func (op *UpdateSecurityProfileOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.SecurityProfile, 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.
UpdateServerTlsPolicyOperation
type UpdateServerTlsPolicyOperation struct {
// contains filtered or unexported fields
}UpdateServerTlsPolicyOperation manages a long-running operation from UpdateServerTlsPolicy.
func (*UpdateServerTlsPolicyOperation) Done
func (op *UpdateServerTlsPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateServerTlsPolicyOperation) Metadata
func (op *UpdateServerTlsPolicyOperation) Metadata() (*networksecuritypb.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 (*UpdateServerTlsPolicyOperation) Name
func (op *UpdateServerTlsPolicyOperation) Name() stringName 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
func (op *UpdateServerTlsPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.ServerTlsPolicy, 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 (*UpdateServerTlsPolicyOperation) Wait
func (op *UpdateServerTlsPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.ServerTlsPolicy, 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.
UpdateTlsInspectionPolicyOperation
type UpdateTlsInspectionPolicyOperation struct {
// contains filtered or unexported fields
}UpdateTlsInspectionPolicyOperation manages a long-running operation from UpdateTlsInspectionPolicy.
func (*UpdateTlsInspectionPolicyOperation) Done
func (op *UpdateTlsInspectionPolicyOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateTlsInspectionPolicyOperation) Metadata
func (op *UpdateTlsInspectionPolicyOperation) Metadata() (*networksecuritypb.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 (*UpdateTlsInspectionPolicyOperation) Name
func (op *UpdateTlsInspectionPolicyOperation) Name() stringName 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 (*UpdateTlsInspectionPolicyOperation) Poll
func (op *UpdateTlsInspectionPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.TlsInspectionPolicy, 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 (*UpdateTlsInspectionPolicyOperation) Wait
func (op *UpdateTlsInspectionPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.TlsInspectionPolicy, 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.
UpdateUrlListOperation
type UpdateUrlListOperation struct {
// contains filtered or unexported fields
}UpdateUrlListOperation manages a long-running operation from UpdateUrlList.
func (*UpdateUrlListOperation) Done
func (op *UpdateUrlListOperation) Done() boolDone reports whether the long-running operation has completed.
func (*UpdateUrlListOperation) Metadata
func (op *UpdateUrlListOperation) Metadata() (*networksecuritypb.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 (*UpdateUrlListOperation) Name
func (op *UpdateUrlListOperation) Name() stringName 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 (*UpdateUrlListOperation) Poll
func (op *UpdateUrlListOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.UrlList, 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 (*UpdateUrlListOperation) Wait
func (op *UpdateUrlListOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networksecuritypb.UrlList, 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.
UrlListIterator
type UrlListIterator 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.UrlList, nextPageToken string, err error)
// contains filtered or unexported fields
}UrlListIterator manages a stream of *networksecuritypb.UrlList.
func (*UrlListIterator) All
func (it *UrlListIterator) All() iter.Seq2[*networksecuritypb.UrlList, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*UrlListIterator) Next
func (it *UrlListIterator) Next() (*networksecuritypb.UrlList, 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 (*UrlListIterator) PageInfo
func (it *UrlListIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.