Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions api/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3295,6 +3295,23 @@ func (c *Client) UpsertAutoUpdateAgentReport(ctx context.Context, report *autoup
return resp, nil
}

// GetAutoUpdateBotInstanceReport gets the singleton auto-update bot report.
func (c *Client) GetAutoUpdateBotInstanceReport(ctx context.Context) (*autoupdatev1pb.AutoUpdateBotInstanceReport, error) {
client := autoupdatev1pb.NewAutoUpdateServiceClient(c.conn)
resp, err := client.GetAutoUpdateBotInstanceReport(ctx, &autoupdatev1pb.GetAutoUpdateBotInstanceReportRequest{})
if err != nil {
return nil, trace.Wrap(err)
}
return resp, nil
}

// DeleteAutoUpdateBotInstanceReport deletes the singleton auto-update bot instance report.
func (c *Client) DeleteAutoUpdateBotInstanceReport(ctx context.Context) error {
client := autoupdatev1pb.NewAutoUpdateServiceClient(c.conn)
_, err := client.DeleteAutoUpdateBotInstanceReport(ctx, &autoupdatev1pb.DeleteAutoUpdateBotInstanceReportRequest{})
return trace.Wrap(err)
}

// GetClusterAccessGraphConfig retrieves the Cluster Access Graph configuration from Auth server.
func (c *Client) GetClusterAccessGraphConfig(ctx context.Context) (*clusterconfigpb.AccessGraphConfig, error) {
rsp, err := c.ClusterConfigClient().GetClusterAccessGraphConfig(ctx, &clusterconfigpb.GetClusterAccessGraphConfigRequest{})
Expand Down
7 changes: 7 additions & 0 deletions api/client/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ func EventToGRPC(in types.Event) (*proto.Event, error) {
out.Resource = &proto.Event_AutoUpdateAgentReport{
AutoUpdateAgentReport: r,
}
case *autoupdate.AutoUpdateBotInstanceReport:
out.Resource = &proto.Event_AutoUpdateBotInstanceReport{
AutoUpdateBotInstanceReport: r,
}
case *identitycenterv1.Account:
out.Resource = &proto.Event_IdentityCenterAccount{
IdentityCenterAccount: r,
Expand Down Expand Up @@ -619,6 +623,9 @@ func EventFromGRPC(in *proto.Event) (*types.Event, error) {
} else if r := in.GetAutoUpdateAgentReport(); r != nil {
out.Resource = types.Resource153ToLegacy(r)
return &out, nil
} else if r := in.GetAutoUpdateBotInstanceReport(); r != nil {
out.Resource = types.Resource153ToLegacy(r)
return &out, nil
} else if r := in.GetUserTask(); r != nil {
out.Resource = types.Resource153ToLegacy(r)
return &out, nil
Expand Down
35 changes: 28 additions & 7 deletions api/client/proto/event.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading