Virtual Machine Management (VMM) audit logs in Google Distributed Cloud (GDC) air-gapped
let you track administrative actions and lifecycle events for virtual machines
(VMs) in organization workloads. Kubernetes audit logs record the user or
service identity, target resource, and JSON payload fields for VM, disk, image,
and access management operations.

|---|---|
| **Workload location** | Organization workloads |
| **Audit log source** | [Kubernetes audit logs](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-kubernetes.md.txt) |
| **Audited operations** | - [Create a VM](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#create-vm) - [List VMs](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#list-vm) - [Update a VM](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#update-vm) - [Delete a VM](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#delete-vm) - [Create a VM disk](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#create-vmdisk) - [List VM disks](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#list-vmdisks) - [Delete a VM disk](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#delete-vmdisk) - [List VM types](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#list-vmtypes) - [Create a VM type](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#create-vmtype) - [Delete a VM type](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#delete-vmtype) - [Update a VM type](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#update-vmtype) - [Create a VM access request](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#create-vmaccessrequest) - [List VM access requests](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#list-vmaccessrequest) - [Delete a VM access request](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#delete-vmaccessrequest) - [List VM images](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#list-vmimage) - [Create a VM image import](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#create-vmimageimport) - [List VM image imports](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#list-vmimageimport) - [Delete a VM image import](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#delete-vmimageimport) - [Start a VM](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#start-vm) - [Stop a VM](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#stop-vm) - [Restart a VM](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#restart-vm) - [Pause a VM](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#pause-vm) - [Unpause a VM](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#unpause-vm) - [Review emergency access actions from an Infrastructure Operator (IO)](https://docs.cloud.google.com/distributed-cloud/hosted/docs/latest/gdcag/platform-application/pa-ao-operations/audit-vmm.md.txt#emergency-access-actions) |

## Create a VM

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user": { "groups": [ "system:authenticated" ], "username": "fop-myusername" } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef": { "apiGroup": "virtualmachine.gdc.goog", "apiVersion": "v1", "name": "vm1", "namespace": "myusername-test", "resource": "virtualmachines" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb": "create"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp": "2023-09-19T21:16:11.086606Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster": "org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus": { "code": 201, "metadata": {} } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster": "org-1-infra",
  "_gdch_fluentbit_pod": "anthos-audit-logs-forwarder-tzdxt",
  "_gdch_org_id": "org-1.zone1.google.gdch.test",
  "_gdch_org_name": "org-1",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": "RBAC: allowed by RoleBinding \"fop-myusername-vm-admin/myusername-test\" of Role \"project-vm-admin\" to User \"fop-myusername\"",
    "mutation.webhook.admission.k8s.io/round_0_index_12": "{\"configuration\":\"gatekeeper-mutating-webhook-configuration\",\"webhook\":\"mutation.gatekeeper.sh\",\"mutated\":false}"
  },
  "apiVersion": "audit.k8s.io/v1",
  "auditID": "6b48ee52-baa4-47d1-9357-98d1bf7bee7e",
  "kind": "Event",
  "level": "Metadata",
  "objectRef": {
    "apiGroup": "virtualmachine.gdc.goog",
    "apiVersion": "v1",
    "name": "vm1",
    "namespace": "myusername-test",
    "resource": "virtualmachines"
  },
  "requestReceivedTimestamp": "2023-09-19T21:16:11.086606Z",
  "requestURI": "/apis/virtualmachine.gdc.goog/v1/namespaces/myusername-test/virtualmachines?fieldManager=kubectl-client-side-apply",
  "responseStatus": {
    "code": 201,
    "metadata": {}
  },
  "sourceIPs": [
    "10.200.0.1",
    "10.200.0.6"
  ],
  "stage": "ResponseComplete",
  "stageTimestamp": "2023-09-19T21:16:11.097294Z",
  "user": {
    "groups": [
      "system:authenticated"
    ],
    "username": "fop-myusername"
  },
  "userAgent": "kubectl/v1.23.5 (linux/amd64) kubernetes/c285e78",
  "verb": "create"
}
```

## List VMs

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user": { "groups": [ "system:authenticated" ], "username": "fop-myusername" } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef": { "apiGroup": "virtualmachine.gdc.goog", "apiVersion": "v1", "namespace": "myusername-test", "resource": "virtualmachines" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb": "list"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp": "2023-09-19T21:37:40.632532Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster": "org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus": { "code": 200, "metadata": {} } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster": "org-1-infra",
  "_gdch_fluentbit_pod": "anthos-audit-logs-forwarder-tzdxt",
  "_gdch_org_id": "org-1.zone1.google.gdch.test",
  "_gdch_org_name": "org-1",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": "RBAC: allowed by RoleBinding \"fop-myusername-vm-admin/myusername-test\" of Role \"project-vm-admin\" to User \"fop-myusername\""
  },
  "apiVersion": "audit.k8s.io/v1",
  "auditID": "e848a3a1-da7e-4b74-8c12-f2af066dda55",
  "kind": "Event",
  "level": "Metadata",
  "objectRef": {
    "apiGroup": "virtualmachine.gdc.goog",
    "apiVersion": "v1",
    "namespace": "myusername-test",
    "resource": "virtualmachines"
  },
  "requestReceivedTimestamp": "2023-09-19T21:37:40.632532Z",
  "requestURI": "/apis/virtualmachine.gdc.goog/v1/namespaces/myusername-test/virtualmachines?limit=500",
  "responseStatus": {
    "code": 200,
    "metadata": {}
  },
  "sourceIPs": [
    "10.200.0.1",
    "10.200.0.6"
  ],
  "stage": "ResponseComplete",
  "stageTimestamp": "2023-09-19T21:37:40.639807Z",
  "user": {
    "groups": [
      "system:authenticated"
    ],
    "username": "fop-myusername"
  },
  "userAgent": "kubectl/v1.23.5 (linux/amd64) kubernetes/c285e78",
  "verb": "list"
}
```

## Update a VM

This includes start/stop operations. A restart operation also shows up as two
update operations (stop and start) by a service account.

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user":{ "username": "fop-myname-test", "groups":[ "system: authenticated" ] } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef": { "apiGroup": "virtualmachine.gdc.goog", "apiVersion": "v1", "name": "vm1", "namespace": "myusername-test", "resource": "virtualmachines" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb": "patch"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp": "2023-09-19T21:42:20.229318Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster": "org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus": { "code": 415, "message": "the body of the request was in an unknown format - accepted media types include: application/json-patch+json, application/merge-patch+json, application/apply-patch+yaml", "metadata": {}, "reason": "UnsupportedMediaType", "status": "Failure" } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster": "org-1-infra",
  "_gdch_fluentbit_pod": "anthos-audit-logs-forwarder-rxgp7",
  "_gdch_org_id": "org-1.zone1.google.gdch.test",
  "_gdch_org_name": "org-1",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": "RBAC: allowed by ClusterRoleBinding \"vmm-controller\" of ClusterRole \"vmm-controller\" to ServiceAccount \"vmm-controller/vm-system\""
  },
  "apiVersion": "audit.k8s.io/v1",
  "auditID": "f094a667-adc8-46cf-9ce7-e0f534b792a9",
  "kind": "Event",
  "level": "Metadata",
  "objectRef": {
    "apiGroup": "virtualmachine.gdc.goog",
    "apiVersion": "v1",
    "name": "vm1",
    "namespace": "myusername-test",
    "resource": "virtualmachines"
  },
  "requestReceivedTimestamp": "2023-09-19T21:42:20.229318Z",
  "requestURI": "/apis/virtualmachine.gdc.goog/v1/namespaces/myusername-test/virtualmachines/vm1",
  "responseStatus": {
    "code": 415,
    "message": "the body of the request was in an unknown format - accepted media types include: application/json-patch+json, application/merge-patch+json, application/apply-patch+yaml",
    "metadata": {},
    "reason": "UnsupportedMediaType",
    "status": "Failure"
  },
  "sourceIPs": [
    "10.201.64.17"
  ],
  "stage": "ResponseComplete",
  "stageTimestamp": "2023-09-19T21:42:20.230057Z",
  "user": {
    "extra": {
      "authentication.kubernetes.io/pod-name": [
        "vmm-controller-588b67d499-p7qzv"
      ],
      "authentication.kubernetes.io/pod-uid": [
        "b5bec7d9-d813-4c9d-a2c6-7c8b2ab7ae9c"
      ]
    },
    "groups": [
      "system:serviceaccounts",
      "system:serviceaccounts:vm-system",
      "system:authenticated"
    ],
    "uid": "24a689d1-aabb-4738-9576-eb3a56e5c3d4",
    "username": "system:serviceaccount:vm-system:vmm-controller"
  },
  "userAgent": "vmm-controller/v0.0.0 (linux/amd64) kubernetes/$Format",
  "verb": "patch"
}
```

## Delete a VM

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user": { "groups": [ "system:masters", "system:authenticated" ], "username": "kubernetes-admin" } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef": { "apiGroup": "virtualmachine.gdc.goog", "apiVersion": "v1", "name": "vm1", "namespace": "myusername-test", "resource": "virtualmachines" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb": "delete"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp": "2023-09-19T20:58:25.165020Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster": "org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus": { "code": 200, "metadata": {} } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster": "org-1-infra",
  "_gdch_fluentbit_pod": "anthos-audit-logs-forwarder-tzdxt",
  "_gdch_org_id": "org-1.zone1.google.gdch.test",
  "_gdch_org_name": "org-1",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": ""
  },
  "apiVersion": "audit.k8s.io/v1",
  "auditID": "b487c3cf-3eda-4cc9-bb5f-1d9665038ee0",
  "kind": "Event",
  "level": "Metadata",
  "objectRef": {
    "apiGroup": "virtualmachine.gdc.goog",
    "apiVersion": "v1",
    "name": "vm1",
    "namespace": "myusername-test",
    "resource": "virtualmachines"
  },
  "requestReceivedTimestamp": "2023-09-19T20:58:25.165020Z",
  "requestURI": "/apis/virtualmachine.gdc.goog/v1/namespaces/myusername-test/virtualmachines/vm1",
  "responseStatus": {
    "code": 200,
    "metadata": {}
  },
  "sourceIPs": [
    "10.200.0.6"
  ],
  "stage": "ResponseComplete",
  "stageTimestamp": "2023-09-19T20:58:25.181044Z",
  "user": {
    "groups": [
      "system:masters",
      "system:authenticated"
    ],
    "username": "kubernetes-admin"
  },
  "userAgent": "kubectl/v1.23.5 (linux/amd64) kubernetes/c285e78",
  "verb": "delete"
}
```

## Create a VM disk

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user": { "groups": [ "system:authenticated" ], "username": "fop-myusername" } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef": { "apiGroup": "virtualmachine.gdc.goog", "apiVersion": "v1", "name": "vm1-boot-disk", "namespace": "myusername-test", "resource": "virtualmachinedisks" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb": "create"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp": "2023-09-19T21:16:11.056904Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster": "org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus": { "code": 201, "metadata": {} } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster": "org-1-infra",
  "_gdch_fluentbit_pod": "anthos-audit-logs-forwarder-tzdxt",
  "_gdch_org_id": "org-1.zone1.google.gdch.test",
  "_gdch_org_name": "org-1",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": "RBAC: allowed by RoleBinding \"fop-myusername-vm-admin/myusername-test\" of Role \"project-vm-admin\" to User \"fop-myusername\"",
    "mutation.webhook.admission.k8s.io/round_0_index_12": "{\"configuration\":\"gatekeeper-mutating-webhook-configuration\",\"webhook\":\"mutation.gatekeeper.sh\",\"mutated\":false}"
  },
  "apiVersion": "audit.k8s.io/v1",
  "auditID": "b304923c-1df4-4184-bafd-40161210e85e",
  "kind": "Event",
  "level": "Metadata",
  "objectRef": {
    "apiGroup": "virtualmachine.gdc.goog",
    "apiVersion": "v1",
    "name": "vm1-boot-disk",
    "namespace": "myusername-test",
    "resource": "virtualmachinedisks"
  },
  "requestReceivedTimestamp": "2023-09-19T21:16:11.056904Z",
  "requestURI": "/apis/virtualmachine.gdc.goog/v1/namespaces/myusername-test/virtualmachinedisks?fieldManager=kubectl-client-side-apply",
  "responseStatus": {
    "code": 201,
    "metadata": {}
  },
  "sourceIPs": [
    "10.200.0.1",
    "10.200.0.6"
  ],
  "stage": "ResponseComplete",
  "stageTimestamp": "2023-09-19T21:16:11.071123Z",
  "user": {
    "groups": [
      "system:authenticated"
    ],
    "username": "fop-myusername"
  },
  "userAgent": "kubectl/v1.23.5 (linux/amd64) kubernetes/c285e78",
  "verb": "create"
}
```

## List VM disks

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user": { "groups": [ "system:authenticated" ], "username": "fop-myusername" } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef": { "apiGroup": "virtualmachine.gdc.goog", "apiVersion": "v1", "namespace": "myusername-test", "resource": "virtualmachinedisks" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb": "list"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp": "2023-09-19T21:18:43.108931Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster": "org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus": { "code": 200, "metadata": {} } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster": "org-1-infra",
  "_gdch_fluentbit_pod": "anthos-audit-logs-forwarder-l7p8r",
  "_gdch_org_id": "org-1.zone1.google.gdch.test",
  "_gdch_org_name": "org-1",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": "RBAC: allowed by RoleBinding \"fop-myusername-vm-admin/myusername-test\" of Role \"project-vm-admin\" to User \"fop-myusername\""
  },
  "apiVersion": "audit.k8s.io/v1",
  "auditID": "3d71f7fd-11d0-4ed7-9d8c-a9bf9f61b46d",
  "kind": "Event",
  "level": "Metadata",
  "objectRef": {
    "apiGroup": "virtualmachine.gdc.goog",
    "apiVersion": "v1",
    "namespace": "myusername-test",
    "resource": "virtualmachinedisks"
  },
  "requestReceivedTimestamp": "2023-09-19T21:18:43.108931Z",
  "requestURI": "/apis/virtualmachine.gdc.goog/v1/namespaces/myusername-test/virtualmachinedisks?limit=500",
  "responseStatus": {
    "code": 200,
    "metadata": {}
  },
  "sourceIPs": [
    "10.200.0.1",
    "10.200.0.7"
  ],
  "stage": "ResponseComplete",
  "stageTimestamp": "2023-09-19T21:18:43.137015Z",
  "user": {
    "groups": [
      "system:authenticated"
    ],
    "username": "fop-myusername"
  },
  "userAgent": "kubectl/v1.23.5 (linux/amd64) kubernetes/c285e78",
  "verb": "list"
}
```

## Delete a VM disk

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user":{ "username": "fop-myname-test", "groups":[ "system: authenticated" ] } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef":{ "namespace":"foo", "resource":"virtualmachinedisks", "apiGroup":"virtualmachine.gdc.goog", "name":"vm1-boot-disk", "apiVersion":"v1" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb":"delete"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster":"org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus":{ "metadata":{}, "code":200 } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster":"org-1-infra",
  "_gdch_fluentbit_pod":"anthos-audit-logs-forwarder-8z2rm",
  "_gdch_service_name":"apiserver",
  "apiVersion":"audit.k8s.io/v1",
  "auditID":"ba0344d7-283f-4d79-aabc-e083al9b053a",
  "kind":"Event",
  "level":"Metadata",
  "objectRef":{
    "namespace":"foo",
    "resource":"virtualmachinedisks",
    "apiGroup":"virtualmachine.gdc.goog",
    "apiVersion":"v1",
    "name":"vm1-boot-disk"
    },
  "requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z",
  "requestURI":"/apis/virtualmachine.gdc.goog/v1/namespaces/foo/virtualmachinedisks/vm1-boot-disk",
  "responseStatus":{
    "metadata":{},
    "code":200
    },
  "sourceIPs":["10.142.5.147"],
  "stage":"ResponseComplete",
  "stageTimestamp":"2022-11-11T22:02:02.045045Z",
  "tsNs":1668204122074601081,
  "user":{
    "username": "fop-myname-test",
    "groups":[
      "system: authenticated"
      ]
    },
  "userAgent":"kubectl/v1.23.5 (linux/amd64) kubernetes/c285e78",
  "verb":"delete"
}
```

## List VM types

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user":{ "username": "fop-myname-test", "groups":[ "system: authenticated" ] } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef":{ "resource":"virtualmachinetypes", "apiGroup":"virtualmachine.gdc.goog", "apiVersion":"v1" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb":"list"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster":"org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus":{ "metadata":{}, "code":200 } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster":"org-1-infra",
  "_gdch_fluentbit_pod":"anthos-audit-logs-forwarder-8z2rm",
  "_gdch_service_name":"apiserver",
  "annotations":{
    "authorization.k8s.io/decision":"allow",
    "authorization.k8s.io/reason":"RBAC: allowed by RoleBinding 'g-vm-admin-binding/foo' of Role 'g-vm-admin' to User 'fop-myname-test'"
    },
  "apiVersion":"audit.k8s.io/v1",
  "auditID":"ba0344d7-283f-4d79-aabc-e083al9b053a",
  "kind":"Event",
  "level":"Metadata",
  "objectRef":{
    "resource":"virtualmachinetypes",
    "apiGroup":"virtualmachine.gdc.goog",
    "apiVersion":"v1"
    },
  "requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z",
  "requestURI":"/apis/virtualmachine.gdc.goog/v1/virtualmachinetypes?limit=500",
  "responseStatus":{
    "metadata":{},
    "code":200
    },
  "sourceIPs":["10.142.5.147"],
  "stage":"ResponseComplete",
  "stageTimestamp":"2022-11-11T22:02:02.045045Z",
  "tsNs":1668204122074601081,
  "user":{
    "username": "fop-myname-test",
    "groups":[
      "system: authenticated"
      ]
    },
  "userAgent":"kubectl/v1.23.5 (linux/amd64) kubernetes/c285e78",
  "verb":"list"
}
```

## Create a VM type

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user":{ "username": "fop-myname-test", "groups":[ "system: authenticated" ] } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef":{ "resource":"virtualmachinetypes", "apiGroup":"virtualmachine.gdc.goog", "name":"test-type", "apiVersion":"v1" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb":"create"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster":"org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus":{ "metadata":{}, "code":201 } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster":"org-1-infra",
  "_gdch_fluentbit_pod":"anthos-audit-logs-forwarder-8z2rm",
  "_gdch_service_name":"apiserver",
  "annotations":{
    "authorization.k8s.io/decision":"allow",
    "authorization.k8s.io/reason":"RBAC: allowed by ClusterRoleBinding 'g-pa-binding' of ClusterRole 'g-cluster' to User 'fop-myname-test'"
    },
  "apiVersion":"audit.k8s.io/v1",
  "auditID":"ba0344d7-283f-4d79-aabc-e083al9b053a",
  "kind":"Event",
  "level":"Metadata",
  "objectRef":{
    "resource":"virtualmachinetypes",
    "apiGroup":"virtualmachine.gdc.goog",
    "name":"test-type",
    "apiVersion":"v1"
    },
  "requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z",
  "requestURI":"/apis/virtualmachine.gdc.goog/v1/virtualmachinetypes?fieldManager=kubectl-client-side-apply",
  "responseStatus":{
    "metadata":{},
    "code":201
    },
  "sourceIPs":["10.142.5.147"],
  "stage":"ResponseComplete",
  "stageTimestamp":"2022-11-11T22:02:02.045045Z",
  "tsNs":1668204122074601081,
  "user":{
    "username": "fop-myname-test",
    "groups":[
      "system: authenticated"
      ]
    },
  "userAgent":"kubectl/v1.23.5 (linux/amd64) kubernetes/c285e78",
  "verb":"create"
}
```

## Delete a VM type

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user":{ "username": "fop-myname-test", "groups":[ "system: authenticated" ] } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef":{ "resource":"virtualmachinetypes", "apiGroup":"virtualmachine.gdc.goog", "name":"test-type", "apiVersion":"v1" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb":"delete"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster":"org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus":{ "metadata":{}, "code":200, "status":"Success" } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster":"org-1-infra",
  "_gdch_fluentbit_pod":"anthos-audit-logs-forwarder-8z2rm",
  "_gdch_service_name":"apiserver",
  "annotations":{
    "authorization.k8s.io/decision":"allow",
    "authorization.k8s.io/reason":"RBAC: allowed by ClusterRoleBinding 'g-pa-binding' of ClusterRole 'g-cluster' to User 'fop-myname-test'"
    },
  "apiVersion":"audit.k8s.io/v1",
  "auditID":"ba0344d7-283f-4d79-aabc-e083al9b053a",
  "kind":"Event",
  "level":"Metadata",
  "objectRef":{
    "resource":"virtualmachinetypes",
    "apiGroup":"virtualmachine.gdc.goog",
    "name":"test-type",
    "apiVersion":"v1"
    },
  "requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z",
  "requestURI":"/apis/virtualmachine.gdc.goog/v1/virtualmachinetypes/test-type",
  "responseStatus":{
    "metadata":{},
    "code":200,
    "status":"Success"
    },
  "sourceIPs":["10.142.5.147"],
  "stage":"ResponseComplete",
  "stageTimestamp":"2022-11-11T22:02:02.045045Z",
  "tsNs":1668204122074601081,
  "user":{
    "username": "fop-myname-test",
    "groups":[
      "system: authenticated"
      ]
    },
  "userAgent":"kubectl/v1.23.5 (linux/amd64) kubernetes/c285e78",
  "verb":"delete"
}
```

## Update a VM type

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user":{ "username": "fop-myname-test", "groups":[ "system: authenticated" ] } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef":{ "resource":"virtualmachinetypes", "apiGroup":"virtualmachine.gdc.goog", "name":"test-type", "apiVersion":"v1" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb":"patch"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster":"org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus":{ "metadata":{}, "code":200 } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster":"org-1-infra",
  "_gdch_fluentbit_pod":"anthos-audit-logs-forwarder-8z2rm",
  "_gdch_service_name":"apiserver",
  "annotations":{
    "authorization.k8s.io/decision":"allow",
    "authorization.k8s.io/reason":"RBAC: allowed by ClusterRoleBinding 'g-pa-binding' of ClusterRole 'g-cluster' to User 'fop-myname-test'"
    },
  "apiVersion":"audit.k8s.io/v1",
  "auditID":"ba0344d7-283f-4d79-aabc-e083al9b053a",
  "kind":"Event",
  "level":"Metadata",
  "objectRef":{
    "resource":"virtualmachinetypes",
    "apiGroup":"virtualmachine.gdc.goog",
    "name":"test-type",
    "apiVersion":"v1"
    },
  "requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z",
  "requestURI":"/apis/virtualmachine.gdc.goog/v1/virtualmachinetypes/test-type?fieldManager=kubectl-client-side-apply",
  "responseStatus":{
    "metadata":{},
    "code":200
    },
  "sourceIPs":["10.142.5.147"],
  "stage":"ResponseComplete",
  "stageTimestamp":"2022-11-11T22:02:02.045045Z",
  "tsNs":1668204122074601081,
  "user":{
    "username": "fop-myname-test",
    "groups":[
      "system: authenticated"
      ]
    },
  "userAgent":"kubectl/v1.23.5 (linux/amd64) kubernetes/c285e78",
  "verb":"patch"
}
```

## Create a VM access request

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user":{ "username": "fop-myname-test", "groups":[ "system: authenticated" ] } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef":{ "namespace":"foo", "resource":"virtualmachineaccessrequests", "apiGroup":"virtualmachine.gdc.goog", "apiVersion":"v1" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb":"create"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster":"org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus":{ "metadata":{}, "code":201 } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster":"org-1-infra",
  "_gdch_fluentbit_pod":"anthos-audit-logs-forwarder-8z2rm",
  "_gdch_service_name":"apiserver",
  "annotations":{
    "authorization.k8s.io/decision":"allow",
    "authorization.k8s.io/reason":"RBAC: allowed by RoleBinding 'g-vm-admin-binding/foo' of Role 'g-vm-admin' to User 'fop-myname-test'"
    },
  "apiVersion":"audit.k8s.io/v1",
  "auditID":"ba0344d7-283f-4d79-aabc-e083al9b053a",
  "kind":"Event",
  "level":"Metadata",
  "objectRef":{
    "namespace":"foo",
    "resource":"virtualmachineaccessrequests",
    "apiGroup":"virtualmachine.gdc.goog",
    "apiVersion":"v1"
    },
  "requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z",
  "requestURI":"/apis/virtualmachine.gdc.goog/v1/namespaces/foo/virtualmachineaccessrequests?fieldManager=kubectl-create",
  "responseStatus":{
    "metadata":{},
    "code":201
    },
  "sourceIPs":["10.142.5.147"],
  "stage":"ResponseComplete",
  "stageTimestamp":"2022-11-11T22:02:02.045045Z",
  "tsNs":1668204122074601081,
  "user":{
    "username": "fop-myname-test",
    "groups":[
      "system: authenticated"
      ]
    },
  "userAgent":"kubectl/v1.23.5 (linux/amd64) kubernetes/c285e78",
  "verb":"create"
}
```

## List VM access requests

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user":{ "username": "fop-myname-test", "groups":[ "system: authenticated" ] } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef":{ "namespace":"foo", "resource":"virtualmachineaccessrequests", "apiGroup":"virtualmachine.gdc.goog", "apiVersion":"v1" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb":"list"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster":"org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus":{ "metadata":{}, "code":200 } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster":"org-1-infra",
  "_gdch_fluentbit_pod":"anthos-audit-logs-forwarder-8z2rm",
  "_gdch_service_name":"apiserver",
  "annotations":{
    "authorization.k8s.io/decision":"allow",
    "authorization.k8s.io/reason":"RBAC: allowed by RoleBinding 'g-vm-admin-binding/foo' of Role 'g-vm-admin' to User 'fop-myname-test'"
    },
  "apiVersion":"audit.k8s.io/v1",
  "auditID":"ba0344d7-283f-4d79-aabc-e083al9b053a",
  "kind":"Event",
  "level":"Metadata",
  "objectRef":{
    "namespace":"foo",
    "resource":"virtualmachineaccessrequests",
    "apiGroup":"virtualmachine.gdc.goog",
    "apiVersion":"v1"
    },
  "requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z",
  "requestURI":"/apis/virtualmachine.gdc.goog/v1/namespaces/foo/virtualmachineaccessrequests?limit=500",
  "responseStatus":{
    "metadata":{},
    "code":200
    },
  "sourceIPs":["10.142.5.147"],
  "stage":"ResponseComplete",
  "stageTimestamp":"2022-11-11T22:02:02.045045Z",
  "tsNs":1668204122074601081,
  "user":{
    "username": "fop-myname-test",
    "groups":[
      "system: authenticated"
      ]
    },
  "userAgent":"kubectl/v1.23.5 (linux/amd64) kubernetes/c285e78",
  "verb":"list"
}
```

## Delete a VM access request

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user":{ "username": "fop-myname-test", "groups":[ "system: authenticated" ] } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef":{ "namespace":"foo", "resource":"virtualmachineaccessrequests", "apiGroup":"virtualmachine.gdc.goog", "name":"vm1-jdc9c", "apiVersion":"v1" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb":"delete"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster":"org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus":{ "metadata":{}, "code":200 } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster":"org-1-infra",
  "_gdch_fluentbit_pod":"anthos-audit-logs-forwarder-8z2rm",
  "_gdch_service_name":"apiserver",
  "annotations":{
    "authorization.k8s.io/decision":"allow",
    "authorization.k8s.io/reason":"RBAC: allowed by RoleBinding 'g-vm-admin-binding/foo' of Role 'g-vm-admin' to User 'fop-myname-test'"
    },
  "apiVersion":"audit.k8s.io/v1",
  "auditID":"ba0344d7-283f-4d79-aabc-e083al9b053a",
  "kind":"Event",
  "level":"Metadata",
  "objectRef":{
    "namespace":"foo",
    "resource":"virtualmachineaccessrequests",
    "apiGroup":"virtualmachine.gdc.goog",
    "name":"vm1-jdc9c",
    "apiVersion":"v1"
    },
  "requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z",
  "requestURI":"/apis/virtualmachine.gdc.goog/v1/namespaces/foo/virtualmachineaccessrequests/vm1-jdc9c",
  "responseStatus":{
    "metadata":{},
    "code":200
    },
  "sourceIPs":["10.142.5.147"],
  "stage":"ResponseComplete",
  "stageTimestamp":"2022-11-11T22:02:02.045045Z",
  "tsNs":1668204122074601081,
  "user":{
    "username": "fop-myname-test",
    "groups":[
      "system: authenticated"
      ]
    },
  "userAgent":"kubectl/v1.23.5 (linux/amd64) kubernetes/c285e78",
  "verb":"delete"
}
```

## List VM images

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user":{ "username": "system:serviceaccount:gatekeeper-system:gatekeeper-admin", "uid":"225d02e7-ee06-42c9-a561-df1945d83224", "groups":[ "system:serviceaccounts", "system:serviceaccounts:gatekeeper-system", "system: authenticated" ] } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef":{ "resource":"virtualmachineimage", "apiGroup":"virtualmachineview.gdc.goog", "apiVersion":"v1alpha1" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb":"list"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster":"org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus":{ "metadata":{}, "code":200 } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster":"org-1-infra",
  "_gdch_fluentbit_pod":"anthos-audit-logs-forwarder-8z2rm",
  "_gdch_service_name":"apiserver",
  "annotations":{
    "authorization.k8s.io/decision":"allow",
    "authorization.k8s.io/reason":"RBAC: allowed by ClusterRoleBinding 'gatekeeper-manager-rolebinding' of ClusterRole 'gatekeeper-manager-role' to ServiceAccount 'gatekeeper-admin/gatekeeper-system'"
    },
  "apiVersion":"audit.k8s.io/v1",
  "auditID":"ba0344d7-283f-4d79-aabc-e083al9b053a",
  "kind":"Event",
  "level":"Metadata",
  "objectRef":{
    "resource":"virtualmachineimage",
    "apiGroup":"virtualmachineview.gdc.goog",
    "apiVersion":"v1alpha1"
    },
  "requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z",
  "requestURI":"/apis/virtualmachineview.gdc.goog/v1alpha1/virtualmachineimage?limit=500",
  "responseStatus":{
    "metadata":{},
    "code":200
    },
  "sourceIPs":["10.142.5.147"],
  "stage":"ResponseComplete",
  "stageTimestamp":"2022-11-11T22:02:02.045045Z",
  "tsNs":1668204122074601081,
  "user":{
    "username": "system:serviceaccount:gatekeeper-system:gatekeeper-admin",
    "uid":"225d02e7-ee06-42c9-a561-df1945d83224",
    "groups":[
      "system:serviceaccounts",
      "system:serviceaccounts:gatekeeper-system",
      "system: authenticated"
      ]
    },
  "userAgent":"gatekeeper/v3.7.0 (linux/amd64) 3ba8e93/2021-11-15T20:59:44Z",
  "verb":"list"
}
```

## Create a VM image import

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user":{ "username": "kubernetes-admin", "groups":[ "system:masters", "system: authenticated" ] } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef":{ "namespace":"foo", "resource":"virtualmachineimageimports", "apiGroup":"virtualmachine.gdc.goog", "apiVersion":"v1alpha1", "name":"import-1" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb":"create"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster":"org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus":{ "metadata":{}, "code":201 } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster":"org-1-infra",
  "_gdch_fluentbit_pod":"anthos-audit-logs-forwarder-8z2rm",
  "_gdch_service_name":"apiserver",
  "annotations":{
    "apiserver.latency.k8s.io/response-write":"1.476μs",
    "authorization.k8s.io/reason":"",
    "apiserver.latency.k8s.io/serialize-response-object":"71.971μs",
    "authorization.k8s.io/decision":"allow",
    "apiserver.latency.k8s.io/total":"7.405669466s",
    "apiserver.latency.k8s.io/validating-webhook":"7.395358418s",
    "apiserver.latency.k8s.io/transform-response-object":"2.358μs"
    },
  "apiVersion":"audit.k8s.io/v1",
  "auditID":"ba0344d7-283f-4d79-aabc-e083al9b053a",
  "kind":"Event",
  "level":"Metadata",
  "objectRef":{
    "namespace":"foo",
    "resource":"virtualmachineimageimports",
    "apiGroup":"virtualmachine.gdc.goog",
    "apiVersion":"v1alpha1",
    "name":"import-1"
    },
  "requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z",
  "requestURI":"/apis/virtualmachine.gdc.goog/v1alpha1/namespaces/foo/virtualmachineimageimports?fieldManager=kubectl-client-side-apply",
  "responseStatus":{
    "metadata":{},
    "code":201
    },
  "sourceIPs":["10.142.5.147"],
  "stage":"ResponseComplete",
  "stageTimestamp":"2022-11-11T22:02:02.045045Z",
  "tsNs":1668204122074601081,
  "user":{
    "username": "kubernetes-admin",
    "groups":[
      "system:masters",
      "system: authenticated"
      ]
    },
  "userAgent":"kubectl/v1.23.5 (linux/amd64) kubernetes/c285e78",
  "verb":"create"
}
```

## List VM image imports

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user":{ "username": "system:serviceaccount:gatekeeper-system:gatekeeper-admin", "groups":[ "system:serviceaccounts", "system:serviceaccounts:gatekeeper-system", "system: authenticated" ] } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef":{ "resource":"virtualmachineimageimports", "apiGroup":"virtualmachine.gdc.goog", "apiVersion":"v1alpha1" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb":"list"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster":"org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus":{ "metadata":{}, "code":201 } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster":"org-1-infra",
  "_gdch_fluentbit_pod":"anthos-audit-logs-forwarder-8z2rm",
  "_gdch_service_name":"apiserver",
  "apiVersion":"audit.k8s.io/v1",
  "auditID":"ba0344d7-283f-4d79-aabc-e083al9b053a",
  "kind":"Event",
  "level":"Metadata",
  "objectRef":{
    "resource":"virtualmachineimageimports",
    "apiGroup":"virtualmachine.gdc.goog",
    "apiVersion":"v1alpha1"
    },
  "requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z",
  "requestURI":"/apis/virtualmachine.gdc.goog/v1alpha1/virtualmachineimageimports?limit=500",
  "responseStatus":{
    "metadata":{},
    "code":201
    },
  "sourceIPs":["10.142.5.147"],
  "stage":"ResponseComplete",
  "stageTimestamp":"2022-11-11T22:02:02.045045Z",
  "tsNs":1668204122074601081,
  "user":{
    "username": "system:serviceaccount:gatekeeper-system:gatekeeper-admin",
    "groups":[
      "system:serviceaccounts",
      "system:serviceaccounts:gatekeeper-system",
      "system: authenticated"
      ]
    },
  "userAgent":"gatekeeper/v3.7.0 (linux/amd64) 3ba8e93/2021-11-15T20:59:44Z",
  "verb":"list"
}
```

## Delete a VM image import

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user":{ "username": "kubernetes-admin", "groups":[ "system:masters", "system: authenticated" ] } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` | For example, <br /> ```json "objectRef":{ "namespace":"foo", "resource":"virtualmachineimageimports", "apiGroup":"virtualmachine.gdc.goog", "name":"import-1", "apiVersion":"v1alpha1" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb":"delete"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster":"org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus":{ "metadata":{}, "code":200 } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster":"org-1-infra",
  "_gdch_fluentbit_pod":"anthos-audit-logs-forwarder-8z2rm",
  "_gdch_service_name":"apiserver",
  "apiVersion":"audit.k8s.io/v1",
  "auditID":"ba0344d7-283f-4d79-aabc-e083al9b053a",
  "kind":"Event",
  "level":"Metadata",
  "objectRef":{
    "namespace":"foo",
    "resource":"virtualmachineimageimports",
    "apiGroup":"virtualmachine.gdc.goog",
    "name":"import-1",
    "apiVersion":"v1alpha1"
    },
  "requestReceivedTimestamp":"2022-11-11T22:02:02.034688Z",
  "requestURI":"/apis/virtualmachine.gdc.goog/v1alpha1/namespaces/foo/virtualmachineimageimports/import-1",
  "responseStatus":{
    "metadata":{},
    "code":200
    },
  "sourceIPs":["10.142.5.147"],
  "stage":"ResponseComplete",
  "stageTimestamp":"2022-11-11T22:02:02.045045Z",
  "tsNs":1668204122074601081,
  "user":{
    "username": "kubernetes-admin",
    "groups":[
      "system:masters",
      "system: authenticated"
      ]
    },
  "userAgent":"kubectl/v1.23.5 (linux/amd64) kubernetes/c285e78",
  "verb":"delete"
}
```

## Start a VM

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user": { "groups": [ "system:authenticated" ], "username": "fop-myusername" } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `requestURI` | It has the following format: `"requestURI": "/apis/virtualmachineoperations.gdc.goog/v1/namespaces/namespace/virtualmachines/name/start"` Where <var translate="no">namespace</var> and <var translate="no">name</var> identify the target object. For example, `"requestURI": "/apis/virtualmachineoperations.gdc.goog/v1/namespaces/myusername-test/virtualmachines/vm1/start"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp": "2023-09-19T22:27:26.787243Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster": "org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus": { "code": 202, "metadata": {} } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster": "org-1-infra",
  "_gdch_fluentbit_pod": "anthos-audit-logs-forwarder-rxgp7",
  "_gdch_org_id": "org-1.zone1.google.gdch.test",
  "_gdch_org_name": "org-1",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": "RBAC: allowed by RoleBinding \"fop-myusername-vm-admin/myusername-test\" of Role \"project-vm-admin\" to User \"fop-myusername\""
  },
  "apiVersion": "audit.k8s.io/v1",
  "auditID": "1446c6b9-f728-4f0d-9a70-aa8361749eef",
  "kind": "Event",
  "level": "Metadata",
  "objectRef": {
    "apiGroup": "virtualmachineoperations.gdc.goog",
    "apiVersion": "v1",
    "name": "vm1",
    "namespace": "myusername-test",
    "resource": "virtualmachines",
    "subresource": "start"
  },
  "requestReceivedTimestamp": "2023-09-19T22:27:26.787243Z",
  "requestURI": "/apis/virtualmachineoperations.gdc.goog/v1/namespaces/myusername-test/virtualmachines/vm1/start",
  "responseStatus": {
    "code": 202,
    "metadata": {}
  },
  "sourceIPs": [
    "10.200.0.1",
    "10.200.0.5"
  ],
  "stage": "ResponseComplete",
  "stageTimestamp": "2023-09-19T22:27:26.929619Z",
  "user": {
    "groups": [
      "system:authenticated"
    ],
    "username": "fop-myusername"
  },
  "userAgent": "Go-http-client/2.0",
  "verb": "update"
}
```

## Stop a VM

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user": { "groups": [ "system:authenticated" ], "username": "fop-myusername" } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `requestURI` | It has the following format: `"requestURI": "/apis/virtualmachineoperations.gdc.goog/v1/namespaces/namespace/virtualmachines/name/stop"` Where <var translate="no">namespace</var> and <var translate="no">name</var> identify the target object. For example, `"requestURI": "/apis/virtualmachineoperations.gdc.goog/v1/namespaces/myusername-test/virtualmachines/vm1/stop"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp": "2023-09-19T22:27:26.787243Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster": "org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus": { "code": 202, "metadata": {} } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster": "org-1-infra",
  "_gdch_fluentbit_pod": "anthos-audit-logs-forwarder-rxgp7",
  "_gdch_org_id": "org-1.zone1.google.gdch.test",
  "_gdch_org_name": "org-1",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": "RBAC: allowed by RoleBinding \"fop-myusername-vm-admin/myusername-test\" of Role \"project-vm-admin\" to User \"fop-myusername\""
  },
  "apiVersion": "audit.k8s.io/v1",
  "auditID": "1446c6b9-f728-4f0d-9a70-aa8361749eef",
  "kind": "Event",
  "level": "Metadata",
  "objectRef": {
    "apiGroup": "virtualmachineoperations.gdc.goog",
    "apiVersion": "v1",
    "name": "vm1",
    "namespace": "myusername-test",
    "resource": "virtualmachines",
    "subresource": "stop"
  },
  "requestReceivedTimestamp": "2023-09-19T22:27:26.787243Z",
  "requestURI": "/apis/virtualmachineoperations.gdc.goog/v1/namespaces/myusername-test/virtualmachines/vm1/stop",
  "responseStatus": {
    "code": 202,
    "metadata": {}
  },
  "sourceIPs": [
    "10.200.0.1",
    "10.200.0.5"
  ],
  "stage": "ResponseComplete",
  "stageTimestamp": "2023-09-19T22:27:26.929619Z",
  "user": {
    "groups": [
      "system:authenticated"
    ],
    "username": "fop-myusername"
  },
  "userAgent": "Go-http-client/2.0",
  "verb": "update"
}
```

## Restart a VM

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user": { "groups": [ "system:authenticated" ], "username": "fop-myusername" } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `requestURI` | It has the following format: `"requestURI": "/apis/virtualmachineoperations.gdc.goog/v1/namespaces/namespace/virtualmachines/name/restart"` Where <var translate="no">namespace</var> and <var translate="no">name</var> identify the target object. For example, `"requestURI": "/apis/virtualmachineoperations.gdc.goog/v1/namespaces/myusername-test/virtualmachines/vm1/restart"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp": "2023-09-19T22:27:26.787243Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster": "org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus": { "code": 202, "metadata": {} } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster": "org-1-infra",
  "_gdch_fluentbit_pod": "anthos-audit-logs-forwarder-rxgp7",
  "_gdch_org_id": "org-1.zone1.google.gdch.test",
  "_gdch_org_name": "org-1",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": "RBAC: allowed by RoleBinding \"fop-myusername-vm-admin/myusername-test\" of Role \"project-vm-admin\" to User \"fop-myusername\""
  },
  "apiVersion": "audit.k8s.io/v1",
  "auditID": "1446c6b9-f728-4f0d-9a70-aa8361749eef",
  "kind": "Event",
  "level": "Metadata",
  "objectRef": {
    "apiGroup": "virtualmachineoperations.gdc.goog",
    "apiVersion": "v1",
    "name": "vm1",
    "namespace": "myusername-test",
    "resource": "virtualmachines",
    "subresource": "restart"
  },
  "requestReceivedTimestamp": "2023-09-19T22:27:26.787243Z",
  "requestURI": "/apis/virtualmachineoperations.gdc.goog/v1/namespaces/myusername-test/virtualmachines/vm1/restart",
  "responseStatus": {
    "code": 202,
    "metadata": {}
  },
  "sourceIPs": [
    "10.200.0.1",
    "10.200.0.5"
  ],
  "stage": "ResponseComplete",
  "stageTimestamp": "2023-09-19T22:27:26.929619Z",
  "user": {
    "groups": [
      "system:authenticated"
    ],
    "username": "fop-myusername"
  },
  "userAgent": "Go-http-client/2.0",
  "verb": "update"
}
```

## Pause a VM

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user": { "groups": [ "system:authenticated" ], "username": "fop-myusername" } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `requestURI` | It has the following format: `"requestURI": "/apis/virtualmachineoperations.gdc.goog/v1/namespaces/namespace/virtualmachines/name/pause"` Where <var translate="no">namespace</var> and <var translate="no">name</var> identify the target object. For example, `"requestURI": "/apis/virtualmachineoperations.gdc.goog/v1/namespaces/myusername-test/virtualmachines/vm1/pause"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp": "2023-09-19T22:27:26.787243Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster": "org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus": { "code": 202, "metadata": {} } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster": "org-1-infra",
  "_gdch_fluentbit_pod": "anthos-audit-logs-forwarder-rxgp7",
  "_gdch_org_id": "org-1.zone1.google.gdch.test",
  "_gdch_org_name": "org-1",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": "RBAC: allowed by RoleBinding \"fop-myusername-vm-admin/myusername-test\" of Role \"project-vm-admin\" to User \"fop-myusername\""
  },
  "apiVersion": "audit.k8s.io/v1",
  "auditID": "1446c6b9-f728-4f0d-9a70-aa8361749eef",
  "kind": "Event",
  "level": "Metadata",
  "objectRef": {
    "apiGroup": "virtualmachineoperations.gdc.goog",
    "apiVersion": "v1",
    "name": "vm1",
    "namespace": "myusername-test",
    "resource": "virtualmachines",
    "subresource": "pause"
  },
  "requestReceivedTimestamp": "2023-09-19T22:27:26.787243Z",
  "requestURI": "/apis/virtualmachineoperations.gdc.goog/v1/namespaces/myusername-test/virtualmachines/vm1/pause",
  "responseStatus": {
    "code": 202,
    "metadata": {}
  },
  "sourceIPs": [
    "10.200.0.1",
    "10.200.0.5"
  ],
  "stage": "ResponseComplete",
  "stageTimestamp": "2023-09-19T22:27:26.929619Z",
  "user": {
    "groups": [
      "system:authenticated"
    ],
    "username": "fop-myusername"
  },
  "userAgent": "Go-http-client/2.0",
  "verb": "update"
}
```

## Unpause a VM

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user": { "groups": [ "system:authenticated" ], "username": "fop-myusername" } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `requestURI` | It has the following format: `"requestURI": "/apis/virtualmachineoperations.gdc.goog/v1/namespaces/namespace/virtualmachines/name/unpause"` Where <var translate="no">namespace</var> and <var translate="no">name</var> identify the target object. For example, `"requestURI": "/apis/virtualmachineoperations.gdc.goog/v1/namespaces/myusername-test/virtualmachines/vm1/unpause"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp": "2023-09-19T22:27:26.787243Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster": "org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus": { "code": 202, "metadata": {} } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster": "org-1-infra",
  "_gdch_fluentbit_pod": "anthos-audit-logs-forwarder-rxgp7",
  "_gdch_org_id": "org-1.zone1.google.gdch.test",
  "_gdch_org_name": "org-1",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": "RBAC: allowed by RoleBinding \"fop-myusername-vm-admin/myusername-test\" of Role \"project-vm-admin\" to User \"fop-myusername\""
  },
  "apiVersion": "audit.k8s.io/v1",
  "auditID": "1446c6b9-f728-4f0d-9a70-aa8361749eef",
  "kind": "Event",
  "level": "Metadata",
  "objectRef": {
    "apiGroup": "virtualmachineoperations.gdc.goog",
    "apiVersion": "v1",
    "name": "vm1",
    "namespace": "myusername-test",
    "resource": "virtualmachines",
    "subresource": "unpause"
  },
  "requestReceivedTimestamp": "2023-09-19T22:27:26.787243Z",
  "requestURI": "/apis/virtualmachineoperations.gdc.goog/v1/namespaces/myusername-test/virtualmachines/vm1/unpause",
  "responseStatus": {
    "code": 202,
    "metadata": {}
  },
  "sourceIPs": [
    "10.200.0.1",
    "10.200.0.5"
  ],
  "stage": "ResponseComplete",
  "stageTimestamp": "2023-09-19T22:27:26.929619Z",
  "user": {
    "groups": [
      "system:authenticated"
    ],
    "username": "fop-myusername"
  },
  "userAgent": "Go-http-client/2.0",
  "verb": "update"
}
```

## Review emergency access actions from an IO

The Infrastructure Operator (IO) has permissions to perform all the VMM audited operations described in this document. All their actions are audit logged automatically as part of the Kubernetes audit log.

| Fields in the log entry that contain audit information |||
| Audit metadata | Audit field name | Value |
|---|---|---|
| **User or service identity** | `user` | For example, <br /> ```json "user": { "groups": [ "system:masters", "system:authenticated" ], "username": "kubernetes-admin" } ``` <br /> |
| **Target** *(Fields and values that call the API)* | `objectRef` The VM specific resources have the following pattern for the `objectRef.apiGroup`: `"virtualmachine.gdc.goog|.*kubevirt.*|.*cdi.*"` | For example, <br /> ```json "objectRef": { "resource": "vmruntimes", "apiGroup": "vm.cluster.gke.io", "apiVersion": "v1" } ``` <br /> |
| **Action** *(Fields containing the performed operation)* | `verb` | `"verb":"list"` |
| **Event timestamp** | `requestReceivedTimestamp` | For example, `"requestReceivedTimestamp":"2022-11-30T00:47:09.472822Z"` |
| **Source of action** | `_gdch_cluster` | For example, `"_gdch_cluster":"org-1-infra"` |
| **Outcome** | `responseStatus` | For example, <br /> ```json "responseStatus": { "code": 200, "metadata": {} } ``` <br /> |
| **Other fields** | *Not applicable* | *Not applicable* |

**Example log**

```json
{
  "_gdch_cluster": "org-1-infra",
  "_gdch_fluentbit_pod": "anthos-audit-logs-forwarder-ztsnr",
  "responseStatus": {
    "code": 200,
    "metadata": {}
  },
  "kind": "Event",
  "stageTimestamp": "2022-11-30T00:47:09.475563Z",
  "annotations": {
    "authorization.k8s.io/decision": "allow",
    "authorization.k8s.io/reason": ""
  },
  "sourceIPs": [
    "10.200.1.109"
  ],
  "objectRef": {
    "resource": "vmruntimes",
    "apiGroup": "virtualmachine.private.gdc.goog",
    "apiVersion": "v1"
  },
  "apiVersion": "audit.k8s.io/v1",
  "verb": "list",
  "auditID": "fe338dca-f502-4fde-ba25-98bd29341a83",
  "level": "Metadata",
  "requestURI": "/apis/virtualmachine.private.gdc.goog/v1/vmruntimes",
  "user": {
    "groups": [
      "system:masters",
      "system:authenticated"
    ],
    "username": "kubernetes-admin"
  },
  "stage": "ResponseComplete",
  "requestReceivedTimestamp": "2022-11-30T00:47:09.472822Z",
  "userAgent": "operator/v0.0.0 (linux/amd64) kubernetes/$Format",
  "_gdch_service_name": "apiserver"
}
```