@@ -99,6 +99,10 @@ All operation use es7 async/await to implement. All api is async function.
9999 - [ .putBucketTags(name, tag[ , options] )] ( #putBucketTagsname-tag-options )
100100 - [ .getBucketTags(name, [ , options] )] ( #getBucketTagsname-options )
101101 - [ .deleteBucketTags(name, [ , options] )] ( #deleteBucketTagsname-options )
102+ - policy
103+ - [ .putBucketPolicy(name, policy[ , options] )] ( #putBucketPolicyname-policy-options )
104+ - [ .getBucketPolicy(name, [ , options] )] ( #getBucketPolicyname-options )
105+ - [ .deleteBucketPolicy(name, [ , options] )] ( #deleteBucketPolicyname-options )
102106- [ Object Operations] ( #object-operations )
103107 - [ .list(query[ , options] )] ( #listquery-options )
104108 - [ .put(name, file[ , options] )] ( #putname-file-options )
@@ -638,6 +642,9 @@ parameters:
638642- config {Object} website config, contains blow properties:
639643 - index {String} default page, e.g.: ` index.html `
640644 - [ error] {String} error page, e.g.: 'error.html'
645+ - [ supportSubDir] {String} default vaule false
646+ - [ type] {String} default value 0
647+ - [ routingRules] {Array} RoutingRules
641648- [ options] {Object} optional parameters
642649 - [ timeout] {Number} the operation timeout
643650
@@ -672,6 +679,9 @@ Success will return:
672679
673680- index {String} index page
674681- error {String} error page, maybe ` null `
682+ - supportSubDir {String}
683+ - type {String}
684+ - routingRules {Array}
675685- res {Object} response info, including
676686 - status {Number} response status
677687 - headers {Object} response headers
@@ -785,9 +795,24 @@ parameters:
785795 - [ id] {String} rule id, if not set, OSS will auto create it with random string.
786796 - prefix {String} store prefix
787797 - status {String} rule status, allow values: ` Enabled ` or ` Disabled `
788- - [ days] {Number|String} expire after the ` days `
789- - [ date] {String} expire date, e.g.: ` 2022-10-11T00:00:00.000Z `
790- ` date ` and ` days ` only set one.
798+ - [ expiration] {Object} specifies the expiration attribute of the lifecycle rules for the object.
799+ - [ days] {Number|String} expire after the ` days `
800+ - [ createdBeforeDate] {String} expire date, e.g.: ` 2022-10-11T00:00:00.000Z `
801+ ` createdBeforeDate ` and ` days ` must have one.
802+ - [ abortMultipartUpload] {Object} Specifies the expiration attribute of the multipart upload tasks that are not complete.
803+ - [ days] {Number|String} expire after the ` days `
804+ - [ createdBeforeDate] {String} expire date, e.g.: ` 2022-10-11T00:00:00.000Z `
805+ ` createdBeforeDate ` and ` days ` must have one.
806+ - [ transition] {Object} Specifies the time when an object is converted to the IA or archive storage class during a valid life cycle.
807+ - storageClass {String} Specifies the storage class that objects that conform to the rule are converted into. allow values: ` IA ` or ` Archive `
808+ - [ days] {Number|String} expire after the ` days `
809+ - [ createdBeforeDate] {String} expire date, e.g.: ` 2022-10-11T00:00:00.000Z `
810+ ` createdBeforeDate ` and ` days ` must have one.
811+ ` expiration ` 、 ` abortMultipartUpload ` 、 ` transition ` must have one.
812+ - [ tag] {Object} Specifies the object tag applicable to a rule. Multiple tags are supported.
813+ - key {String} Indicates the tag key.
814+ - value {String} Indicates the tag value.
815+ ` tag ` cannot be used with ` abortMultipartUpload `
791816- [ options] {Object} optional parameters
792817 - [ timeout] {Number} the operation timeout
793818
@@ -1066,6 +1091,72 @@ Success will return:
10661091
10671092---
10681093
1094+ ### .putBucketPolicy(name, policy[ , options] )
1095+
1096+ Adds or modify policy for a bucket.
1097+
1098+ parameters:
1099+
1100+ - name {String} the bucket name
1101+ - policy {Object} bucket policy
1102+ - [ options] {Object} optional args
1103+
1104+ Success will return:
1105+
1106+ - status {Number} response status
1107+ - res {Object} response info
1108+
1109+ example:
1110+ ``` js
1111+ const policy = {
1112+ Version: ' 1' ,
1113+ Statement: [
1114+ {
1115+ Action: [' oss:PutObject' , ' oss:GetObject' ],
1116+ Effect: ' Deny' ,
1117+ Principal: [' 1234567890' ],
1118+ Resource: [' acs:oss:*:1234567890:*/*' ]
1119+ }
1120+ ]
1121+ };
1122+ const result = await store .putBucketPolicy (bucket, policy);
1123+ console .log (result);
1124+ ```
1125+ ---
1126+
1127+ ### .getBucketPolicy(name[ , options] )
1128+
1129+ Obtains the policy for a bucket.
1130+
1131+ parameters:
1132+
1133+ - name {String} the bucket name
1134+ - [ options] {Object} optional args
1135+
1136+ Success will return:
1137+
1138+ - policy {Object} the policy of bucket, if not exist, the value is null
1139+ - res {Object} response info
1140+ - status {Number} response status
1141+
1142+ ---
1143+
1144+ ### .deleteBucketPolicy(name[ , options] )
1145+
1146+ Deletes the policy added for a bucket.
1147+
1148+ parameters:
1149+
1150+ - name {String} the bucket name
1151+ - [ options] {Object} optional args
1152+
1153+ Success will return:
1154+
1155+ - status {Number} response status
1156+ - res {Object} response info
1157+
1158+ ---
1159+
10691160## Object Operations
10701161
10711162All operations function return Promise, except ` signatureUrl ` .
@@ -1796,6 +1887,7 @@ parameters:
17961887 - [Content-Type] {String} set the request content type
17971888 - [process] {String} image process params, will send with `x-oss-process`
17981889 e.g.: `{process: 'image/resize,w_200'}`
1890+ - [trafficLimit] {Number} traffic limit, range: `819200`~`838860800`.
17991891 - [response] {Object} set the response headers for download
18001892 - [content-type] {String} set the response content type
18011893 - [content-disposition] {String} set the response content disposition
@@ -2673,6 +2765,33 @@ object:
26732765- status {Number} response status
26742766- res {Object} response info
26752767
2768+ ### .processObjectSave(sourceObject, targetObject, process[, targetBucket])
2769+
2770+ Persistency indicates that images are asynchronously stored in the specified Bucket
2771+
2772+ parameters:
2773+
2774+ - sourceObject {String} source object name
2775+ - targetObject {String} target object name
2776+ - process {String} process string
2777+ - [targetBucket] {String} target bucket
2778+
2779+ Success will return the channel information.
2780+
2781+ object:
2782+
2783+ - status {Number} response status
2784+ - res {Object} response info
2785+
2786+
2787+ ```js
2788+ const sourceObject = ' a .png '
2789+ const targetObject = ' b .png '
2790+ const process = ' image/ watermark,text_aGVsbG8g5Zu+ 54mH5pyN5Yqh77yB ,color_ff6a00'
2791+
2792+ await this.store.processObjectSave(sourceObject, targetObject, process);
2793+ ```
2794+
26762795## RTMP Operations
26772796
26782797All operations function is [async], except `getRtmpUrl`.
0 commit comments