Documentation
¶
Overview ¶
审计日志查询
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogInfo ¶
type LogInfo struct {
EventId string // 日志 ID
EventType string // 事件类型,仅支持 UNKNOWN 表示未知,CONSOLE 表示控制台事件,API 表示 API 事件
EventTime string // 事件发生时间(UTC 格式)
UserIdentity UserIdentify // 请求者的身份信息
EventRw string // 读写类型,仅支持 UNKNOWN 表示未知,READ 表示读,WRITE 表示写
ServiceName string // 服务名称
EventName string // 事件名称
SourceIp string // 源 IP 地址
UserAgent string // 客户端代理
ResourceNames ResourceNames // 操作的资源名称列表
RequestId string // 请求 ID
RequestUrl string // 请求 URL
RequestParams string // 请求的输入参数
ResponseData string // 请求的返回数据
ResponseCode int64 // 请求的返回码
ResponseMessage string // 请求的返回信息
AdditionalEventData string // 额外备注信息
}
返回的审计日志
func (*LogInfo) MarshalJSON ¶
func (*LogInfo) UnmarshalJSON ¶
type QueryLogResp ¶ added in v7.24.0
type QueryLogResp = Response
type Request ¶
type Request struct {
StartTime string // 检索日志的开始时间,日期格式按照 ISO8601 标准,并使用 UTC 时间
EndTime string // 检索日志的结束时间,日期格式按照 ISO8601 标准,并使用 UTC 时间
ServiceName string // 服务名称,参考 https://developer.qiniu.com/af/12434/audit-log-events
EventNames []string // 事件名称集合,参考 https://developer.qiniu.com/af/12434/audit-log-events
PrincipalId string // 请求者的 ID,参考 https://developer.qiniu.com/af/manual/12433/audit-log-object
AccessKeyId string // 请求身份所属的 AccessKey ID
Limit int64 // 允许返回的最大结果数目,取值范围:1~50,不传值默认为:20
NextMark string // 用于请求下一页检索的结果
Credentials credentials.CredentialsProvider // 鉴权参数,用于生成鉴权凭证,如果为空,则使用 HTTPClientOptions 中的 CredentialsProvider
}
调用 API 所用的请求
type UserIdentity ¶
type UserIdentity struct {
AccountId string // 当前请求所属的七牛云账号 ID
PrincipalId string // 当前请求者的 ID,需结合 principal_type 来确认请求者身份
PrincipalType string // 请求者身份类型,仅支持 UNKNOWN 表示未知,ROOT_USER 表示七牛云账户 ID,IAM_USER 表示 IAM 子账户 ID,QINIU_ACCOUNT 表示当七牛云账号跨账号操作时,记录七牛云账号 ID
AccessKeyId string // 当前请求身份所属的 AccessKey ID
}
请求者的身份信息
func (*UserIdentity) MarshalJSON ¶
func (j *UserIdentity) MarshalJSON() ([]byte, error)
func (*UserIdentity) UnmarshalJSON ¶
func (j *UserIdentity) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.