Documentation
¶
Overview ¶
Package networkconnectivity is an auto-generated package for the Network Connectivity API.
This API enables connectivity with and between Google Cloud resources.
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/networkconnectivity/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 := networkconnectivity.NewCrossNetworkAutomationClient(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 := &networkconnectivitypb.CreateServiceConnectionMapRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#CreateServiceConnectionMapRequest.
}
op, err := c.CreateServiceConnectionMap(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 NewCrossNetworkAutomationClient 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.
Index ¶
- func DefaultAuthScopes() []string
- type AcceptHubSpokeOperation
- func (op *AcceptHubSpokeOperation) Done() bool
- func (op *AcceptHubSpokeOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *AcceptHubSpokeOperation) Name() string
- func (op *AcceptHubSpokeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.AcceptHubSpokeResponse, error)
- func (op *AcceptHubSpokeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.AcceptHubSpokeResponse, error)
- type AcceptSpokeUpdateOperation
- func (op *AcceptSpokeUpdateOperation) Done() bool
- func (op *AcceptSpokeUpdateOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *AcceptSpokeUpdateOperation) Name() string
- func (op *AcceptSpokeUpdateOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.AcceptSpokeUpdateResponse, error)
- func (op *AcceptSpokeUpdateOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.AcceptSpokeUpdateResponse, error)
- type CreateDestinationOperation
- func (op *CreateDestinationOperation) Done() bool
- func (op *CreateDestinationOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *CreateDestinationOperation) Name() string
- func (op *CreateDestinationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Destination, error)
- func (op *CreateDestinationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Destination, error)
- type CreateHubOperation
- func (op *CreateHubOperation) Done() bool
- func (op *CreateHubOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *CreateHubOperation) Name() string
- func (op *CreateHubOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Hub, error)
- func (op *CreateHubOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Hub, error)
- type CreateInternalRangeOperation
- func (op *CreateInternalRangeOperation) Done() bool
- func (op *CreateInternalRangeOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *CreateInternalRangeOperation) Name() string
- func (op *CreateInternalRangeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.InternalRange, error)
- func (op *CreateInternalRangeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.InternalRange, error)
- type CreateMulticloudDataTransferConfigOperation
- func (op *CreateMulticloudDataTransferConfigOperation) Done() bool
- func (op *CreateMulticloudDataTransferConfigOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *CreateMulticloudDataTransferConfigOperation) Name() string
- func (op *CreateMulticloudDataTransferConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.MulticloudDataTransferConfig, error)
- func (op *CreateMulticloudDataTransferConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.MulticloudDataTransferConfig, error)
- type CreatePolicyBasedRouteOperation
- func (op *CreatePolicyBasedRouteOperation) Done() bool
- func (op *CreatePolicyBasedRouteOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *CreatePolicyBasedRouteOperation) Name() string
- func (op *CreatePolicyBasedRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.PolicyBasedRoute, error)
- func (op *CreatePolicyBasedRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.PolicyBasedRoute, error)
- type CreateServiceConnectionMapOperation
- func (op *CreateServiceConnectionMapOperation) Done() bool
- func (op *CreateServiceConnectionMapOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *CreateServiceConnectionMapOperation) Name() string
- func (op *CreateServiceConnectionMapOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionMap, error)
- func (op *CreateServiceConnectionMapOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionMap, error)
- type CreateServiceConnectionPolicyOperation
- func (op *CreateServiceConnectionPolicyOperation) Done() bool
- func (op *CreateServiceConnectionPolicyOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *CreateServiceConnectionPolicyOperation) Name() string
- func (op *CreateServiceConnectionPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionPolicy, error)
- func (op *CreateServiceConnectionPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionPolicy, error)
- type CreateServiceConnectionTokenOperation
- func (op *CreateServiceConnectionTokenOperation) Done() bool
- func (op *CreateServiceConnectionTokenOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *CreateServiceConnectionTokenOperation) Name() string
- func (op *CreateServiceConnectionTokenOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionToken, error)
- func (op *CreateServiceConnectionTokenOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionToken, error)
- type CreateSpokeOperation
- func (op *CreateSpokeOperation) Done() bool
- func (op *CreateSpokeOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *CreateSpokeOperation) Name() string
- func (op *CreateSpokeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Spoke, error)
- func (op *CreateSpokeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Spoke, error)
- type CrossNetworkAutomationCallOptions
- type CrossNetworkAutomationClient
- func (c *CrossNetworkAutomationClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *CrossNetworkAutomationClient) Close() error
- func (c *CrossNetworkAutomationClient) Connection() *grpc.ClientConndeprecated
- func (c *CrossNetworkAutomationClient) CreateServiceConnectionMap(ctx context.Context, ...) (*CreateServiceConnectionMapOperation, error)
- func (c *CrossNetworkAutomationClient) CreateServiceConnectionMapOperation(name string) *CreateServiceConnectionMapOperation
- func (c *CrossNetworkAutomationClient) CreateServiceConnectionPolicy(ctx context.Context, ...) (*CreateServiceConnectionPolicyOperation, error)
- func (c *CrossNetworkAutomationClient) CreateServiceConnectionPolicyOperation(name string) *CreateServiceConnectionPolicyOperation
- func (c *CrossNetworkAutomationClient) CreateServiceConnectionToken(ctx context.Context, ...) (*CreateServiceConnectionTokenOperation, error)
- func (c *CrossNetworkAutomationClient) CreateServiceConnectionTokenOperation(name string) *CreateServiceConnectionTokenOperation
- func (c *CrossNetworkAutomationClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *CrossNetworkAutomationClient) DeleteServiceClass(ctx context.Context, req *networkconnectivitypb.DeleteServiceClassRequest, ...) (*DeleteServiceClassOperation, error)
- func (c *CrossNetworkAutomationClient) DeleteServiceClassOperation(name string) *DeleteServiceClassOperation
- func (c *CrossNetworkAutomationClient) DeleteServiceConnectionMap(ctx context.Context, ...) (*DeleteServiceConnectionMapOperation, error)
- func (c *CrossNetworkAutomationClient) DeleteServiceConnectionMapOperation(name string) *DeleteServiceConnectionMapOperation
- func (c *CrossNetworkAutomationClient) DeleteServiceConnectionPolicy(ctx context.Context, ...) (*DeleteServiceConnectionPolicyOperation, error)
- func (c *CrossNetworkAutomationClient) DeleteServiceConnectionPolicyOperation(name string) *DeleteServiceConnectionPolicyOperation
- func (c *CrossNetworkAutomationClient) DeleteServiceConnectionToken(ctx context.Context, ...) (*DeleteServiceConnectionTokenOperation, error)
- func (c *CrossNetworkAutomationClient) DeleteServiceConnectionTokenOperation(name string) *DeleteServiceConnectionTokenOperation
- func (c *CrossNetworkAutomationClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *CrossNetworkAutomationClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *CrossNetworkAutomationClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *CrossNetworkAutomationClient) GetServiceClass(ctx context.Context, req *networkconnectivitypb.GetServiceClassRequest, ...) (*networkconnectivitypb.ServiceClass, error)
- func (c *CrossNetworkAutomationClient) GetServiceConnectionMap(ctx context.Context, req *networkconnectivitypb.GetServiceConnectionMapRequest, ...) (*networkconnectivitypb.ServiceConnectionMap, error)
- func (c *CrossNetworkAutomationClient) GetServiceConnectionPolicy(ctx context.Context, ...) (*networkconnectivitypb.ServiceConnectionPolicy, error)
- func (c *CrossNetworkAutomationClient) GetServiceConnectionToken(ctx context.Context, ...) (*networkconnectivitypb.ServiceConnectionToken, error)
- func (c *CrossNetworkAutomationClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *CrossNetworkAutomationClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *CrossNetworkAutomationClient) ListServiceClasses(ctx context.Context, req *networkconnectivitypb.ListServiceClassesRequest, ...) *ServiceClassIterator
- func (c *CrossNetworkAutomationClient) ListServiceConnectionMaps(ctx context.Context, ...) *ServiceConnectionMapIterator
- func (c *CrossNetworkAutomationClient) ListServiceConnectionPolicies(ctx context.Context, ...) *ServiceConnectionPolicyIterator
- func (c *CrossNetworkAutomationClient) ListServiceConnectionTokens(ctx context.Context, ...) *ServiceConnectionTokenIterator
- func (c *CrossNetworkAutomationClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *CrossNetworkAutomationClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, ...) (*iampb.TestIamPermissionsResponse, error)
- func (c *CrossNetworkAutomationClient) UpdateServiceClass(ctx context.Context, req *networkconnectivitypb.UpdateServiceClassRequest, ...) (*UpdateServiceClassOperation, error)
- func (c *CrossNetworkAutomationClient) UpdateServiceClassOperation(name string) *UpdateServiceClassOperation
- func (c *CrossNetworkAutomationClient) UpdateServiceConnectionMap(ctx context.Context, ...) (*UpdateServiceConnectionMapOperation, error)
- func (c *CrossNetworkAutomationClient) UpdateServiceConnectionMapOperation(name string) *UpdateServiceConnectionMapOperation
- func (c *CrossNetworkAutomationClient) UpdateServiceConnectionPolicy(ctx context.Context, ...) (*UpdateServiceConnectionPolicyOperation, error)
- func (c *CrossNetworkAutomationClient) UpdateServiceConnectionPolicyOperation(name string) *UpdateServiceConnectionPolicyOperation
- type DataTransferCallOptions
- type DataTransferClient
- func (c *DataTransferClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *DataTransferClient) Close() error
- func (c *DataTransferClient) Connection() *grpc.ClientConndeprecated
- func (c *DataTransferClient) CreateDestination(ctx context.Context, req *networkconnectivitypb.CreateDestinationRequest, ...) (*CreateDestinationOperation, error)
- func (c *DataTransferClient) CreateDestinationOperation(name string) *CreateDestinationOperation
- func (c *DataTransferClient) CreateMulticloudDataTransferConfig(ctx context.Context, ...) (*CreateMulticloudDataTransferConfigOperation, error)
- func (c *DataTransferClient) CreateMulticloudDataTransferConfigOperation(name string) *CreateMulticloudDataTransferConfigOperation
- func (c *DataTransferClient) DeleteDestination(ctx context.Context, req *networkconnectivitypb.DeleteDestinationRequest, ...) (*DeleteDestinationOperation, error)
- func (c *DataTransferClient) DeleteDestinationOperation(name string) *DeleteDestinationOperation
- func (c *DataTransferClient) DeleteMulticloudDataTransferConfig(ctx context.Context, ...) (*DeleteMulticloudDataTransferConfigOperation, error)
- func (c *DataTransferClient) DeleteMulticloudDataTransferConfigOperation(name string) *DeleteMulticloudDataTransferConfigOperation
- func (c *DataTransferClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *DataTransferClient) GetDestination(ctx context.Context, req *networkconnectivitypb.GetDestinationRequest, ...) (*networkconnectivitypb.Destination, error)
- func (c *DataTransferClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *DataTransferClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *DataTransferClient) GetMulticloudDataTransferConfig(ctx context.Context, ...) (*networkconnectivitypb.MulticloudDataTransferConfig, error)
- func (c *DataTransferClient) GetMulticloudDataTransferSupportedService(ctx context.Context, ...) (*networkconnectivitypb.MulticloudDataTransferSupportedService, error)
- func (c *DataTransferClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *DataTransferClient) ListDestinations(ctx context.Context, req *networkconnectivitypb.ListDestinationsRequest, ...) *DestinationIterator
- func (c *DataTransferClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *DataTransferClient) ListMulticloudDataTransferConfigs(ctx context.Context, ...) *MulticloudDataTransferConfigIterator
- func (c *DataTransferClient) ListMulticloudDataTransferSupportedServices(ctx context.Context, ...) *MulticloudDataTransferSupportedServiceIterator
- func (c *DataTransferClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *DataTransferClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *DataTransferClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, ...) (*iampb.TestIamPermissionsResponse, error)
- func (c *DataTransferClient) UpdateDestination(ctx context.Context, req *networkconnectivitypb.UpdateDestinationRequest, ...) (*UpdateDestinationOperation, error)
- func (c *DataTransferClient) UpdateDestinationOperation(name string) *UpdateDestinationOperation
- func (c *DataTransferClient) UpdateMulticloudDataTransferConfig(ctx context.Context, ...) (*UpdateMulticloudDataTransferConfigOperation, error)
- func (c *DataTransferClient) UpdateMulticloudDataTransferConfigOperation(name string) *UpdateMulticloudDataTransferConfigOperation
- type DeleteDestinationOperation
- func (op *DeleteDestinationOperation) Done() bool
- func (op *DeleteDestinationOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *DeleteDestinationOperation) Name() string
- func (op *DeleteDestinationOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteDestinationOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteHubOperation
- func (op *DeleteHubOperation) Done() bool
- func (op *DeleteHubOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *DeleteHubOperation) Name() string
- func (op *DeleteHubOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteHubOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteInternalRangeOperation
- func (op *DeleteInternalRangeOperation) Done() bool
- func (op *DeleteInternalRangeOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *DeleteInternalRangeOperation) Name() string
- func (op *DeleteInternalRangeOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteInternalRangeOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteMulticloudDataTransferConfigOperation
- func (op *DeleteMulticloudDataTransferConfigOperation) Done() bool
- func (op *DeleteMulticloudDataTransferConfigOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *DeleteMulticloudDataTransferConfigOperation) Name() string
- func (op *DeleteMulticloudDataTransferConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteMulticloudDataTransferConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeletePolicyBasedRouteOperation
- func (op *DeletePolicyBasedRouteOperation) Done() bool
- func (op *DeletePolicyBasedRouteOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *DeletePolicyBasedRouteOperation) Name() string
- func (op *DeletePolicyBasedRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeletePolicyBasedRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteServiceClassOperation
- func (op *DeleteServiceClassOperation) Done() bool
- func (op *DeleteServiceClassOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *DeleteServiceClassOperation) Name() string
- func (op *DeleteServiceClassOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteServiceClassOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteServiceConnectionMapOperation
- func (op *DeleteServiceConnectionMapOperation) Done() bool
- func (op *DeleteServiceConnectionMapOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *DeleteServiceConnectionMapOperation) Name() string
- func (op *DeleteServiceConnectionMapOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteServiceConnectionMapOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteServiceConnectionPolicyOperation
- func (op *DeleteServiceConnectionPolicyOperation) Done() bool
- func (op *DeleteServiceConnectionPolicyOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *DeleteServiceConnectionPolicyOperation) Name() string
- func (op *DeleteServiceConnectionPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteServiceConnectionPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteServiceConnectionTokenOperation
- func (op *DeleteServiceConnectionTokenOperation) Done() bool
- func (op *DeleteServiceConnectionTokenOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *DeleteServiceConnectionTokenOperation) Name() string
- func (op *DeleteServiceConnectionTokenOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteServiceConnectionTokenOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DeleteSpokeOperation
- func (op *DeleteSpokeOperation) Done() bool
- func (op *DeleteSpokeOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *DeleteSpokeOperation) Name() string
- func (op *DeleteSpokeOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
- func (op *DeleteSpokeOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
- type DestinationIterator
- type GroupIterator
- type HubCallOptions
- type HubClient
- func (c *HubClient) AcceptHubSpoke(ctx context.Context, req *networkconnectivitypb.AcceptHubSpokeRequest, ...) (*AcceptHubSpokeOperation, error)
- func (c *HubClient) AcceptHubSpokeOperation(name string) *AcceptHubSpokeOperation
- func (c *HubClient) AcceptSpokeUpdate(ctx context.Context, req *networkconnectivitypb.AcceptSpokeUpdateRequest, ...) (*AcceptSpokeUpdateOperation, error)
- func (c *HubClient) AcceptSpokeUpdateOperation(name string) *AcceptSpokeUpdateOperation
- func (c *HubClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *HubClient) Close() error
- func (c *HubClient) Connection() *grpc.ClientConndeprecated
- func (c *HubClient) CreateHub(ctx context.Context, req *networkconnectivitypb.CreateHubRequest, ...) (*CreateHubOperation, error)
- func (c *HubClient) CreateHubOperation(name string) *CreateHubOperation
- func (c *HubClient) CreateSpoke(ctx context.Context, req *networkconnectivitypb.CreateSpokeRequest, ...) (*CreateSpokeOperation, error)
- func (c *HubClient) CreateSpokeOperation(name string) *CreateSpokeOperation
- func (c *HubClient) DeleteHub(ctx context.Context, req *networkconnectivitypb.DeleteHubRequest, ...) (*DeleteHubOperation, error)
- func (c *HubClient) DeleteHubOperation(name string) *DeleteHubOperation
- func (c *HubClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *HubClient) DeleteSpoke(ctx context.Context, req *networkconnectivitypb.DeleteSpokeRequest, ...) (*DeleteSpokeOperation, error)
- func (c *HubClient) DeleteSpokeOperation(name string) *DeleteSpokeOperation
- func (c *HubClient) GetGroup(ctx context.Context, req *networkconnectivitypb.GetGroupRequest, ...) (*networkconnectivitypb.Group, error)
- func (c *HubClient) GetHub(ctx context.Context, req *networkconnectivitypb.GetHubRequest, ...) (*networkconnectivitypb.Hub, error)
- func (c *HubClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *HubClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *HubClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *HubClient) GetRoute(ctx context.Context, req *networkconnectivitypb.GetRouteRequest, ...) (*networkconnectivitypb.Route, error)
- func (c *HubClient) GetRouteTable(ctx context.Context, req *networkconnectivitypb.GetRouteTableRequest, ...) (*networkconnectivitypb.RouteTable, error)
- func (c *HubClient) GetSpoke(ctx context.Context, req *networkconnectivitypb.GetSpokeRequest, ...) (*networkconnectivitypb.Spoke, error)
- func (c *HubClient) ListGroups(ctx context.Context, req *networkconnectivitypb.ListGroupsRequest, ...) *GroupIterator
- func (c *HubClient) ListHubSpokes(ctx context.Context, req *networkconnectivitypb.ListHubSpokesRequest, ...) *SpokeIterator
- func (c *HubClient) ListHubs(ctx context.Context, req *networkconnectivitypb.ListHubsRequest, ...) *HubIterator
- func (c *HubClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *HubClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *HubClient) ListRouteTables(ctx context.Context, req *networkconnectivitypb.ListRouteTablesRequest, ...) *RouteTableIterator
- func (c *HubClient) ListRoutes(ctx context.Context, req *networkconnectivitypb.ListRoutesRequest, ...) *RouteIterator
- func (c *HubClient) ListSpokes(ctx context.Context, req *networkconnectivitypb.ListSpokesRequest, ...) *SpokeIterator
- func (c *HubClient) QueryHubStatus(ctx context.Context, req *networkconnectivitypb.QueryHubStatusRequest, ...) *HubStatusEntryIterator
- func (c *HubClient) RejectHubSpoke(ctx context.Context, req *networkconnectivitypb.RejectHubSpokeRequest, ...) (*RejectHubSpokeOperation, error)
- func (c *HubClient) RejectHubSpokeOperation(name string) *RejectHubSpokeOperation
- func (c *HubClient) RejectSpokeUpdate(ctx context.Context, req *networkconnectivitypb.RejectSpokeUpdateRequest, ...) (*RejectSpokeUpdateOperation, error)
- func (c *HubClient) RejectSpokeUpdateOperation(name string) *RejectSpokeUpdateOperation
- func (c *HubClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *HubClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, ...) (*iampb.TestIamPermissionsResponse, error)
- func (c *HubClient) UpdateGroup(ctx context.Context, req *networkconnectivitypb.UpdateGroupRequest, ...) (*UpdateGroupOperation, error)
- func (c *HubClient) UpdateGroupOperation(name string) *UpdateGroupOperation
- func (c *HubClient) UpdateHub(ctx context.Context, req *networkconnectivitypb.UpdateHubRequest, ...) (*UpdateHubOperation, error)
- func (c *HubClient) UpdateHubOperation(name string) *UpdateHubOperation
- func (c *HubClient) UpdateSpoke(ctx context.Context, req *networkconnectivitypb.UpdateSpokeRequest, ...) (*UpdateSpokeOperation, error)
- func (c *HubClient) UpdateSpokeOperation(name string) *UpdateSpokeOperation
- type HubIterator
- type HubStatusEntryIterator
- type InternalRangeCallOptions
- type InternalRangeClient
- func (c *InternalRangeClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *InternalRangeClient) Close() error
- func (c *InternalRangeClient) Connection() *grpc.ClientConndeprecated
- func (c *InternalRangeClient) CreateInternalRange(ctx context.Context, req *networkconnectivitypb.CreateInternalRangeRequest, ...) (*CreateInternalRangeOperation, error)
- func (c *InternalRangeClient) CreateInternalRangeOperation(name string) *CreateInternalRangeOperation
- func (c *InternalRangeClient) DeleteInternalRange(ctx context.Context, req *networkconnectivitypb.DeleteInternalRangeRequest, ...) (*DeleteInternalRangeOperation, error)
- func (c *InternalRangeClient) DeleteInternalRangeOperation(name string) *DeleteInternalRangeOperation
- func (c *InternalRangeClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *InternalRangeClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *InternalRangeClient) GetInternalRange(ctx context.Context, req *networkconnectivitypb.GetInternalRangeRequest, ...) (*networkconnectivitypb.InternalRange, error)
- func (c *InternalRangeClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *InternalRangeClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *InternalRangeClient) ListInternalRanges(ctx context.Context, req *networkconnectivitypb.ListInternalRangesRequest, ...) *InternalRangeIterator
- func (c *InternalRangeClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *InternalRangeClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *InternalRangeClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *InternalRangeClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, ...) (*iampb.TestIamPermissionsResponse, error)
- func (c *InternalRangeClient) UpdateInternalRange(ctx context.Context, req *networkconnectivitypb.UpdateInternalRangeRequest, ...) (*UpdateInternalRangeOperation, error)
- func (c *InternalRangeClient) UpdateInternalRangeOperation(name string) *UpdateInternalRangeOperation
- type InternalRangeIterator
- type LocationIterator
- type MulticloudDataTransferConfigIterator
- func (it *MulticloudDataTransferConfigIterator) All() iter.Seq2[*networkconnectivitypb.MulticloudDataTransferConfig, error]
- func (it *MulticloudDataTransferConfigIterator) Next() (*networkconnectivitypb.MulticloudDataTransferConfig, error)
- func (it *MulticloudDataTransferConfigIterator) PageInfo() *iterator.PageInfo
- type MulticloudDataTransferSupportedServiceIterator
- type OperationIterator
- type PolicyBasedRouteIterator
- type PolicyBasedRoutingCallOptions
- type PolicyBasedRoutingClient
- func (c *PolicyBasedRoutingClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *PolicyBasedRoutingClient) Close() error
- func (c *PolicyBasedRoutingClient) Connection() *grpc.ClientConndeprecated
- func (c *PolicyBasedRoutingClient) CreatePolicyBasedRoute(ctx context.Context, req *networkconnectivitypb.CreatePolicyBasedRouteRequest, ...) (*CreatePolicyBasedRouteOperation, error)
- func (c *PolicyBasedRoutingClient) CreatePolicyBasedRouteOperation(name string) *CreatePolicyBasedRouteOperation
- func (c *PolicyBasedRoutingClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *PolicyBasedRoutingClient) DeletePolicyBasedRoute(ctx context.Context, req *networkconnectivitypb.DeletePolicyBasedRouteRequest, ...) (*DeletePolicyBasedRouteOperation, error)
- func (c *PolicyBasedRoutingClient) DeletePolicyBasedRouteOperation(name string) *DeletePolicyBasedRouteOperation
- func (c *PolicyBasedRoutingClient) GetIamPolicy(ctx context.Context, req *iampb.GetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *PolicyBasedRoutingClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, ...) (*locationpb.Location, error)
- func (c *PolicyBasedRoutingClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *PolicyBasedRoutingClient) GetPolicyBasedRoute(ctx context.Context, req *networkconnectivitypb.GetPolicyBasedRouteRequest, ...) (*networkconnectivitypb.PolicyBasedRoute, error)
- func (c *PolicyBasedRoutingClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, ...) *LocationIterator
- func (c *PolicyBasedRoutingClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *PolicyBasedRoutingClient) ListPolicyBasedRoutes(ctx context.Context, req *networkconnectivitypb.ListPolicyBasedRoutesRequest, ...) *PolicyBasedRouteIterator
- func (c *PolicyBasedRoutingClient) SetIamPolicy(ctx context.Context, req *iampb.SetIamPolicyRequest, opts ...gax.CallOption) (*iampb.Policy, error)
- func (c *PolicyBasedRoutingClient) TestIamPermissions(ctx context.Context, req *iampb.TestIamPermissionsRequest, ...) (*iampb.TestIamPermissionsResponse, error)
- type RejectHubSpokeOperation
- func (op *RejectHubSpokeOperation) Done() bool
- func (op *RejectHubSpokeOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *RejectHubSpokeOperation) Name() string
- func (op *RejectHubSpokeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.RejectHubSpokeResponse, error)
- func (op *RejectHubSpokeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.RejectHubSpokeResponse, error)
- type RejectSpokeUpdateOperation
- func (op *RejectSpokeUpdateOperation) Done() bool
- func (op *RejectSpokeUpdateOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *RejectSpokeUpdateOperation) Name() string
- func (op *RejectSpokeUpdateOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.RejectSpokeUpdateResponse, error)
- func (op *RejectSpokeUpdateOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.RejectSpokeUpdateResponse, error)
- type RouteIterator
- type RouteTableIterator
- type ServiceClassIterator
- type ServiceConnectionMapIterator
- type ServiceConnectionPolicyIterator
- type ServiceConnectionTokenIterator
- type SpokeIterator
- type UpdateDestinationOperation
- func (op *UpdateDestinationOperation) Done() bool
- func (op *UpdateDestinationOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *UpdateDestinationOperation) Name() string
- func (op *UpdateDestinationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Destination, error)
- func (op *UpdateDestinationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Destination, error)
- type UpdateGroupOperation
- func (op *UpdateGroupOperation) Done() bool
- func (op *UpdateGroupOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *UpdateGroupOperation) Name() string
- func (op *UpdateGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Group, error)
- func (op *UpdateGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Group, error)
- type UpdateHubOperation
- func (op *UpdateHubOperation) Done() bool
- func (op *UpdateHubOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *UpdateHubOperation) Name() string
- func (op *UpdateHubOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Hub, error)
- func (op *UpdateHubOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Hub, error)
- type UpdateInternalRangeOperation
- func (op *UpdateInternalRangeOperation) Done() bool
- func (op *UpdateInternalRangeOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *UpdateInternalRangeOperation) Name() string
- func (op *UpdateInternalRangeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.InternalRange, error)
- func (op *UpdateInternalRangeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.InternalRange, error)
- type UpdateMulticloudDataTransferConfigOperation
- func (op *UpdateMulticloudDataTransferConfigOperation) Done() bool
- func (op *UpdateMulticloudDataTransferConfigOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *UpdateMulticloudDataTransferConfigOperation) Name() string
- func (op *UpdateMulticloudDataTransferConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.MulticloudDataTransferConfig, error)
- func (op *UpdateMulticloudDataTransferConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.MulticloudDataTransferConfig, error)
- type UpdateServiceClassOperation
- func (op *UpdateServiceClassOperation) Done() bool
- func (op *UpdateServiceClassOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *UpdateServiceClassOperation) Name() string
- func (op *UpdateServiceClassOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceClass, error)
- func (op *UpdateServiceClassOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceClass, error)
- type UpdateServiceConnectionMapOperation
- func (op *UpdateServiceConnectionMapOperation) Done() bool
- func (op *UpdateServiceConnectionMapOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *UpdateServiceConnectionMapOperation) Name() string
- func (op *UpdateServiceConnectionMapOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionMap, error)
- func (op *UpdateServiceConnectionMapOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionMap, error)
- type UpdateServiceConnectionPolicyOperation
- func (op *UpdateServiceConnectionPolicyOperation) Done() bool
- func (op *UpdateServiceConnectionPolicyOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *UpdateServiceConnectionPolicyOperation) Name() string
- func (op *UpdateServiceConnectionPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionPolicy, error)
- func (op *UpdateServiceConnectionPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionPolicy, error)
- type UpdateSpokeOperation
- func (op *UpdateSpokeOperation) Done() bool
- func (op *UpdateSpokeOperation) Metadata() (*networkconnectivitypb.OperationMetadata, error)
- func (op *UpdateSpokeOperation) Name() string
- func (op *UpdateSpokeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Spoke, error)
- func (op *UpdateSpokeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Spoke, error)
Examples ¶
- CrossNetworkAutomationClient.CancelOperation
- CrossNetworkAutomationClient.CreateServiceConnectionMap
- CrossNetworkAutomationClient.CreateServiceConnectionPolicy
- CrossNetworkAutomationClient.CreateServiceConnectionToken
- CrossNetworkAutomationClient.DeleteOperation
- CrossNetworkAutomationClient.DeleteServiceClass
- CrossNetworkAutomationClient.DeleteServiceConnectionMap
- CrossNetworkAutomationClient.DeleteServiceConnectionPolicy
- CrossNetworkAutomationClient.DeleteServiceConnectionToken
- CrossNetworkAutomationClient.GetIamPolicy
- CrossNetworkAutomationClient.GetLocation
- CrossNetworkAutomationClient.GetOperation
- CrossNetworkAutomationClient.GetServiceClass
- CrossNetworkAutomationClient.GetServiceConnectionMap
- CrossNetworkAutomationClient.GetServiceConnectionPolicy
- CrossNetworkAutomationClient.GetServiceConnectionToken
- CrossNetworkAutomationClient.ListLocations
- CrossNetworkAutomationClient.ListLocations (All)
- CrossNetworkAutomationClient.ListOperations
- CrossNetworkAutomationClient.ListOperations (All)
- CrossNetworkAutomationClient.ListServiceClasses
- CrossNetworkAutomationClient.ListServiceClasses (All)
- CrossNetworkAutomationClient.ListServiceConnectionMaps
- CrossNetworkAutomationClient.ListServiceConnectionMaps (All)
- CrossNetworkAutomationClient.ListServiceConnectionPolicies
- CrossNetworkAutomationClient.ListServiceConnectionPolicies (All)
- CrossNetworkAutomationClient.ListServiceConnectionTokens
- CrossNetworkAutomationClient.ListServiceConnectionTokens (All)
- CrossNetworkAutomationClient.SetIamPolicy
- CrossNetworkAutomationClient.TestIamPermissions
- CrossNetworkAutomationClient.UpdateServiceClass
- CrossNetworkAutomationClient.UpdateServiceConnectionMap
- CrossNetworkAutomationClient.UpdateServiceConnectionPolicy
- DataTransferClient.CancelOperation
- DataTransferClient.CreateDestination
- DataTransferClient.CreateMulticloudDataTransferConfig
- DataTransferClient.DeleteDestination
- DataTransferClient.DeleteMulticloudDataTransferConfig
- DataTransferClient.DeleteOperation
- DataTransferClient.GetDestination
- DataTransferClient.GetIamPolicy
- DataTransferClient.GetLocation
- DataTransferClient.GetMulticloudDataTransferConfig
- DataTransferClient.GetMulticloudDataTransferSupportedService
- DataTransferClient.GetOperation
- DataTransferClient.ListDestinations
- DataTransferClient.ListDestinations (All)
- DataTransferClient.ListLocations
- DataTransferClient.ListLocations (All)
- DataTransferClient.ListMulticloudDataTransferConfigs
- DataTransferClient.ListMulticloudDataTransferConfigs (All)
- DataTransferClient.ListMulticloudDataTransferSupportedServices
- DataTransferClient.ListMulticloudDataTransferSupportedServices (All)
- DataTransferClient.ListOperations
- DataTransferClient.ListOperations (All)
- DataTransferClient.SetIamPolicy
- DataTransferClient.TestIamPermissions
- DataTransferClient.UpdateDestination
- DataTransferClient.UpdateMulticloudDataTransferConfig
- HubClient.AcceptHubSpoke
- HubClient.AcceptSpokeUpdate
- HubClient.CancelOperation
- HubClient.CreateHub
- HubClient.CreateSpoke
- HubClient.DeleteHub
- HubClient.DeleteOperation
- HubClient.DeleteSpoke
- HubClient.GetGroup
- HubClient.GetHub
- HubClient.GetIamPolicy
- HubClient.GetLocation
- HubClient.GetOperation
- HubClient.GetRoute
- HubClient.GetRouteTable
- HubClient.GetSpoke
- HubClient.ListGroups
- HubClient.ListGroups (All)
- HubClient.ListHubSpokes
- HubClient.ListHubSpokes (All)
- HubClient.ListHubs
- HubClient.ListHubs (All)
- HubClient.ListLocations
- HubClient.ListLocations (All)
- HubClient.ListOperations
- HubClient.ListOperations (All)
- HubClient.ListRouteTables
- HubClient.ListRouteTables (All)
- HubClient.ListRoutes
- HubClient.ListRoutes (All)
- HubClient.ListSpokes
- HubClient.ListSpokes (All)
- HubClient.QueryHubStatus
- HubClient.QueryHubStatus (All)
- HubClient.RejectHubSpoke
- HubClient.RejectSpokeUpdate
- HubClient.SetIamPolicy
- HubClient.TestIamPermissions
- HubClient.UpdateGroup
- HubClient.UpdateHub
- HubClient.UpdateSpoke
- InternalRangeClient.CancelOperation
- InternalRangeClient.CreateInternalRange
- InternalRangeClient.DeleteInternalRange
- InternalRangeClient.DeleteOperation
- InternalRangeClient.GetIamPolicy
- InternalRangeClient.GetInternalRange
- InternalRangeClient.GetLocation
- InternalRangeClient.GetOperation
- InternalRangeClient.ListInternalRanges
- InternalRangeClient.ListInternalRanges (All)
- InternalRangeClient.ListLocations
- InternalRangeClient.ListLocations (All)
- InternalRangeClient.ListOperations
- InternalRangeClient.ListOperations (All)
- InternalRangeClient.SetIamPolicy
- InternalRangeClient.TestIamPermissions
- InternalRangeClient.UpdateInternalRange
- NewCrossNetworkAutomationClient
- NewDataTransferClient
- NewHubClient
- NewInternalRangeClient
- NewPolicyBasedRoutingClient
- PolicyBasedRoutingClient.CancelOperation
- PolicyBasedRoutingClient.CreatePolicyBasedRoute
- PolicyBasedRoutingClient.DeleteOperation
- PolicyBasedRoutingClient.DeletePolicyBasedRoute
- PolicyBasedRoutingClient.GetIamPolicy
- PolicyBasedRoutingClient.GetLocation
- PolicyBasedRoutingClient.GetOperation
- PolicyBasedRoutingClient.GetPolicyBasedRoute
- PolicyBasedRoutingClient.ListLocations
- PolicyBasedRoutingClient.ListLocations (All)
- PolicyBasedRoutingClient.ListOperations
- PolicyBasedRoutingClient.ListOperations (All)
- PolicyBasedRoutingClient.ListPolicyBasedRoutes
- PolicyBasedRoutingClient.ListPolicyBasedRoutes (All)
- PolicyBasedRoutingClient.SetIamPolicy
- PolicyBasedRoutingClient.TestIamPermissions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
Types ¶
type AcceptHubSpokeOperation ¶ added in v1.14.0
type AcceptHubSpokeOperation struct {
// contains filtered or unexported fields
}
AcceptHubSpokeOperation manages a long-running operation from AcceptHubSpoke.
func (*AcceptHubSpokeOperation) Done ¶ added in v1.14.0
func (op *AcceptHubSpokeOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*AcceptHubSpokeOperation) Metadata ¶ added in v1.14.0
func (op *AcceptHubSpokeOperation) Metadata() (*networkconnectivitypb.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 (*AcceptHubSpokeOperation) Name ¶ added in v1.14.0
func (op *AcceptHubSpokeOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*AcceptHubSpokeOperation) Poll ¶ added in v1.14.0
func (op *AcceptHubSpokeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.AcceptHubSpokeResponse, 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 (*AcceptHubSpokeOperation) Wait ¶ added in v1.14.0
func (op *AcceptHubSpokeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.AcceptHubSpokeResponse, 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.
type AcceptSpokeUpdateOperation ¶ added in v1.17.0
type AcceptSpokeUpdateOperation struct {
// contains filtered or unexported fields
}
AcceptSpokeUpdateOperation manages a long-running operation from AcceptSpokeUpdate.
func (*AcceptSpokeUpdateOperation) Done ¶ added in v1.17.0
func (op *AcceptSpokeUpdateOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*AcceptSpokeUpdateOperation) Metadata ¶ added in v1.17.0
func (op *AcceptSpokeUpdateOperation) Metadata() (*networkconnectivitypb.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 (*AcceptSpokeUpdateOperation) Name ¶ added in v1.17.0
func (op *AcceptSpokeUpdateOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*AcceptSpokeUpdateOperation) Poll ¶ added in v1.17.0
func (op *AcceptSpokeUpdateOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.AcceptSpokeUpdateResponse, 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 (*AcceptSpokeUpdateOperation) Wait ¶ added in v1.17.0
func (op *AcceptSpokeUpdateOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.AcceptSpokeUpdateResponse, 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.
type CreateDestinationOperation ¶ added in v1.19.0
type CreateDestinationOperation struct {
// contains filtered or unexported fields
}
CreateDestinationOperation manages a long-running operation from CreateDestination.
func (*CreateDestinationOperation) Done ¶ added in v1.19.0
func (op *CreateDestinationOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateDestinationOperation) Metadata ¶ added in v1.19.0
func (op *CreateDestinationOperation) Metadata() (*networkconnectivitypb.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 (*CreateDestinationOperation) Name ¶ added in v1.19.0
func (op *CreateDestinationOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateDestinationOperation) Poll ¶ added in v1.19.0
func (op *CreateDestinationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Destination, 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 (*CreateDestinationOperation) Wait ¶ added in v1.19.0
func (op *CreateDestinationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Destination, 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.
type CreateHubOperation ¶
type CreateHubOperation struct {
// contains filtered or unexported fields
}
CreateHubOperation manages a long-running operation from CreateHub.
func (*CreateHubOperation) Done ¶
func (op *CreateHubOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateHubOperation) Metadata ¶
func (op *CreateHubOperation) Metadata() (*networkconnectivitypb.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 (*CreateHubOperation) Name ¶
func (op *CreateHubOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateHubOperation) Poll ¶
func (op *CreateHubOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Hub, 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 (*CreateHubOperation) Wait ¶
func (op *CreateHubOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Hub, 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.
type CreateInternalRangeOperation ¶ added in v1.18.0
type CreateInternalRangeOperation struct {
// contains filtered or unexported fields
}
CreateInternalRangeOperation manages a long-running operation from CreateInternalRange.
func (*CreateInternalRangeOperation) Done ¶ added in v1.18.0
func (op *CreateInternalRangeOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateInternalRangeOperation) Metadata ¶ added in v1.18.0
func (op *CreateInternalRangeOperation) Metadata() (*networkconnectivitypb.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 (*CreateInternalRangeOperation) Name ¶ added in v1.18.0
func (op *CreateInternalRangeOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateInternalRangeOperation) Poll ¶ added in v1.18.0
func (op *CreateInternalRangeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.InternalRange, 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 (*CreateInternalRangeOperation) Wait ¶ added in v1.18.0
func (op *CreateInternalRangeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.InternalRange, 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.
type CreateMulticloudDataTransferConfigOperation ¶ added in v1.19.0
type CreateMulticloudDataTransferConfigOperation struct {
// contains filtered or unexported fields
}
CreateMulticloudDataTransferConfigOperation manages a long-running operation from CreateMulticloudDataTransferConfig.
func (*CreateMulticloudDataTransferConfigOperation) Done ¶ added in v1.19.0
func (op *CreateMulticloudDataTransferConfigOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateMulticloudDataTransferConfigOperation) Metadata ¶ added in v1.19.0
func (op *CreateMulticloudDataTransferConfigOperation) Metadata() (*networkconnectivitypb.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 (*CreateMulticloudDataTransferConfigOperation) Name ¶ added in v1.19.0
func (op *CreateMulticloudDataTransferConfigOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateMulticloudDataTransferConfigOperation) Poll ¶ added in v1.19.0
func (op *CreateMulticloudDataTransferConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.MulticloudDataTransferConfig, 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 (*CreateMulticloudDataTransferConfigOperation) Wait ¶ added in v1.19.0
func (op *CreateMulticloudDataTransferConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.MulticloudDataTransferConfig, 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.
type CreatePolicyBasedRouteOperation ¶ added in v1.8.0
type CreatePolicyBasedRouteOperation struct {
// contains filtered or unexported fields
}
CreatePolicyBasedRouteOperation manages a long-running operation from CreatePolicyBasedRoute.
func (*CreatePolicyBasedRouteOperation) Done ¶ added in v1.8.0
func (op *CreatePolicyBasedRouteOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreatePolicyBasedRouteOperation) Metadata ¶ added in v1.8.0
func (op *CreatePolicyBasedRouteOperation) Metadata() (*networkconnectivitypb.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 (*CreatePolicyBasedRouteOperation) Name ¶ added in v1.8.0
func (op *CreatePolicyBasedRouteOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreatePolicyBasedRouteOperation) Poll ¶ added in v1.8.0
func (op *CreatePolicyBasedRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.PolicyBasedRoute, 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 (*CreatePolicyBasedRouteOperation) Wait ¶ added in v1.8.0
func (op *CreatePolicyBasedRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.PolicyBasedRoute, 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.
type CreateServiceConnectionMapOperation ¶ added in v1.17.0
type CreateServiceConnectionMapOperation struct {
// contains filtered or unexported fields
}
CreateServiceConnectionMapOperation manages a long-running operation from CreateServiceConnectionMap.
func (*CreateServiceConnectionMapOperation) Done ¶ added in v1.17.0
func (op *CreateServiceConnectionMapOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateServiceConnectionMapOperation) Metadata ¶ added in v1.17.0
func (op *CreateServiceConnectionMapOperation) Metadata() (*networkconnectivitypb.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 (*CreateServiceConnectionMapOperation) Name ¶ added in v1.17.0
func (op *CreateServiceConnectionMapOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateServiceConnectionMapOperation) Poll ¶ added in v1.17.0
func (op *CreateServiceConnectionMapOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionMap, 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 (*CreateServiceConnectionMapOperation) Wait ¶ added in v1.17.0
func (op *CreateServiceConnectionMapOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionMap, 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.
type CreateServiceConnectionPolicyOperation ¶ added in v1.17.0
type CreateServiceConnectionPolicyOperation struct {
// contains filtered or unexported fields
}
CreateServiceConnectionPolicyOperation manages a long-running operation from CreateServiceConnectionPolicy.
func (*CreateServiceConnectionPolicyOperation) Done ¶ added in v1.17.0
func (op *CreateServiceConnectionPolicyOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateServiceConnectionPolicyOperation) Metadata ¶ added in v1.17.0
func (op *CreateServiceConnectionPolicyOperation) Metadata() (*networkconnectivitypb.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 (*CreateServiceConnectionPolicyOperation) Name ¶ added in v1.17.0
func (op *CreateServiceConnectionPolicyOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateServiceConnectionPolicyOperation) Poll ¶ added in v1.17.0
func (op *CreateServiceConnectionPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionPolicy, 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 (*CreateServiceConnectionPolicyOperation) Wait ¶ added in v1.17.0
func (op *CreateServiceConnectionPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionPolicy, 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.
type CreateServiceConnectionTokenOperation ¶ added in v1.17.0
type CreateServiceConnectionTokenOperation struct {
// contains filtered or unexported fields
}
CreateServiceConnectionTokenOperation manages a long-running operation from CreateServiceConnectionToken.
func (*CreateServiceConnectionTokenOperation) Done ¶ added in v1.17.0
func (op *CreateServiceConnectionTokenOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateServiceConnectionTokenOperation) Metadata ¶ added in v1.17.0
func (op *CreateServiceConnectionTokenOperation) Metadata() (*networkconnectivitypb.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 (*CreateServiceConnectionTokenOperation) Name ¶ added in v1.17.0
func (op *CreateServiceConnectionTokenOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateServiceConnectionTokenOperation) Poll ¶ added in v1.17.0
func (op *CreateServiceConnectionTokenOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionToken, 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 (*CreateServiceConnectionTokenOperation) Wait ¶ added in v1.17.0
func (op *CreateServiceConnectionTokenOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionToken, 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.
type CreateSpokeOperation ¶
type CreateSpokeOperation struct {
// contains filtered or unexported fields
}
CreateSpokeOperation manages a long-running operation from CreateSpoke.
func (*CreateSpokeOperation) Done ¶
func (op *CreateSpokeOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*CreateSpokeOperation) Metadata ¶
func (op *CreateSpokeOperation) Metadata() (*networkconnectivitypb.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 (*CreateSpokeOperation) Name ¶
func (op *CreateSpokeOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateSpokeOperation) Poll ¶
func (op *CreateSpokeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Spoke, 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 (*CreateSpokeOperation) Wait ¶
func (op *CreateSpokeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Spoke, 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.
type CrossNetworkAutomationCallOptions ¶ added in v1.17.0
type CrossNetworkAutomationCallOptions struct {
ListServiceConnectionMaps []gax.CallOption
GetServiceConnectionMap []gax.CallOption
CreateServiceConnectionMap []gax.CallOption
UpdateServiceConnectionMap []gax.CallOption
DeleteServiceConnectionMap []gax.CallOption
ListServiceConnectionPolicies []gax.CallOption
GetServiceConnectionPolicy []gax.CallOption
CreateServiceConnectionPolicy []gax.CallOption
UpdateServiceConnectionPolicy []gax.CallOption
DeleteServiceConnectionPolicy []gax.CallOption
ListServiceClasses []gax.CallOption
GetServiceClass []gax.CallOption
UpdateServiceClass []gax.CallOption
DeleteServiceClass []gax.CallOption
GetServiceConnectionToken []gax.CallOption
ListServiceConnectionTokens []gax.CallOption
CreateServiceConnectionToken []gax.CallOption
DeleteServiceConnectionToken []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
}
CrossNetworkAutomationCallOptions contains the retry settings for each method of CrossNetworkAutomationClient.
type CrossNetworkAutomationClient ¶ added in v1.17.0
type CrossNetworkAutomationClient struct {
// The call options for this service.
CallOptions *CrossNetworkAutomationCallOptions
// 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
}
CrossNetworkAutomationClient is a client for interacting with Network Connectivity API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The service for CrossNetworkAutomation resources.
func NewCrossNetworkAutomationClient ¶ added in v1.17.0
func NewCrossNetworkAutomationClient(ctx context.Context, opts ...option.ClientOption) (*CrossNetworkAutomationClient, error)
NewCrossNetworkAutomationClient creates a new cross network automation service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
The service for CrossNetworkAutomation resources.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*CrossNetworkAutomationClient) CancelOperation ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewCrossNetworkAutomationClient(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 (*CrossNetworkAutomationClient) Close ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*CrossNetworkAutomationClient) Connection
deprecated
added in
v1.17.0
func (c *CrossNetworkAutomationClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*CrossNetworkAutomationClient) CreateServiceConnectionMap ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) CreateServiceConnectionMap(ctx context.Context, req *networkconnectivitypb.CreateServiceConnectionMapRequest, opts ...gax.CallOption) (*CreateServiceConnectionMapOperation, error)
CreateServiceConnectionMap creates a new ServiceConnectionMap in a given project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.CreateServiceConnectionMapRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#CreateServiceConnectionMapRequest.
}
op, err := c.CreateServiceConnectionMap(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CrossNetworkAutomationClient) CreateServiceConnectionMapOperation ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) CreateServiceConnectionMapOperation(name string) *CreateServiceConnectionMapOperation
CreateServiceConnectionMapOperation returns a new CreateServiceConnectionMapOperation from a given name. The name must be that of a previously created CreateServiceConnectionMapOperation, possibly from a different process.
func (*CrossNetworkAutomationClient) CreateServiceConnectionPolicy ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) CreateServiceConnectionPolicy(ctx context.Context, req *networkconnectivitypb.CreateServiceConnectionPolicyRequest, opts ...gax.CallOption) (*CreateServiceConnectionPolicyOperation, error)
CreateServiceConnectionPolicy creates a new ServiceConnectionPolicy in a given project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.CreateServiceConnectionPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#CreateServiceConnectionPolicyRequest.
}
op, err := c.CreateServiceConnectionPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CrossNetworkAutomationClient) CreateServiceConnectionPolicyOperation ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) CreateServiceConnectionPolicyOperation(name string) *CreateServiceConnectionPolicyOperation
CreateServiceConnectionPolicyOperation returns a new CreateServiceConnectionPolicyOperation from a given name. The name must be that of a previously created CreateServiceConnectionPolicyOperation, possibly from a different process.
func (*CrossNetworkAutomationClient) CreateServiceConnectionToken ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) CreateServiceConnectionToken(ctx context.Context, req *networkconnectivitypb.CreateServiceConnectionTokenRequest, opts ...gax.CallOption) (*CreateServiceConnectionTokenOperation, error)
CreateServiceConnectionToken creates a new ServiceConnectionToken in a given project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.CreateServiceConnectionTokenRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#CreateServiceConnectionTokenRequest.
}
op, err := c.CreateServiceConnectionToken(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CrossNetworkAutomationClient) CreateServiceConnectionTokenOperation ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) CreateServiceConnectionTokenOperation(name string) *CreateServiceConnectionTokenOperation
CreateServiceConnectionTokenOperation returns a new CreateServiceConnectionTokenOperation from a given name. The name must be that of a previously created CreateServiceConnectionTokenOperation, possibly from a different process.
func (*CrossNetworkAutomationClient) DeleteOperation ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewCrossNetworkAutomationClient(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 (*CrossNetworkAutomationClient) DeleteServiceClass ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) DeleteServiceClass(ctx context.Context, req *networkconnectivitypb.DeleteServiceClassRequest, opts ...gax.CallOption) (*DeleteServiceClassOperation, error)
DeleteServiceClass deletes a single ServiceClass.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.DeleteServiceClassRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#DeleteServiceClassRequest.
}
op, err := c.DeleteServiceClass(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*CrossNetworkAutomationClient) DeleteServiceClassOperation ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) DeleteServiceClassOperation(name string) *DeleteServiceClassOperation
DeleteServiceClassOperation returns a new DeleteServiceClassOperation from a given name. The name must be that of a previously created DeleteServiceClassOperation, possibly from a different process.
func (*CrossNetworkAutomationClient) DeleteServiceConnectionMap ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) DeleteServiceConnectionMap(ctx context.Context, req *networkconnectivitypb.DeleteServiceConnectionMapRequest, opts ...gax.CallOption) (*DeleteServiceConnectionMapOperation, error)
DeleteServiceConnectionMap deletes a single ServiceConnectionMap.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.DeleteServiceConnectionMapRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#DeleteServiceConnectionMapRequest.
}
op, err := c.DeleteServiceConnectionMap(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*CrossNetworkAutomationClient) DeleteServiceConnectionMapOperation ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) DeleteServiceConnectionMapOperation(name string) *DeleteServiceConnectionMapOperation
DeleteServiceConnectionMapOperation returns a new DeleteServiceConnectionMapOperation from a given name. The name must be that of a previously created DeleteServiceConnectionMapOperation, possibly from a different process.
func (*CrossNetworkAutomationClient) DeleteServiceConnectionPolicy ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) DeleteServiceConnectionPolicy(ctx context.Context, req *networkconnectivitypb.DeleteServiceConnectionPolicyRequest, opts ...gax.CallOption) (*DeleteServiceConnectionPolicyOperation, error)
DeleteServiceConnectionPolicy deletes a single ServiceConnectionPolicy.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.DeleteServiceConnectionPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#DeleteServiceConnectionPolicyRequest.
}
op, err := c.DeleteServiceConnectionPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*CrossNetworkAutomationClient) DeleteServiceConnectionPolicyOperation ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) DeleteServiceConnectionPolicyOperation(name string) *DeleteServiceConnectionPolicyOperation
DeleteServiceConnectionPolicyOperation returns a new DeleteServiceConnectionPolicyOperation from a given name. The name must be that of a previously created DeleteServiceConnectionPolicyOperation, possibly from a different process.
func (*CrossNetworkAutomationClient) DeleteServiceConnectionToken ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) DeleteServiceConnectionToken(ctx context.Context, req *networkconnectivitypb.DeleteServiceConnectionTokenRequest, opts ...gax.CallOption) (*DeleteServiceConnectionTokenOperation, error)
DeleteServiceConnectionToken deletes a single ServiceConnectionToken.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.DeleteServiceConnectionTokenRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#DeleteServiceConnectionTokenRequest.
}
op, err := c.DeleteServiceConnectionToken(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*CrossNetworkAutomationClient) DeleteServiceConnectionTokenOperation ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) DeleteServiceConnectionTokenOperation(name string) *DeleteServiceConnectionTokenOperation
DeleteServiceConnectionTokenOperation returns a new DeleteServiceConnectionTokenOperation from a given name. The name must be that of a previously created DeleteServiceConnectionTokenOperation, possibly from a different process.
func (*CrossNetworkAutomationClient) GetIamPolicy ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewCrossNetworkAutomationClient(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 (*CrossNetworkAutomationClient) GetLocation ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewCrossNetworkAutomationClient(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 (*CrossNetworkAutomationClient) GetOperation ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewCrossNetworkAutomationClient(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 (*CrossNetworkAutomationClient) GetServiceClass ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) GetServiceClass(ctx context.Context, req *networkconnectivitypb.GetServiceClassRequest, opts ...gax.CallOption) (*networkconnectivitypb.ServiceClass, error)
GetServiceClass gets details of a single ServiceClass.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.GetServiceClassRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#GetServiceClassRequest.
}
resp, err := c.GetServiceClass(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CrossNetworkAutomationClient) GetServiceConnectionMap ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) GetServiceConnectionMap(ctx context.Context, req *networkconnectivitypb.GetServiceConnectionMapRequest, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionMap, error)
GetServiceConnectionMap gets details of a single ServiceConnectionMap.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.GetServiceConnectionMapRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#GetServiceConnectionMapRequest.
}
resp, err := c.GetServiceConnectionMap(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CrossNetworkAutomationClient) GetServiceConnectionPolicy ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) GetServiceConnectionPolicy(ctx context.Context, req *networkconnectivitypb.GetServiceConnectionPolicyRequest, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionPolicy, error)
GetServiceConnectionPolicy gets details of a single ServiceConnectionPolicy.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.GetServiceConnectionPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#GetServiceConnectionPolicyRequest.
}
resp, err := c.GetServiceConnectionPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CrossNetworkAutomationClient) GetServiceConnectionToken ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) GetServiceConnectionToken(ctx context.Context, req *networkconnectivitypb.GetServiceConnectionTokenRequest, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionToken, error)
GetServiceConnectionToken gets details of a single ServiceConnectionToken.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.GetServiceConnectionTokenRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#GetServiceConnectionTokenRequest.
}
resp, err := c.GetServiceConnectionToken(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CrossNetworkAutomationClient) ListLocations ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewCrossNetworkAutomationClient(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)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewCrossNetworkAutomationClient(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 (*CrossNetworkAutomationClient) ListOperations ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewCrossNetworkAutomationClient(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)
}
}
Example (All) ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewCrossNetworkAutomationClient(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 (*CrossNetworkAutomationClient) ListServiceClasses ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) ListServiceClasses(ctx context.Context, req *networkconnectivitypb.ListServiceClassesRequest, opts ...gax.CallOption) *ServiceClassIterator
ListServiceClasses lists ServiceClasses in a given project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
"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 := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListServiceClassesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListServiceClassesRequest.
}
it := c.ListServiceClasses(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.(*networkconnectivitypb.ListServiceClassesResponse)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListServiceClassesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListServiceClassesRequest.
}
for resp, err := range c.ListServiceClasses(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*CrossNetworkAutomationClient) ListServiceConnectionMaps ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) ListServiceConnectionMaps(ctx context.Context, req *networkconnectivitypb.ListServiceConnectionMapsRequest, opts ...gax.CallOption) *ServiceConnectionMapIterator
ListServiceConnectionMaps lists ServiceConnectionMaps in a given project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
"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 := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListServiceConnectionMapsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListServiceConnectionMapsRequest.
}
it := c.ListServiceConnectionMaps(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.(*networkconnectivitypb.ListServiceConnectionMapsResponse)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListServiceConnectionMapsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListServiceConnectionMapsRequest.
}
for resp, err := range c.ListServiceConnectionMaps(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*CrossNetworkAutomationClient) ListServiceConnectionPolicies ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) ListServiceConnectionPolicies(ctx context.Context, req *networkconnectivitypb.ListServiceConnectionPoliciesRequest, opts ...gax.CallOption) *ServiceConnectionPolicyIterator
ListServiceConnectionPolicies lists ServiceConnectionPolicies in a given project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
"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 := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListServiceConnectionPoliciesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListServiceConnectionPoliciesRequest.
}
it := c.ListServiceConnectionPolicies(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.(*networkconnectivitypb.ListServiceConnectionPoliciesResponse)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListServiceConnectionPoliciesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListServiceConnectionPoliciesRequest.
}
for resp, err := range c.ListServiceConnectionPolicies(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*CrossNetworkAutomationClient) ListServiceConnectionTokens ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) ListServiceConnectionTokens(ctx context.Context, req *networkconnectivitypb.ListServiceConnectionTokensRequest, opts ...gax.CallOption) *ServiceConnectionTokenIterator
ListServiceConnectionTokens lists ServiceConnectionTokens in a given project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
"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 := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListServiceConnectionTokensRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListServiceConnectionTokensRequest.
}
it := c.ListServiceConnectionTokens(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.(*networkconnectivitypb.ListServiceConnectionTokensResponse)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListServiceConnectionTokensRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListServiceConnectionTokensRequest.
}
for resp, err := range c.ListServiceConnectionTokens(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*CrossNetworkAutomationClient) SetIamPolicy ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewCrossNetworkAutomationClient(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 (*CrossNetworkAutomationClient) TestIamPermissions ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewCrossNetworkAutomationClient(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 (*CrossNetworkAutomationClient) UpdateServiceClass ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) UpdateServiceClass(ctx context.Context, req *networkconnectivitypb.UpdateServiceClassRequest, opts ...gax.CallOption) (*UpdateServiceClassOperation, error)
UpdateServiceClass updates the parameters of a single ServiceClass.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.UpdateServiceClassRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#UpdateServiceClassRequest.
}
op, err := c.UpdateServiceClass(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CrossNetworkAutomationClient) UpdateServiceClassOperation ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) UpdateServiceClassOperation(name string) *UpdateServiceClassOperation
UpdateServiceClassOperation returns a new UpdateServiceClassOperation from a given name. The name must be that of a previously created UpdateServiceClassOperation, possibly from a different process.
func (*CrossNetworkAutomationClient) UpdateServiceConnectionMap ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) UpdateServiceConnectionMap(ctx context.Context, req *networkconnectivitypb.UpdateServiceConnectionMapRequest, opts ...gax.CallOption) (*UpdateServiceConnectionMapOperation, error)
UpdateServiceConnectionMap updates the parameters of a single ServiceConnectionMap.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.UpdateServiceConnectionMapRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#UpdateServiceConnectionMapRequest.
}
op, err := c.UpdateServiceConnectionMap(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CrossNetworkAutomationClient) UpdateServiceConnectionMapOperation ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) UpdateServiceConnectionMapOperation(name string) *UpdateServiceConnectionMapOperation
UpdateServiceConnectionMapOperation returns a new UpdateServiceConnectionMapOperation from a given name. The name must be that of a previously created UpdateServiceConnectionMapOperation, possibly from a different process.
func (*CrossNetworkAutomationClient) UpdateServiceConnectionPolicy ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) UpdateServiceConnectionPolicy(ctx context.Context, req *networkconnectivitypb.UpdateServiceConnectionPolicyRequest, opts ...gax.CallOption) (*UpdateServiceConnectionPolicyOperation, error)
UpdateServiceConnectionPolicy updates the parameters of a single ServiceConnectionPolicy.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewCrossNetworkAutomationClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.UpdateServiceConnectionPolicyRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#UpdateServiceConnectionPolicyRequest.
}
op, err := c.UpdateServiceConnectionPolicy(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*CrossNetworkAutomationClient) UpdateServiceConnectionPolicyOperation ¶ added in v1.17.0
func (c *CrossNetworkAutomationClient) UpdateServiceConnectionPolicyOperation(name string) *UpdateServiceConnectionPolicyOperation
UpdateServiceConnectionPolicyOperation returns a new UpdateServiceConnectionPolicyOperation from a given name. The name must be that of a previously created UpdateServiceConnectionPolicyOperation, possibly from a different process.
type DataTransferCallOptions ¶ added in v1.19.0
type DataTransferCallOptions struct {
ListMulticloudDataTransferConfigs []gax.CallOption
GetMulticloudDataTransferConfig []gax.CallOption
CreateMulticloudDataTransferConfig []gax.CallOption
UpdateMulticloudDataTransferConfig []gax.CallOption
DeleteMulticloudDataTransferConfig []gax.CallOption
ListDestinations []gax.CallOption
GetDestination []gax.CallOption
CreateDestination []gax.CallOption
UpdateDestination []gax.CallOption
DeleteDestination []gax.CallOption
GetMulticloudDataTransferSupportedService []gax.CallOption
ListMulticloudDataTransferSupportedServices []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
}
DataTransferCallOptions contains the retry settings for each method of DataTransferClient.
type DataTransferClient ¶ added in v1.19.0
type DataTransferClient struct {
// The call options for this service.
CallOptions *DataTransferCallOptions
// 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
}
DataTransferClient is a client for interacting with Network Connectivity API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
DataTransferService is the service for the Data Transfer API.
func NewDataTransferClient ¶ added in v1.19.0
func NewDataTransferClient(ctx context.Context, opts ...option.ClientOption) (*DataTransferClient, error)
NewDataTransferClient creates a new data transfer service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
DataTransferService is the service for the Data Transfer API.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewDataTransferClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*DataTransferClient) CancelOperation ¶ added in v1.19.0
func (c *DataTransferClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewDataTransferClient(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 (*DataTransferClient) Close ¶ added in v1.19.0
func (c *DataTransferClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*DataTransferClient) Connection
deprecated
added in
v1.19.0
func (c *DataTransferClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*DataTransferClient) CreateDestination ¶ added in v1.19.0
func (c *DataTransferClient) CreateDestination(ctx context.Context, req *networkconnectivitypb.CreateDestinationRequest, opts ...gax.CallOption) (*CreateDestinationOperation, error)
CreateDestination creates a Destination resource in a specified project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewDataTransferClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.CreateDestinationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#CreateDestinationRequest.
}
op, err := c.CreateDestination(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataTransferClient) CreateDestinationOperation ¶ added in v1.19.0
func (c *DataTransferClient) CreateDestinationOperation(name string) *CreateDestinationOperation
CreateDestinationOperation returns a new CreateDestinationOperation from a given name. The name must be that of a previously created CreateDestinationOperation, possibly from a different process.
func (*DataTransferClient) CreateMulticloudDataTransferConfig ¶ added in v1.19.0
func (c *DataTransferClient) CreateMulticloudDataTransferConfig(ctx context.Context, req *networkconnectivitypb.CreateMulticloudDataTransferConfigRequest, opts ...gax.CallOption) (*CreateMulticloudDataTransferConfigOperation, error)
CreateMulticloudDataTransferConfig creates a MulticloudDataTransferConfig resource in a specified project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewDataTransferClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.CreateMulticloudDataTransferConfigRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#CreateMulticloudDataTransferConfigRequest.
}
op, err := c.CreateMulticloudDataTransferConfig(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataTransferClient) CreateMulticloudDataTransferConfigOperation ¶ added in v1.19.0
func (c *DataTransferClient) CreateMulticloudDataTransferConfigOperation(name string) *CreateMulticloudDataTransferConfigOperation
CreateMulticloudDataTransferConfigOperation returns a new CreateMulticloudDataTransferConfigOperation from a given name. The name must be that of a previously created CreateMulticloudDataTransferConfigOperation, possibly from a different process.
func (*DataTransferClient) DeleteDestination ¶ added in v1.19.0
func (c *DataTransferClient) DeleteDestination(ctx context.Context, req *networkconnectivitypb.DeleteDestinationRequest, opts ...gax.CallOption) (*DeleteDestinationOperation, error)
DeleteDestination deletes a Destination resource.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewDataTransferClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.DeleteDestinationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#DeleteDestinationRequest.
}
op, err := c.DeleteDestination(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*DataTransferClient) DeleteDestinationOperation ¶ added in v1.19.0
func (c *DataTransferClient) DeleteDestinationOperation(name string) *DeleteDestinationOperation
DeleteDestinationOperation returns a new DeleteDestinationOperation from a given name. The name must be that of a previously created DeleteDestinationOperation, possibly from a different process.
func (*DataTransferClient) DeleteMulticloudDataTransferConfig ¶ added in v1.19.0
func (c *DataTransferClient) DeleteMulticloudDataTransferConfig(ctx context.Context, req *networkconnectivitypb.DeleteMulticloudDataTransferConfigRequest, opts ...gax.CallOption) (*DeleteMulticloudDataTransferConfigOperation, error)
DeleteMulticloudDataTransferConfig deletes a MulticloudDataTransferConfig resource.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewDataTransferClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.DeleteMulticloudDataTransferConfigRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#DeleteMulticloudDataTransferConfigRequest.
}
op, err := c.DeleteMulticloudDataTransferConfig(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*DataTransferClient) DeleteMulticloudDataTransferConfigOperation ¶ added in v1.19.0
func (c *DataTransferClient) DeleteMulticloudDataTransferConfigOperation(name string) *DeleteMulticloudDataTransferConfigOperation
DeleteMulticloudDataTransferConfigOperation returns a new DeleteMulticloudDataTransferConfigOperation from a given name. The name must be that of a previously created DeleteMulticloudDataTransferConfigOperation, possibly from a different process.
func (*DataTransferClient) DeleteOperation ¶ added in v1.19.0
func (c *DataTransferClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewDataTransferClient(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 (*DataTransferClient) GetDestination ¶ added in v1.19.0
func (c *DataTransferClient) GetDestination(ctx context.Context, req *networkconnectivitypb.GetDestinationRequest, opts ...gax.CallOption) (*networkconnectivitypb.Destination, error)
GetDestination gets the details of a Destination resource.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewDataTransferClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.GetDestinationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#GetDestinationRequest.
}
resp, err := c.GetDestination(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataTransferClient) GetIamPolicy ¶ added in v1.19.0
func (c *DataTransferClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewDataTransferClient(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 (*DataTransferClient) GetLocation ¶ added in v1.19.0
func (c *DataTransferClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewDataTransferClient(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 (*DataTransferClient) GetMulticloudDataTransferConfig ¶ added in v1.19.0
func (c *DataTransferClient) GetMulticloudDataTransferConfig(ctx context.Context, req *networkconnectivitypb.GetMulticloudDataTransferConfigRequest, opts ...gax.CallOption) (*networkconnectivitypb.MulticloudDataTransferConfig, error)
GetMulticloudDataTransferConfig gets the details of a MulticloudDataTransferConfig resource.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewDataTransferClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.GetMulticloudDataTransferConfigRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#GetMulticloudDataTransferConfigRequest.
}
resp, err := c.GetMulticloudDataTransferConfig(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataTransferClient) GetMulticloudDataTransferSupportedService ¶ added in v1.19.0
func (c *DataTransferClient) GetMulticloudDataTransferSupportedService(ctx context.Context, req *networkconnectivitypb.GetMulticloudDataTransferSupportedServiceRequest, opts ...gax.CallOption) (*networkconnectivitypb.MulticloudDataTransferSupportedService, error)
GetMulticloudDataTransferSupportedService gets the details of a service that is supported for Data Transfer Essentials.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewDataTransferClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.GetMulticloudDataTransferSupportedServiceRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#GetMulticloudDataTransferSupportedServiceRequest.
}
resp, err := c.GetMulticloudDataTransferSupportedService(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataTransferClient) GetOperation ¶ added in v1.19.0
func (c *DataTransferClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewDataTransferClient(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 (*DataTransferClient) ListDestinations ¶ added in v1.19.0
func (c *DataTransferClient) ListDestinations(ctx context.Context, req *networkconnectivitypb.ListDestinationsRequest, opts ...gax.CallOption) *DestinationIterator
ListDestinations lists the Destination resources in a specified project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
"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 := networkconnectivity.NewDataTransferClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListDestinationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListDestinationsRequest.
}
it := c.ListDestinations(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.(*networkconnectivitypb.ListDestinationsResponse)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewDataTransferClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListDestinationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListDestinationsRequest.
}
for resp, err := range c.ListDestinations(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*DataTransferClient) ListLocations ¶ added in v1.19.0
func (c *DataTransferClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewDataTransferClient(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)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewDataTransferClient(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 (*DataTransferClient) ListMulticloudDataTransferConfigs ¶ added in v1.19.0
func (c *DataTransferClient) ListMulticloudDataTransferConfigs(ctx context.Context, req *networkconnectivitypb.ListMulticloudDataTransferConfigsRequest, opts ...gax.CallOption) *MulticloudDataTransferConfigIterator
ListMulticloudDataTransferConfigs lists the MulticloudDataTransferConfig resources in a specified project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
"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 := networkconnectivity.NewDataTransferClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListMulticloudDataTransferConfigsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListMulticloudDataTransferConfigsRequest.
}
it := c.ListMulticloudDataTransferConfigs(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.(*networkconnectivitypb.ListMulticloudDataTransferConfigsResponse)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewDataTransferClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListMulticloudDataTransferConfigsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListMulticloudDataTransferConfigsRequest.
}
for resp, err := range c.ListMulticloudDataTransferConfigs(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*DataTransferClient) ListMulticloudDataTransferSupportedServices ¶ added in v1.19.0
func (c *DataTransferClient) ListMulticloudDataTransferSupportedServices(ctx context.Context, req *networkconnectivitypb.ListMulticloudDataTransferSupportedServicesRequest, opts ...gax.CallOption) *MulticloudDataTransferSupportedServiceIterator
ListMulticloudDataTransferSupportedServices lists the services in the project for a region that are supported for Data Transfer Essentials.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
"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 := networkconnectivity.NewDataTransferClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListMulticloudDataTransferSupportedServicesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListMulticloudDataTransferSupportedServicesRequest.
}
it := c.ListMulticloudDataTransferSupportedServices(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.(*networkconnectivitypb.ListMulticloudDataTransferSupportedServicesResponse)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewDataTransferClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListMulticloudDataTransferSupportedServicesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListMulticloudDataTransferSupportedServicesRequest.
}
for resp, err := range c.ListMulticloudDataTransferSupportedServices(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*DataTransferClient) ListOperations ¶ added in v1.19.0
func (c *DataTransferClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewDataTransferClient(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)
}
}
Example (All) ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewDataTransferClient(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 (*DataTransferClient) SetIamPolicy ¶ added in v1.19.0
func (c *DataTransferClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewDataTransferClient(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 (*DataTransferClient) TestIamPermissions ¶ added in v1.19.0
func (c *DataTransferClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewDataTransferClient(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 (*DataTransferClient) UpdateDestination ¶ added in v1.19.0
func (c *DataTransferClient) UpdateDestination(ctx context.Context, req *networkconnectivitypb.UpdateDestinationRequest, opts ...gax.CallOption) (*UpdateDestinationOperation, error)
UpdateDestination updates a Destination resource in a specified project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewDataTransferClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.UpdateDestinationRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#UpdateDestinationRequest.
}
op, err := c.UpdateDestination(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataTransferClient) UpdateDestinationOperation ¶ added in v1.19.0
func (c *DataTransferClient) UpdateDestinationOperation(name string) *UpdateDestinationOperation
UpdateDestinationOperation returns a new UpdateDestinationOperation from a given name. The name must be that of a previously created UpdateDestinationOperation, possibly from a different process.
func (*DataTransferClient) UpdateMulticloudDataTransferConfig ¶ added in v1.19.0
func (c *DataTransferClient) UpdateMulticloudDataTransferConfig(ctx context.Context, req *networkconnectivitypb.UpdateMulticloudDataTransferConfigRequest, opts ...gax.CallOption) (*UpdateMulticloudDataTransferConfigOperation, error)
UpdateMulticloudDataTransferConfig updates a MulticloudDataTransferConfig resource in a specified project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewDataTransferClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.UpdateMulticloudDataTransferConfigRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#UpdateMulticloudDataTransferConfigRequest.
}
op, err := c.UpdateMulticloudDataTransferConfig(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataTransferClient) UpdateMulticloudDataTransferConfigOperation ¶ added in v1.19.0
func (c *DataTransferClient) UpdateMulticloudDataTransferConfigOperation(name string) *UpdateMulticloudDataTransferConfigOperation
UpdateMulticloudDataTransferConfigOperation returns a new UpdateMulticloudDataTransferConfigOperation from a given name. The name must be that of a previously created UpdateMulticloudDataTransferConfigOperation, possibly from a different process.
type DeleteDestinationOperation ¶ added in v1.19.0
type DeleteDestinationOperation struct {
// contains filtered or unexported fields
}
DeleteDestinationOperation manages a long-running operation from DeleteDestination.
func (*DeleteDestinationOperation) Done ¶ added in v1.19.0
func (op *DeleteDestinationOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteDestinationOperation) Metadata ¶ added in v1.19.0
func (op *DeleteDestinationOperation) Metadata() (*networkconnectivitypb.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 (*DeleteDestinationOperation) Name ¶ added in v1.19.0
func (op *DeleteDestinationOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteDestinationOperation) Poll ¶ added in v1.19.0
func (op *DeleteDestinationOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteDestinationOperation) Wait ¶ added in v1.19.0
func (op *DeleteDestinationOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteHubOperation ¶
type DeleteHubOperation struct {
// contains filtered or unexported fields
}
DeleteHubOperation manages a long-running operation from DeleteHub.
func (*DeleteHubOperation) Done ¶
func (op *DeleteHubOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteHubOperation) Metadata ¶
func (op *DeleteHubOperation) Metadata() (*networkconnectivitypb.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 (*DeleteHubOperation) Name ¶
func (op *DeleteHubOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteHubOperation) Poll ¶
func (op *DeleteHubOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteHubOperation) Wait ¶
func (op *DeleteHubOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteInternalRangeOperation ¶ added in v1.18.0
type DeleteInternalRangeOperation struct {
// contains filtered or unexported fields
}
DeleteInternalRangeOperation manages a long-running operation from DeleteInternalRange.
func (*DeleteInternalRangeOperation) Done ¶ added in v1.18.0
func (op *DeleteInternalRangeOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteInternalRangeOperation) Metadata ¶ added in v1.18.0
func (op *DeleteInternalRangeOperation) Metadata() (*networkconnectivitypb.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 (*DeleteInternalRangeOperation) Name ¶ added in v1.18.0
func (op *DeleteInternalRangeOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteInternalRangeOperation) Poll ¶ added in v1.18.0
func (op *DeleteInternalRangeOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteInternalRangeOperation) Wait ¶ added in v1.18.0
func (op *DeleteInternalRangeOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteMulticloudDataTransferConfigOperation ¶ added in v1.19.0
type DeleteMulticloudDataTransferConfigOperation struct {
// contains filtered or unexported fields
}
DeleteMulticloudDataTransferConfigOperation manages a long-running operation from DeleteMulticloudDataTransferConfig.
func (*DeleteMulticloudDataTransferConfigOperation) Done ¶ added in v1.19.0
func (op *DeleteMulticloudDataTransferConfigOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteMulticloudDataTransferConfigOperation) Metadata ¶ added in v1.19.0
func (op *DeleteMulticloudDataTransferConfigOperation) Metadata() (*networkconnectivitypb.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 (*DeleteMulticloudDataTransferConfigOperation) Name ¶ added in v1.19.0
func (op *DeleteMulticloudDataTransferConfigOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteMulticloudDataTransferConfigOperation) Poll ¶ added in v1.19.0
func (op *DeleteMulticloudDataTransferConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteMulticloudDataTransferConfigOperation) Wait ¶ added in v1.19.0
func (op *DeleteMulticloudDataTransferConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeletePolicyBasedRouteOperation ¶ added in v1.8.0
type DeletePolicyBasedRouteOperation struct {
// contains filtered or unexported fields
}
DeletePolicyBasedRouteOperation manages a long-running operation from DeletePolicyBasedRoute.
func (*DeletePolicyBasedRouteOperation) Done ¶ added in v1.8.0
func (op *DeletePolicyBasedRouteOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeletePolicyBasedRouteOperation) Metadata ¶ added in v1.8.0
func (op *DeletePolicyBasedRouteOperation) Metadata() (*networkconnectivitypb.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 (*DeletePolicyBasedRouteOperation) Name ¶ added in v1.8.0
func (op *DeletePolicyBasedRouteOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeletePolicyBasedRouteOperation) Poll ¶ added in v1.8.0
func (op *DeletePolicyBasedRouteOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeletePolicyBasedRouteOperation) Wait ¶ added in v1.8.0
func (op *DeletePolicyBasedRouteOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteServiceClassOperation ¶ added in v1.17.0
type DeleteServiceClassOperation struct {
// contains filtered or unexported fields
}
DeleteServiceClassOperation manages a long-running operation from DeleteServiceClass.
func (*DeleteServiceClassOperation) Done ¶ added in v1.17.0
func (op *DeleteServiceClassOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteServiceClassOperation) Metadata ¶ added in v1.17.0
func (op *DeleteServiceClassOperation) Metadata() (*networkconnectivitypb.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 (*DeleteServiceClassOperation) Name ¶ added in v1.17.0
func (op *DeleteServiceClassOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteServiceClassOperation) Poll ¶ added in v1.17.0
func (op *DeleteServiceClassOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteServiceClassOperation) Wait ¶ added in v1.17.0
func (op *DeleteServiceClassOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteServiceConnectionMapOperation ¶ added in v1.17.0
type DeleteServiceConnectionMapOperation struct {
// contains filtered or unexported fields
}
DeleteServiceConnectionMapOperation manages a long-running operation from DeleteServiceConnectionMap.
func (*DeleteServiceConnectionMapOperation) Done ¶ added in v1.17.0
func (op *DeleteServiceConnectionMapOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteServiceConnectionMapOperation) Metadata ¶ added in v1.17.0
func (op *DeleteServiceConnectionMapOperation) Metadata() (*networkconnectivitypb.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 (*DeleteServiceConnectionMapOperation) Name ¶ added in v1.17.0
func (op *DeleteServiceConnectionMapOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteServiceConnectionMapOperation) Poll ¶ added in v1.17.0
func (op *DeleteServiceConnectionMapOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteServiceConnectionMapOperation) Wait ¶ added in v1.17.0
func (op *DeleteServiceConnectionMapOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteServiceConnectionPolicyOperation ¶ added in v1.17.0
type DeleteServiceConnectionPolicyOperation struct {
// contains filtered or unexported fields
}
DeleteServiceConnectionPolicyOperation manages a long-running operation from DeleteServiceConnectionPolicy.
func (*DeleteServiceConnectionPolicyOperation) Done ¶ added in v1.17.0
func (op *DeleteServiceConnectionPolicyOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteServiceConnectionPolicyOperation) Metadata ¶ added in v1.17.0
func (op *DeleteServiceConnectionPolicyOperation) Metadata() (*networkconnectivitypb.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 (*DeleteServiceConnectionPolicyOperation) Name ¶ added in v1.17.0
func (op *DeleteServiceConnectionPolicyOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteServiceConnectionPolicyOperation) Poll ¶ added in v1.17.0
func (op *DeleteServiceConnectionPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteServiceConnectionPolicyOperation) Wait ¶ added in v1.17.0
func (op *DeleteServiceConnectionPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteServiceConnectionTokenOperation ¶ added in v1.17.0
type DeleteServiceConnectionTokenOperation struct {
// contains filtered or unexported fields
}
DeleteServiceConnectionTokenOperation manages a long-running operation from DeleteServiceConnectionToken.
func (*DeleteServiceConnectionTokenOperation) Done ¶ added in v1.17.0
func (op *DeleteServiceConnectionTokenOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteServiceConnectionTokenOperation) Metadata ¶ added in v1.17.0
func (op *DeleteServiceConnectionTokenOperation) Metadata() (*networkconnectivitypb.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 (*DeleteServiceConnectionTokenOperation) Name ¶ added in v1.17.0
func (op *DeleteServiceConnectionTokenOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteServiceConnectionTokenOperation) Poll ¶ added in v1.17.0
func (op *DeleteServiceConnectionTokenOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteServiceConnectionTokenOperation) Wait ¶ added in v1.17.0
func (op *DeleteServiceConnectionTokenOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DeleteSpokeOperation ¶
type DeleteSpokeOperation struct {
// contains filtered or unexported fields
}
DeleteSpokeOperation manages a long-running operation from DeleteSpoke.
func (*DeleteSpokeOperation) Done ¶
func (op *DeleteSpokeOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*DeleteSpokeOperation) Metadata ¶
func (op *DeleteSpokeOperation) Metadata() (*networkconnectivitypb.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 (*DeleteSpokeOperation) Name ¶
func (op *DeleteSpokeOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*DeleteSpokeOperation) Poll ¶
func (op *DeleteSpokeOperation) Poll(ctx context.Context, opts ...gax.CallOption) error
Poll fetches the latest state of the long-running operation.
Poll also fetches the latest metadata, which can be retrieved by Metadata.
If Poll fails, the error is returned and op is unmodified. If Poll succeeds and the operation has completed with failure, the error is returned and op.Done will return true. If Poll succeeds and the operation has completed successfully, op.Done will return true, and the response of the operation is returned. If Poll succeeds and the operation has not completed, the returned response and error are both nil.
func (*DeleteSpokeOperation) Wait ¶
func (op *DeleteSpokeOperation) Wait(ctx context.Context, opts ...gax.CallOption) error
Wait blocks until the long-running operation is completed, returning the response and any errors encountered.
See documentation of Poll for error-handling information.
type DestinationIterator ¶ added in v1.19.0
type DestinationIterator 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 []*networkconnectivitypb.Destination, nextPageToken string, err error)
// contains filtered or unexported fields
}
DestinationIterator manages a stream of *networkconnectivitypb.Destination.
func (*DestinationIterator) All ¶ added in v1.19.0
func (it *DestinationIterator) All() iter.Seq2[*networkconnectivitypb.Destination, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*DestinationIterator) Next ¶ added in v1.19.0
func (it *DestinationIterator) Next() (*networkconnectivitypb.Destination, 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 (*DestinationIterator) PageInfo ¶ added in v1.19.0
func (it *DestinationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type GroupIterator ¶ added in v1.14.0
type GroupIterator 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 []*networkconnectivitypb.Group, nextPageToken string, err error)
// contains filtered or unexported fields
}
GroupIterator manages a stream of *networkconnectivitypb.Group.
func (*GroupIterator) All ¶ added in v1.15.1
func (it *GroupIterator) All() iter.Seq2[*networkconnectivitypb.Group, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*GroupIterator) Next ¶ added in v1.14.0
func (it *GroupIterator) Next() (*networkconnectivitypb.Group, 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 (*GroupIterator) PageInfo ¶ added in v1.14.0
func (it *GroupIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type HubCallOptions ¶
type HubCallOptions struct {
ListHubs []gax.CallOption
GetHub []gax.CallOption
CreateHub []gax.CallOption
UpdateHub []gax.CallOption
DeleteHub []gax.CallOption
ListHubSpokes []gax.CallOption
QueryHubStatus []gax.CallOption
ListSpokes []gax.CallOption
GetSpoke []gax.CallOption
CreateSpoke []gax.CallOption
UpdateSpoke []gax.CallOption
RejectHubSpoke []gax.CallOption
AcceptHubSpoke []gax.CallOption
AcceptSpokeUpdate []gax.CallOption
RejectSpokeUpdate []gax.CallOption
DeleteSpoke []gax.CallOption
GetRouteTable []gax.CallOption
GetRoute []gax.CallOption
ListRoutes []gax.CallOption
ListRouteTables []gax.CallOption
GetGroup []gax.CallOption
ListGroups []gax.CallOption
UpdateGroup []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
}
HubCallOptions contains the retry settings for each method of HubClient.
type HubClient ¶
type HubClient struct {
// The call options for this service.
CallOptions *HubCallOptions
// 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
}
HubClient is a client for interacting with Network Connectivity API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Network Connectivity Center is a hub-and-spoke abstraction for network connectivity management in Google Cloud. It reduces operational complexity through a simple, centralized connectivity management model.
func NewHubClient ¶
NewHubClient creates a new hub service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Network Connectivity Center is a hub-and-spoke abstraction for network connectivity management in Google Cloud. It reduces operational complexity through a simple, centralized connectivity management model.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*HubClient) AcceptHubSpoke ¶ added in v1.14.0
func (c *HubClient) AcceptHubSpoke(ctx context.Context, req *networkconnectivitypb.AcceptHubSpokeRequest, opts ...gax.CallOption) (*AcceptHubSpokeOperation, error)
AcceptHubSpoke accepts a proposal to attach a Network Connectivity Center spoke to a hub.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.AcceptHubSpokeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#AcceptHubSpokeRequest.
}
op, err := c.AcceptHubSpoke(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) AcceptHubSpokeOperation ¶ added in v1.14.0
func (c *HubClient) AcceptHubSpokeOperation(name string) *AcceptHubSpokeOperation
AcceptHubSpokeOperation returns a new AcceptHubSpokeOperation from a given name. The name must be that of a previously created AcceptHubSpokeOperation, possibly from a different process.
func (*HubClient) AcceptSpokeUpdate ¶ added in v1.17.0
func (c *HubClient) AcceptSpokeUpdate(ctx context.Context, req *networkconnectivitypb.AcceptSpokeUpdateRequest, opts ...gax.CallOption) (*AcceptSpokeUpdateOperation, error)
AcceptSpokeUpdate accepts a proposal to update a Network Connectivity Center spoke in a hub.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.AcceptSpokeUpdateRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#AcceptSpokeUpdateRequest.
}
op, err := c.AcceptSpokeUpdate(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) AcceptSpokeUpdateOperation ¶ added in v1.17.0
func (c *HubClient) AcceptSpokeUpdateOperation(name string) *AcceptSpokeUpdateOperation
AcceptSpokeUpdateOperation returns a new AcceptSpokeUpdateOperation from a given name. The name must be that of a previously created AcceptSpokeUpdateOperation, possibly from a different process.
func (*HubClient) CancelOperation ¶ added in v1.8.0
func (c *HubClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewHubClient(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 (*HubClient) Close ¶
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*HubClient) Connection
deprecated
func (c *HubClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*HubClient) CreateHub ¶
func (c *HubClient) CreateHub(ctx context.Context, req *networkconnectivitypb.CreateHubRequest, opts ...gax.CallOption) (*CreateHubOperation, error)
CreateHub creates a new Network Connectivity Center hub in the specified project.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.CreateHubRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#CreateHubRequest.
}
op, err := c.CreateHub(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) CreateHubOperation ¶
func (c *HubClient) CreateHubOperation(name string) *CreateHubOperation
CreateHubOperation returns a new CreateHubOperation from a given name. The name must be that of a previously created CreateHubOperation, possibly from a different process.
func (*HubClient) CreateSpoke ¶
func (c *HubClient) CreateSpoke(ctx context.Context, req *networkconnectivitypb.CreateSpokeRequest, opts ...gax.CallOption) (*CreateSpokeOperation, error)
CreateSpoke creates a Network Connectivity Center spoke.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.CreateSpokeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#CreateSpokeRequest.
}
op, err := c.CreateSpoke(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) CreateSpokeOperation ¶
func (c *HubClient) CreateSpokeOperation(name string) *CreateSpokeOperation
CreateSpokeOperation returns a new CreateSpokeOperation from a given name. The name must be that of a previously created CreateSpokeOperation, possibly from a different process.
func (*HubClient) DeleteHub ¶
func (c *HubClient) DeleteHub(ctx context.Context, req *networkconnectivitypb.DeleteHubRequest, opts ...gax.CallOption) (*DeleteHubOperation, error)
DeleteHub deletes a Network Connectivity Center hub.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.DeleteHubRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#DeleteHubRequest.
}
op, err := c.DeleteHub(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*HubClient) DeleteHubOperation ¶
func (c *HubClient) DeleteHubOperation(name string) *DeleteHubOperation
DeleteHubOperation returns a new DeleteHubOperation from a given name. The name must be that of a previously created DeleteHubOperation, possibly from a different process.
func (*HubClient) DeleteOperation ¶ added in v1.8.0
func (c *HubClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewHubClient(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 (*HubClient) DeleteSpoke ¶
func (c *HubClient) DeleteSpoke(ctx context.Context, req *networkconnectivitypb.DeleteSpokeRequest, opts ...gax.CallOption) (*DeleteSpokeOperation, error)
DeleteSpoke deletes a Network Connectivity Center spoke.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.DeleteSpokeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#DeleteSpokeRequest.
}
op, err := c.DeleteSpoke(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*HubClient) DeleteSpokeOperation ¶
func (c *HubClient) DeleteSpokeOperation(name string) *DeleteSpokeOperation
DeleteSpokeOperation returns a new DeleteSpokeOperation from a given name. The name must be that of a previously created DeleteSpokeOperation, possibly from a different process.
func (*HubClient) GetGroup ¶ added in v1.14.0
func (c *HubClient) GetGroup(ctx context.Context, req *networkconnectivitypb.GetGroupRequest, opts ...gax.CallOption) (*networkconnectivitypb.Group, error)
GetGroup gets details about a Network Connectivity Center group.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.GetGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#GetGroupRequest.
}
resp, err := c.GetGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) GetHub ¶
func (c *HubClient) GetHub(ctx context.Context, req *networkconnectivitypb.GetHubRequest, opts ...gax.CallOption) (*networkconnectivitypb.Hub, error)
GetHub gets details about a Network Connectivity Center hub.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.GetHubRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#GetHubRequest.
}
resp, err := c.GetHub(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) GetIamPolicy ¶ added in v1.8.0
func (c *HubClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewHubClient(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 (*HubClient) GetLocation ¶ added in v1.8.0
func (c *HubClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewHubClient(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 (*HubClient) GetOperation ¶ added in v1.8.0
func (c *HubClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewHubClient(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 (*HubClient) GetRoute ¶ added in v1.14.0
func (c *HubClient) GetRoute(ctx context.Context, req *networkconnectivitypb.GetRouteRequest, opts ...gax.CallOption) (*networkconnectivitypb.Route, error)
GetRoute gets details about the specified route.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.GetRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#GetRouteRequest.
}
resp, err := c.GetRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) GetRouteTable ¶ added in v1.14.0
func (c *HubClient) GetRouteTable(ctx context.Context, req *networkconnectivitypb.GetRouteTableRequest, opts ...gax.CallOption) (*networkconnectivitypb.RouteTable, error)
GetRouteTable gets details about a Network Connectivity Center route table.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.GetRouteTableRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#GetRouteTableRequest.
}
resp, err := c.GetRouteTable(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) GetSpoke ¶
func (c *HubClient) GetSpoke(ctx context.Context, req *networkconnectivitypb.GetSpokeRequest, opts ...gax.CallOption) (*networkconnectivitypb.Spoke, error)
GetSpoke gets details about a Network Connectivity Center spoke.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.GetSpokeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#GetSpokeRequest.
}
resp, err := c.GetSpoke(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) ListGroups ¶ added in v1.14.0
func (c *HubClient) ListGroups(ctx context.Context, req *networkconnectivitypb.ListGroupsRequest, opts ...gax.CallOption) *GroupIterator
ListGroups lists groups in a given hub.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
"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 := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListGroupsRequest.
}
it := c.ListGroups(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.(*networkconnectivitypb.ListGroupsResponse)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListGroupsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListGroupsRequest.
}
for resp, err := range c.ListGroups(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*HubClient) ListHubSpokes ¶ added in v1.14.0
func (c *HubClient) ListHubSpokes(ctx context.Context, req *networkconnectivitypb.ListHubSpokesRequest, opts ...gax.CallOption) *SpokeIterator
ListHubSpokes lists the Network Connectivity Center spokes associated with a specified hub and location. The list includes both spokes that are attached to the hub and spokes that have been proposed but not yet accepted.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
"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 := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListHubSpokesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListHubSpokesRequest.
}
it := c.ListHubSpokes(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.(*networkconnectivitypb.ListHubSpokesResponse)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListHubSpokesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListHubSpokesRequest.
}
for resp, err := range c.ListHubSpokes(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*HubClient) ListHubs ¶
func (c *HubClient) ListHubs(ctx context.Context, req *networkconnectivitypb.ListHubsRequest, opts ...gax.CallOption) *HubIterator
ListHubs lists the Network Connectivity Center hubs associated with a given project.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
"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 := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListHubsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListHubsRequest.
}
it := c.ListHubs(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.(*networkconnectivitypb.ListHubsResponse)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListHubsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListHubsRequest.
}
for resp, err := range c.ListHubs(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*HubClient) ListLocations ¶ added in v1.8.0
func (c *HubClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewHubClient(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)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewHubClient(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 (*HubClient) ListOperations ¶ added in v1.8.0
func (c *HubClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewHubClient(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)
}
}
Example (All) ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewHubClient(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 (*HubClient) ListRouteTables ¶ added in v1.14.0
func (c *HubClient) ListRouteTables(ctx context.Context, req *networkconnectivitypb.ListRouteTablesRequest, opts ...gax.CallOption) *RouteTableIterator
ListRouteTables lists route tables in a given hub.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
"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 := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListRouteTablesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListRouteTablesRequest.
}
it := c.ListRouteTables(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.(*networkconnectivitypb.ListRouteTablesResponse)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListRouteTablesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListRouteTablesRequest.
}
for resp, err := range c.ListRouteTables(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*HubClient) ListRoutes ¶ added in v1.14.0
func (c *HubClient) ListRoutes(ctx context.Context, req *networkconnectivitypb.ListRoutesRequest, opts ...gax.CallOption) *RouteIterator
ListRoutes lists routes in a given route table.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
"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 := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListRoutesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListRoutesRequest.
}
it := c.ListRoutes(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.(*networkconnectivitypb.ListRoutesResponse)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListRoutesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListRoutesRequest.
}
for resp, err := range c.ListRoutes(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*HubClient) ListSpokes ¶
func (c *HubClient) ListSpokes(ctx context.Context, req *networkconnectivitypb.ListSpokesRequest, opts ...gax.CallOption) *SpokeIterator
ListSpokes lists the Network Connectivity Center spokes in a specified project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
"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 := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListSpokesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListSpokesRequest.
}
it := c.ListSpokes(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.(*networkconnectivitypb.ListSpokesResponse)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListSpokesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListSpokesRequest.
}
for resp, err := range c.ListSpokes(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*HubClient) QueryHubStatus ¶ added in v1.16.0
func (c *HubClient) QueryHubStatus(ctx context.Context, req *networkconnectivitypb.QueryHubStatusRequest, opts ...gax.CallOption) *HubStatusEntryIterator
QueryHubStatus query the Private Service Connect propagation status of a Network Connectivity Center hub.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
"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 := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.QueryHubStatusRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#QueryHubStatusRequest.
}
it := c.QueryHubStatus(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.(*networkconnectivitypb.QueryHubStatusResponse)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.QueryHubStatusRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#QueryHubStatusRequest.
}
for resp, err := range c.QueryHubStatus(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*HubClient) RejectHubSpoke ¶ added in v1.14.0
func (c *HubClient) RejectHubSpoke(ctx context.Context, req *networkconnectivitypb.RejectHubSpokeRequest, opts ...gax.CallOption) (*RejectHubSpokeOperation, error)
RejectHubSpoke rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the ACTIVE state, it transitions to the INACTIVE state and is no longer able to connect to other spokes that are attached to the hub.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.RejectHubSpokeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#RejectHubSpokeRequest.
}
op, err := c.RejectHubSpoke(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) RejectHubSpokeOperation ¶ added in v1.14.0
func (c *HubClient) RejectHubSpokeOperation(name string) *RejectHubSpokeOperation
RejectHubSpokeOperation returns a new RejectHubSpokeOperation from a given name. The name must be that of a previously created RejectHubSpokeOperation, possibly from a different process.
func (*HubClient) RejectSpokeUpdate ¶ added in v1.17.0
func (c *HubClient) RejectSpokeUpdate(ctx context.Context, req *networkconnectivitypb.RejectSpokeUpdateRequest, opts ...gax.CallOption) (*RejectSpokeUpdateOperation, error)
RejectSpokeUpdate rejects a proposal to update a Network Connectivity Center spoke in a hub.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.RejectSpokeUpdateRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#RejectSpokeUpdateRequest.
}
op, err := c.RejectSpokeUpdate(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) RejectSpokeUpdateOperation ¶ added in v1.17.0
func (c *HubClient) RejectSpokeUpdateOperation(name string) *RejectSpokeUpdateOperation
RejectSpokeUpdateOperation returns a new RejectSpokeUpdateOperation from a given name. The name must be that of a previously created RejectSpokeUpdateOperation, possibly from a different process.
func (*HubClient) SetIamPolicy ¶ added in v1.8.0
func (c *HubClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewHubClient(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 (*HubClient) TestIamPermissions ¶ added in v1.8.0
func (c *HubClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewHubClient(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 (*HubClient) UpdateGroup ¶ added in v1.16.0
func (c *HubClient) UpdateGroup(ctx context.Context, req *networkconnectivitypb.UpdateGroupRequest, opts ...gax.CallOption) (*UpdateGroupOperation, error)
UpdateGroup updates the parameters of a Network Connectivity Center group.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.UpdateGroupRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#UpdateGroupRequest.
}
op, err := c.UpdateGroup(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) UpdateGroupOperation ¶ added in v1.16.0
func (c *HubClient) UpdateGroupOperation(name string) *UpdateGroupOperation
UpdateGroupOperation returns a new UpdateGroupOperation from a given name. The name must be that of a previously created UpdateGroupOperation, possibly from a different process.
func (*HubClient) UpdateHub ¶
func (c *HubClient) UpdateHub(ctx context.Context, req *networkconnectivitypb.UpdateHubRequest, opts ...gax.CallOption) (*UpdateHubOperation, error)
UpdateHub updates the description and/or labels of a Network Connectivity Center hub.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.UpdateHubRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#UpdateHubRequest.
}
op, err := c.UpdateHub(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) UpdateHubOperation ¶
func (c *HubClient) UpdateHubOperation(name string) *UpdateHubOperation
UpdateHubOperation returns a new UpdateHubOperation from a given name. The name must be that of a previously created UpdateHubOperation, possibly from a different process.
func (*HubClient) UpdateSpoke ¶
func (c *HubClient) UpdateSpoke(ctx context.Context, req *networkconnectivitypb.UpdateSpokeRequest, opts ...gax.CallOption) (*UpdateSpokeOperation, error)
UpdateSpoke updates the parameters of a Network Connectivity Center spoke.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewHubClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.UpdateSpokeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#UpdateSpokeRequest.
}
op, err := c.UpdateSpoke(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*HubClient) UpdateSpokeOperation ¶
func (c *HubClient) UpdateSpokeOperation(name string) *UpdateSpokeOperation
UpdateSpokeOperation returns a new UpdateSpokeOperation from a given name. The name must be that of a previously created UpdateSpokeOperation, possibly from a different process.
type HubIterator ¶
type HubIterator 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 []*networkconnectivitypb.Hub, nextPageToken string, err error)
// contains filtered or unexported fields
}
HubIterator manages a stream of *networkconnectivitypb.Hub.
func (*HubIterator) All ¶ added in v1.15.1
func (it *HubIterator) All() iter.Seq2[*networkconnectivitypb.Hub, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*HubIterator) Next ¶
func (it *HubIterator) Next() (*networkconnectivitypb.Hub, 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 (*HubIterator) PageInfo ¶
func (it *HubIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type HubStatusEntryIterator ¶ added in v1.16.0
type HubStatusEntryIterator 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 []*networkconnectivitypb.HubStatusEntry, nextPageToken string, err error)
// contains filtered or unexported fields
}
HubStatusEntryIterator manages a stream of *networkconnectivitypb.HubStatusEntry.
func (*HubStatusEntryIterator) All ¶ added in v1.16.0
func (it *HubStatusEntryIterator) All() iter.Seq2[*networkconnectivitypb.HubStatusEntry, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*HubStatusEntryIterator) Next ¶ added in v1.16.0
func (it *HubStatusEntryIterator) Next() (*networkconnectivitypb.HubStatusEntry, 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 (*HubStatusEntryIterator) PageInfo ¶ added in v1.16.0
func (it *HubStatusEntryIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type InternalRangeCallOptions ¶ added in v1.18.0
type InternalRangeCallOptions struct {
ListInternalRanges []gax.CallOption
GetInternalRange []gax.CallOption
CreateInternalRange []gax.CallOption
UpdateInternalRange []gax.CallOption
DeleteInternalRange []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
}
InternalRangeCallOptions contains the retry settings for each method of InternalRangeClient.
type InternalRangeClient ¶ added in v1.18.0
type InternalRangeClient struct {
// The call options for this service.
CallOptions *InternalRangeCallOptions
// 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
}
InternalRangeClient is a client for interacting with Network Connectivity API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
The CLH-based service for internal range resources used to perform IPAM operations within a VPC network.
func NewInternalRangeClient ¶ added in v1.18.0
func NewInternalRangeClient(ctx context.Context, opts ...option.ClientOption) (*InternalRangeClient, error)
NewInternalRangeClient creates a new internal range service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
The CLH-based service for internal range resources used to perform IPAM operations within a VPC network.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewInternalRangeClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*InternalRangeClient) CancelOperation ¶ added in v1.18.0
func (c *InternalRangeClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewInternalRangeClient(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 (*InternalRangeClient) Close ¶ added in v1.18.0
func (c *InternalRangeClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*InternalRangeClient) Connection
deprecated
added in
v1.18.0
func (c *InternalRangeClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*InternalRangeClient) CreateInternalRange ¶ added in v1.18.0
func (c *InternalRangeClient) CreateInternalRange(ctx context.Context, req *networkconnectivitypb.CreateInternalRangeRequest, opts ...gax.CallOption) (*CreateInternalRangeOperation, error)
CreateInternalRange creates a new internal range in a given project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewInternalRangeClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.CreateInternalRangeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#CreateInternalRangeRequest.
}
op, err := c.CreateInternalRange(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InternalRangeClient) CreateInternalRangeOperation ¶ added in v1.18.0
func (c *InternalRangeClient) CreateInternalRangeOperation(name string) *CreateInternalRangeOperation
CreateInternalRangeOperation returns a new CreateInternalRangeOperation from a given name. The name must be that of a previously created CreateInternalRangeOperation, possibly from a different process.
func (*InternalRangeClient) DeleteInternalRange ¶ added in v1.18.0
func (c *InternalRangeClient) DeleteInternalRange(ctx context.Context, req *networkconnectivitypb.DeleteInternalRangeRequest, opts ...gax.CallOption) (*DeleteInternalRangeOperation, error)
DeleteInternalRange deletes a single internal range.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewInternalRangeClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.DeleteInternalRangeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#DeleteInternalRangeRequest.
}
op, err := c.DeleteInternalRange(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*InternalRangeClient) DeleteInternalRangeOperation ¶ added in v1.18.0
func (c *InternalRangeClient) DeleteInternalRangeOperation(name string) *DeleteInternalRangeOperation
DeleteInternalRangeOperation returns a new DeleteInternalRangeOperation from a given name. The name must be that of a previously created DeleteInternalRangeOperation, possibly from a different process.
func (*InternalRangeClient) DeleteOperation ¶ added in v1.18.0
func (c *InternalRangeClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewInternalRangeClient(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 (*InternalRangeClient) GetIamPolicy ¶ added in v1.18.0
func (c *InternalRangeClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewInternalRangeClient(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 (*InternalRangeClient) GetInternalRange ¶ added in v1.18.0
func (c *InternalRangeClient) GetInternalRange(ctx context.Context, req *networkconnectivitypb.GetInternalRangeRequest, opts ...gax.CallOption) (*networkconnectivitypb.InternalRange, error)
GetInternalRange gets details of a single internal range.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewInternalRangeClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.GetInternalRangeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#GetInternalRangeRequest.
}
resp, err := c.GetInternalRange(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InternalRangeClient) GetLocation ¶ added in v1.18.0
func (c *InternalRangeClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewInternalRangeClient(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 (*InternalRangeClient) GetOperation ¶ added in v1.18.0
func (c *InternalRangeClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewInternalRangeClient(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 (*InternalRangeClient) ListInternalRanges ¶ added in v1.18.0
func (c *InternalRangeClient) ListInternalRanges(ctx context.Context, req *networkconnectivitypb.ListInternalRangesRequest, opts ...gax.CallOption) *InternalRangeIterator
ListInternalRanges lists internal ranges in a given project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
"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 := networkconnectivity.NewInternalRangeClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListInternalRangesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListInternalRangesRequest.
}
it := c.ListInternalRanges(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.(*networkconnectivitypb.ListInternalRangesResponse)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewInternalRangeClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListInternalRangesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListInternalRangesRequest.
}
for resp, err := range c.ListInternalRanges(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*InternalRangeClient) ListLocations ¶ added in v1.18.0
func (c *InternalRangeClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewInternalRangeClient(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)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewInternalRangeClient(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 (*InternalRangeClient) ListOperations ¶ added in v1.18.0
func (c *InternalRangeClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewInternalRangeClient(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)
}
}
Example (All) ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewInternalRangeClient(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 (*InternalRangeClient) SetIamPolicy ¶ added in v1.18.0
func (c *InternalRangeClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewInternalRangeClient(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 (*InternalRangeClient) TestIamPermissions ¶ added in v1.18.0
func (c *InternalRangeClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewInternalRangeClient(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 (*InternalRangeClient) UpdateInternalRange ¶ added in v1.18.0
func (c *InternalRangeClient) UpdateInternalRange(ctx context.Context, req *networkconnectivitypb.UpdateInternalRangeRequest, opts ...gax.CallOption) (*UpdateInternalRangeOperation, error)
UpdateInternalRange updates the parameters of a single internal range.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewInternalRangeClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.UpdateInternalRangeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#UpdateInternalRangeRequest.
}
op, err := c.UpdateInternalRange(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InternalRangeClient) UpdateInternalRangeOperation ¶ added in v1.18.0
func (c *InternalRangeClient) UpdateInternalRangeOperation(name string) *UpdateInternalRangeOperation
UpdateInternalRangeOperation returns a new UpdateInternalRangeOperation from a given name. The name must be that of a previously created UpdateInternalRangeOperation, possibly from a different process.
type InternalRangeIterator ¶ added in v1.18.0
type InternalRangeIterator 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 []*networkconnectivitypb.InternalRange, nextPageToken string, err error)
// contains filtered or unexported fields
}
InternalRangeIterator manages a stream of *networkconnectivitypb.InternalRange.
func (*InternalRangeIterator) All ¶ added in v1.18.0
func (it *InternalRangeIterator) All() iter.Seq2[*networkconnectivitypb.InternalRange, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*InternalRangeIterator) Next ¶ added in v1.18.0
func (it *InternalRangeIterator) Next() (*networkconnectivitypb.InternalRange, 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 (*InternalRangeIterator) PageInfo ¶ added in v1.18.0
func (it *InternalRangeIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type LocationIterator ¶ added in v1.8.0
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 ¶ added in v1.15.1
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 ¶ added in v1.8.0
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 ¶ added in v1.8.0
func (it *LocationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type MulticloudDataTransferConfigIterator ¶ added in v1.19.0
type MulticloudDataTransferConfigIterator 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 []*networkconnectivitypb.MulticloudDataTransferConfig, nextPageToken string, err error)
// contains filtered or unexported fields
}
MulticloudDataTransferConfigIterator manages a stream of *networkconnectivitypb.MulticloudDataTransferConfig.
func (*MulticloudDataTransferConfigIterator) All ¶ added in v1.19.0
func (it *MulticloudDataTransferConfigIterator) All() iter.Seq2[*networkconnectivitypb.MulticloudDataTransferConfig, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*MulticloudDataTransferConfigIterator) Next ¶ added in v1.19.0
func (it *MulticloudDataTransferConfigIterator) Next() (*networkconnectivitypb.MulticloudDataTransferConfig, 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 (*MulticloudDataTransferConfigIterator) PageInfo ¶ added in v1.19.0
func (it *MulticloudDataTransferConfigIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type MulticloudDataTransferSupportedServiceIterator ¶ added in v1.19.0
type MulticloudDataTransferSupportedServiceIterator 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 []*networkconnectivitypb.MulticloudDataTransferSupportedService, nextPageToken string, err error)
// contains filtered or unexported fields
}
MulticloudDataTransferSupportedServiceIterator manages a stream of *networkconnectivitypb.MulticloudDataTransferSupportedService.
func (*MulticloudDataTransferSupportedServiceIterator) All ¶ added in v1.19.0
func (it *MulticloudDataTransferSupportedServiceIterator) All() iter.Seq2[*networkconnectivitypb.MulticloudDataTransferSupportedService, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*MulticloudDataTransferSupportedServiceIterator) Next ¶ added in v1.19.0
func (it *MulticloudDataTransferSupportedServiceIterator) Next() (*networkconnectivitypb.MulticloudDataTransferSupportedService, 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 (*MulticloudDataTransferSupportedServiceIterator) PageInfo ¶ added in v1.19.0
func (it *MulticloudDataTransferSupportedServiceIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type OperationIterator ¶ added in v1.8.0
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 ¶ added in v1.15.1
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 ¶ added in v1.8.0
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 ¶ added in v1.8.0
func (it *OperationIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type PolicyBasedRouteIterator ¶ added in v1.8.0
type PolicyBasedRouteIterator 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 []*networkconnectivitypb.PolicyBasedRoute, nextPageToken string, err error)
// contains filtered or unexported fields
}
PolicyBasedRouteIterator manages a stream of *networkconnectivitypb.PolicyBasedRoute.
func (*PolicyBasedRouteIterator) All ¶ added in v1.15.1
func (it *PolicyBasedRouteIterator) All() iter.Seq2[*networkconnectivitypb.PolicyBasedRoute, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*PolicyBasedRouteIterator) Next ¶ added in v1.8.0
func (it *PolicyBasedRouteIterator) Next() (*networkconnectivitypb.PolicyBasedRoute, 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 (*PolicyBasedRouteIterator) PageInfo ¶ added in v1.8.0
func (it *PolicyBasedRouteIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type PolicyBasedRoutingCallOptions ¶ added in v1.8.0
type PolicyBasedRoutingCallOptions struct {
ListPolicyBasedRoutes []gax.CallOption
GetPolicyBasedRoute []gax.CallOption
CreatePolicyBasedRoute []gax.CallOption
DeletePolicyBasedRoute []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
}
PolicyBasedRoutingCallOptions contains the retry settings for each method of PolicyBasedRoutingClient.
type PolicyBasedRoutingClient ¶ added in v1.8.0
type PolicyBasedRoutingClient struct {
// The call options for this service.
CallOptions *PolicyBasedRoutingCallOptions
// 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
}
PolicyBasedRoutingClient is a client for interacting with Network Connectivity API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Policy-Based Routing allows GCP customers to specify flexibile routing policies for Layer 4 traffic traversing through the connected service.
func NewPolicyBasedRoutingClient ¶ added in v1.8.0
func NewPolicyBasedRoutingClient(ctx context.Context, opts ...option.ClientOption) (*PolicyBasedRoutingClient, error)
NewPolicyBasedRoutingClient creates a new policy based routing service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Policy-Based Routing allows GCP customers to specify flexibile routing policies for Layer 4 traffic traversing through the connected service.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewPolicyBasedRoutingClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*PolicyBasedRoutingClient) CancelOperation ¶ added in v1.8.0
func (c *PolicyBasedRoutingClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewPolicyBasedRoutingClient(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 (*PolicyBasedRoutingClient) Close ¶ added in v1.8.0
func (c *PolicyBasedRoutingClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*PolicyBasedRoutingClient) Connection
deprecated
added in
v1.8.0
func (c *PolicyBasedRoutingClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*PolicyBasedRoutingClient) CreatePolicyBasedRoute ¶ added in v1.8.0
func (c *PolicyBasedRoutingClient) CreatePolicyBasedRoute(ctx context.Context, req *networkconnectivitypb.CreatePolicyBasedRouteRequest, opts ...gax.CallOption) (*CreatePolicyBasedRouteOperation, error)
CreatePolicyBasedRoute creates a new policy-based route in a given project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewPolicyBasedRoutingClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.CreatePolicyBasedRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#CreatePolicyBasedRouteRequest.
}
op, err := c.CreatePolicyBasedRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*PolicyBasedRoutingClient) CreatePolicyBasedRouteOperation ¶ added in v1.8.0
func (c *PolicyBasedRoutingClient) CreatePolicyBasedRouteOperation(name string) *CreatePolicyBasedRouteOperation
CreatePolicyBasedRouteOperation returns a new CreatePolicyBasedRouteOperation from a given name. The name must be that of a previously created CreatePolicyBasedRouteOperation, possibly from a different process.
func (*PolicyBasedRoutingClient) DeleteOperation ¶ added in v1.8.0
func (c *PolicyBasedRoutingClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewPolicyBasedRoutingClient(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 (*PolicyBasedRoutingClient) DeletePolicyBasedRoute ¶ added in v1.8.0
func (c *PolicyBasedRoutingClient) DeletePolicyBasedRoute(ctx context.Context, req *networkconnectivitypb.DeletePolicyBasedRouteRequest, opts ...gax.CallOption) (*DeletePolicyBasedRouteOperation, error)
DeletePolicyBasedRoute deletes a single policy-based route.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewPolicyBasedRoutingClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.DeletePolicyBasedRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#DeletePolicyBasedRouteRequest.
}
op, err := c.DeletePolicyBasedRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
err = op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
}
func (*PolicyBasedRoutingClient) DeletePolicyBasedRouteOperation ¶ added in v1.8.0
func (c *PolicyBasedRoutingClient) DeletePolicyBasedRouteOperation(name string) *DeletePolicyBasedRouteOperation
DeletePolicyBasedRouteOperation returns a new DeletePolicyBasedRouteOperation from a given name. The name must be that of a previously created DeletePolicyBasedRouteOperation, possibly from a different process.
func (*PolicyBasedRoutingClient) GetIamPolicy ¶ added in v1.8.0
func (c *PolicyBasedRoutingClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewPolicyBasedRoutingClient(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 (*PolicyBasedRoutingClient) GetLocation ¶ added in v1.8.0
func (c *PolicyBasedRoutingClient) GetLocation(ctx context.Context, req *locationpb.GetLocationRequest, opts ...gax.CallOption) (*locationpb.Location, error)
GetLocation gets information about a location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewPolicyBasedRoutingClient(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 (*PolicyBasedRoutingClient) GetOperation ¶ added in v1.8.0
func (c *PolicyBasedRoutingClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewPolicyBasedRoutingClient(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 (*PolicyBasedRoutingClient) GetPolicyBasedRoute ¶ added in v1.8.0
func (c *PolicyBasedRoutingClient) GetPolicyBasedRoute(ctx context.Context, req *networkconnectivitypb.GetPolicyBasedRouteRequest, opts ...gax.CallOption) (*networkconnectivitypb.PolicyBasedRoute, error)
GetPolicyBasedRoute gets details of a single policy-based route.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewPolicyBasedRoutingClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.GetPolicyBasedRouteRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#GetPolicyBasedRouteRequest.
}
resp, err := c.GetPolicyBasedRoute(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*PolicyBasedRoutingClient) ListLocations ¶ added in v1.8.0
func (c *PolicyBasedRoutingClient) ListLocations(ctx context.Context, req *locationpb.ListLocationsRequest, opts ...gax.CallOption) *LocationIterator
ListLocations lists information about the supported locations for this service.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewPolicyBasedRoutingClient(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)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewPolicyBasedRoutingClient(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 (*PolicyBasedRoutingClient) ListOperations ¶ added in v1.8.0
func (c *PolicyBasedRoutingClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewPolicyBasedRoutingClient(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)
}
}
Example (All) ¶
package main
import (
"context"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewPolicyBasedRoutingClient(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 (*PolicyBasedRoutingClient) ListPolicyBasedRoutes ¶ added in v1.8.0
func (c *PolicyBasedRoutingClient) ListPolicyBasedRoutes(ctx context.Context, req *networkconnectivitypb.ListPolicyBasedRoutesRequest, opts ...gax.CallOption) *PolicyBasedRouteIterator
ListPolicyBasedRoutes lists policy-based routes in a given project and location.
Example ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
"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 := networkconnectivity.NewPolicyBasedRoutingClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListPolicyBasedRoutesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListPolicyBasedRoutesRequest.
}
it := c.ListPolicyBasedRoutes(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.(*networkconnectivitypb.ListPolicyBasedRoutesResponse)
}
}
Example (All) ¶
package main
import (
"context"
networkconnectivity "cloud.google.com/go/networkconnectivity/apiv1"
networkconnectivitypb "cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := networkconnectivity.NewPolicyBasedRoutingClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &networkconnectivitypb.ListPolicyBasedRoutesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/networkconnectivity/apiv1/networkconnectivitypb#ListPolicyBasedRoutesRequest.
}
for resp, err := range c.ListPolicyBasedRoutes(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*PolicyBasedRoutingClient) SetIamPolicy ¶ added in v1.8.0
func (c *PolicyBasedRoutingClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewPolicyBasedRoutingClient(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 (*PolicyBasedRoutingClient) TestIamPermissions ¶ added in v1.8.0
func (c *PolicyBasedRoutingClient) 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"
networkconnectivity "cloud.google.com/go/networkconnectivity/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 := networkconnectivity.NewPolicyBasedRoutingClient(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
}
type RejectHubSpokeOperation ¶ added in v1.14.0
type RejectHubSpokeOperation struct {
// contains filtered or unexported fields
}
RejectHubSpokeOperation manages a long-running operation from RejectHubSpoke.
func (*RejectHubSpokeOperation) Done ¶ added in v1.14.0
func (op *RejectHubSpokeOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*RejectHubSpokeOperation) Metadata ¶ added in v1.14.0
func (op *RejectHubSpokeOperation) Metadata() (*networkconnectivitypb.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 (*RejectHubSpokeOperation) Name ¶ added in v1.14.0
func (op *RejectHubSpokeOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*RejectHubSpokeOperation) Poll ¶ added in v1.14.0
func (op *RejectHubSpokeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.RejectHubSpokeResponse, 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 (*RejectHubSpokeOperation) Wait ¶ added in v1.14.0
func (op *RejectHubSpokeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.RejectHubSpokeResponse, 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.
type RejectSpokeUpdateOperation ¶ added in v1.17.0
type RejectSpokeUpdateOperation struct {
// contains filtered or unexported fields
}
RejectSpokeUpdateOperation manages a long-running operation from RejectSpokeUpdate.
func (*RejectSpokeUpdateOperation) Done ¶ added in v1.17.0
func (op *RejectSpokeUpdateOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*RejectSpokeUpdateOperation) Metadata ¶ added in v1.17.0
func (op *RejectSpokeUpdateOperation) Metadata() (*networkconnectivitypb.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 (*RejectSpokeUpdateOperation) Name ¶ added in v1.17.0
func (op *RejectSpokeUpdateOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*RejectSpokeUpdateOperation) Poll ¶ added in v1.17.0
func (op *RejectSpokeUpdateOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.RejectSpokeUpdateResponse, 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 (*RejectSpokeUpdateOperation) Wait ¶ added in v1.17.0
func (op *RejectSpokeUpdateOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.RejectSpokeUpdateResponse, 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.
type RouteIterator ¶ added in v1.14.0
type RouteIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*networkconnectivitypb.Route, nextPageToken string, err error)
// contains filtered or unexported fields
}
RouteIterator manages a stream of *networkconnectivitypb.Route.
func (*RouteIterator) All ¶ added in v1.15.1
func (it *RouteIterator) All() iter.Seq2[*networkconnectivitypb.Route, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*RouteIterator) Next ¶ added in v1.14.0
func (it *RouteIterator) Next() (*networkconnectivitypb.Route, error)
Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*RouteIterator) PageInfo ¶ added in v1.14.0
func (it *RouteIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type RouteTableIterator ¶ added in v1.14.0
type RouteTableIterator 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 []*networkconnectivitypb.RouteTable, nextPageToken string, err error)
// contains filtered or unexported fields
}
RouteTableIterator manages a stream of *networkconnectivitypb.RouteTable.
func (*RouteTableIterator) All ¶ added in v1.15.1
func (it *RouteTableIterator) All() iter.Seq2[*networkconnectivitypb.RouteTable, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*RouteTableIterator) Next ¶ added in v1.14.0
func (it *RouteTableIterator) Next() (*networkconnectivitypb.RouteTable, 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 (*RouteTableIterator) PageInfo ¶ added in v1.14.0
func (it *RouteTableIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ServiceClassIterator ¶ added in v1.17.0
type ServiceClassIterator 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 []*networkconnectivitypb.ServiceClass, nextPageToken string, err error)
// contains filtered or unexported fields
}
ServiceClassIterator manages a stream of *networkconnectivitypb.ServiceClass.
func (*ServiceClassIterator) All ¶ added in v1.17.0
func (it *ServiceClassIterator) All() iter.Seq2[*networkconnectivitypb.ServiceClass, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*ServiceClassIterator) Next ¶ added in v1.17.0
func (it *ServiceClassIterator) Next() (*networkconnectivitypb.ServiceClass, 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 (*ServiceClassIterator) PageInfo ¶ added in v1.17.0
func (it *ServiceClassIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ServiceConnectionMapIterator ¶ added in v1.17.0
type ServiceConnectionMapIterator 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 []*networkconnectivitypb.ServiceConnectionMap, nextPageToken string, err error)
// contains filtered or unexported fields
}
ServiceConnectionMapIterator manages a stream of *networkconnectivitypb.ServiceConnectionMap.
func (*ServiceConnectionMapIterator) All ¶ added in v1.17.0
func (it *ServiceConnectionMapIterator) All() iter.Seq2[*networkconnectivitypb.ServiceConnectionMap, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*ServiceConnectionMapIterator) Next ¶ added in v1.17.0
func (it *ServiceConnectionMapIterator) Next() (*networkconnectivitypb.ServiceConnectionMap, 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 (*ServiceConnectionMapIterator) PageInfo ¶ added in v1.17.0
func (it *ServiceConnectionMapIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ServiceConnectionPolicyIterator ¶ added in v1.17.0
type ServiceConnectionPolicyIterator 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 []*networkconnectivitypb.ServiceConnectionPolicy, nextPageToken string, err error)
// contains filtered or unexported fields
}
ServiceConnectionPolicyIterator manages a stream of *networkconnectivitypb.ServiceConnectionPolicy.
func (*ServiceConnectionPolicyIterator) All ¶ added in v1.17.0
func (it *ServiceConnectionPolicyIterator) All() iter.Seq2[*networkconnectivitypb.ServiceConnectionPolicy, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*ServiceConnectionPolicyIterator) Next ¶ added in v1.17.0
func (it *ServiceConnectionPolicyIterator) Next() (*networkconnectivitypb.ServiceConnectionPolicy, 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 (*ServiceConnectionPolicyIterator) PageInfo ¶ added in v1.17.0
func (it *ServiceConnectionPolicyIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type ServiceConnectionTokenIterator ¶ added in v1.17.0
type ServiceConnectionTokenIterator 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 []*networkconnectivitypb.ServiceConnectionToken, nextPageToken string, err error)
// contains filtered or unexported fields
}
ServiceConnectionTokenIterator manages a stream of *networkconnectivitypb.ServiceConnectionToken.
func (*ServiceConnectionTokenIterator) All ¶ added in v1.17.0
func (it *ServiceConnectionTokenIterator) All() iter.Seq2[*networkconnectivitypb.ServiceConnectionToken, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*ServiceConnectionTokenIterator) Next ¶ added in v1.17.0
func (it *ServiceConnectionTokenIterator) Next() (*networkconnectivitypb.ServiceConnectionToken, 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 (*ServiceConnectionTokenIterator) PageInfo ¶ added in v1.17.0
func (it *ServiceConnectionTokenIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type SpokeIterator ¶
type SpokeIterator 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 []*networkconnectivitypb.Spoke, nextPageToken string, err error)
// contains filtered or unexported fields
}
SpokeIterator manages a stream of *networkconnectivitypb.Spoke.
func (*SpokeIterator) All ¶ added in v1.15.1
func (it *SpokeIterator) All() iter.Seq2[*networkconnectivitypb.Spoke, error]
All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*SpokeIterator) Next ¶
func (it *SpokeIterator) Next() (*networkconnectivitypb.Spoke, 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 (*SpokeIterator) PageInfo ¶
func (it *SpokeIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type UpdateDestinationOperation ¶ added in v1.19.0
type UpdateDestinationOperation struct {
// contains filtered or unexported fields
}
UpdateDestinationOperation manages a long-running operation from UpdateDestination.
func (*UpdateDestinationOperation) Done ¶ added in v1.19.0
func (op *UpdateDestinationOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateDestinationOperation) Metadata ¶ added in v1.19.0
func (op *UpdateDestinationOperation) Metadata() (*networkconnectivitypb.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 (*UpdateDestinationOperation) Name ¶ added in v1.19.0
func (op *UpdateDestinationOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateDestinationOperation) Poll ¶ added in v1.19.0
func (op *UpdateDestinationOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Destination, 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 (*UpdateDestinationOperation) Wait ¶ added in v1.19.0
func (op *UpdateDestinationOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Destination, 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.
type UpdateGroupOperation ¶ added in v1.16.0
type UpdateGroupOperation struct {
// contains filtered or unexported fields
}
UpdateGroupOperation manages a long-running operation from UpdateGroup.
func (*UpdateGroupOperation) Done ¶ added in v1.16.0
func (op *UpdateGroupOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateGroupOperation) Metadata ¶ added in v1.16.0
func (op *UpdateGroupOperation) Metadata() (*networkconnectivitypb.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 (*UpdateGroupOperation) Name ¶ added in v1.16.0
func (op *UpdateGroupOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateGroupOperation) Poll ¶ added in v1.16.0
func (op *UpdateGroupOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Group, 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 (*UpdateGroupOperation) Wait ¶ added in v1.16.0
func (op *UpdateGroupOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Group, 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.
type UpdateHubOperation ¶
type UpdateHubOperation struct {
// contains filtered or unexported fields
}
UpdateHubOperation manages a long-running operation from UpdateHub.
func (*UpdateHubOperation) Done ¶
func (op *UpdateHubOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateHubOperation) Metadata ¶
func (op *UpdateHubOperation) Metadata() (*networkconnectivitypb.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 (*UpdateHubOperation) Name ¶
func (op *UpdateHubOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateHubOperation) Poll ¶
func (op *UpdateHubOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Hub, 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 (*UpdateHubOperation) Wait ¶
func (op *UpdateHubOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Hub, 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.
type UpdateInternalRangeOperation ¶ added in v1.18.0
type UpdateInternalRangeOperation struct {
// contains filtered or unexported fields
}
UpdateInternalRangeOperation manages a long-running operation from UpdateInternalRange.
func (*UpdateInternalRangeOperation) Done ¶ added in v1.18.0
func (op *UpdateInternalRangeOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateInternalRangeOperation) Metadata ¶ added in v1.18.0
func (op *UpdateInternalRangeOperation) Metadata() (*networkconnectivitypb.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 (*UpdateInternalRangeOperation) Name ¶ added in v1.18.0
func (op *UpdateInternalRangeOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateInternalRangeOperation) Poll ¶ added in v1.18.0
func (op *UpdateInternalRangeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.InternalRange, 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 (*UpdateInternalRangeOperation) Wait ¶ added in v1.18.0
func (op *UpdateInternalRangeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.InternalRange, 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.
type UpdateMulticloudDataTransferConfigOperation ¶ added in v1.19.0
type UpdateMulticloudDataTransferConfigOperation struct {
// contains filtered or unexported fields
}
UpdateMulticloudDataTransferConfigOperation manages a long-running operation from UpdateMulticloudDataTransferConfig.
func (*UpdateMulticloudDataTransferConfigOperation) Done ¶ added in v1.19.0
func (op *UpdateMulticloudDataTransferConfigOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateMulticloudDataTransferConfigOperation) Metadata ¶ added in v1.19.0
func (op *UpdateMulticloudDataTransferConfigOperation) Metadata() (*networkconnectivitypb.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 (*UpdateMulticloudDataTransferConfigOperation) Name ¶ added in v1.19.0
func (op *UpdateMulticloudDataTransferConfigOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateMulticloudDataTransferConfigOperation) Poll ¶ added in v1.19.0
func (op *UpdateMulticloudDataTransferConfigOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.MulticloudDataTransferConfig, 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 (*UpdateMulticloudDataTransferConfigOperation) Wait ¶ added in v1.19.0
func (op *UpdateMulticloudDataTransferConfigOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.MulticloudDataTransferConfig, 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.
type UpdateServiceClassOperation ¶ added in v1.17.0
type UpdateServiceClassOperation struct {
// contains filtered or unexported fields
}
UpdateServiceClassOperation manages a long-running operation from UpdateServiceClass.
func (*UpdateServiceClassOperation) Done ¶ added in v1.17.0
func (op *UpdateServiceClassOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateServiceClassOperation) Metadata ¶ added in v1.17.0
func (op *UpdateServiceClassOperation) Metadata() (*networkconnectivitypb.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 (*UpdateServiceClassOperation) Name ¶ added in v1.17.0
func (op *UpdateServiceClassOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateServiceClassOperation) Poll ¶ added in v1.17.0
func (op *UpdateServiceClassOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceClass, 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 (*UpdateServiceClassOperation) Wait ¶ added in v1.17.0
func (op *UpdateServiceClassOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceClass, 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.
type UpdateServiceConnectionMapOperation ¶ added in v1.17.0
type UpdateServiceConnectionMapOperation struct {
// contains filtered or unexported fields
}
UpdateServiceConnectionMapOperation manages a long-running operation from UpdateServiceConnectionMap.
func (*UpdateServiceConnectionMapOperation) Done ¶ added in v1.17.0
func (op *UpdateServiceConnectionMapOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateServiceConnectionMapOperation) Metadata ¶ added in v1.17.0
func (op *UpdateServiceConnectionMapOperation) Metadata() (*networkconnectivitypb.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 (*UpdateServiceConnectionMapOperation) Name ¶ added in v1.17.0
func (op *UpdateServiceConnectionMapOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateServiceConnectionMapOperation) Poll ¶ added in v1.17.0
func (op *UpdateServiceConnectionMapOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionMap, 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 (*UpdateServiceConnectionMapOperation) Wait ¶ added in v1.17.0
func (op *UpdateServiceConnectionMapOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionMap, 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.
type UpdateServiceConnectionPolicyOperation ¶ added in v1.17.0
type UpdateServiceConnectionPolicyOperation struct {
// contains filtered or unexported fields
}
UpdateServiceConnectionPolicyOperation manages a long-running operation from UpdateServiceConnectionPolicy.
func (*UpdateServiceConnectionPolicyOperation) Done ¶ added in v1.17.0
func (op *UpdateServiceConnectionPolicyOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateServiceConnectionPolicyOperation) Metadata ¶ added in v1.17.0
func (op *UpdateServiceConnectionPolicyOperation) Metadata() (*networkconnectivitypb.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 (*UpdateServiceConnectionPolicyOperation) Name ¶ added in v1.17.0
func (op *UpdateServiceConnectionPolicyOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateServiceConnectionPolicyOperation) Poll ¶ added in v1.17.0
func (op *UpdateServiceConnectionPolicyOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionPolicy, 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 (*UpdateServiceConnectionPolicyOperation) Wait ¶ added in v1.17.0
func (op *UpdateServiceConnectionPolicyOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.ServiceConnectionPolicy, 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.
type UpdateSpokeOperation ¶
type UpdateSpokeOperation struct {
// contains filtered or unexported fields
}
UpdateSpokeOperation manages a long-running operation from UpdateSpoke.
func (*UpdateSpokeOperation) Done ¶
func (op *UpdateSpokeOperation) Done() bool
Done reports whether the long-running operation has completed.
func (*UpdateSpokeOperation) Metadata ¶
func (op *UpdateSpokeOperation) Metadata() (*networkconnectivitypb.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 (*UpdateSpokeOperation) Name ¶
func (op *UpdateSpokeOperation) Name() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*UpdateSpokeOperation) Poll ¶
func (op *UpdateSpokeOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Spoke, 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 (*UpdateSpokeOperation) Wait ¶
func (op *UpdateSpokeOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*networkconnectivitypb.Spoke, 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.