Documentation
¶
Overview ¶
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.
Index ¶
- func DefaultAuthScopes() []string
- type BigQueryExportCallOptions
- type BigQueryExportClient
- func (c *BigQueryExportClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *BigQueryExportClient) Close() error
- func (c *BigQueryExportClient) Connection() *grpc.ClientConndeprecated
- func (c *BigQueryExportClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *BigQueryExportClient) GetBigQueryExport(ctx context.Context, req *chroniclepb.GetBigQueryExportRequest, ...) (*chroniclepb.BigQueryExport, error)
- func (c *BigQueryExportClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *BigQueryExportClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *BigQueryExportClient) ProvisionBigQueryExport(ctx context.Context, req *chroniclepb.ProvisionBigQueryExportRequest, ...) (*chroniclepb.BigQueryExport, error)
- func (c *BigQueryExportClient) UpdateBigQueryExport(ctx context.Context, req *chroniclepb.UpdateBigQueryExportRequest, ...) (*chroniclepb.BigQueryExport, error)
- type CreateRetrohuntOperation
- func (op *CreateRetrohuntOperation) Done() bool
- func (op *CreateRetrohuntOperation) Metadata() (*chroniclepb.RetrohuntMetadata, error)
- func (op *CreateRetrohuntOperation) Name() string
- func (op *CreateRetrohuntOperation) Poll(ctx context.Context, opts ...gax.CallOption) (*chroniclepb.Retrohunt, error)
- func (op *CreateRetrohuntOperation) Wait(ctx context.Context, opts ...gax.CallOption) (*chroniclepb.Retrohunt, error)
- type DashboardChartCallOptions
- type DashboardChartClient
- func (c *DashboardChartClient) BatchGetDashboardCharts(ctx context.Context, req *chroniclepb.BatchGetDashboardChartsRequest, ...) (*chroniclepb.BatchGetDashboardChartsResponse, error)
- func (c *DashboardChartClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *DashboardChartClient) Close() error
- func (c *DashboardChartClient) Connection() *grpc.ClientConndeprecated
- func (c *DashboardChartClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *DashboardChartClient) GetDashboardChart(ctx context.Context, req *chroniclepb.GetDashboardChartRequest, ...) (*chroniclepb.DashboardChart, error)
- func (c *DashboardChartClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *DashboardChartClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- type DashboardQueryCallOptions
- type DashboardQueryClient
- func (c *DashboardQueryClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *DashboardQueryClient) Close() error
- func (c *DashboardQueryClient) Connection() *grpc.ClientConndeprecated
- func (c *DashboardQueryClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *DashboardQueryClient) ExecuteDashboardQuery(ctx context.Context, req *chroniclepb.ExecuteDashboardQueryRequest, ...) (*chroniclepb.ExecuteDashboardQueryResponse, error)
- func (c *DashboardQueryClient) GetDashboardQuery(ctx context.Context, req *chroniclepb.GetDashboardQueryRequest, ...) (*chroniclepb.DashboardQuery, error)
- func (c *DashboardQueryClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *DashboardQueryClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- type DataAccessControlCallOptions
- type DataAccessControlClient
- func (c *DataAccessControlClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *DataAccessControlClient) Close() error
- func (c *DataAccessControlClient) Connection() *grpc.ClientConndeprecated
- func (c *DataAccessControlClient) CreateDataAccessLabel(ctx context.Context, req *chroniclepb.CreateDataAccessLabelRequest, ...) (*chroniclepb.DataAccessLabel, error)
- func (c *DataAccessControlClient) CreateDataAccessScope(ctx context.Context, req *chroniclepb.CreateDataAccessScopeRequest, ...) (*chroniclepb.DataAccessScope, error)
- func (c *DataAccessControlClient) DeleteDataAccessLabel(ctx context.Context, req *chroniclepb.DeleteDataAccessLabelRequest, ...) error
- func (c *DataAccessControlClient) DeleteDataAccessScope(ctx context.Context, req *chroniclepb.DeleteDataAccessScopeRequest, ...) error
- func (c *DataAccessControlClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *DataAccessControlClient) GetDataAccessLabel(ctx context.Context, req *chroniclepb.GetDataAccessLabelRequest, ...) (*chroniclepb.DataAccessLabel, error)
- func (c *DataAccessControlClient) GetDataAccessScope(ctx context.Context, req *chroniclepb.GetDataAccessScopeRequest, ...) (*chroniclepb.DataAccessScope, error)
- func (c *DataAccessControlClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *DataAccessControlClient) ListDataAccessLabels(ctx context.Context, req *chroniclepb.ListDataAccessLabelsRequest, ...) *DataAccessLabelIterator
- func (c *DataAccessControlClient) ListDataAccessScopes(ctx context.Context, req *chroniclepb.ListDataAccessScopesRequest, ...) *DataAccessScopeIterator
- func (c *DataAccessControlClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *DataAccessControlClient) UpdateDataAccessLabel(ctx context.Context, req *chroniclepb.UpdateDataAccessLabelRequest, ...) (*chroniclepb.DataAccessLabel, error)
- func (c *DataAccessControlClient) UpdateDataAccessScope(ctx context.Context, req *chroniclepb.UpdateDataAccessScopeRequest, ...) (*chroniclepb.DataAccessScope, error)
- type DataAccessLabelIterator
- type DataAccessScopeIterator
- type DataTableCallOptions
- type DataTableClient
- func (c *DataTableClient) BulkCreateDataTableRows(ctx context.Context, req *chroniclepb.BulkCreateDataTableRowsRequest, ...) (*chroniclepb.BulkCreateDataTableRowsResponse, error)
- func (c *DataTableClient) BulkGetDataTableRows(ctx context.Context, req *chroniclepb.BulkGetDataTableRowsRequest, ...) (*chroniclepb.BulkGetDataTableRowsResponse, error)
- func (c *DataTableClient) BulkReplaceDataTableRows(ctx context.Context, req *chroniclepb.BulkReplaceDataTableRowsRequest, ...) (*chroniclepb.BulkReplaceDataTableRowsResponse, error)
- func (c *DataTableClient) BulkUpdateDataTableRows(ctx context.Context, req *chroniclepb.BulkUpdateDataTableRowsRequest, ...) (*chroniclepb.BulkUpdateDataTableRowsResponse, error)
- func (c *DataTableClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *DataTableClient) Close() error
- func (c *DataTableClient) Connection() *grpc.ClientConndeprecated
- func (c *DataTableClient) CreateDataTable(ctx context.Context, req *chroniclepb.CreateDataTableRequest, ...) (*chroniclepb.DataTable, error)
- func (c *DataTableClient) CreateDataTableRow(ctx context.Context, req *chroniclepb.CreateDataTableRowRequest, ...) (*chroniclepb.DataTableRow, error)
- func (c *DataTableClient) DeleteDataTable(ctx context.Context, req *chroniclepb.DeleteDataTableRequest, ...) error
- func (c *DataTableClient) DeleteDataTableRow(ctx context.Context, req *chroniclepb.DeleteDataTableRowRequest, ...) error
- func (c *DataTableClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *DataTableClient) GetDataTable(ctx context.Context, req *chroniclepb.GetDataTableRequest, ...) (*chroniclepb.DataTable, error)
- func (c *DataTableClient) GetDataTableOperationErrors(ctx context.Context, req *chroniclepb.GetDataTableOperationErrorsRequest, ...) (*chroniclepb.DataTableOperationErrors, error)
- func (c *DataTableClient) GetDataTableRow(ctx context.Context, req *chroniclepb.GetDataTableRowRequest, ...) (*chroniclepb.DataTableRow, error)
- func (c *DataTableClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *DataTableClient) ListDataTableRows(ctx context.Context, req *chroniclepb.ListDataTableRowsRequest, ...) *DataTableRowIterator
- func (c *DataTableClient) ListDataTables(ctx context.Context, req *chroniclepb.ListDataTablesRequest, ...) *DataTableIterator
- func (c *DataTableClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *DataTableClient) UpdateDataTable(ctx context.Context, req *chroniclepb.UpdateDataTableRequest, ...) (*chroniclepb.DataTable, error)
- func (c *DataTableClient) UpdateDataTableRow(ctx context.Context, req *chroniclepb.UpdateDataTableRowRequest, ...) (*chroniclepb.DataTableRow, error)
- type DataTableIterator
- type DataTableRowIterator
- type EntityCallOptions
- type EntityClient
- func (c *EntityClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *EntityClient) Close() error
- func (c *EntityClient) Connection() *grpc.ClientConndeprecated
- func (c *EntityClient) CreateWatchlist(ctx context.Context, req *chroniclepb.CreateWatchlistRequest, ...) (*chroniclepb.Watchlist, error)
- func (c *EntityClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *EntityClient) DeleteWatchlist(ctx context.Context, req *chroniclepb.DeleteWatchlistRequest, ...) error
- func (c *EntityClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *EntityClient) GetWatchlist(ctx context.Context, req *chroniclepb.GetWatchlistRequest, ...) (*chroniclepb.Watchlist, error)
- func (c *EntityClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *EntityClient) ListWatchlists(ctx context.Context, req *chroniclepb.ListWatchlistsRequest, ...) *WatchlistIterator
- func (c *EntityClient) UpdateWatchlist(ctx context.Context, req *chroniclepb.UpdateWatchlistRequest, ...) (*chroniclepb.Watchlist, error)
- type FeaturedContentNativeDashboardCallOptions
- type FeaturedContentNativeDashboardClient
- func (c *FeaturedContentNativeDashboardClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *FeaturedContentNativeDashboardClient) Close() error
- func (c *FeaturedContentNativeDashboardClient) Connection() *grpc.ClientConndeprecated
- func (c *FeaturedContentNativeDashboardClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *FeaturedContentNativeDashboardClient) GetFeaturedContentNativeDashboard(ctx context.Context, req *chroniclepb.GetFeaturedContentNativeDashboardRequest, ...) (*chroniclepb.FeaturedContentNativeDashboard, error)
- func (c *FeaturedContentNativeDashboardClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *FeaturedContentNativeDashboardClient) InstallFeaturedContentNativeDashboard(ctx context.Context, ...) (*chroniclepb.InstallFeaturedContentNativeDashboardResponse, error)
- func (c *FeaturedContentNativeDashboardClient) ListFeaturedContentNativeDashboards(ctx context.Context, ...) *FeaturedContentNativeDashboardIterator
- func (c *FeaturedContentNativeDashboardClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- type FeaturedContentNativeDashboardIterator
- func (it *FeaturedContentNativeDashboardIterator) All() iter.Seq2[*chroniclepb.FeaturedContentNativeDashboard, error]
- func (it *FeaturedContentNativeDashboardIterator) Next() (*chroniclepb.FeaturedContentNativeDashboard, error)
- func (it *FeaturedContentNativeDashboardIterator) PageInfo() *iterator.PageInfo
- type InstanceCallOptions
- type InstanceClient
- func (c *InstanceClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *InstanceClient) Close() error
- func (c *InstanceClient) Connection() *grpc.ClientConndeprecated
- func (c *InstanceClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *InstanceClient) GetInstance(ctx context.Context, req *chroniclepb.GetInstanceRequest, ...) (*chroniclepb.Instance, error)
- func (c *InstanceClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *InstanceClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- type NativeDashboardCallOptions
- type NativeDashboardClient
- func (c *NativeDashboardClient) AddChart(ctx context.Context, req *chroniclepb.AddChartRequest, opts ...gax.CallOption) (*chroniclepb.AddChartResponse, error)
- func (c *NativeDashboardClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *NativeDashboardClient) Close() error
- func (c *NativeDashboardClient) Connection() *grpc.ClientConndeprecated
- func (c *NativeDashboardClient) CreateNativeDashboard(ctx context.Context, req *chroniclepb.CreateNativeDashboardRequest, ...) (*chroniclepb.NativeDashboard, error)
- func (c *NativeDashboardClient) DeleteNativeDashboard(ctx context.Context, req *chroniclepb.DeleteNativeDashboardRequest, ...) error
- func (c *NativeDashboardClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *NativeDashboardClient) DuplicateChart(ctx context.Context, req *chroniclepb.DuplicateChartRequest, ...) (*chroniclepb.DuplicateChartResponse, error)
- func (c *NativeDashboardClient) DuplicateNativeDashboard(ctx context.Context, req *chroniclepb.DuplicateNativeDashboardRequest, ...) (*chroniclepb.NativeDashboard, error)
- func (c *NativeDashboardClient) EditChart(ctx context.Context, req *chroniclepb.EditChartRequest, opts ...gax.CallOption) (*chroniclepb.EditChartResponse, error)
- func (c *NativeDashboardClient) ExportNativeDashboards(ctx context.Context, req *chroniclepb.ExportNativeDashboardsRequest, ...) (*chroniclepb.ExportNativeDashboardsResponse, error)
- func (c *NativeDashboardClient) GetNativeDashboard(ctx context.Context, req *chroniclepb.GetNativeDashboardRequest, ...) (*chroniclepb.NativeDashboard, error)
- func (c *NativeDashboardClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *NativeDashboardClient) ImportNativeDashboards(ctx context.Context, req *chroniclepb.ImportNativeDashboardsRequest, ...) (*chroniclepb.ImportNativeDashboardsResponse, error)
- func (c *NativeDashboardClient) ListNativeDashboards(ctx context.Context, req *chroniclepb.ListNativeDashboardsRequest, ...) *NativeDashboardIterator
- func (c *NativeDashboardClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *NativeDashboardClient) RemoveChart(ctx context.Context, req *chroniclepb.RemoveChartRequest, ...) (*chroniclepb.NativeDashboard, error)
- func (c *NativeDashboardClient) UpdateNativeDashboard(ctx context.Context, req *chroniclepb.UpdateNativeDashboardRequest, ...) (*chroniclepb.NativeDashboard, error)
- type NativeDashboardIterator
- type OperationIterator
- type ReferenceListCallOptions
- type ReferenceListClient
- func (c *ReferenceListClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *ReferenceListClient) Close() error
- func (c *ReferenceListClient) Connection() *grpc.ClientConndeprecated
- func (c *ReferenceListClient) CreateReferenceList(ctx context.Context, req *chroniclepb.CreateReferenceListRequest, ...) (*chroniclepb.ReferenceList, error)
- func (c *ReferenceListClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *ReferenceListClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *ReferenceListClient) GetReferenceList(ctx context.Context, req *chroniclepb.GetReferenceListRequest, ...) (*chroniclepb.ReferenceList, error)
- func (c *ReferenceListClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *ReferenceListClient) ListReferenceLists(ctx context.Context, req *chroniclepb.ListReferenceListsRequest, ...) *ReferenceListIterator
- func (c *ReferenceListClient) UpdateReferenceList(ctx context.Context, req *chroniclepb.UpdateReferenceListRequest, ...) (*chroniclepb.ReferenceList, error)
- type ReferenceListIterator
- type RetrohuntIterator
- type RuleCallOptions
- type RuleClient
- func (c *RuleClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, ...) error
- func (c *RuleClient) Close() error
- func (c *RuleClient) Connection() *grpc.ClientConndeprecated
- func (c *RuleClient) CreateRetrohunt(ctx context.Context, req *chroniclepb.CreateRetrohuntRequest, ...) (*CreateRetrohuntOperation, error)
- func (c *RuleClient) CreateRetrohuntOperation(name string) *CreateRetrohuntOperation
- func (c *RuleClient) CreateRule(ctx context.Context, req *chroniclepb.CreateRuleRequest, ...) (*chroniclepb.Rule, error)
- func (c *RuleClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, ...) error
- func (c *RuleClient) DeleteRule(ctx context.Context, req *chroniclepb.DeleteRuleRequest, ...) error
- func (c *RuleClient) GetOperation(ctx context.Context, req *longrunningpb.GetOperationRequest, ...) (*longrunningpb.Operation, error)
- func (c *RuleClient) GetRetrohunt(ctx context.Context, req *chroniclepb.GetRetrohuntRequest, ...) (*chroniclepb.Retrohunt, error)
- func (c *RuleClient) GetRule(ctx context.Context, req *chroniclepb.GetRuleRequest, opts ...gax.CallOption) (*chroniclepb.Rule, error)
- func (c *RuleClient) GetRuleDeployment(ctx context.Context, req *chroniclepb.GetRuleDeploymentRequest, ...) (*chroniclepb.RuleDeployment, error)
- func (c *RuleClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, ...) *OperationIterator
- func (c *RuleClient) ListRetrohunts(ctx context.Context, req *chroniclepb.ListRetrohuntsRequest, ...) *RetrohuntIterator
- func (c *RuleClient) ListRuleDeployments(ctx context.Context, req *chroniclepb.ListRuleDeploymentsRequest, ...) *RuleDeploymentIterator
- func (c *RuleClient) ListRuleRevisions(ctx context.Context, req *chroniclepb.ListRuleRevisionsRequest, ...) *RuleIterator
- func (c *RuleClient) ListRules(ctx context.Context, req *chroniclepb.ListRulesRequest, opts ...gax.CallOption) *RuleIterator
- func (c *RuleClient) UpdateRule(ctx context.Context, req *chroniclepb.UpdateRuleRequest, ...) (*chroniclepb.Rule, error)
- func (c *RuleClient) UpdateRuleDeployment(ctx context.Context, req *chroniclepb.UpdateRuleDeploymentRequest, ...) (*chroniclepb.RuleDeployment, error)
- type RuleDeploymentIterator
- type RuleIterator
- type WatchlistIterator
Examples ¶
- BigQueryExportClient.CancelOperation
- BigQueryExportClient.DeleteOperation
- BigQueryExportClient.GetBigQueryExport
- BigQueryExportClient.GetOperation
- BigQueryExportClient.ListOperations
- BigQueryExportClient.ListOperations (All)
- BigQueryExportClient.ProvisionBigQueryExport
- BigQueryExportClient.UpdateBigQueryExport
- DashboardChartClient.BatchGetDashboardCharts
- DashboardChartClient.CancelOperation
- DashboardChartClient.DeleteOperation
- DashboardChartClient.GetDashboardChart
- DashboardChartClient.GetOperation
- DashboardChartClient.ListOperations
- DashboardChartClient.ListOperations (All)
- DashboardQueryClient.CancelOperation
- DashboardQueryClient.DeleteOperation
- DashboardQueryClient.ExecuteDashboardQuery
- DashboardQueryClient.GetDashboardQuery
- DashboardQueryClient.GetOperation
- DashboardQueryClient.ListOperations
- DashboardQueryClient.ListOperations (All)
- DataAccessControlClient.CancelOperation
- DataAccessControlClient.CreateDataAccessLabel
- DataAccessControlClient.CreateDataAccessScope
- DataAccessControlClient.DeleteDataAccessLabel
- DataAccessControlClient.DeleteDataAccessScope
- DataAccessControlClient.DeleteOperation
- DataAccessControlClient.GetDataAccessLabel
- DataAccessControlClient.GetDataAccessScope
- DataAccessControlClient.GetOperation
- DataAccessControlClient.ListDataAccessLabels
- DataAccessControlClient.ListDataAccessLabels (All)
- DataAccessControlClient.ListDataAccessScopes
- DataAccessControlClient.ListDataAccessScopes (All)
- DataAccessControlClient.ListOperations
- DataAccessControlClient.ListOperations (All)
- DataAccessControlClient.UpdateDataAccessLabel
- DataAccessControlClient.UpdateDataAccessScope
- DataTableClient.BulkCreateDataTableRows
- DataTableClient.BulkGetDataTableRows
- DataTableClient.BulkReplaceDataTableRows
- DataTableClient.BulkUpdateDataTableRows
- DataTableClient.CancelOperation
- DataTableClient.CreateDataTable
- DataTableClient.CreateDataTableRow
- DataTableClient.DeleteDataTable
- DataTableClient.DeleteDataTableRow
- DataTableClient.DeleteOperation
- DataTableClient.GetDataTable
- DataTableClient.GetDataTableOperationErrors
- DataTableClient.GetDataTableRow
- DataTableClient.GetOperation
- DataTableClient.ListDataTableRows
- DataTableClient.ListDataTableRows (All)
- DataTableClient.ListDataTables
- DataTableClient.ListDataTables (All)
- DataTableClient.ListOperations
- DataTableClient.ListOperations (All)
- DataTableClient.UpdateDataTable
- DataTableClient.UpdateDataTableRow
- EntityClient.CancelOperation
- EntityClient.CreateWatchlist
- EntityClient.DeleteOperation
- EntityClient.DeleteWatchlist
- EntityClient.GetOperation
- EntityClient.GetWatchlist
- EntityClient.ListOperations
- EntityClient.ListOperations (All)
- EntityClient.ListWatchlists
- EntityClient.ListWatchlists (All)
- EntityClient.UpdateWatchlist
- FeaturedContentNativeDashboardClient.CancelOperation
- FeaturedContentNativeDashboardClient.DeleteOperation
- FeaturedContentNativeDashboardClient.GetFeaturedContentNativeDashboard
- FeaturedContentNativeDashboardClient.GetOperation
- FeaturedContentNativeDashboardClient.InstallFeaturedContentNativeDashboard
- FeaturedContentNativeDashboardClient.ListFeaturedContentNativeDashboards
- FeaturedContentNativeDashboardClient.ListFeaturedContentNativeDashboards (All)
- FeaturedContentNativeDashboardClient.ListOperations
- FeaturedContentNativeDashboardClient.ListOperations (All)
- InstanceClient.CancelOperation
- InstanceClient.DeleteOperation
- InstanceClient.GetInstance
- InstanceClient.GetOperation
- InstanceClient.ListOperations
- InstanceClient.ListOperations (All)
- NativeDashboardClient.AddChart
- NativeDashboardClient.CancelOperation
- NativeDashboardClient.CreateNativeDashboard
- NativeDashboardClient.DeleteNativeDashboard
- NativeDashboardClient.DeleteOperation
- NativeDashboardClient.DuplicateChart
- NativeDashboardClient.DuplicateNativeDashboard
- NativeDashboardClient.EditChart
- NativeDashboardClient.ExportNativeDashboards
- NativeDashboardClient.GetNativeDashboard
- NativeDashboardClient.GetOperation
- NativeDashboardClient.ImportNativeDashboards
- NativeDashboardClient.ListNativeDashboards
- NativeDashboardClient.ListNativeDashboards (All)
- NativeDashboardClient.ListOperations
- NativeDashboardClient.ListOperations (All)
- NativeDashboardClient.RemoveChart
- NativeDashboardClient.UpdateNativeDashboard
- NewBigQueryExportClient
- NewBigQueryExportRESTClient
- NewDashboardChartClient
- NewDashboardChartRESTClient
- NewDashboardQueryClient
- NewDashboardQueryRESTClient
- NewDataAccessControlClient
- NewDataAccessControlRESTClient
- NewDataTableClient
- NewDataTableRESTClient
- NewEntityClient
- NewEntityRESTClient
- NewFeaturedContentNativeDashboardClient
- NewFeaturedContentNativeDashboardRESTClient
- NewInstanceClient
- NewInstanceRESTClient
- NewNativeDashboardClient
- NewNativeDashboardRESTClient
- NewReferenceListClient
- NewReferenceListRESTClient
- NewRuleClient
- NewRuleRESTClient
- ReferenceListClient.CancelOperation
- ReferenceListClient.CreateReferenceList
- ReferenceListClient.DeleteOperation
- ReferenceListClient.GetOperation
- ReferenceListClient.GetReferenceList
- ReferenceListClient.ListOperations
- ReferenceListClient.ListOperations (All)
- ReferenceListClient.ListReferenceLists
- ReferenceListClient.ListReferenceLists (All)
- ReferenceListClient.UpdateReferenceList
- RuleClient.CancelOperation
- RuleClient.CreateRetrohunt
- RuleClient.CreateRule
- RuleClient.DeleteOperation
- RuleClient.DeleteRule
- RuleClient.GetOperation
- RuleClient.GetRetrohunt
- RuleClient.GetRule
- RuleClient.GetRuleDeployment
- RuleClient.ListOperations
- RuleClient.ListOperations (All)
- RuleClient.ListRetrohunts
- RuleClient.ListRetrohunts (All)
- RuleClient.ListRuleDeployments
- RuleClient.ListRuleDeployments (All)
- RuleClient.ListRuleRevisions
- RuleClient.ListRuleRevisions (All)
- RuleClient.ListRules
- RuleClient.ListRules (All)
- RuleClient.UpdateRule
- RuleClient.UpdateRuleDeployment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAuthScopes ¶
func DefaultAuthScopes() []string
DefaultAuthScopes reports the default set of authentication scopes to use with this package.
Types ¶
type BigQueryExportCallOptions ¶ added in v0.7.0
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.
type BigQueryExportClient ¶ added in v0.7.0
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 ¶ added in v0.7.0
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
}
Output:
func NewBigQueryExportRESTClient ¶ added in v0.7.0
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
}
Output:
func (*BigQueryExportClient) CancelOperation ¶ added in v0.7.0
func (c *BigQueryExportClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*BigQueryExportClient) Close ¶ added in v0.7.0
func (c *BigQueryExportClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*BigQueryExportClient) Connection
deprecated
added in
v0.7.0
func (c *BigQueryExportClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*BigQueryExportClient) DeleteOperation ¶ added in v0.7.0
func (c *BigQueryExportClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*BigQueryExportClient) GetBigQueryExport ¶ added in v0.7.0
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
}
Output:
func (*BigQueryExportClient) GetOperation ¶ added in v0.7.0
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
}
Output:
func (*BigQueryExportClient) ListOperations ¶ added in v0.7.0
func (c *BigQueryExportClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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)
}
}
Output:
Example (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
}
}
Output:
func (*BigQueryExportClient) ProvisionBigQueryExport ¶ added in v0.7.0
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
}
Output:
func (*BigQueryExportClient) UpdateBigQueryExport ¶ added in v0.7.0
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
}
Output:
type CreateRetrohuntOperation ¶
type CreateRetrohuntOperation struct {
// contains filtered or unexported fields
}
CreateRetrohuntOperation manages a long-running operation from CreateRetrohunt.
func (*CreateRetrohuntOperation) Done ¶
func (op *CreateRetrohuntOperation) Done() bool
Done 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() string
Name returns the name of the long-running operation. The name is assigned by the server and is unique within the service from which the operation is created.
func (*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.
type DashboardChartCallOptions ¶ added in v0.7.0
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.
type DashboardChartClient ¶ added in v0.7.0
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 ¶ added in v0.7.0
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
}
Output:
func NewDashboardChartRESTClient ¶ added in v0.7.0
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
}
Output:
func (*DashboardChartClient) BatchGetDashboardCharts ¶ added in v0.7.0
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
}
Output:
func (*DashboardChartClient) CancelOperation ¶ added in v0.7.0
func (c *DashboardChartClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*DashboardChartClient) Close ¶ added in v0.7.0
func (c *DashboardChartClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*DashboardChartClient) Connection
deprecated
added in
v0.7.0
func (c *DashboardChartClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*DashboardChartClient) DeleteOperation ¶ added in v0.7.0
func (c *DashboardChartClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*DashboardChartClient) GetDashboardChart ¶ added in v0.7.0
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
}
Output:
func (*DashboardChartClient) GetOperation ¶ added in v0.7.0
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
}
Output:
func (*DashboardChartClient) ListOperations ¶ added in v0.7.0
func (c *DashboardChartClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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)
}
}
Output:
Example (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
}
}
Output:
type DashboardQueryCallOptions ¶ added in v0.7.0
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.
type DashboardQueryClient ¶ added in v0.7.0
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 ¶ added in v0.7.0
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
}
Output:
func NewDashboardQueryRESTClient ¶ added in v0.7.0
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
}
Output:
func (*DashboardQueryClient) CancelOperation ¶ added in v0.7.0
func (c *DashboardQueryClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*DashboardQueryClient) Close ¶ added in v0.7.0
func (c *DashboardQueryClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*DashboardQueryClient) Connection
deprecated
added in
v0.7.0
func (c *DashboardQueryClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*DashboardQueryClient) DeleteOperation ¶ added in v0.7.0
func (c *DashboardQueryClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*DashboardQueryClient) ExecuteDashboardQuery ¶ added in v0.7.0
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
}
Output:
func (*DashboardQueryClient) GetDashboardQuery ¶ added in v0.7.0
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
}
Output:
func (*DashboardQueryClient) GetOperation ¶ added in v0.7.0
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
}
Output:
func (*DashboardQueryClient) ListOperations ¶ added in v0.7.0
func (c *DashboardQueryClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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)
}
}
Output:
Example (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
}
}
Output:
type 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.
type 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
}
Output:
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
}
Output:
func (*DataAccessControlClient) CancelOperation ¶
func (c *DataAccessControlClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*DataAccessControlClient) Close ¶
func (c *DataAccessControlClient) Close() error
Close 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.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*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
}
Output:
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
}
Output:
func (*DataAccessControlClient) DeleteDataAccessLabel ¶
func (c *DataAccessControlClient) DeleteDataAccessLabel(ctx context.Context, req *chroniclepb.DeleteDataAccessLabelRequest, opts ...gax.CallOption) error
DeleteDataAccessLabel 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.
}
}
Output:
func (*DataAccessControlClient) DeleteDataAccessScope ¶
func (c *DataAccessControlClient) DeleteDataAccessScope(ctx context.Context, req *chroniclepb.DeleteDataAccessScopeRequest, opts ...gax.CallOption) error
DeleteDataAccessScope 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.
}
}
Output:
func (*DataAccessControlClient) DeleteOperation ¶
func (c *DataAccessControlClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
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
}
Output:
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
}
Output:
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
}
Output:
func (*DataAccessControlClient) ListDataAccessLabels ¶
func (c *DataAccessControlClient) ListDataAccessLabels(ctx context.Context, req *chroniclepb.ListDataAccessLabelsRequest, opts ...gax.CallOption) *DataAccessLabelIterator
ListDataAccessLabels lists all data access labels for the customer.
Example ¶
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)
}
}
Output:
Example (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
}
}
Output:
func (*DataAccessControlClient) ListDataAccessScopes ¶
func (c *DataAccessControlClient) ListDataAccessScopes(ctx context.Context, req *chroniclepb.ListDataAccessScopesRequest, opts ...gax.CallOption) *DataAccessScopeIterator
ListDataAccessScopes lists all existing data access scopes for the customer.
Example ¶
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)
}
}
Output:
Example (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
}
}
Output:
func (*DataAccessControlClient) ListOperations ¶
func (c *DataAccessControlClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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)
}
}
Output:
Example (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
}
}
Output:
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
}
Output:
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
}
Output:
type 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.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type 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.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type DataTableCallOptions ¶ added in v0.6.0
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.
type DataTableClient ¶ added in v0.6.0
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 ¶ added in v0.6.0
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
}
Output:
func NewDataTableRESTClient ¶ added in v0.6.0
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
}
Output:
func (*DataTableClient) BulkCreateDataTableRows ¶ added in v0.6.0
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
}
Output:
func (*DataTableClient) BulkGetDataTableRows ¶ added in v0.6.0
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
}
Output:
func (*DataTableClient) BulkReplaceDataTableRows ¶ added in v0.6.0
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
}
Output:
func (*DataTableClient) BulkUpdateDataTableRows ¶ added in v0.6.0
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
}
Output:
func (*DataTableClient) CancelOperation ¶ added in v0.6.0
func (c *DataTableClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*DataTableClient) Close ¶ added in v0.6.0
func (c *DataTableClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*DataTableClient) Connection
deprecated
added in
v0.6.0
func (c *DataTableClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*DataTableClient) CreateDataTable ¶ added in v0.6.0
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
}
Output:
func (*DataTableClient) CreateDataTableRow ¶ added in v0.6.0
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
}
Output:
func (*DataTableClient) DeleteDataTable ¶ added in v0.6.0
func (c *DataTableClient) DeleteDataTable(ctx context.Context, req *chroniclepb.DeleteDataTableRequest, opts ...gax.CallOption) error
DeleteDataTable 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.
}
}
Output:
func (*DataTableClient) DeleteDataTableRow ¶ added in v0.6.0
func (c *DataTableClient) DeleteDataTableRow(ctx context.Context, req *chroniclepb.DeleteDataTableRowRequest, opts ...gax.CallOption) error
DeleteDataTableRow 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.
}
}
Output:
func (*DataTableClient) DeleteOperation ¶ added in v0.6.0
func (c *DataTableClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*DataTableClient) GetDataTable ¶ added in v0.6.0
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
}
Output:
func (*DataTableClient) GetDataTableOperationErrors ¶ added in v0.6.0
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
}
Output:
func (*DataTableClient) GetDataTableRow ¶ added in v0.6.0
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
}
Output:
func (*DataTableClient) GetOperation ¶ added in v0.6.0
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
}
Output:
func (*DataTableClient) ListDataTableRows ¶ added in v0.6.0
func (c *DataTableClient) ListDataTableRows(ctx context.Context, req *chroniclepb.ListDataTableRowsRequest, opts ...gax.CallOption) *DataTableRowIterator
ListDataTableRows list data table rows.
Example ¶
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)
}
}
Output:
Example (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
}
}
Output:
func (*DataTableClient) ListDataTables ¶ added in v0.6.0
func (c *DataTableClient) ListDataTables(ctx context.Context, req *chroniclepb.ListDataTablesRequest, opts ...gax.CallOption) *DataTableIterator
ListDataTables list data tables.
Example ¶
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)
}
}
Output:
Example (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
}
}
Output:
func (*DataTableClient) ListOperations ¶ added in v0.6.0
func (c *DataTableClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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)
}
}
Output:
Example (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
}
}
Output:
func (*DataTableClient) UpdateDataTable ¶ added in v0.6.0
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
}
Output:
func (*DataTableClient) UpdateDataTableRow ¶ added in v0.6.0
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
}
Output:
type DataTableIterator ¶ added in v0.6.0
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 ¶ added in v0.6.0
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 ¶ added in v0.6.0
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 ¶ added in v0.6.0
func (it *DataTableIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type DataTableRowIterator ¶ added in v0.6.0
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 ¶ added in v0.6.0
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 ¶ added in v0.6.0
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 ¶ added in v0.6.0
func (it *DataTableRowIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type 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.
type 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
}
Output:
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
}
Output:
func (*EntityClient) CancelOperation ¶
func (c *EntityClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*EntityClient) Close ¶
func (c *EntityClient) Close() error
Close 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.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*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
}
Output:
func (*EntityClient) DeleteOperation ¶
func (c *EntityClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*EntityClient) DeleteWatchlist ¶
func (c *EntityClient) DeleteWatchlist(ctx context.Context, req *chroniclepb.DeleteWatchlistRequest, opts ...gax.CallOption) error
DeleteWatchlist 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.
}
}
Output:
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
}
Output:
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
}
Output:
func (*EntityClient) ListOperations ¶
func (c *EntityClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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)
}
}
Output:
Example (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
}
}
Output:
func (*EntityClient) ListWatchlists ¶
func (c *EntityClient) ListWatchlists(ctx context.Context, req *chroniclepb.ListWatchlistsRequest, opts ...gax.CallOption) *WatchlistIterator
ListWatchlists lists all watchlists for the given instance.
Example ¶
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)
}
}
Output:
Example (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
}
}
Output:
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
}
Output:
type FeaturedContentNativeDashboardCallOptions ¶ added in v0.7.0
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.
type FeaturedContentNativeDashboardClient ¶ added in v0.7.0
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 ¶ added in v0.7.0
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
}
Output:
func NewFeaturedContentNativeDashboardRESTClient ¶ added in v0.7.0
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
}
Output:
func (*FeaturedContentNativeDashboardClient) CancelOperation ¶ added in v0.7.0
func (c *FeaturedContentNativeDashboardClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*FeaturedContentNativeDashboardClient) Close ¶ added in v0.7.0
func (c *FeaturedContentNativeDashboardClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*FeaturedContentNativeDashboardClient) Connection
deprecated
added in
v0.7.0
func (c *FeaturedContentNativeDashboardClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*FeaturedContentNativeDashboardClient) DeleteOperation ¶ added in v0.7.0
func (c *FeaturedContentNativeDashboardClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*FeaturedContentNativeDashboardClient) GetFeaturedContentNativeDashboard ¶ added in v0.7.0
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
}
Output:
func (*FeaturedContentNativeDashboardClient) GetOperation ¶ added in v0.7.0
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
}
Output:
func (*FeaturedContentNativeDashboardClient) InstallFeaturedContentNativeDashboard ¶ added in v0.7.0
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
}
Output:
func (*FeaturedContentNativeDashboardClient) ListFeaturedContentNativeDashboards ¶ added in v0.7.0
func (c *FeaturedContentNativeDashboardClient) ListFeaturedContentNativeDashboards(ctx context.Context, req *chroniclepb.ListFeaturedContentNativeDashboardsRequest, opts ...gax.CallOption) *FeaturedContentNativeDashboardIterator
ListFeaturedContentNativeDashboards list all native dashboards featured content.
Example ¶
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)
}
}
Output:
Example (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
}
}
Output:
func (*FeaturedContentNativeDashboardClient) ListOperations ¶ added in v0.7.0
func (c *FeaturedContentNativeDashboardClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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)
}
}
Output:
Example (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
}
}
Output:
type FeaturedContentNativeDashboardIterator ¶ added in v0.7.0
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 ¶ added in v0.7.0
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 ¶ added in v0.7.0
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 ¶ added in v0.7.0
func (it *FeaturedContentNativeDashboardIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type 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.
type 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
}
Output:
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
}
Output:
func (*InstanceClient) CancelOperation ¶
func (c *InstanceClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*InstanceClient) Close ¶
func (c *InstanceClient) Close() error
Close 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.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*InstanceClient) DeleteOperation ¶
func (c *InstanceClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
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
}
Output:
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
}
Output:
func (*InstanceClient) ListOperations ¶
func (c *InstanceClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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)
}
}
Output:
Example (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
}
}
Output:
type NativeDashboardCallOptions ¶ added in v0.7.0
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.
type NativeDashboardClient ¶ added in v0.7.0
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 ¶ added in v0.7.0
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
}
Output:
func NewNativeDashboardRESTClient ¶ added in v0.7.0
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
}
Output:
func (*NativeDashboardClient) AddChart ¶ added in v0.7.0
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
}
Output:
func (*NativeDashboardClient) CancelOperation ¶ added in v0.7.0
func (c *NativeDashboardClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*NativeDashboardClient) Close ¶ added in v0.7.0
func (c *NativeDashboardClient) Close() error
Close closes the connection to the API service. The user should invoke this when the client is no longer required.
func (*NativeDashboardClient) Connection
deprecated
added in
v0.7.0
func (c *NativeDashboardClient) Connection() *grpc.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*NativeDashboardClient) CreateNativeDashboard ¶ added in v0.7.0
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
}
Output:
func (*NativeDashboardClient) DeleteNativeDashboard ¶ added in v0.7.0
func (c *NativeDashboardClient) DeleteNativeDashboard(ctx context.Context, req *chroniclepb.DeleteNativeDashboardRequest, opts ...gax.CallOption) error
DeleteNativeDashboard 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.
}
}
Output:
func (*NativeDashboardClient) DeleteOperation ¶ added in v0.7.0
func (c *NativeDashboardClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*NativeDashboardClient) DuplicateChart ¶ added in v0.7.0
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
}
Output:
func (*NativeDashboardClient) DuplicateNativeDashboard ¶ added in v0.7.0
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
}
Output:
func (*NativeDashboardClient) EditChart ¶ added in v0.7.0
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
}
Output:
func (*NativeDashboardClient) ExportNativeDashboards ¶ added in v0.7.0
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
}
Output:
func (*NativeDashboardClient) GetNativeDashboard ¶ added in v0.7.0
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
}
Output:
func (*NativeDashboardClient) GetOperation ¶ added in v0.7.0
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
}
Output:
func (*NativeDashboardClient) ImportNativeDashboards ¶ added in v0.7.0
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
}
Output:
func (*NativeDashboardClient) ListNativeDashboards ¶ added in v0.7.0
func (c *NativeDashboardClient) ListNativeDashboards(ctx context.Context, req *chroniclepb.ListNativeDashboardsRequest, opts ...gax.CallOption) *NativeDashboardIterator
ListNativeDashboards list all dashboards.
Example ¶
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)
}
}
Output:
Example (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
}
}
Output:
func (*NativeDashboardClient) ListOperations ¶ added in v0.7.0
func (c *NativeDashboardClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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)
}
}
Output:
Example (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
}
}
Output:
func (*NativeDashboardClient) RemoveChart ¶ added in v0.7.0
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
}
Output:
func (*NativeDashboardClient) UpdateNativeDashboard ¶ added in v0.7.0
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
}
Output:
type NativeDashboardIterator ¶ added in v0.7.0
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 ¶ added in v0.7.0
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 ¶ added in v0.7.0
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 ¶ added in v0.7.0
func (it *NativeDashboardIterator) PageInfo() *iterator.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type 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.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type 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.
type 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
}
Output:
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
}
Output:
func (*ReferenceListClient) CancelOperation ¶
func (c *ReferenceListClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*ReferenceListClient) Close ¶
func (c *ReferenceListClient) Close() error
Close 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.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*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
}
Output:
func (*ReferenceListClient) DeleteOperation ¶
func (c *ReferenceListClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
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
}
Output:
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
}
Output:
func (*ReferenceListClient) ListOperations ¶
func (c *ReferenceListClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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)
}
}
Output:
Example (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
}
}
Output:
func (*ReferenceListClient) ListReferenceLists ¶
func (c *ReferenceListClient) ListReferenceLists(ctx context.Context, req *chroniclepb.ListReferenceListsRequest, opts ...gax.CallOption) *ReferenceListIterator
ListReferenceLists lists a collection of reference lists.
Example ¶
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)
}
}
Output:
Example (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
}
}
Output:
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
}
Output:
type 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.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type 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.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type 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.
type 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
}
Output:
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
}
Output:
func (*RuleClient) CancelOperation ¶
func (c *RuleClient) CancelOperation(ctx context.Context, req *longrunningpb.CancelOperationRequest, opts ...gax.CallOption) error
CancelOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*RuleClient) Close ¶
func (c *RuleClient) Close() error
Close 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.ClientConn
Connection returns a connection to the API service.
Deprecated: Connections are now pooled so this method does not always return the same resource.
func (*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
}
Output:
func (*RuleClient) CreateRetrohuntOperation ¶
func (c *RuleClient) CreateRetrohuntOperation(name string) *CreateRetrohuntOperation
CreateRetrohuntOperation 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
}
Output:
func (*RuleClient) DeleteOperation ¶
func (c *RuleClient) DeleteOperation(ctx context.Context, req *longrunningpb.DeleteOperationRequest, opts ...gax.CallOption) error
DeleteOperation is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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.
}
}
Output:
func (*RuleClient) DeleteRule ¶
func (c *RuleClient) DeleteRule(ctx context.Context, req *chroniclepb.DeleteRuleRequest, opts ...gax.CallOption) error
DeleteRule 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.
}
}
Output:
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
}
Output:
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
}
Output:
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
}
Output:
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
}
Output:
func (*RuleClient) ListOperations ¶
func (c *RuleClient) ListOperations(ctx context.Context, req *longrunningpb.ListOperationsRequest, opts ...gax.CallOption) *OperationIterator
ListOperations is a utility method from google.longrunning.Operations.
Example ¶
package main
import (
"context"
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)
}
}
Output:
Example (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
}
}
Output:
func (*RuleClient) ListRetrohunts ¶
func (c *RuleClient) ListRetrohunts(ctx context.Context, req *chroniclepb.ListRetrohuntsRequest, opts ...gax.CallOption) *RetrohuntIterator
ListRetrohunts list Retrohunts.
Example ¶
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)
}
}
Output:
Example (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
}
}
Output:
func (*RuleClient) ListRuleDeployments ¶
func (c *RuleClient) ListRuleDeployments(ctx context.Context, req *chroniclepb.ListRuleDeploymentsRequest, opts ...gax.CallOption) *RuleDeploymentIterator
ListRuleDeployments lists RuleDeployments across all Rules.
Example ¶
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)
}
}
Output:
Example (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
}
}
Output:
func (*RuleClient) ListRuleRevisions ¶
func (c *RuleClient) ListRuleRevisions(ctx context.Context, req *chroniclepb.ListRuleRevisionsRequest, opts ...gax.CallOption) *RuleIterator
ListRuleRevisions lists all revisions of the rule.
Example ¶
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)
}
}
Output:
Example (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
}
}
Output:
func (*RuleClient) ListRules ¶
func (c *RuleClient) ListRules(ctx context.Context, req *chroniclepb.ListRulesRequest, opts ...gax.CallOption) *RuleIterator
ListRules lists Rules.
Example ¶
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)
}
}
Output:
Example (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
}
}
Output:
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
}
Output:
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
}
Output:
type 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.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type 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.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
type 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.PageInfo
PageInfo supports pagination. See the google.golang.org/api/iterator package for details.
Source Files
¶
- auxiliary.go
- auxiliary_go123.go
- big_query_export_client.go
- dashboard_chart_client.go
- dashboard_query_client.go
- data_access_control_client.go
- data_table_client.go
- doc.go
- entity_client.go
- featured_content_native_dashboard_client.go
- helpers.go
- instance_client.go
- native_dashboard_client.go
- reference_list_client.go
- rule_client.go
- version.go