File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -2326,6 +2326,47 @@ def test_put_get_bucket_intelligenttiering():
23262326 )
23272327
23282328
2329+ def test_bucket_intelligenttiering_v2 ():
2330+ """测试设置获取智能分层 v2接口"""
2331+ try :
2332+ intelligent_tiering_conf = {
2333+ 'Id' : 'default' ,
2334+ 'Status' : 'Enabled' ,
2335+ 'Tiering' : [
2336+ {
2337+ 'AccessTier' : 'INFREQUENT' ,
2338+ 'Days' : 30 ,
2339+ 'RequestFrequent' : '1'
2340+ }
2341+ ]
2342+ }
2343+ response = client .put_bucket_intelligenttiering_v2 (
2344+ Bucket = test_bucket ,
2345+ IntelligentTieringConfiguration = intelligent_tiering_conf ,
2346+ Id = 'default'
2347+ )
2348+ time .sleep (2 )
2349+ except CosServiceError as e :
2350+ if e .get_error_msg () == 'The default rule cannot be modified' :
2351+ print (e .get_error_msg ())
2352+ else :
2353+ raise e
2354+
2355+ response = client .get_bucket_intelligenttiering (
2356+ Bucket = test_bucket ,
2357+ )
2358+
2359+ # v2接口
2360+ response = client .get_bucket_intelligenttiering_v2 (
2361+ Bucket = test_bucket ,
2362+ Id = "default"
2363+ )
2364+
2365+ response = client .list_bucket_intelligenttiering_configurations (
2366+ Bucket = test_bucket
2367+ )
2368+
2369+
23292370def test_bucket_encryption ():
23302371 """测试存储桶默认加密配置"""
23312372 # 测试设置存储桶的默认加密配置
You can’t perform that action at this time.
0 commit comments