Cloudbreak CLI Reference
Also available as:
PDF

audit list

Lists all audit events for a specific resource.

Sub-commands

blueprint List audit for blueprints

cluster List audit for clusters

credential List audit for credentials

database List audit for database configurations

imagecatalog List audit for image catalogs

ldap List audit for LDAP/AD configurations

recipe List audit for recipes

Required options

--resource-id [$VALUE] Id of a resource (You can obtain this ID from the output of cb <resource> describe)

Options

--output [$VALUE] Supported formats: json, yaml, table (default: “json”) [$CB_OUT_FORMAT]

--server [$VALUE] Cloudbreak server address [$CB_SERVER_ADDRESS]

--username [$VALUE] Cloudbreak user name (e-mail address) [$CB_USER_NAME]

--password [$VALUE] Cloudbreak password [$CB_PASSWORD]

--workspace [$VALUE] Name of the workspace holding the resource

--profile [$VALUE] Selects a config profile to use [$CB_PROFILE]

--auth-type [$VALUE] Authentication method to use. Values: oauth2, basic [$CB_AUTH_TYPE]

Examples

Lists all audit events for a specific RDS configuration with a resource id of 3782:

cb audit list database --resource-id 3782
[
  {
    "Audit": {
      "auditId": 196452,
      "duration": 27,
      "operation": {
        "account": "48c9ee87-f5f4-4749-97ca-085ac7bb1a1c",
        "cloudbreakId": "qa-cloudbreak-280dev355-7d59d87cdc-d8845",
        "cloudbreakVersion": "2.8.0-dev.355",
        "eventType": "REST",
        "resourceId": 3782,
        "resourceType": "rdsconfigs",
        "timestamp": 1534288440363,
        "userId": "48c9ee87-f5f4-4749-97ca-085ac7bb1a1c",
        "userName": "test@hortonworks.com",
        "zonedDateTime": "2018-08-14T23:14:00.363Z"
      },
      "rawRestEvent": {
        "duration": 27,
        "operation": {
          "account": "48c9ee87-f5f4-4749-97ca-085ac7bb1a1c",
          "cloudbreakId": "qa-cloudbreak-280dev355-7d59d87cdc-d8845",
          "cloudbreakVersion": "2.8.0-dev.355",
          "eventType": "REST",
          "resourceId": 3782,
          "resourceType": "rdsconfigs",
          "timestamp": 1534288440363,
          "userId": "48c9ee87-f5f4-4749-97ca-085ac7bb1a1c",
          "userName": "dbialek@hortonworks.com",
          "zonedDateTime": "2018-08-14T23:14:00.363Z"
        },
        "restCall": {
          "duration": 27,
          "restRequest": {
            "body": "eyJjb25uZWN0aW9uVVJMIjoiamRiYzpwb3N0Z3Jlc3FsOi8vaGl2ZWRiLmNyamR1amtheWJndi51cy1lYXN0LTEucmRzLmFtYXpvbmF3cy5jb206NTQzMi9hbWJhcmlkYiIsIm5hbWUiOiJhbWJhcmktcmQiLCJ0eXBlIjoiQU1CQVJJIiwiY29ubmVjdG9ySmFyVXJsIjpudWxsLCJjb25uZWN0aW9uVXNlck5hbWUiOiJkYmlhbGVrIiwiY29ubmVjdGlvblBhc3N3b3JkIjoiKioqKiJ9Cg==",
            "headers": {
              "connection": "close",
              "content-length": "225",
              "content-type": "application/json",
              "host": "qa-cloudbreak-canary.qa.svc.l42scl.hortonworks.com:8080",
              "trackingid": "0ef86b9a-6505-4474-b6e8-7ab7fec9bc03"
            },
            "mediaType": "application/json",
            "method": "POST",
            "requestUri": "http://qa-cloudbreak-canary.qa.svc.l42scl.hortonworks.com:8080/cb/api/v1/rdsconfigs/user"
          },
          "restResponse": {
            "body": "eyJuYW1lIjoiYW1iYXJpLXJkIiwiY29ubmVjdGlvblVSTCI6ImpkYmM6cG9zdGdyZXNxbDovL2hpdmVkYi5jcmpkdWprYXliZ3YudXMtZWFzdC0xLnJkcy5hbWF6b25hd3MuY29tOjU0MzIvYW1iYXJpZGIiLCJ0eXBlIjoiQU1CQVJJIiwiY29ubmVjdG9ySmFyVXJsIjpudWxsLCJpZCI6Mzc4MiwiY3JlYXRpb25EYXRlIjoxNTM0Mjg4NDQwMzY3LCJwdWJsaWNJbkFjY291bnQiOmZhbHNlLCJjbHVzdGVyTmFtZXMiOltdLCJzdGFja1ZlcnNpb24iOm51bGwsImRhdGFiYXNlRW5naW5lIjoiUE9TVEdSRVMiLCJjb25uZWN0aW9uRHJpdmVyIjoib3JnLnBvc3RncmVzcWwuRHJpdmVyIiwiZGF0YWJhc2VFbmdpbmVEaXNwbGF5TmFtZSI6IlBvc3RncmVTUUwifQo=",
            "headers": {
              "Content-Type": "application/json"
            },
            "mediaType": "application/json",
            "statusCode": 200,
            "statusText": "OK"
          }
        },
        "status": "OK - 200",
        "type": "StructuredRestCallEvent"
      },
      "status": "OK - 200"
    }
  }
]