(OpenSCAP)
Requires that the openscap
plugin is installed on the server.
Get OpenSCAP reports for nodes.
- OpenscapReport - Get an OpenSCAP report
Get latest OpenSCAP report for the given node
package main
import(
rudder "github.com/infra-rdc/rudder-go"
"context"
"log"
)
func main() {
s := rudder.New(
rudder.WithSecurity("<YOUR_API_KEY_HERE>"),
)
var nodeID string = "9a1773c9-0889-40b6-be89-f6504443ac1b"
ctx := context.Background()
res, err := s.OpenSCAP.OpenscapReport(ctx, nodeID)
if err != nil {
log.Fatal(err)
}
if res.Res != nil {
// handle response
}
}
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
ctx |
context.Context | ✔️ | The context to use for the request. | |
nodeID |
string | ✔️ | Id of the target node | 9a1773c9-0889-40b6-be89-f6504443ac1b |
*operations.OpenscapReportResponse, error
Error Object | Status Code | Content Type |
---|---|---|
sdkerrors.SDKError | 4xx-5xx | / |