百度智能云

All Product Document

          Baremetal Compute Sevice

          Operation Log

          Query Operation Log

          Query the specified operation log by the following code.

          // The starting location of query for batch acquisition of lists, and is one string generated by the system. 
          marker := "your-marker" 
          // Maximum number contained in each page, generally not exceeding 1000. The default value is 100. 
          maxKeys := 100 
          // To query the start time of physical machine operation (UTC time), the format is yyyy-MM-dd'T'HH:mm:ss'Z' ; if it is empty, query the operation log of the day 
          startTime := "" 
          // To query the end time (UTC time) of the physical machine operation, the format is yyyy-MM-dd'T'HH:mm:ss'Z' ; if it is empty, query the operation log of the day 
          endTime := "" 
          queryArgs := &GetOperationLogArgs{ 
              Marker:    marker, 
          	 MaxKeys:   maxKeys, 
          	 StartTime: startTime, 
          	 EndTime:   endTime, 
          } 
          if res, err := bbcClient.ListImage(queryArgs); err != nil { 
              fmt.Println("Get Operation Log failed: ", err) 
          } else { 
              fmt.Println("Get Operation Log success, result: ", res) 
          } 
          Previous
          Tag