Package chronicle is an auto-generated package for the Chronicle API.
The Google Cloud Security Operations API (Chronicle API) provides endpoints that help analysts investigate and mitigate security threats throughout their lifecycle.
NOTE: This package is in beta. It is not stable, and may be subject to changes.
General documentation
For information that is relevant for all client libraries please reference https://pkg.go.dev/cloud.google.com/go#pkg-overview. Some information on this page includes:
- Authentication and Authorization
- Timeouts and Cancellation
- Testing against Client Libraries
- Debugging Client Libraries
- Inspecting errors
Example usage
To get started with this package, create a client.
// go get cloud.google.com/go/chronicle/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 := chronicle.NewBigQueryExportClient(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 := &chroniclepb.GetBigQueryExportRequest{ // TODO: Fill request struct fields. // See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#GetBigQueryExportRequest. } resp, err := c.GetBigQueryExport(ctx, req) if err != nil { // TODO: Handle error. } // TODO: Use resp. _ = resp
Use of Context
The ctx passed to NewBigQueryExportClient is used for authentication requests and for creating the underlying connection, but is not used for subsequent calls. Individual methods on the client use the ctx given to them.
To close the open connection, use the Close() method.
Functions
func DefaultAuthScopes
func DefaultAuthScopes() []stringDefaultAuthScopes reports the default set of authentication scopes to use with this package.
BigQueryExportCallOptions
type BigQueryExportCallOptions struct {
GetBigQueryExport []gax.CallOption
UpdateBigQueryExport []gax.CallOption
ProvisionBigQueryExport []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}BigQueryExportCallOptions contains the retry settings for each method of BigQueryExportClient.
BigQueryExportClient
type BigQueryExportClient struct {
// The call options for this service.
CallOptions *BigQueryExportCallOptions
// contains filtered or unexported fields
}BigQueryExportClient is a client for interacting with Chronicle API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
Service for managing BigQuery export configurations for Chronicle instances.
func NewBigQueryExportClient
func NewBigQueryExportClient(ctx context.Context, opts ...option.ClientOption) (*BigQueryExportClient, error)NewBigQueryExportClient creates a new big query export service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
Service for managing BigQuery export configurations for Chronicle instances.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewBigQueryExportClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewBigQueryExportRESTClient
func NewBigQueryExportRESTClient(ctx context.Context, opts ...option.ClientOption) (*BigQueryExportClient, error)NewBigQueryExportRESTClient creates a new big query export service rest client.
Service for managing BigQuery export configurations for Chronicle instances.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewBigQueryExportRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*BigQueryExportClient) CancelOperation
func (c *BigQueryExportClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewBigQueryExportClient(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 (*BigQueryExportClient) Close
func (c *BigQueryExportClient) Close() errorClose closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*BigQueryExportClient) Connection (deprecated)
func (c *BigQueryExportClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*BigQueryExportClient) DeleteOperation
func (c *BigQueryExportClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewBigQueryExportClient(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 (*BigQueryExportClient) GetBigQueryExport
func (c *BigQueryExportClient) GetBigQueryExport(ctx context.Context, req *chroniclepb.GetBigQueryExportRequest, opts ...gax.CallOption) (*chroniclepb.BigQueryExport, error)GetBigQueryExport get the BigQuery export configuration for a Chronicle instance.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewBigQueryExportClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.GetBigQueryExportRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#GetBigQueryExportRequest.
}
resp, err := c.GetBigQueryExport(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*BigQueryExportClient) GetOperation
func (c *BigQueryExportClient) 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"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewBigQueryExportClient(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 (*BigQueryExportClient) ListOperations
func (c *BigQueryExportClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"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 := chronicle.NewBigQueryExportClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewBigQueryExportClient(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 (*BigQueryExportClient) ProvisionBigQueryExport
func (c *BigQueryExportClient) ProvisionBigQueryExport(ctx context.Context, req *chroniclepb.ProvisionBigQueryExportRequest, opts ...gax.CallOption) (*chroniclepb.BigQueryExport, error)ProvisionBigQueryExport provision the BigQuery export for a Chronicle instance. This will create {{gcp_name}} resources like {{storage_name}} buckets, BigQuery datasets and set default export settings for each data source.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewBigQueryExportClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ProvisionBigQueryExportRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ProvisionBigQueryExportRequest.
}
resp, err := c.ProvisionBigQueryExport(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*BigQueryExportClient) UpdateBigQueryExport
func (c *BigQueryExportClient) UpdateBigQueryExport(ctx context.Context, req *chroniclepb.UpdateBigQueryExportRequest, opts ...gax.CallOption) (*chroniclepb.BigQueryExport, error)UpdateBigQueryExport update the BigQuery export configuration for a Chronicle instance.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewBigQueryExportClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.UpdateBigQueryExportRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#UpdateBigQueryExportRequest.
}
resp, err := c.UpdateBigQueryExport(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
CreateRetrohuntOperation
type CreateRetrohuntOperation struct {
// contains filtered or unexported fields
}CreateRetrohuntOperation manages a long-running operation from CreateRetrohunt.
func (*CreateRetrohuntOperation) Done
func (op *CreateRetrohuntOperation) Done() boolDone reports whether the long-running operation has completed.
func (*CreateRetrohuntOperation) Metadata
func (op *CreateRetrohuntOperation) Metadata() (*chroniclepb.RetrohuntMetadata, 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 (*CreateRetrohuntOperation) Name
func (op *CreateRetrohuntOperation) Name() stringName returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*CreateRetrohuntOperation) Poll
func (op *CreateRetrohuntOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*chroniclepb.Retrohunt, 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 (*CreateRetrohuntOperation) Wait
func (op *CreateRetrohuntOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*chroniclepb.Retrohunt, 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.
DashboardChartCallOptions
type DashboardChartCallOptions struct {
GetDashboardChart []gax.CallOption
BatchGetDashboardCharts []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}DashboardChartCallOptions contains the retry settings for each method of DashboardChartClient.
DashboardChartClient
type DashboardChartClient struct {
// The call options for this service.
CallOptions *DashboardChartCallOptions
// contains filtered or unexported fields
}DashboardChartClient is a client for interacting with Chronicle API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service providing functionality for managing dashboards’ charts.
func NewDashboardChartClient
func NewDashboardChartClient(ctx context.Context, opts ...option.ClientOption) (*DashboardChartClient, error)NewDashboardChartClient creates a new dashboard chart service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
A service providing functionality for managing dashboards’ charts.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewDashboardChartClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewDashboardChartRESTClient
func NewDashboardChartRESTClient(ctx context.Context, opts ...option.ClientOption) (*DashboardChartClient, error)NewDashboardChartRESTClient creates a new dashboard chart service rest client.
A service providing functionality for managing dashboards’ charts.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewDashboardChartRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*DashboardChartClient) BatchGetDashboardCharts
func (c *DashboardChartClient) BatchGetDashboardCharts(ctx context.Context, req *chroniclepb.BatchGetDashboardChartsRequest, opts ...gax.CallOption) (*chroniclepb.BatchGetDashboardChartsResponse, error)BatchGetDashboardCharts get dashboard charts in batches.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDashboardChartClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.BatchGetDashboardChartsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#BatchGetDashboardChartsRequest.
}
resp, err := c.BatchGetDashboardCharts(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DashboardChartClient) CancelOperation
func (c *DashboardChartClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDashboardChartClient(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 (*DashboardChartClient) Close
func (c *DashboardChartClient) Close() errorClose closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*DashboardChartClient) Connection (deprecated)
func (c *DashboardChartClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*DashboardChartClient) DeleteOperation
func (c *DashboardChartClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDashboardChartClient(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 (*DashboardChartClient) GetDashboardChart
func (c *DashboardChartClient) GetDashboardChart(ctx context.Context, req *chroniclepb.GetDashboardChartRequest, opts ...gax.CallOption) (*chroniclepb.DashboardChart, error)GetDashboardChart get a dashboard chart.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDashboardChartClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.GetDashboardChartRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#GetDashboardChartRequest.
}
resp, err := c.GetDashboardChart(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DashboardChartClient) GetOperation
func (c *DashboardChartClient) 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"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDashboardChartClient(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 (*DashboardChartClient) ListOperations
func (c *DashboardChartClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"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 := chronicle.NewDashboardChartClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDashboardChartClient(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
}
}
DashboardQueryCallOptions
type DashboardQueryCallOptions struct {
GetDashboardQuery []gax.CallOption
ExecuteDashboardQuery []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}DashboardQueryCallOptions contains the retry settings for each method of DashboardQueryClient.
DashboardQueryClient
type DashboardQueryClient struct {
// The call options for this service.
CallOptions *DashboardQueryCallOptions
// contains filtered or unexported fields
}DashboardQueryClient is a client for interacting with Chronicle API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service providing functionality for managing dashboards’ queries.
func NewDashboardQueryClient
func NewDashboardQueryClient(ctx context.Context, opts ...option.ClientOption) (*DashboardQueryClient, error)NewDashboardQueryClient creates a new dashboard query service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
A service providing functionality for managing dashboards’ queries.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewDashboardQueryClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewDashboardQueryRESTClient
func NewDashboardQueryRESTClient(ctx context.Context, opts ...option.ClientOption) (*DashboardQueryClient, error)NewDashboardQueryRESTClient creates a new dashboard query service rest client.
A service providing functionality for managing dashboards’ queries.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewDashboardQueryRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*DashboardQueryClient) CancelOperation
func (c *DashboardQueryClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDashboardQueryClient(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 (*DashboardQueryClient) Close
func (c *DashboardQueryClient) Close() errorClose closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*DashboardQueryClient) Connection (deprecated)
func (c *DashboardQueryClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*DashboardQueryClient) DeleteOperation
func (c *DashboardQueryClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDashboardQueryClient(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 (*DashboardQueryClient) ExecuteDashboardQuery
func (c *DashboardQueryClient) ExecuteDashboardQuery(ctx context.Context, req *chroniclepb.ExecuteDashboardQueryRequest, opts ...gax.CallOption) (*chroniclepb.ExecuteDashboardQueryResponse, error)ExecuteDashboardQuery execute a query and return the data.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDashboardQueryClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ExecuteDashboardQueryRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ExecuteDashboardQueryRequest.
}
resp, err := c.ExecuteDashboardQuery(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DashboardQueryClient) GetDashboardQuery
func (c *DashboardQueryClient) GetDashboardQuery(ctx context.Context, req *chroniclepb.GetDashboardQueryRequest, opts ...gax.CallOption) (*chroniclepb.DashboardQuery, error)GetDashboardQuery get a dashboard query.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDashboardQueryClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.GetDashboardQueryRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#GetDashboardQueryRequest.
}
resp, err := c.GetDashboardQuery(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DashboardQueryClient) GetOperation
func (c *DashboardQueryClient) 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"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDashboardQueryClient(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 (*DashboardQueryClient) ListOperations
func (c *DashboardQueryClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"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 := chronicle.NewDashboardQueryClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDashboardQueryClient(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
}
}
DataAccessControlCallOptions
type DataAccessControlCallOptions struct {
CreateDataAccessLabel []gax.CallOption
GetDataAccessLabel []gax.CallOption
ListDataAccessLabels []gax.CallOption
UpdateDataAccessLabel []gax.CallOption
DeleteDataAccessLabel []gax.CallOption
CreateDataAccessScope []gax.CallOption
GetDataAccessScope []gax.CallOption
ListDataAccessScopes []gax.CallOption
UpdateDataAccessScope []gax.CallOption
DeleteDataAccessScope []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}DataAccessControlCallOptions contains the retry settings for each method of DataAccessControlClient.
DataAccessControlClient
type DataAccessControlClient struct {
// The call options for this service.
CallOptions *DataAccessControlCallOptions
// contains filtered or unexported fields
}DataAccessControlClient is a client for interacting with Chronicle API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
DataAccessControlService exposes resources and endpoints related to data access control.
func NewDataAccessControlClient
func NewDataAccessControlClient(ctx context.Context, opts ...option.ClientOption) (*DataAccessControlClient, error)NewDataAccessControlClient creates a new data access control service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
DataAccessControlService exposes resources and endpoints related to data access control.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewDataAccessControlClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewDataAccessControlRESTClient
func NewDataAccessControlRESTClient(ctx context.Context, opts ...option.ClientOption) (*DataAccessControlClient, error)NewDataAccessControlRESTClient creates a new data access control service rest client.
DataAccessControlService exposes resources and endpoints related to data access control.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewDataAccessControlRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*DataAccessControlClient) CancelOperation
func (c *DataAccessControlClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataAccessControlClient(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 (*DataAccessControlClient) Close
func (c *DataAccessControlClient) Close() errorClose closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*DataAccessControlClient) Connection (deprecated)
func (c *DataAccessControlClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*DataAccessControlClient) CreateDataAccessLabel
func (c *DataAccessControlClient) CreateDataAccessLabel(ctx context.Context, req *chroniclepb.CreateDataAccessLabelRequest, opts ...gax.CallOption) (*chroniclepb.DataAccessLabel, error)CreateDataAccessLabel creates a data access label. Data access labels are applied to incoming event data and selected in data access scopes (another resource), and only users with scopes containing the label can see data with that label. Currently, the data access label resource only includes custom labels, which are labels that correspond to UDM queries over event data.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataAccessControlClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.CreateDataAccessLabelRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#CreateDataAccessLabelRequest.
}
resp, err := c.CreateDataAccessLabel(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataAccessControlClient) CreateDataAccessScope
func (c *DataAccessControlClient) CreateDataAccessScope(ctx context.Context, req *chroniclepb.CreateDataAccessScopeRequest, opts ...gax.CallOption) (*chroniclepb.DataAccessScope, error)CreateDataAccessScope creates a data access scope. Data access scope is a combination of allowed and denied labels attached to a permission group. If a scope has allowed labels A and B and denied labels C and D, then the group of people attached to the scope will have permissions to see all events labeled with A or B (or both) and not labeled with either C or D.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataAccessControlClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.CreateDataAccessScopeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#CreateDataAccessScopeRequest.
}
resp, err := c.CreateDataAccessScope(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataAccessControlClient) DeleteDataAccessLabel
func (c *DataAccessControlClient) DeleteDataAccessLabel(ctx context.Context, req *chroniclepb.DeleteDataAccessLabelRequest, opts ...gax.CallOption) errorDeleteDataAccessLabel deletes a data access label. When a label is deleted, new data that enters in the system will not receive the label, but the label will not be removed from old data that still refers to it.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataAccessControlClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.DeleteDataAccessLabelRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#DeleteDataAccessLabelRequest.
}
err = c.DeleteDataAccessLabel(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*DataAccessControlClient) DeleteDataAccessScope
func (c *DataAccessControlClient) DeleteDataAccessScope(ctx context.Context, req *chroniclepb.DeleteDataAccessScopeRequest, opts ...gax.CallOption) errorDeleteDataAccessScope deletes a data access scope.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataAccessControlClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.DeleteDataAccessScopeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#DeleteDataAccessScopeRequest.
}
err = c.DeleteDataAccessScope(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*DataAccessControlClient) DeleteOperation
func (c *DataAccessControlClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataAccessControlClient(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 (*DataAccessControlClient) GetDataAccessLabel
func (c *DataAccessControlClient) GetDataAccessLabel(ctx context.Context, req *chroniclepb.GetDataAccessLabelRequest, opts ...gax.CallOption) (*chroniclepb.DataAccessLabel, error)GetDataAccessLabel gets a data access label.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataAccessControlClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.GetDataAccessLabelRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#GetDataAccessLabelRequest.
}
resp, err := c.GetDataAccessLabel(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataAccessControlClient) GetDataAccessScope
func (c *DataAccessControlClient) GetDataAccessScope(ctx context.Context, req *chroniclepb.GetDataAccessScopeRequest, opts ...gax.CallOption) (*chroniclepb.DataAccessScope, error)GetDataAccessScope retrieves an existing data access scope.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataAccessControlClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.GetDataAccessScopeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#GetDataAccessScopeRequest.
}
resp, err := c.GetDataAccessScope(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataAccessControlClient) GetOperation
func (c *DataAccessControlClient) 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"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataAccessControlClient(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 (*DataAccessControlClient) ListDataAccessLabels
func (c *DataAccessControlClient) ListDataAccessLabels(ctx context.Context, req *chroniclepb.ListDataAccessLabelsRequest, opts ...gax.CallOption) *DataAccessLabelIteratorListDataAccessLabels lists all data access labels for the customer.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
"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 := chronicle.NewDataAccessControlClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListDataAccessLabelsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListDataAccessLabelsRequest.
}
it := c.ListDataAccessLabels(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.(*chroniclepb.ListDataAccessLabelsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataAccessControlClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListDataAccessLabelsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListDataAccessLabelsRequest.
}
for resp, err := range c.ListDataAccessLabels(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*DataAccessControlClient) ListDataAccessScopes
func (c *DataAccessControlClient) ListDataAccessScopes(ctx context.Context, req *chroniclepb.ListDataAccessScopesRequest, opts ...gax.CallOption) *DataAccessScopeIteratorListDataAccessScopes lists all existing data access scopes for the customer.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
"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 := chronicle.NewDataAccessControlClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListDataAccessScopesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListDataAccessScopesRequest.
}
it := c.ListDataAccessScopes(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.(*chroniclepb.ListDataAccessScopesResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataAccessControlClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListDataAccessScopesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListDataAccessScopesRequest.
}
for resp, err := range c.ListDataAccessScopes(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*DataAccessControlClient) ListOperations
func (c *DataAccessControlClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"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 := chronicle.NewDataAccessControlClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataAccessControlClient(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 (*DataAccessControlClient) UpdateDataAccessLabel
func (c *DataAccessControlClient) UpdateDataAccessLabel(ctx context.Context, req *chroniclepb.UpdateDataAccessLabelRequest, opts ...gax.CallOption) (*chroniclepb.DataAccessLabel, error)UpdateDataAccessLabel updates a data access label.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataAccessControlClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.UpdateDataAccessLabelRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#UpdateDataAccessLabelRequest.
}
resp, err := c.UpdateDataAccessLabel(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataAccessControlClient) UpdateDataAccessScope
func (c *DataAccessControlClient) UpdateDataAccessScope(ctx context.Context, req *chroniclepb.UpdateDataAccessScopeRequest, opts ...gax.CallOption) (*chroniclepb.DataAccessScope, error)UpdateDataAccessScope updates a data access scope.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataAccessControlClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.UpdateDataAccessScopeRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#UpdateDataAccessScopeRequest.
}
resp, err := c.UpdateDataAccessScope(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
DataAccessLabelIterator
type DataAccessLabelIterator 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 []*chroniclepb.DataAccessLabel, nextPageToken string, err error)
// contains filtered or unexported fields
}DataAccessLabelIterator manages a stream of *chroniclepb.DataAccessLabel.
func (*DataAccessLabelIterator) All
func (it *DataAccessLabelIterator) All() iter.Seq2[*chroniclepb.DataAccessLabel, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*DataAccessLabelIterator) Next
func (it *DataAccessLabelIterator) Next() (*chroniclepb.DataAccessLabel, 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 (*DataAccessLabelIterator) PageInfo
func (it *DataAccessLabelIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
DataAccessScopeIterator
type DataAccessScopeIterator 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 []*chroniclepb.DataAccessScope, nextPageToken string, err error)
// contains filtered or unexported fields
}DataAccessScopeIterator manages a stream of *chroniclepb.DataAccessScope.
func (*DataAccessScopeIterator) All
func (it *DataAccessScopeIterator) All() iter.Seq2[*chroniclepb.DataAccessScope, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*DataAccessScopeIterator) Next
func (it *DataAccessScopeIterator) Next() (*chroniclepb.DataAccessScope, 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 (*DataAccessScopeIterator) PageInfo
func (it *DataAccessScopeIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
DataTableCallOptions
type DataTableCallOptions struct {
CreateDataTable []gax.CallOption
ListDataTables []gax.CallOption
GetDataTable []gax.CallOption
UpdateDataTable []gax.CallOption
DeleteDataTable []gax.CallOption
CreateDataTableRow []gax.CallOption
UpdateDataTableRow []gax.CallOption
ListDataTableRows []gax.CallOption
GetDataTableRow []gax.CallOption
DeleteDataTableRow []gax.CallOption
BulkCreateDataTableRows []gax.CallOption
BulkGetDataTableRows []gax.CallOption
BulkReplaceDataTableRows []gax.CallOption
BulkUpdateDataTableRows []gax.CallOption
GetDataTableOperationErrors []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}DataTableCallOptions contains the retry settings for each method of DataTableClient.
DataTableClient
type DataTableClient struct {
// The call options for this service.
CallOptions *DataTableCallOptions
// contains filtered or unexported fields
}DataTableClient is a client for interacting with Chronicle API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
DataTableManager provides an interface for managing data tables.
func NewDataTableClient
func NewDataTableClient(ctx context.Context, opts ...option.ClientOption) (*DataTableClient, error)NewDataTableClient creates a new data table service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
DataTableManager provides an interface for managing data tables.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewDataTableRESTClient
func NewDataTableRESTClient(ctx context.Context, opts ...option.ClientOption) (*DataTableClient, error)NewDataTableRESTClient creates a new data table service rest client.
DataTableManager provides an interface for managing data tables.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewDataTableRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*DataTableClient) BulkCreateDataTableRows
func (c *DataTableClient) BulkCreateDataTableRows(ctx context.Context, req *chroniclepb.BulkCreateDataTableRowsRequest, opts ...gax.CallOption) (*chroniclepb.BulkCreateDataTableRowsResponse, error)BulkCreateDataTableRows create data table rows in bulk.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.BulkCreateDataTableRowsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#BulkCreateDataTableRowsRequest.
}
resp, err := c.BulkCreateDataTableRows(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataTableClient) BulkGetDataTableRows
func (c *DataTableClient) BulkGetDataTableRows(ctx context.Context, req *chroniclepb.BulkGetDataTableRowsRequest, opts ...gax.CallOption) (*chroniclepb.BulkGetDataTableRowsResponse, error)BulkGetDataTableRows get data table rows in bulk.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.BulkGetDataTableRowsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#BulkGetDataTableRowsRequest.
}
resp, err := c.BulkGetDataTableRows(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataTableClient) BulkReplaceDataTableRows
func (c *DataTableClient) BulkReplaceDataTableRows(ctx context.Context, req *chroniclepb.BulkReplaceDataTableRowsRequest, opts ...gax.CallOption) (*chroniclepb.BulkReplaceDataTableRowsResponse, error)BulkReplaceDataTableRows replace all existing data table rows with new data table rows.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.BulkReplaceDataTableRowsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#BulkReplaceDataTableRowsRequest.
}
resp, err := c.BulkReplaceDataTableRows(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataTableClient) BulkUpdateDataTableRows
func (c *DataTableClient) BulkUpdateDataTableRows(ctx context.Context, req *chroniclepb.BulkUpdateDataTableRowsRequest, opts ...gax.CallOption) (*chroniclepb.BulkUpdateDataTableRowsResponse, error)BulkUpdateDataTableRows update data table rows in bulk.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.BulkUpdateDataTableRowsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#BulkUpdateDataTableRowsRequest.
}
resp, err := c.BulkUpdateDataTableRows(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataTableClient) CancelOperation
func (c *DataTableClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(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 (*DataTableClient) Close
func (c *DataTableClient) Close() errorClose closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*DataTableClient) Connection (deprecated)
func (c *DataTableClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*DataTableClient) CreateDataTable
func (c *DataTableClient) CreateDataTable(ctx context.Context, req *chroniclepb.CreateDataTableRequest, opts ...gax.CallOption) (*chroniclepb.DataTable, error)CreateDataTable create a new data table.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.CreateDataTableRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#CreateDataTableRequest.
}
resp, err := c.CreateDataTable(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataTableClient) CreateDataTableRow
func (c *DataTableClient) CreateDataTableRow(ctx context.Context, req *chroniclepb.CreateDataTableRowRequest, opts ...gax.CallOption) (*chroniclepb.DataTableRow, error)CreateDataTableRow create a new data table row.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.CreateDataTableRowRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#CreateDataTableRowRequest.
}
resp, err := c.CreateDataTableRow(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataTableClient) DeleteDataTable
func (c *DataTableClient) DeleteDataTable(ctx context.Context, req *chroniclepb.DeleteDataTableRequest, opts ...gax.CallOption) errorDeleteDataTable delete data table.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.DeleteDataTableRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#DeleteDataTableRequest.
}
err = c.DeleteDataTable(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*DataTableClient) DeleteDataTableRow
func (c *DataTableClient) DeleteDataTableRow(ctx context.Context, req *chroniclepb.DeleteDataTableRowRequest, opts ...gax.CallOption) errorDeleteDataTableRow delete data table row.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.DeleteDataTableRowRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#DeleteDataTableRowRequest.
}
err = c.DeleteDataTableRow(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*DataTableClient) DeleteOperation
func (c *DataTableClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(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 (*DataTableClient) GetDataTable
func (c *DataTableClient) GetDataTable(ctx context.Context, req *chroniclepb.GetDataTableRequest, opts ...gax.CallOption) (*chroniclepb.DataTable, error)GetDataTable get data table info.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.GetDataTableRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#GetDataTableRequest.
}
resp, err := c.GetDataTable(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataTableClient) GetDataTableOperationErrors
func (c *DataTableClient) GetDataTableOperationErrors(ctx context.Context, req *chroniclepb.GetDataTableOperationErrorsRequest, opts ...gax.CallOption) (*chroniclepb.DataTableOperationErrors, error)GetDataTableOperationErrors get the error for a data table operation.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.GetDataTableOperationErrorsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#GetDataTableOperationErrorsRequest.
}
resp, err := c.GetDataTableOperationErrors(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataTableClient) GetDataTableRow
func (c *DataTableClient) GetDataTableRow(ctx context.Context, req *chroniclepb.GetDataTableRowRequest, opts ...gax.CallOption) (*chroniclepb.DataTableRow, error)GetDataTableRow get data table row
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.GetDataTableRowRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#GetDataTableRowRequest.
}
resp, err := c.GetDataTableRow(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataTableClient) GetOperation
func (c *DataTableClient) 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"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(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 (*DataTableClient) ListDataTableRows
func (c *DataTableClient) ListDataTableRows(ctx context.Context, req *chroniclepb.ListDataTableRowsRequest, opts ...gax.CallOption) *DataTableRowIteratorListDataTableRows list data table rows.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
"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 := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListDataTableRowsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListDataTableRowsRequest.
}
it := c.ListDataTableRows(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.(*chroniclepb.ListDataTableRowsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListDataTableRowsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListDataTableRowsRequest.
}
for resp, err := range c.ListDataTableRows(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*DataTableClient) ListDataTables
func (c *DataTableClient) ListDataTables(ctx context.Context, req *chroniclepb.ListDataTablesRequest, opts ...gax.CallOption) *DataTableIteratorListDataTables list data tables.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
"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 := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListDataTablesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListDataTablesRequest.
}
it := c.ListDataTables(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.(*chroniclepb.ListDataTablesResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListDataTablesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListDataTablesRequest.
}
for resp, err := range c.ListDataTables(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*DataTableClient) ListOperations
func (c *DataTableClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"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 := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(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 (*DataTableClient) UpdateDataTable
func (c *DataTableClient) UpdateDataTable(ctx context.Context, req *chroniclepb.UpdateDataTableRequest, opts ...gax.CallOption) (*chroniclepb.DataTable, error)UpdateDataTable update data table.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.UpdateDataTableRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#UpdateDataTableRequest.
}
resp, err := c.UpdateDataTable(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*DataTableClient) UpdateDataTableRow
func (c *DataTableClient) UpdateDataTableRow(ctx context.Context, req *chroniclepb.UpdateDataTableRowRequest, opts ...gax.CallOption) (*chroniclepb.DataTableRow, error)UpdateDataTableRow update data table row
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewDataTableClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.UpdateDataTableRowRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#UpdateDataTableRowRequest.
}
resp, err := c.UpdateDataTableRow(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
DataTableIterator
type DataTableIterator 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 []*chroniclepb.DataTable, nextPageToken string, err error)
// contains filtered or unexported fields
}DataTableIterator manages a stream of *chroniclepb.DataTable.
func (*DataTableIterator) All
func (it *DataTableIterator) All() iter.Seq2[*chroniclepb.DataTable, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*DataTableIterator) Next
func (it *DataTableIterator) Next() (*chroniclepb.DataTable, 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 (*DataTableIterator) PageInfo
func (it *DataTableIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
DataTableRowIterator
type DataTableRowIterator 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 []*chroniclepb.DataTableRow, nextPageToken string, err error)
// contains filtered or unexported fields
}DataTableRowIterator manages a stream of *chroniclepb.DataTableRow.
func (*DataTableRowIterator) All
func (it *DataTableRowIterator) All() iter.Seq2[*chroniclepb.DataTableRow, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*DataTableRowIterator) Next
func (it *DataTableRowIterator) Next() (*chroniclepb.DataTableRow, 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 (*DataTableRowIterator) PageInfo
func (it *DataTableRowIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
EntityCallOptions
type EntityCallOptions struct {
GetWatchlist []gax.CallOption
ListWatchlists []gax.CallOption
CreateWatchlist []gax.CallOption
UpdateWatchlist []gax.CallOption
DeleteWatchlist []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}EntityCallOptions contains the retry settings for each method of EntityClient.
EntityClient
type EntityClient struct {
// The call options for this service.
CallOptions *EntityCallOptions
// contains filtered or unexported fields
}EntityClient is a client for interacting with Chronicle API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
EntityService contains apis for finding entities.
func NewEntityClient
func NewEntityClient(ctx context.Context, opts ...option.ClientOption) (*EntityClient, error)NewEntityClient creates a new entity service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
EntityService contains apis for finding entities.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewEntityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewEntityRESTClient
func NewEntityRESTClient(ctx context.Context, opts ...option.ClientOption) (*EntityClient, error)NewEntityRESTClient creates a new entity service rest client.
EntityService contains apis for finding entities.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewEntityRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*EntityClient) CancelOperation
func (c *EntityClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewEntityClient(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 (*EntityClient) Close
func (c *EntityClient) Close() errorClose closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*EntityClient) Connection (deprecated)
func (c *EntityClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*EntityClient) CreateWatchlist
func (c *EntityClient) CreateWatchlist(ctx context.Context, req *chroniclepb.CreateWatchlistRequest, opts ...gax.CallOption) (*chroniclepb.Watchlist, error)CreateWatchlist creates a watchlist for the given instance. Note that there can be at most 200 watchlists per instance.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewEntityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.CreateWatchlistRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#CreateWatchlistRequest.
}
resp, err := c.CreateWatchlist(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*EntityClient) DeleteOperation
func (c *EntityClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewEntityClient(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 (*EntityClient) DeleteWatchlist
func (c *EntityClient) DeleteWatchlist(ctx context.Context, req *chroniclepb.DeleteWatchlistRequest, opts ...gax.CallOption) errorDeleteWatchlist deletes the watchlist for the given instance.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewEntityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.DeleteWatchlistRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#DeleteWatchlistRequest.
}
err = c.DeleteWatchlist(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*EntityClient) GetOperation
func (c *EntityClient) 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"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewEntityClient(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 (*EntityClient) GetWatchlist
func (c *EntityClient) GetWatchlist(ctx context.Context, req *chroniclepb.GetWatchlistRequest, opts ...gax.CallOption) (*chroniclepb.Watchlist, error)GetWatchlist gets watchlist details for the given watchlist ID.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewEntityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.GetWatchlistRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#GetWatchlistRequest.
}
resp, err := c.GetWatchlist(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*EntityClient) ListOperations
func (c *EntityClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"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 := chronicle.NewEntityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewEntityClient(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 (*EntityClient) ListWatchlists
func (c *EntityClient) ListWatchlists(ctx context.Context, req *chroniclepb.ListWatchlistsRequest, opts ...gax.CallOption) *WatchlistIteratorListWatchlists lists all watchlists for the given instance.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
"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 := chronicle.NewEntityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListWatchlistsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListWatchlistsRequest.
}
it := c.ListWatchlists(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.(*chroniclepb.ListWatchlistsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewEntityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListWatchlistsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListWatchlistsRequest.
}
for resp, err := range c.ListWatchlists(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*EntityClient) UpdateWatchlist
func (c *EntityClient) UpdateWatchlist(ctx context.Context, req *chroniclepb.UpdateWatchlistRequest, opts ...gax.CallOption) (*chroniclepb.Watchlist, error)UpdateWatchlist updates the watchlist for the given instance.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewEntityClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.UpdateWatchlistRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#UpdateWatchlistRequest.
}
resp, err := c.UpdateWatchlist(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
FeaturedContentNativeDashboardCallOptions
type FeaturedContentNativeDashboardCallOptions struct {
GetFeaturedContentNativeDashboard []gax.CallOption
ListFeaturedContentNativeDashboards []gax.CallOption
InstallFeaturedContentNativeDashboard []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}FeaturedContentNativeDashboardCallOptions contains the retry settings for each method of FeaturedContentNativeDashboardClient.
FeaturedContentNativeDashboardClient
type FeaturedContentNativeDashboardClient struct {
// The call options for this service.
CallOptions *FeaturedContentNativeDashboardCallOptions
// contains filtered or unexported fields
}FeaturedContentNativeDashboardClient is a client for interacting with Chronicle API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
This service provides functionality for managing FeaturedContentNativeDashboard.
func NewFeaturedContentNativeDashboardClient
func NewFeaturedContentNativeDashboardClient(ctx context.Context, opts ...option.ClientOption) (*FeaturedContentNativeDashboardClient, error)NewFeaturedContentNativeDashboardClient creates a new featured content native dashboard service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
This service provides functionality for managing FeaturedContentNativeDashboard.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewFeaturedContentNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewFeaturedContentNativeDashboardRESTClient
func NewFeaturedContentNativeDashboardRESTClient(ctx context.Context, opts ...option.ClientOption) (*FeaturedContentNativeDashboardClient, error)NewFeaturedContentNativeDashboardRESTClient creates a new featured content native dashboard service rest client.
This service provides functionality for managing FeaturedContentNativeDashboard.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewFeaturedContentNativeDashboardRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*FeaturedContentNativeDashboardClient) CancelOperation
func (c *FeaturedContentNativeDashboardClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewFeaturedContentNativeDashboardClient(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 (*FeaturedContentNativeDashboardClient) Close
func (c *FeaturedContentNativeDashboardClient) Close() errorClose closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*FeaturedContentNativeDashboardClient) Connection (deprecated)
func (c *FeaturedContentNativeDashboardClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*FeaturedContentNativeDashboardClient) DeleteOperation
func (c *FeaturedContentNativeDashboardClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewFeaturedContentNativeDashboardClient(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 (*FeaturedContentNativeDashboardClient) GetFeaturedContentNativeDashboard
func (c *FeaturedContentNativeDashboardClient) GetFeaturedContentNativeDashboard(ctx context.Context, req *chroniclepb.GetFeaturedContentNativeDashboardRequest, opts ...gax.CallOption) (*chroniclepb.FeaturedContentNativeDashboard, error)GetFeaturedContentNativeDashboard get a native dashboard featured content.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewFeaturedContentNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.GetFeaturedContentNativeDashboardRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#GetFeaturedContentNativeDashboardRequest.
}
resp, err := c.GetFeaturedContentNativeDashboard(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*FeaturedContentNativeDashboardClient) GetOperation
func (c *FeaturedContentNativeDashboardClient) 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"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewFeaturedContentNativeDashboardClient(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 (*FeaturedContentNativeDashboardClient) InstallFeaturedContentNativeDashboard
func (c *FeaturedContentNativeDashboardClient) InstallFeaturedContentNativeDashboard(ctx context.Context, req *chroniclepb.InstallFeaturedContentNativeDashboardRequest, opts ...gax.CallOption) (*chroniclepb.InstallFeaturedContentNativeDashboardResponse, error)InstallFeaturedContentNativeDashboard install a native dashboard featured content.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewFeaturedContentNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.InstallFeaturedContentNativeDashboardRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#InstallFeaturedContentNativeDashboardRequest.
}
resp, err := c.InstallFeaturedContentNativeDashboard(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*FeaturedContentNativeDashboardClient) ListFeaturedContentNativeDashboards
func (c *FeaturedContentNativeDashboardClient) ListFeaturedContentNativeDashboards(ctx context.Context, req *chroniclepb.ListFeaturedContentNativeDashboardsRequest, opts ...gax.CallOption) *FeaturedContentNativeDashboardIteratorListFeaturedContentNativeDashboards list all native dashboards featured content.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
"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 := chronicle.NewFeaturedContentNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListFeaturedContentNativeDashboardsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListFeaturedContentNativeDashboardsRequest.
}
it := c.ListFeaturedContentNativeDashboards(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.(*chroniclepb.ListFeaturedContentNativeDashboardsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewFeaturedContentNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListFeaturedContentNativeDashboardsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListFeaturedContentNativeDashboardsRequest.
}
for resp, err := range c.ListFeaturedContentNativeDashboards(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*FeaturedContentNativeDashboardClient) ListOperations
func (c *FeaturedContentNativeDashboardClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"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 := chronicle.NewFeaturedContentNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewFeaturedContentNativeDashboardClient(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
}
}
FeaturedContentNativeDashboardIterator
type FeaturedContentNativeDashboardIterator 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 []*chroniclepb.FeaturedContentNativeDashboard, nextPageToken string, err error)
// contains filtered or unexported fields
}FeaturedContentNativeDashboardIterator manages a stream of *chroniclepb.FeaturedContentNativeDashboard.
func (*FeaturedContentNativeDashboardIterator) All
func (it *FeaturedContentNativeDashboardIterator) All() iter.Seq2[*chroniclepb.FeaturedContentNativeDashboard, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*FeaturedContentNativeDashboardIterator) Next
func (it *FeaturedContentNativeDashboardIterator) Next() (*chroniclepb.FeaturedContentNativeDashboard, 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 (*FeaturedContentNativeDashboardIterator) PageInfo
func (it *FeaturedContentNativeDashboardIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
InstanceCallOptions
type InstanceCallOptions struct {
GetInstance []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}InstanceCallOptions contains the retry settings for each method of InstanceClient.
InstanceClient
type InstanceClient struct {
// The call options for this service.
CallOptions *InstanceCallOptions
// contains filtered or unexported fields
}InstanceClient is a client for interacting with Chronicle API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
InstanceService provides the entry interface for the Chronicle API.
func NewInstanceClient
func NewInstanceClient(ctx context.Context, opts ...option.ClientOption) (*InstanceClient, error)NewInstanceClient creates a new instance service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
InstanceService provides the entry interface for the Chronicle API.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewInstanceClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewInstanceRESTClient
func NewInstanceRESTClient(ctx context.Context, opts ...option.ClientOption) (*InstanceClient, error)NewInstanceRESTClient creates a new instance service rest client.
InstanceService provides the entry interface for the Chronicle API.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewInstanceRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*InstanceClient) CancelOperation
func (c *InstanceClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewInstanceClient(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 (*InstanceClient) Close
func (c *InstanceClient) Close() errorClose closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*InstanceClient) Connection (deprecated)
func (c *InstanceClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*InstanceClient) DeleteOperation
func (c *InstanceClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewInstanceClient(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 (*InstanceClient) GetInstance
func (c *InstanceClient) GetInstance(ctx context.Context, req *chroniclepb.GetInstanceRequest, opts ...gax.CallOption) (*chroniclepb.Instance, error)GetInstance gets a Instance.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewInstanceClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.GetInstanceRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#GetInstanceRequest.
}
resp, err := c.GetInstance(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*InstanceClient) GetOperation
func (c *InstanceClient) 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"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewInstanceClient(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 (*InstanceClient) ListOperations
func (c *InstanceClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"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 := chronicle.NewInstanceClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewInstanceClient(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
}
}
NativeDashboardCallOptions
type NativeDashboardCallOptions struct {
CreateNativeDashboard []gax.CallOption
GetNativeDashboard []gax.CallOption
ListNativeDashboards []gax.CallOption
UpdateNativeDashboard []gax.CallOption
DuplicateNativeDashboard []gax.CallOption
DeleteNativeDashboard []gax.CallOption
AddChart []gax.CallOption
RemoveChart []gax.CallOption
EditChart []gax.CallOption
DuplicateChart []gax.CallOption
ExportNativeDashboards []gax.CallOption
ImportNativeDashboards []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}NativeDashboardCallOptions contains the retry settings for each method of NativeDashboardClient.
NativeDashboardClient
type NativeDashboardClient struct {
// The call options for this service.
CallOptions *NativeDashboardCallOptions
// contains filtered or unexported fields
}NativeDashboardClient is a client for interacting with Chronicle API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
A service providing functionality for managing native dashboards.
func NewNativeDashboardClient
func NewNativeDashboardClient(ctx context.Context, opts ...option.ClientOption) (*NativeDashboardClient, error)NewNativeDashboardClient creates a new native dashboard service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
A service providing functionality for managing native dashboards.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewNativeDashboardRESTClient
func NewNativeDashboardRESTClient(ctx context.Context, opts ...option.ClientOption) (*NativeDashboardClient, error)NewNativeDashboardRESTClient creates a new native dashboard service rest client.
A service providing functionality for managing native dashboards.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewNativeDashboardRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*NativeDashboardClient) AddChart
func (c *NativeDashboardClient) AddChart(ctx context.Context, req *chroniclepb.AddChartRequest, opts ...gax.CallOption) (*chroniclepb.AddChartResponse, error)AddChart add chart in a dashboard.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.AddChartRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#AddChartRequest.
}
resp, err := c.AddChart(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*NativeDashboardClient) CancelOperation
func (c *NativeDashboardClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewNativeDashboardClient(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 (*NativeDashboardClient) Close
func (c *NativeDashboardClient) Close() errorClose closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*NativeDashboardClient) Connection (deprecated)
func (c *NativeDashboardClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*NativeDashboardClient) CreateNativeDashboard
func (c *NativeDashboardClient) CreateNativeDashboard(ctx context.Context, req *chroniclepb.CreateNativeDashboardRequest, opts ...gax.CallOption) (*chroniclepb.NativeDashboard, error)CreateNativeDashboard create a dashboard.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.CreateNativeDashboardRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#CreateNativeDashboardRequest.
}
resp, err := c.CreateNativeDashboard(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*NativeDashboardClient) DeleteNativeDashboard
func (c *NativeDashboardClient) DeleteNativeDashboard(ctx context.Context, req *chroniclepb.DeleteNativeDashboardRequest, opts ...gax.CallOption) errorDeleteNativeDashboard delete a dashboard.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.DeleteNativeDashboardRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#DeleteNativeDashboardRequest.
}
err = c.DeleteNativeDashboard(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*NativeDashboardClient) DeleteOperation
func (c *NativeDashboardClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewNativeDashboardClient(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 (*NativeDashboardClient) DuplicateChart
func (c *NativeDashboardClient) DuplicateChart(ctx context.Context, req *chroniclepb.DuplicateChartRequest, opts ...gax.CallOption) (*chroniclepb.DuplicateChartResponse, error)DuplicateChart duplicate chart in a dashboard.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.DuplicateChartRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#DuplicateChartRequest.
}
resp, err := c.DuplicateChart(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*NativeDashboardClient) DuplicateNativeDashboard
func (c *NativeDashboardClient) DuplicateNativeDashboard(ctx context.Context, req *chroniclepb.DuplicateNativeDashboardRequest, opts ...gax.CallOption) (*chroniclepb.NativeDashboard, error)DuplicateNativeDashboard duplicate a dashboard.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.DuplicateNativeDashboardRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#DuplicateNativeDashboardRequest.
}
resp, err := c.DuplicateNativeDashboard(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*NativeDashboardClient) EditChart
func (c *NativeDashboardClient) EditChart(ctx context.Context, req *chroniclepb.EditChartRequest, opts ...gax.CallOption) (*chroniclepb.EditChartResponse, error)EditChart edit chart in a dashboard.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.EditChartRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#EditChartRequest.
}
resp, err := c.EditChart(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*NativeDashboardClient) ExportNativeDashboards
func (c *NativeDashboardClient) ExportNativeDashboards(ctx context.Context, req *chroniclepb.ExportNativeDashboardsRequest, opts ...gax.CallOption) (*chroniclepb.ExportNativeDashboardsResponse, error)ExportNativeDashboards exports the dashboards.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ExportNativeDashboardsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ExportNativeDashboardsRequest.
}
resp, err := c.ExportNativeDashboards(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*NativeDashboardClient) GetNativeDashboard
func (c *NativeDashboardClient) GetNativeDashboard(ctx context.Context, req *chroniclepb.GetNativeDashboardRequest, opts ...gax.CallOption) (*chroniclepb.NativeDashboard, error)GetNativeDashboard get a dashboard.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.GetNativeDashboardRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#GetNativeDashboardRequest.
}
resp, err := c.GetNativeDashboard(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*NativeDashboardClient) GetOperation
func (c *NativeDashboardClient) 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"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewNativeDashboardClient(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 (*NativeDashboardClient) ImportNativeDashboards
func (c *NativeDashboardClient) ImportNativeDashboards(ctx context.Context, req *chroniclepb.ImportNativeDashboardsRequest, opts ...gax.CallOption) (*chroniclepb.ImportNativeDashboardsResponse, error)ImportNativeDashboards imports the dashboards.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ImportNativeDashboardsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ImportNativeDashboardsRequest.
}
resp, err := c.ImportNativeDashboards(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*NativeDashboardClient) ListNativeDashboards
func (c *NativeDashboardClient) ListNativeDashboards(ctx context.Context, req *chroniclepb.ListNativeDashboardsRequest, opts ...gax.CallOption) *NativeDashboardIteratorListNativeDashboards list all dashboards.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
"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 := chronicle.NewNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListNativeDashboardsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListNativeDashboardsRequest.
}
it := c.ListNativeDashboards(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.(*chroniclepb.ListNativeDashboardsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListNativeDashboardsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListNativeDashboardsRequest.
}
for resp, err := range c.ListNativeDashboards(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*NativeDashboardClient) ListOperations
func (c *NativeDashboardClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"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 := chronicle.NewNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewNativeDashboardClient(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 (*NativeDashboardClient) RemoveChart
func (c *NativeDashboardClient) RemoveChart(ctx context.Context, req *chroniclepb.RemoveChartRequest, opts ...gax.CallOption) (*chroniclepb.NativeDashboard, error)RemoveChart remove chart from a dashboard.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.RemoveChartRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#RemoveChartRequest.
}
resp, err := c.RemoveChart(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*NativeDashboardClient) UpdateNativeDashboard
func (c *NativeDashboardClient) UpdateNativeDashboard(ctx context.Context, req *chroniclepb.UpdateNativeDashboardRequest, opts ...gax.CallOption) (*chroniclepb.NativeDashboard, error)UpdateNativeDashboard update a dashboard.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewNativeDashboardClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.UpdateNativeDashboardRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#UpdateNativeDashboardRequest.
}
resp, err := c.UpdateNativeDashboard(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
NativeDashboardIterator
type NativeDashboardIterator 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 []*chroniclepb.NativeDashboard, nextPageToken string, err error)
// contains filtered or unexported fields
}NativeDashboardIterator manages a stream of *chroniclepb.NativeDashboard.
func (*NativeDashboardIterator) All
func (it *NativeDashboardIterator) All() iter.Seq2[*chroniclepb.NativeDashboard, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*NativeDashboardIterator) Next
func (it *NativeDashboardIterator) Next() (*chroniclepb.NativeDashboard, 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 (*NativeDashboardIterator) PageInfo
func (it *NativeDashboardIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
OperationIterator
type OperationIterator struct {
// Response is the raw response for the current page.
// It must be cast to the RPC response type.
// Calling Next() or InternalFetch() updates this value.
Response interface{}
// InternalFetch is for use by the Google Cloud Libraries only.
// It is not part of the stable interface of this package.
//
// InternalFetch returns results from a single call to the underlying RPC.
// The number of results is no greater than pageSize.
// If there are no more results, nextPageToken is empty and err is nil.
InternalFetch func(pageSize int, pageToken string) (results []*longrunningpb.Operation, nextPageToken string, err error)
// contains filtered or unexported fields
}OperationIterator manages a stream of *longrunningpb.Operation.
func (*OperationIterator) All
func (it *OperationIterator) All() iter.Seq2[*longrunningpb.Operation, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*OperationIterator) Next
func (it *OperationIterator) Next() (*longrunningpb.Operation, error)Next returns the next result. Its second return value is iterator.Done if there are no more results. Once Next returns Done, all subsequent calls will return Done.
func (*OperationIterator) PageInfo
func (it *OperationIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
ReferenceListCallOptions
type ReferenceListCallOptions struct {
GetReferenceList []gax.CallOption
ListReferenceLists []gax.CallOption
CreateReferenceList []gax.CallOption
UpdateReferenceList []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}ReferenceListCallOptions contains the retry settings for each method of ReferenceListClient.
ReferenceListClient
type ReferenceListClient struct {
// The call options for this service.
CallOptions *ReferenceListCallOptions
// contains filtered or unexported fields
}ReferenceListClient is a client for interacting with Chronicle API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
ReferenceListService provides an interface for managing reference lists.
func NewReferenceListClient
func NewReferenceListClient(ctx context.Context, opts ...option.ClientOption) (*ReferenceListClient, error)NewReferenceListClient creates a new reference list service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
ReferenceListService provides an interface for managing reference lists.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewReferenceListClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewReferenceListRESTClient
func NewReferenceListRESTClient(ctx context.Context, opts ...option.ClientOption) (*ReferenceListClient, error)NewReferenceListRESTClient creates a new reference list service rest client.
ReferenceListService provides an interface for managing reference lists.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewReferenceListRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*ReferenceListClient) CancelOperation
func (c *ReferenceListClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewReferenceListClient(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 (*ReferenceListClient) Close
func (c *ReferenceListClient) Close() errorClose closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*ReferenceListClient) Connection (deprecated)
func (c *ReferenceListClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*ReferenceListClient) CreateReferenceList
func (c *ReferenceListClient) CreateReferenceList(ctx context.Context, req *chroniclepb.CreateReferenceListRequest, opts ...gax.CallOption) (*chroniclepb.ReferenceList, error)CreateReferenceList creates a new reference list.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewReferenceListClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.CreateReferenceListRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#CreateReferenceListRequest.
}
resp, err := c.CreateReferenceList(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*ReferenceListClient) DeleteOperation
func (c *ReferenceListClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewReferenceListClient(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 (*ReferenceListClient) GetOperation
func (c *ReferenceListClient) 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"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewReferenceListClient(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 (*ReferenceListClient) GetReferenceList
func (c *ReferenceListClient) GetReferenceList(ctx context.Context, req *chroniclepb.GetReferenceListRequest, opts ...gax.CallOption) (*chroniclepb.ReferenceList, error)GetReferenceList gets a single reference list.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewReferenceListClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.GetReferenceListRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#GetReferenceListRequest.
}
resp, err := c.GetReferenceList(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*ReferenceListClient) ListOperations
func (c *ReferenceListClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"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 := chronicle.NewReferenceListClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewReferenceListClient(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 (*ReferenceListClient) ListReferenceLists
func (c *ReferenceListClient) ListReferenceLists(ctx context.Context, req *chroniclepb.ListReferenceListsRequest, opts ...gax.CallOption) *ReferenceListIteratorListReferenceLists lists a collection of reference lists.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
"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 := chronicle.NewReferenceListClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListReferenceListsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListReferenceListsRequest.
}
it := c.ListReferenceLists(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.(*chroniclepb.ListReferenceListsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewReferenceListClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListReferenceListsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListReferenceListsRequest.
}
for resp, err := range c.ListReferenceLists(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*ReferenceListClient) UpdateReferenceList
func (c *ReferenceListClient) UpdateReferenceList(ctx context.Context, req *chroniclepb.UpdateReferenceListRequest, opts ...gax.CallOption) (*chroniclepb.ReferenceList, error)UpdateReferenceList updates an existing reference list.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewReferenceListClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.UpdateReferenceListRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#UpdateReferenceListRequest.
}
resp, err := c.UpdateReferenceList(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
ReferenceListIterator
type ReferenceListIterator 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 []*chroniclepb.ReferenceList, nextPageToken string, err error)
// contains filtered or unexported fields
}ReferenceListIterator manages a stream of *chroniclepb.ReferenceList.
func (*ReferenceListIterator) All
func (it *ReferenceListIterator) All() iter.Seq2[*chroniclepb.ReferenceList, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*ReferenceListIterator) Next
func (it *ReferenceListIterator) Next() (*chroniclepb.ReferenceList, 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 (*ReferenceListIterator) PageInfo
func (it *ReferenceListIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
RetrohuntIterator
type RetrohuntIterator 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 []*chroniclepb.Retrohunt, nextPageToken string, err error)
// contains filtered or unexported fields
}RetrohuntIterator manages a stream of *chroniclepb.Retrohunt.
func (*RetrohuntIterator) All
func (it *RetrohuntIterator) All() iter.Seq2[*chroniclepb.Retrohunt, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*RetrohuntIterator) Next
func (it *RetrohuntIterator) Next() (*chroniclepb.Retrohunt, 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 (*RetrohuntIterator) PageInfo
func (it *RetrohuntIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
RuleCallOptions
type RuleCallOptions struct {
CreateRule []gax.CallOption
GetRule []gax.CallOption
ListRules []gax.CallOption
UpdateRule []gax.CallOption
DeleteRule []gax.CallOption
ListRuleRevisions []gax.CallOption
CreateRetrohunt []gax.CallOption
GetRetrohunt []gax.CallOption
ListRetrohunts []gax.CallOption
GetRuleDeployment []gax.CallOption
ListRuleDeployments []gax.CallOption
UpdateRuleDeployment []gax.CallOption
CancelOperation []gax.CallOption
DeleteOperation []gax.CallOption
GetOperation []gax.CallOption
ListOperations []gax.CallOption
}RuleCallOptions contains the retry settings for each method of RuleClient.
RuleClient
type RuleClient struct {
// The call options for this service.
CallOptions *RuleCallOptions
// 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
}RuleClient is a client for interacting with Chronicle API. Methods, except Close, may be called concurrently. However, fields must not be modified concurrently with method calls.
RuleService provides interface for user-created rules.
func NewRuleClient
func NewRuleClient(ctx context.Context, opts ...option.ClientOption) (*RuleClient, error)NewRuleClient creates a new rule service client based on gRPC. The returned client must be Closed when it is done being used to clean up its underlying connections.
RuleService provides interface for user-created rules.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func NewRuleRESTClient
func NewRuleRESTClient(ctx context.Context, opts ...option.ClientOption) (*RuleClient, error)NewRuleRESTClient creates a new rule service rest client.
RuleService provides interface for user-created rules.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/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 := chronicle.NewRuleRESTClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
// TODO: Use client.
_ = c
}
func (*RuleClient) CancelOperation
func (c *RuleClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) errorCancelOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewRuleClient(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 (*RuleClient) Close
func (c *RuleClient) Close() errorClose closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*RuleClient) Connection (deprecated)
func (c *RuleClient) Connection() *grpc.ClientConnConnection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*RuleClient) CreateRetrohunt
func (c *RuleClient) CreateRetrohunt(ctx context.Context, req *chroniclepb.CreateRetrohuntRequest, opts ...gax.CallOption) (*CreateRetrohuntOperation, error)CreateRetrohunt create a Retrohunt.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.CreateRetrohuntRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#CreateRetrohuntRequest.
}
op, err := c.CreateRetrohunt(ctx, req)
if err != nil {
// TODO: Handle error.
}
resp, err := op.Wait(ctx)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*RuleClient) CreateRetrohuntOperation
func (c *RuleClient) CreateRetrohuntOperation(name string) *CreateRetrohuntOperationCreateRetrohuntOperation returns a new CreateRetrohuntOperation from a given name. The name must be that of a previously created CreateRetrohuntOperation, possibly from a different process.
func (*RuleClient) CreateRule
func (c *RuleClient) CreateRule(ctx context.Context, req *chroniclepb.CreateRuleRequest, opts ...gax.CallOption) (*chroniclepb.Rule, error)CreateRule creates a new Rule.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.CreateRuleRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#CreateRuleRequest.
}
resp, err := c.CreateRule(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*RuleClient) DeleteOperation
func (c *RuleClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) errorDeleteOperation is a utility method from google.longrunning.Operations.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewRuleClient(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 (*RuleClient) DeleteRule
func (c *RuleClient) DeleteRule(ctx context.Context, req *chroniclepb.DeleteRuleRequest, opts ...gax.CallOption) errorDeleteRule deletes a Rule.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.DeleteRuleRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#DeleteRuleRequest.
}
err = c.DeleteRule(ctx, req)
if err != nil {
// TODO: Handle error.
}
}
func (*RuleClient) GetOperation
func (c *RuleClient) 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"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewRuleClient(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 (*RuleClient) GetRetrohunt
func (c *RuleClient) GetRetrohunt(ctx context.Context, req *chroniclepb.GetRetrohuntRequest, opts ...gax.CallOption) (*chroniclepb.Retrohunt, error)GetRetrohunt get a Retrohunt.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.GetRetrohuntRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#GetRetrohuntRequest.
}
resp, err := c.GetRetrohunt(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*RuleClient) GetRule
func (c *RuleClient) GetRule(ctx context.Context, req *chroniclepb.GetRuleRequest, opts ...gax.CallOption) (*chroniclepb.Rule, error)GetRule gets a Rule.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.GetRuleRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#GetRuleRequest.
}
resp, err := c.GetRule(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*RuleClient) GetRuleDeployment
func (c *RuleClient) GetRuleDeployment(ctx context.Context, req *chroniclepb.GetRuleDeploymentRequest, opts ...gax.CallOption) (*chroniclepb.RuleDeployment, error)GetRuleDeployment gets a RuleDeployment.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.GetRuleDeploymentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#GetRuleDeploymentRequest.
}
resp, err := c.GetRuleDeployment(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*RuleClient) ListOperations
func (c *RuleClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIteratorListOperations is a utility method from google.longrunning.Operations.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
"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 := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &longrunningpb.ListOperationsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/longrunning/autogen/longrunningpb#ListOperationsRequest.
}
it := c.ListOperations(ctx, req)
for {
resp, err := it.Next()
if err == iterator.Done {
break
}
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
// If you need to access the underlying RPC response,
// you can do so by casting the `Response` as below.
// Otherwise, remove this line. Only populated after
// first call to Next(). Not safe for concurrent access.
_ = it.Response.(*longrunningpb.ListOperationsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
longrunningpb "cloud.google.com/go/longrunning/autogen/longrunningpb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewRuleClient(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 (*RuleClient) ListRetrohunts
func (c *RuleClient) ListRetrohunts(ctx context.Context, req *chroniclepb.ListRetrohuntsRequest, opts ...gax.CallOption) *RetrohuntIteratorListRetrohunts list Retrohunts.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
"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 := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListRetrohuntsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListRetrohuntsRequest.
}
it := c.ListRetrohunts(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.(*chroniclepb.ListRetrohuntsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListRetrohuntsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListRetrohuntsRequest.
}
for resp, err := range c.ListRetrohunts(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*RuleClient) ListRuleDeployments
func (c *RuleClient) ListRuleDeployments(ctx context.Context, req *chroniclepb.ListRuleDeploymentsRequest, opts ...gax.CallOption) *RuleDeploymentIteratorListRuleDeployments lists RuleDeployments across all Rules.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
"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 := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListRuleDeploymentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListRuleDeploymentsRequest.
}
it := c.ListRuleDeployments(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.(*chroniclepb.ListRuleDeploymentsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListRuleDeploymentsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListRuleDeploymentsRequest.
}
for resp, err := range c.ListRuleDeployments(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*RuleClient) ListRuleRevisions
func (c *RuleClient) ListRuleRevisions(ctx context.Context, req *chroniclepb.ListRuleRevisionsRequest, opts ...gax.CallOption) *RuleIteratorListRuleRevisions lists all revisions of the rule.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
"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 := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListRuleRevisionsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListRuleRevisionsRequest.
}
it := c.ListRuleRevisions(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.(*chroniclepb.ListRuleRevisionsResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListRuleRevisionsRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListRuleRevisionsRequest.
}
for resp, err := range c.ListRuleRevisions(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*RuleClient) ListRules
func (c *RuleClient) ListRules(ctx context.Context, req *chroniclepb.ListRulesRequest, opts ...gax.CallOption) *RuleIteratorListRules lists Rules.
Examples
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
"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 := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListRulesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListRulesRequest.
}
it := c.ListRules(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.(*chroniclepb.ListRulesResponse)
}
}
all
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.ListRulesRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#ListRulesRequest.
}
for resp, err := range c.ListRules(ctx, req).All() {
if err != nil {
// TODO: Handle error and break/return/continue. Iteration will stop after any error.
}
// TODO: Use resp.
_ = resp
}
}
func (*RuleClient) UpdateRule
func (c *RuleClient) UpdateRule(ctx context.Context, req *chroniclepb.UpdateRuleRequest, opts ...gax.CallOption) (*chroniclepb.Rule, error)UpdateRule updates a Rule.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.UpdateRuleRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#UpdateRuleRequest.
}
resp, err := c.UpdateRule(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
func (*RuleClient) UpdateRuleDeployment
func (c *RuleClient) UpdateRuleDeployment(ctx context.Context, req *chroniclepb.UpdateRuleDeploymentRequest, opts ...gax.CallOption) (*chroniclepb.RuleDeployment, error)UpdateRuleDeployment updates a RuleDeployment. Failures are not necessarily atomic. If there is a request to update multiple fields, and any update to a single field fails, an error will be returned, but other fields may remain successfully updated.
Example
package main
import (
"context"
chronicle "cloud.google.com/go/chronicle/apiv1"
chroniclepb "cloud.google.com/go/chronicle/apiv1/chroniclepb"
)
func main() {
ctx := context.Background()
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in:
// https://pkg.go.dev/cloud.google.com/go#hdr-Client_Options
c, err := chronicle.NewRuleClient(ctx)
if err != nil {
// TODO: Handle error.
}
defer c.Close()
req := &chroniclepb.UpdateRuleDeploymentRequest{
// TODO: Fill request struct fields.
// See https://pkg.go.dev/cloud.google.com/go/chronicle/apiv1/chroniclepb#UpdateRuleDeploymentRequest.
}
resp, err := c.UpdateRuleDeployment(ctx, req)
if err != nil {
// TODO: Handle error.
}
// TODO: Use resp.
_ = resp
}
RuleDeploymentIterator
type RuleDeploymentIterator 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 []*chroniclepb.RuleDeployment, nextPageToken string, err error)
// contains filtered or unexported fields
}RuleDeploymentIterator manages a stream of *chroniclepb.RuleDeployment.
func (*RuleDeploymentIterator) All
func (it *RuleDeploymentIterator) All() iter.Seq2[*chroniclepb.RuleDeployment, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*RuleDeploymentIterator) Next
func (it *RuleDeploymentIterator) Next() (*chroniclepb.RuleDeployment, 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 (*RuleDeploymentIterator) PageInfo
func (it *RuleDeploymentIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
RuleIterator
type RuleIterator 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 []*chroniclepb.Rule, nextPageToken string, err error)
// contains filtered or unexported fields
}RuleIterator manages a stream of *chroniclepb.Rule.
func (*RuleIterator) All
func (it *RuleIterator) All() iter.Seq2[*chroniclepb.Rule, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*RuleIterator) Next
func (it *RuleIterator) Next() (*chroniclepb.Rule, 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 (*RuleIterator) PageInfo
func (it *RuleIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.
WatchlistIterator
type WatchlistIterator 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 []*chroniclepb.Watchlist, nextPageToken string, err error)
// contains filtered or unexported fields
}WatchlistIterator manages a stream of *chroniclepb.Watchlist.
func (*WatchlistIterator) All
func (it *WatchlistIterator) All() iter.Seq2[*chroniclepb.Watchlist, error]All returns an iterator. If an error is returned by the iterator, the iterator will stop after that iteration.
func (*WatchlistIterator) Next
func (it *WatchlistIterator) Next() (*chroniclepb.Watchlist, 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 (*WatchlistIterator) PageInfo
func (it *WatchlistIterator) PageInfo() *iterator.PageInfoPageInfo supports pagination. See the [google.golang.org/api/iterator] package for details.