文档

对象存储OSS事件

更新时间:

本文介绍对象存储OSS作为事件源发布到事件总线EventBridge的事件类型。

支持的地域

支持对象存储OSS发布到事件总线EventBridge的地域有华东1(杭州)、华东2(上海)、华北2(北京)、华北3(张家口)、华南1(深圳)、西南1(成都)、美国(硅谷)、新加坡和日本(东京)。

事件类型

对象存储OSS支持发布到事件总线EventBridge的事件类型如下所示。

事件类型

type参数值

创建存储空间

oss:BucketCreated:PutBucket

删除存储空间

oss:BucketRemoved:DeleteBucket

以追加写的方式上传文件

oss:ObjectCreated:AppendObject

拷贝文件

oss:ObjectCreated:CopyObject

通过HTML表单上传文件

oss:ObjectCreated:PostObject

上传文件

oss:ObjectCreated:PutObject

创建软链接

oss:ObjectCreated:PutSymlink

删除文件

oss:ObjectRemoved:DeleteObject

初始化分片上传

oss:ObjectCreated:InitiateMultipartUpload

上传文件分片

oss:ObjectCreated:UploadPart

以拷贝方式上传文件分片

oss:ObjectCreated:UploadPartCopy

文件分片上传已完成

oss:ObjectCreated:CompleteMultipartUpload

文件分片上传已取消

oss:ObjectRemoved:AbortMultipartUpload

解冻数据文件已完成

oss:ObjectRestore:FinishRestore

通过跨区域复制生成文件

oss:ObjectReplication:ObjectCreated

通过跨区域复制覆盖文件

oss:ObjectReplication:ObjectModified

通过跨区域复制删除文件

oss:ObjectReplication:ObjectRemoved

阿里云平台对资源执行的操作事件

oss:ActionTrail:AliyunServiceEvent

API调用

oss:ActionTrail:ApiCall

控制台的操作事件

oss:ActionTrail:ConsoleOperation

Bucket下行带宽超过汇报阈值

oss:CloudMonitor:BucketEgressBandwidth

Bucket下行带宽超过流控阈值

oss:CloudMonitor:BucketEgressBandwidthThresholdExceeded

Bucket图片处理占用CPU核数超过流控阈值

oss:CloudMonitor:BucketImageCpuThresholdExceeded

Bucket上行带宽超过汇报阈值

oss:CloudMonitor:BucketIngressBandwidth

Bucket上行带宽超过流控阈值

oss:CloudMonitor:BucketIngressBandwidthThresholdExceeded

Bucket镜像回源带宽超过流控阈值

oss:CloudMonitor:BucketMirrorIngressBandwidthThresholdExceeded

Bucket镜像回源QPS超过流控阈值

oss:CloudMonitor:BucketMirrorQpsThresholdExceeded

Bucket每秒请求数超过QPS流控阈值

oss:CloudMonitor:BucketQpsThresholdExceeded

User下行带宽超过汇报阈值

oss:CloudMonitor:UserEgressBandwidth

User下行带宽超过流控阈值

oss:CloudMonitor:UserEgressBandwidthThresholdExceeded

User图片处理占用CPU核数超过流控阈值

oss:CloudMonitor:UserImageCpuThresholdExceeded

User上行带宽超过汇报阈值

oss:CloudMonitor:UserIngressBandwidth

User上行带宽超过流控阈值

oss:CloudMonitor:UserIngressBandwidthThresholdExceeded

User镜像回源带宽超过流控阈值

oss:CloudMonitor:UserMirrorIngressBandwidthThresholdExceeded

User镜像回源QPS超过流控阈值

oss:CloudMonitor:UserMirrorQpsThresholdExceeded

User QPS超过流控阈值

oss:CloudMonitor:UserQpsThresholdExceeded

资源变更投递

oss:Config:ConfigurationItemChangeNotification

资源评估不合规通知

oss:Config:NonCompliantNotification

CloudEvents规范中定义的参数解释,请参见事件概述

创建存储空间

存储空间(Bucket)是用于存储对象(Object)的容器。在上传任意类型的Object前,您需要先创建Bucket。创建存储空间时,事件总线EventBridge接收到的示例事件如下所示。

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"164901546557****",
    "data":{
        "region":"cn-beijing",
        "eventVersion":"1.0",
        "eventSource":"acs:oss",
        "eventName":"BucketCreated:PutBucket",
        "eventTime":"2021-08-13T06:45:43.000Z",
        "requestParameters":{
            "sourceIPAddress":"118.31.XX.XX"
        },
        "userIdentity":{
            "principalId":"28815334868278****"
        },
        "responseElements":{
            "requestId":"61161517B258223732BC****"
        },
        "oss":{
            "bucket":{
                "name":"oss-source-bucket1-cn-beijing",
                "arn":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing",
                "ownerIdentity":"164901546557****"
            },
            "ossSchemaVersion":"1.0"
        }
    },
    "subject":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing/1628837143916",
    "aliyunoriginalaccountid":"164901546557****",
    "source":"acs.oss",
    "type":"oss:BucketCreated:PutBucket",
    "aliyunpublishtime":"2021-08-13T06:45:43.986Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"61161517B258223732BC****",
    "time":"2021-08-13T06:45:43Z",
    "aliyunregionid":"cn-beijing"
}

data字段包含的参数解释如下表所示。

参数

类型

示例值

描述

region

String

cn-beijing

bucket所在的地域。

eventVersion

String

1.0

事件协议的版本。

eventSource

String

acs:oss

事件源,固定为acs.oss

eventName

String

BucketCreated:PutBucket

事件类型。

eventTime

String

2021-08-13T06:45:43.000Z

事件产生的时间。使用ISO-8601标准时间格式。

requestParameters

String

请求参数。

sourceIPAddress

String

118.31.XX.XX

请求消息的源IP地址。

userIdentity

Map

用户信息。

principalId

String

28815334868278****

请求发起者的用户ID。

responseElements

Map

返回参数。

requestId

String

61161517B258223732BC****

请求对应的Request ID。

oss

Map

OSS事件内容。

bucket

Map

bucket参数内容。

name

String

oss-source-bucket1-cn-beijing

Bucket的名称。

arn

String

acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing

Bucket的唯一标识符。

ownerIdentity

String

164901546557****

创建Bucket的用户ID。

ossSchemaVersion

String

1.0

OSS模式的版本号。

删除存储空间

删除存储空间时,事件总线EventBridge接收到的示例事件如下所示。

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"164901546557****",
    "data":{
        "region":"cn-beijing",
        "eventVersion":"1.0",
        "eventSource":"acs:oss",
        "eventName":"BucketCreated:DeleteBucket",
        "eventTime":"2021-08-13T06:45:43.000Z",
        "requestParameters":{
            "sourceIPAddress":"118.31.XX.XX"
        },
        "userIdentity":{
            "principalId":"28815334868278****"
        },
        "responseElements":{
            "requestId":"61161517B258223732BC****"
        },
        "oss":{
            "bucket":{
                "name":"oss-source-bucket1-cn-beijing",
                "arn":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing",
                "ownerIdentity":"164901546557****"
            },
            "ossSchemaVersion":"1.0"
        }
    },
    "subject":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing/1628837143916",
    "aliyunoriginalaccountid":"164901546557****",
    "source":"acs.oss",
    "type":"oss:BucketCreated:DeleteBucket",
    "aliyunpublishtime":"2021-08-13T06:45:43.986Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"61161517B258223732BC****",
    "time":"2021-08-13T06:45:43Z",
    "aliyunregionid":"cn-beijing"
}

关于data字段包含的参数解释,请参见参数解释

以追加写的方式上传文件

以追加写的方式上传文件时,事件总线EventBridge接收到的示例事件如下所示。

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"164901546557****",
    "data":{
        "region":"cn-beijing",
        "eventVersion":"1.0",
        "eventSource":"acs:oss",
        "eventName":"ObjectCreated:AppendObject",
        "eventTime":"2021-08-13T06:45:43.000Z",
        "requestParameters":{
            "sourceIPAddress":"118.31.XX.XX"
        },
        "userIdentity":{
            "principalId":"28815334868278****"
        },
        "responseElements":{
            "requestId":"61161517B258223732BC****"
        },
        "oss":{
            "bucket":{
                "name":"oss-source-bucket1-cn-beijing",
                "arn":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing",
                "ownerIdentity":"164901546557****"
            },
            "ossSchemaVersion":"1.0",
            "object":{
                "size":9,
                "deltaSize":9,
                "eTag":"F0F18C2C66AE1DD512BDCD4366F7****",
                "key":"objectname",
                "position":0
            }
        }
    },
    "subject":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing/1628837143916",
    "aliyunoriginalaccountid":"164901546557****",
    "source":"acs.oss",
    "type":"oss:ObjectCreated:AppendObject",
    "aliyunpublishtime":"2021-08-13T06:45:43.986Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"61161517B258223732BC****",
    "time":"2021-08-13T06:45:43Z",
    "aliyunregionid":"cn-beijing"
}

data字段包含的参数解释如下表所示。

参数

类型

示例值

描述

region

String

cn-beijing

bucket所在的地域。

eventVersion

String

1.0

事件协议的版本。

eventSource

String

acs:oss

事件源,固定为“acs:oss”。

eventName

String

ObjectCreated:AppendObject

事件类型。

eventTime

String

2021-08-13T06:45:43.000Z

事件产生的时间。使用ISO-8601标准时间格式。

requestParameters

String

请求参数。

sourceIPAddress

String

118.31.XX.XX

请求消息的源IP地址。

userIdentity

Map

用户信息。

principalId

String

28815334868278****

请求发起者的用户ID。

responseElements

Map

返回参数。

requestId

String

61161517B258223732BC****

请求对应的Request ID。

oss

Map

OSS事件内容。

bucket

Map

bucket参数内容。

name

String

oss-source-bucket1-cn-beijing

Bucket的名称。

arn

String

acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing

Bucket的唯一标识符。

ownerIdentity

String

164901546557****

创建Bucket的用户ID。

ossSchemaVersion

String

1.0

OSS模式的版本号。

object

Map

object参数内容。

size

Int

9

object的大小。单位:Byte。

deltaSize

Int

9

object的大小变化量。单位:Byte。

  • 如果新增一个文件,此参数的值表示文件大小。

  • 如果同名覆盖一个文件,此参数的值表示新文件与旧文件的大小差值。

eTag

String

F0F18C2C66AE1DD512BDCD4366F7****

Object的标签。

key

String

objectname

Object的名称。

position

Int

0

以追加写的方式上传文件时,开始追加的位置。首次追加从0字节开始。

拷贝文件

拷贝文件时,事件总线EventBridge接收到的示例事件如下所示。

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"164901546557****",
    "data":{
        "region":"cn-beijing",
        "eventVersion":"1.0",
        "eventSource":"acs:oss",
        "eventName":"ObjectCreated:CopyObject",
        "eventTime":"2021-08-13T06:45:43.000Z",
        "requestParameters":{
            "sourceIPAddress":"118.31.XX.XX"
        },
        "userIdentity":{
            "principalId":"28815334868278****"
        },
        "responseElements":{
            "requestId":"61161517B258223732BC****"
        },
        "oss":{
            "bucket":{
                "name":"oss-source-bucket1-cn-beijing",
                "arn":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing",
                "ownerIdentity":"164901546557****"
            },
            "ossSchemaVersion":"1.0",
            "object":{
                "size":9,
                "deltaSize":9,
                "eTag":"F0F18C2C66AE1DD512BDCD4366F7****",
                "key":"objectname"
            }
        }
    },
    "subject":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing/1628837143916",
    "aliyunoriginalaccountid":"164901546557****",
    "source":"acs.oss",
    "type":"oss:ObjectCreated:CopyObject",
    "aliyunpublishtime":"2021-08-13T06:45:43.986Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"61161517B258223732BC****",
    "time":"2021-08-13T06:45:43Z",
    "aliyunregionid":"cn-beijing"
}

关于data字段包含的参数解释如下表所示。

参数

类型

示例值

描述

region

String

cn-beijing

bucket所在的地域。

eventVersion

String

1.0

事件协议的版本。

eventSource

String

acs:oss

事件源,固定为“acs:oss”。

eventName

String

ObjectCreated:AppendObject

事件类型。

eventTime

String

2021-08-13T06:45:43.000Z

事件产生的时间。使用ISO-8601标准时间格式。

requestParameters

String

请求参数。

sourceIPAddress

String

118.31.XX.XX

请求消息的源IP地址。

userIdentity

Map

用户信息。

principalId

String

28815334868278****

请求发起者的用户ID。

responseElements

Map

返回参数。

requestId

String

61161517B258223732BC****

请求对应的Request ID。

oss

Map

OSS事件内容。

bucket

Map

bucket参数内容。

name

String

oss-source-bucket1-cn-beijing

Bucket的名称。

arn

String

acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing

Bucket的唯一标识符。

ownerIdentity

String

164901546557****

创建Bucket的用户ID。

ossSchemaVersion

String

1.0

OSS模式的版本号。

object

Map

object参数内容。

size

Int

9

object的大小。单位:Byte。

deltaSize

Int

9

object的大小变化量。单位:Byte。

  • 如果新增一个文件,此参数的值表示文件大小。

  • 如果同名覆盖一个文件,此参数的值表示新文件与旧文件的大小差值。

eTag

String

F0F18C2C66AE1DD512BDCD4366F7****

Object的标签。

key

String

objectname

Object的名称。

通过HTML表单上传文件

通过HTML表单上传文件时,事件总线EventBridge接收到的示例事件如下所示。

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"164901546557****",
    "data":{
        "region":"cn-beijing",
        "eventVersion":"1.0",
        "eventSource":"acs:oss",
        "eventName":"ObjectCreated:PostObject",
        "eventTime":"2021-08-13T06:45:43.000Z",
        "requestParameters":{
            "sourceIPAddress":"118.31.XX.XX"
        },
        "userIdentity":{
            "principalId":"28815334868278****"
        },
        "responseElements":{
            "requestId":"61161517B258223732BC****"
        },
        "oss":{
            "bucket":{
                "name":"oss-source-bucket1-cn-beijing",
                "arn":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing",
                "ownerIdentity":"164901546557****"
            },
            "ossSchemaVersion":"1.0",
            "object":{
                "size":9,
                "deltaSize":9,
                "eTag":"F0F18C2C66AE1DD512BDCD4366F7****",
                "key":"objectname"
            }
        }
    },
    "subject":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing/1628837143916",
    "aliyunoriginalaccountid":"164901546557****",
    "source":"acs.oss",
    "type":"oss:ObjectCreated:PostObject",
    "aliyunpublishtime":"2021-08-13T06:45:43.986Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"61161517B258223732BC****",
    "time":"2021-08-13T06:45:43Z",
    "aliyunregionid":"cn-beijing"
}

关于data字段包含的参数解释,请参见参数解释

上传文件

上传文件时,事件总线EventBridge接收到的示例事件如下所示。

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"164901546557****",
    "data":{
        "region":"cn-beijing",
        "eventVersion":"1.0",
        "eventSource":"acs:oss",
        "eventName":"ObjectCreated:PutObject",
        "eventTime":"2021-08-13T06:45:43.000Z",
        "requestParameters":{
            "sourceIPAddress":"118.31.XX.XX"
        },
        "userIdentity":{
            "principalId":"28815334868278****"
        },
        "responseElements":{
            "requestId":"61161517B258223732BC****"
        },
        "oss":{
            "bucket":{
                "name":"oss-source-bucket1-cn-beijing",
                "arn":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing",
                "ownerIdentity":"164901546557****"
            },
            "ossSchemaVersion":"1.0",
            "object":{
                "size":9,
                "deltaSize":9,
                "eTag":"F0F18C2C66AE1DD512BDCD4366F7****",
                "key":"objectname"
            }
        }
    },
    "subject":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing/1628837143916",
    "aliyunoriginalaccountid":"164901546557****",
    "source":"acs.oss",
    "type":"oss:ObjectCreated:PutObject",
    "aliyunpublishtime":"2021-08-13T06:45:43.986Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"61161517B258223732BC****",
    "time":"2021-08-13T06:45:43Z",
    "aliyunregionid":"cn-beijing"
}

关于data字段包含的参数解释,请参见参数解释

创建软链接

创建软链接时,事件总线EventBridge接收到的示例事件如下所示。

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"164901546557****",
    "data":{
        "region":"cn-beijing",
        "eventVersion":"1.0",
        "eventSource":"acs:oss",
        "eventName":"ObjectCreated:PutSymlink",
        "eventTime":"2021-08-13T06:45:43.000Z",
        "requestParameters":{
            "sourceIPAddress":"118.31.XX.XX"
        },
        "userIdentity":{
            "principalId":"28815334868278****"
        },
        "responseElements":{
            "requestId":"61161517B258223732BC****"
        },
        "oss":{
            "bucket":{
                "name":"oss-source-bucket1-cn-beijing",
                "arn":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing",
                "ownerIdentity":"164901546557****"
            },
            "ossSchemaVersion":"1.0",
            "object":{
                "size":9,
                "deltaSize":9,
                "eTag":"F0F18C2C66AE1DD512BDCD4366F7****",
                "key":"objectname"
            }
        }
    },
    "subject":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing/1628837143916",
    "aliyunoriginalaccountid":"164901546557****",
    "source":"acs.oss",
    "type":"oss:ObjectCreated:PutSymlink",
    "aliyunpublishtime":"2021-08-13T06:45:43.986Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"61161517B258223732BC****",
    "time":"2021-08-13T06:45:43Z",
    "aliyunregionid":"cn-beijing"
}

关于data字段包含的参数解释,请参见参数解释

删除文件

删除文件时,事件总线EventBridge接收到的示例事件如下所示。

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"164901546557****",
    "data":{
        "region":"cn-beijing",
        "eventVersion":"1.0",
        "eventSource":"acs:oss",
        "eventName":"ObjectRemoved:DeleteObject",
        "eventTime":"2021-08-13T06:45:43.000Z",
        "requestParameters":{
            "sourceIPAddress":"118.31.XX.XX"
        },
        "userIdentity":{
            "principalId":"28815334868278****"
        },
        "responseElements":{
            "requestId":"61161517B258223732BC****"
        },
        "oss":{
            "bucket":{
                "name":"oss-source-bucket1-cn-beijing",
                "arn":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing",
                "ownerIdentity":"164901546557****"
            },
            "ossSchemaVersion":"1.0",
            "object":{
                "size":9,
                "deltaSize":9,
                "eTag":"F0F18C2C66AE1DD512BDCD4366F7****",
                "key":"objectname"
            }
        }
    },
    "subject":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing/1628837143916",
    "aliyunoriginalaccountid":"164901546557****",
    "source":"acs.oss",
    "type":"oss:ObjectRemoved:DeleteObject",
    "aliyunpublishtime":"2021-08-13T06:45:43.986Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"61161517B258223732BC****",
    "time":"2021-08-13T06:45:43Z",
    "aliyunregionid":"cn-beijing"
}

关于data字段包含的参数解释,请参见参数解释

初始化分片上传

初始化分片上传时,事件总线EventBridge接收到的示例事件如下所示。

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"164901546557****",
    "data":{
        "region":"cn-beijing",
        "eventVersion":"1.0",
        "eventSource":"acs:oss",
        "eventName":"ObjectCreated:InitiateMultipartUpload",
        "eventTime":"2021-08-13T06:45:43.000Z",
        "requestParameters":{
            "sourceIPAddress":"118.31.XX.XX"
        },
        "userIdentity":{
            "principalId":"28815334868278****"
        },
        "responseElements":{
            "requestId":"61161517B258223732BC****"
        },
        "oss":{
            "bucket":{
                "name":"oss-source-bucket1-cn-beijing",
                "arn":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing",
                "ownerIdentity":"164901546557****"
            },
            "ossSchemaVersion":"1.0",
            "object":{
                "size":9,
                "deltaSize":9,
                "eTag":"F0F18C2C66AE1DD512BDCD4366F7****",
                "key":"objectname"
            }
        }
    },
    "subject":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing/1628837143916",
    "aliyunoriginalaccountid":"164901546557****",
    "source":"acs.oss",
    "type":"oss:ObjectCreated:InitiateMultipartUpload",
    "aliyunpublishtime":"2021-08-13T06:45:43.986Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"61161517B258223732BC****",
    "time":"2021-08-13T06:45:43Z",
    "aliyunregionid":"cn-beijing"
}

关于data字段包含的参数解释,请参见参数解释

上传文件分片

上传文件分片时,事件总线EventBridge接收到的示例事件如下所示。

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"164901546557****",
    "data":{
        "region":"cn-beijing",
        "eventVersion":"1.0",
        "eventSource":"acs:oss",
        "eventName":"ObjectCreated:UploadPart",
        "eventTime":"2021-08-13T06:45:43.000Z",
        "requestParameters":{
            "sourceIPAddress":"118.31.XX.XX"
        },
        "userIdentity":{
            "principalId":"28815334868278****"
        },
        "responseElements":{
            "requestId":"61161517B258223732BC****"
        },
        "oss":{
            "bucket":{
                "name":"oss-source-bucket1-cn-beijing",
                "arn":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing",
                "ownerIdentity":"164901546557****"
            },
            "ossSchemaVersion":"1.0",
            "object":{
                "size":9,
                "deltaSize":9,
                "eTag":"F0F18C2C66AE1DD512BDCD4366F7****",
                "key":"objectname"
            }
        }
    },
    "subject":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing/1628837143916",
    "aliyunoriginalaccountid":"164901546557****",
    "source":"acs.oss",
    "type":"oss:ObjectCreated:UploadPart",
    "aliyunpublishtime":"2021-08-13T06:45:43.986Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"61161517B258223732BC****",
    "time":"2021-08-13T06:45:43Z",
    "aliyunregionid":"cn-beijing"
}

关于data字段包含的参数解释,请参见参数解释

以拷贝方式上传文件分片

以拷贝方式上传文件分片时,事件总线EventBridge接收到的示例事件如下所示。

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"164901546557****",
    "data":{
        "region":"cn-beijing",
        "eventVersion":"1.0",
        "eventSource":"acs:oss",
        "eventName":"ObjectCreated:UploadPartCopy",
        "eventTime":"2021-08-13T06:45:43.000Z",
        "requestParameters":{
            "sourceIPAddress":"118.31.XX.XX"
        },
        "userIdentity":{
            "principalId":"28815334868278****"
        },
        "responseElements":{
            "requestId":"61161517B258223732BC****"
        },
        "oss":{
            "bucket":{
                "name":"oss-source-bucket1-cn-beijing",
                "arn":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing",
                "ownerIdentity":"164901546557****"
            },
            "ossSchemaVersion":"1.0",
            "object":{
                "size":9,
                "deltaSize":9,
                "eTag":"F0F18C2C66AE1DD512BDCD4366F7****",
                "key":"objectname"
            }
        }
    },
    "subject":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing/1628837143916",
    "aliyunoriginalaccountid":"164901546557****",
    "source":"acs.oss",
    "type":"oss:ObjectCreated:UploadPartCopy",
    "aliyunpublishtime":"2021-08-13T06:45:43.986Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"61161517B258223732BC****",
    "time":"2021-08-13T06:45:43Z",
    "aliyunregionid":"cn-beijing"
}

关于data字段包含的参数解释,请参见参数解释

文件分片上传已完成

文件分片上传已完成时,事件总线EventBridge接收到的示例事件如下所示。

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"164901546557****",
    "data":{
        "region":"cn-beijing",
        "eventVersion":"1.0",
        "eventSource":"acs:oss",
        "eventName":"ObjectCreated:CompleteMultipartUpload",
        "eventTime":"2021-08-13T06:45:43.000Z",
        "requestParameters":{
            "sourceIPAddress":"118.31.XX.XX"
        },
        "userIdentity":{
            "principalId":"28815334868278****"
        },
        "responseElements":{
            "requestId":"61161517B258223732BC****"
        },
        "oss":{
            "bucket":{
                "name":"oss-source-bucket1-cn-beijing",
                "arn":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing",
                "ownerIdentity":"164901546557****"
            },
            "ossSchemaVersion":"1.0",
            "object":{
                "size":9,
                "deltaSize":9,
                "eTag":"F0F18C2C66AE1DD512BDCD4366F7****",
                "key":"objectname"
            }
        }
    },
    "subject":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing/1628837143916",
    "aliyunoriginalaccountid":"164901546557****",
    "source":"acs.oss",
    "type":"oss:ObjectCreated:CompleteMultipartUpload",
    "aliyunpublishtime":"2021-08-13T06:45:43.986Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"61161517B258223732BC****",
    "time":"2021-08-13T06:45:43Z",
    "aliyunregionid":"cn-beijing"
}

关于data字段包含的参数解释,请参见参数解释

文件分片上传已取消

文件分片上传已取消时,事件总线EventBridge接收到的示例事件如下所示。

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"164901546557****",
    "data":{
        "region":"cn-beijing",
        "eventVersion":"1.0",
        "eventSource":"acs:oss",
        "eventName":"ObjectRemoved:AbortMultipartUpload",
        "eventTime":"2021-08-13T06:45:43.000Z",
        "requestParameters":{
            "sourceIPAddress":"118.31.XX.XX"
        },
        "userIdentity":{
            "principalId":"28815334868278****"
        },
        "responseElements":{
            "requestId":"61161517B258223732BC****"
        },
        "oss":{
            "bucket":{
                "name":"oss-source-bucket1-cn-beijing",
                "arn":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing",
                "ownerIdentity":"164901546557****"
            },
            "ossSchemaVersion":"1.0",
            "object":{
                "size":9,
                "deltaSize":9,
                "eTag":"F0F18C2C66AE1DD512BDCD4366F7****",
                "key":"objectname"
            }
        }
    },
    "subject":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing/1628837143916",
    "aliyunoriginalaccountid":"164901546557****",
    "source":"acs.oss",
    "type":"oss:ObjectRemoved:AbortMultipartUpload",
    "aliyunpublishtime":"2021-08-13T06:45:43.986Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"61161517B258223732BC****",
    "time":"2021-08-13T06:45:43Z",
    "aliyunregionid":"cn-beijing"
}

关于data字段包含的参数解释,请参见参数解释

解冻数据文件已完成

解冻数据文件完成时,事件总线EventBridge接收到的示例事件如下所示。

{
    "datacontenttype":"application/json;charset=utf-8",
    "aliyunaccountid":"164901546557****",
    "data":{
        "region":"cn-beijing",
        "eventVersion":"1.0",
        "eventSource":"acs:oss",
        "eventName":"ObjectRestore:FinishRestore",
        "eventTime":"2021-08-13T06:45:43.000Z",
        "requestParameters":{
            "sourceIPAddress":"118.31.XX.XX"
        },
        "userIdentity":{
            "principalId":"28815334868278****"
        },
        "responseElements":{
            "requestId":"61161517B258223732BC****"
        },
        "oss":{
            "bucket":{
                "name":"oss-source-bucket1-cn-beijing",
                "arn":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing",
                "ownerIdentity":"164901546557****"
            },
            "ossSchemaVersion":"1.0",
            "object":{
                "size":9,
                "deltaSize":9,
                "eTag":"F0F18C2C66AE1DD512BDCD4366F7****",
                "key":"objectname"
            }
        }
    },
    "subject":"acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing/1628837143916",
    "aliyunoriginalaccountid":"164901546557****",
    "source":"acs.oss",
    "type":"oss:ObjectRestore:FinishRestore",
    "aliyunpublishtime":"2021-08-13T06:45:43.986Z",
    "specversion":"1.0",
    "aliyuneventbusname":"default",
    "id":"61161517B258223732BC****",
    "time":"2021-08-13T06:45:43Z",
    "aliyunregionid":"cn-beijing"
}

关于data字段包含的参数解释如下表所示。

参数

类型

示例值

描述

region

String

cn-beijing

bucket所在的地域。

eventVersion

String

1.0

事件协议的版本。

eventSource

String

acs:oss

事件源,固定为“acs:oss”。

eventName

String

ObjectRestore:FinishRestore

事件类型。

eventTime

String

2021-08-13T06:45:43.000Z

事件产生的时间。使用ISO-8601标准时间格式。

sourceIPAddress

String

118.31.XX.XX

请求消息的源IP地址。

principalId

String

28815334868278****

请求发起者的用户ID。

requestId

String

61161517B258223732BC****

请求对应的Request ID。

name

String

oss-source-bucket1-cn-beijing

Bucket的名称。

arn

String

acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-beijing

Bucket的唯一标识符。

ownerIdentity

String

164901546557****

创建Bucket的用户ID。

ossSchemaVersion

String

1.0

OSS模式的版本号。

size

Int

9

object的大小。单位:Byte。

deltaSize

Int

9

object的大小变化量。单位:Byte。

  • 如果新增一个文件,此参数的值表示文件大小。

  • 如果同名覆盖一个文件,此参数的值表示新文件与旧文件的大小差值。

eTag

String

F0F18C2C66AE1DD512BDCD4366F7****

Object的标签。

key

String

objectname

Object的名称。

通过跨区域复制生成文件

通过跨区域复制生成文件时,事件总线EventBridge接收到的示例事件如下所示。

{
    "id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
    "source": "acs.oss",
    "specversion": "1.0",
    "subject": "acs.oss:cn-hangzhou:161234567890984901546557****:oss-source-bucket1-cn-hangzhou/1628837143916",
    "time": "2020-11-19T21:04:41+08:00",
    "type": "oss:ObjectReplication:ObjectCreated",
    "aliyunaccountid": "123456789098****",
    "aliyunpublishtime": "2020-11-19T21:04:42Z",
    "aliyuneventbusname": "default",
    "aliyunregionid": "cn-hangzhou",
    "aliyunpublishaddr": "172.25.XX.XX",
    "datacontenttype":"application/json;charset=utf-8",
    "data": {
        "region":"cn-hangzhou",
        "eventVersion":"1.0",
        "eventSource":"acs:oss",
        "eventName":"ObjectReplication:ObjectCreated",
        "eventTime":"2021-08-13T06:45:43.000Z",
        "requestParameters":{
            "sourceIPAddress":"118.31.XX.XX"
        },
        "userIdentity":{
            "principalId":"28815334868278****"
        },
        "responseElements":{
            "requestId":"61161517B258223732BC****"
        },
        "oss":{
            "bucket":{
                "name":"oss-source-bucket1-cn-hangzhou",
                "arn":"acs:oss:cn-hangzhou:123456789098****:oss-source-bucket1-cn-hangzhou",
                "ownerIdentity":"164901546557****"
            },
            "ossSchemaVersion":"1.0",
            "object":{
                "size":9,
                "deltaSize":9,
                "eTag":"F0F18C2C66AE1DD512BDCD4366F7****",
                "key":"objectname",
                "objectMeta": {
                    "mimeType": "application/octet-stream"
                }
            }
        }
    }
}

关于data字段包含的参数解释如下表所示。

参数

类型

示例值

描述

region

String

cn-hangzhou

bucket所在的地域。

eventVersion

String

1.0

事件协议的版本。

eventSource

String

acs:oss

事件源,固定为“acs:oss”。

eventName

String

ObjectReplication:ObjectCreated

事件类型。

eventTime

String

2021-08-13T06:45:43.000Z

事件产生的时间。使用ISO-8601标准时间格式。

sourceIPAddress

String

118.31.XX.XX

请求消息的源IP地址。

principalId

String

28815334868278****

请求发起者的用户ID。

requestId

String

61161517B258223732BC****

请求对应的Request ID。

name

String

oss-source-bucket1-cn-beijing

Bucket的名称。

arn

String

acs:oss:cn-beijing:164901546557****:oss-source-bucket1-cn-hangzhou

Bucket的唯一标识符。

ownerIdentity

String

164901546557****

创建Bucket的用户ID。

ossSchemaVersion

String

1.0

OSS模式的版本号。

size

Int

9

object的大小。单位:Byte。

deltaSize

Int

9

object的大小变化量。单位:Byte。

  • 如果新增一个文件,此参数的值表示文件大小。

  • 如果同名覆盖一个文件,此参数的值表示新文件与旧文件的大小差值。

eTag

String

F0F18C2C66AE1DD512BDCD4366F7****

Object的标签。

key

String

objectname

Object的名称。

objectMeta

Object

Object的属性。

mimeType

String

application/octet-stream

媒体类型。

通过跨区域复制覆盖文件

通过跨区域复制覆盖文件时,事件总线EventBridge接收到的示例事件如下所示。

{
    "id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
    "source": "acs.oss",
    "specversion": "1.0",
    "subject": "acs.oss:cn-hangzhou:161234567890984901546557****:oss-source-bucket1-cn-hangzhou/1628837143916",
    "time": "2020-11-19T21:04:41+08:00",
    "type": "oss:ObjectReplication:ObjectModified",
    "aliyunaccountid": "123456789098****",
    "aliyunpublishtime": "2020-11-19T21:04:42Z",
    "aliyuneventbusname": "default",
    "aliyunregionid": "cn-hangzhou",
    "aliyunpublishaddr": "172.25.XX.XX",
    "datacontenttype":"application/json;charset=utf-8",
    "data": {
        "region":"cn-hangzhou",
        "eventVersion":"1.0",
        "eventSource":"acs:oss",
        "eventName":"ObjectReplication:ObjectModified",
        "eventTime":"2021-08-13T06:45:43.000Z",
        "requestParameters":{
            "sourceIPAddress":"118.31.XX.XX"
        },
        "userIdentity":{
            "principalId":"28815334868278****"
        },
        "responseElements":{
            "requestId":"61161517B258223732BC****"
        },
        "oss":{
            "bucket":{
                "name":"oss-source-bucket1-cn-hangzhou",
                "arn":"acs:oss:cn-hangzhou:123456789098****:oss-source-bucket1-cn-hangzhou",
                "ownerIdentity":"164901546557****"
            },
            "ossSchemaVersion":"1.0",
            "object":{
                "size":9,
                "deltaSize":9,
                "eTag":"F0F18C2C66AE1DD512BDCD4366F7****",
                "key":"objectname",
                "objectMeta": {
                    "mimeType": "application/octet-stream"
                }
            }
        }
    }
}

关于data字段包含的参数解释,请参见参数解释

通过跨区域复制删除文件

通过跨区域复制删除文件时,事件总线EventBridge接收到的示例事件如下所示。

{
    "id": "45ef4dewdwe1-7c35-447a-bd93-fab****",
    "source": "acs.oss",
    "specversion": "1.0",
    "subject": "acs.oss:cn-hangzhou:161234567890984901546557****:oss-source-bucket1-cn-hangzhou/1628837143916",
    "time": "2020-11-19T21:04:41+08:00",
    "type": "oss:ObjectReplication:ObjectRemoved",
    "aliyunaccountid": "123456789098****",
    "aliyunpublishtime": "2020-11-19T21:04:42Z",
    "aliyuneventbusname": "default",
    "aliyunregionid": "cn-hangzhou",
    "aliyunpublishaddr": "172.25.XX.XX",
    "datacontenttype":"application/json;charset=utf-8",
    "data": {
        "region":"cn-hangzhou",
        "eventVersion":"1.0",
        "eventSource":"acs:oss",
        "eventName":"ObjectReplication:ObjectRemoved",
        "eventTime":"2021-08-13T06:45:43.000Z",
        "requestParameters":{
            "sourceIPAddress":"118.31.XX.XX"
        },
        "userIdentity":{
            "principalId":"28815334868278****"
        },
        "responseElements":{
            "requestId":"61161517B258223732BC****"
        },
        "oss":{
            "bucket":{
                "name":"oss-source-bucket1-cn-hangzhou",
                "arn":"acs:oss:cn-hangzhou:123456789098****:oss-source-bucket1-cn-hangzhou",
                "ownerIdentity":"164901546557****"
            },
            "ossSchemaVersion":"1.0",
            "object":{
                "size":9,
                "deltaSize":9,
                "eTag":"F0F18C2C66AE1DD512BDCD4366F7****",
                "key":"objectname",
                "objectMeta": {
                    "mimeType": "application/octet-stream"
                }
            }
        }
    }
}

关于data字段包含的参数解释,请参见参数解释