Skip to content

Commit 2b26c3b

Browse files
committed
listbuckets supports regionList parameter.
1 parent 30b15c3 commit 2b26c3b

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/main/java/com/aliyun/oss/internal/OSSBucketOperation.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ public BucketList listBuckets(ListBucketsRequest listBucketRequest) throws OSSEx
144144
params.put(TAG_VALUE, listBucketRequest.getTagValue());
145145
}
146146

147+
if (listBucketRequest.getParameters() != null && listBucketRequest.getParameters().containsKey(SUBRESOURCE_REGION_LIST)) {
148+
params.put(SUBRESOURCE_REGION_LIST, listBucketRequest.getParameters().get(SUBRESOURCE_REGION_LIST));
149+
}
150+
147151
Map<String, String> headers = new HashMap<String, String>();
148152
addOptionalResourceGroupIdHeader(headers, listBucketRequest.getResourceGroupId());
149153

src/main/java/com/aliyun/oss/internal/RequestParameters.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,4 +154,7 @@ public final class RequestParameters {
154154
public static final String SUBRESOURCE_TRANSFER_ACCELERATION = "transferAcceleration";
155155

156156
public static final String ACCESS_MONITOR = "accessmonitor";
157+
158+
public static final String SUBRESOURCE_REGION_LIST = "regionList";
159+
157160
}

src/main/java/com/aliyun/oss/internal/SignParameters.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public class SignParameters {
4242
SUBRESOURCE_INVENTORY, SUBRESOURCE_INVENTORY_ID, SUBRESOURCE_CONTINUATION_TOKEN, SUBRESOURCE_WORM,
4343
SUBRESOURCE_WORM_ID, SUBRESOURCE_WORM_EXTEND, SUBRESOURCE_CALLBACK, SUBRESOURCE_CALLBACK_VAR,
4444
SUBRESOURCE_DIR, SUBRESOURCE_RENAME, SUBRESOURCE_DIR_DELETE, SUBRESOURCE_TRANSFER_ACCELERATION,
45-
X_OSS_AC_SOURCE_IP, X_OSS_AC_SUBNET_MASK, X_OSS_AC_VPC_ID, X_OSS_AC_FORWARD_ALLOW, META_QUERY, SUBRESOURCE_RESOURCE_GROUP});
45+
X_OSS_AC_SOURCE_IP, X_OSS_AC_SUBNET_MASK, X_OSS_AC_VPC_ID, X_OSS_AC_FORWARD_ALLOW, META_QUERY, SUBRESOURCE_RESOURCE_GROUP,
46+
SUBRESOURCE_REGION_LIST});
4647

4748
}

0 commit comments

Comments
 (0)