Beispiel für Object Storage

Im Folgenden finden Sie ein Beispiel für einen Loggingbefehl, der sich auf Object Storage bezieht.

So erstellen Sie eine Loggruppe und ein Log in Object Storage

oci logging log-group create --compartment-id <compartment_OCID> 
 --display-name CLITestLogGroup
oci logging log create --display-name object_log_write --log-group-id <log_group_OCID>
 --log-type SERVICE --is-enabled true --configuration file://~/.oci/objectstorage_configuration.json

objectstorage_configuration.json:

{
  "archiving": {
    "isEnabled": true
  },
  "compartmentId": "ocid1.compartment.oc1..<unique_ID>",                 
  "source": [
    {
      "category":"write",
      "parameters": null,
      "resource": "bucket-cli-sample",    
      "service": "objectstorage",       
      "sourceType": "OCISERVICE"
    }
  ]
}