public void ChangeStatusTest() { Config config = new Config(); config.Zone = Zone.ZONE_CN_East; //config.Region = Region.Region_CN_East; Mac mac = new Mac(AccessKey, SecretKey); BucketManager bucketManager = new BucketManager(mac, config); //条件匹配,只有匹配上才会执行修改操作 //cond 可以填写 空,一个或者多个 Dictionary <string, string> cond = new Dictionary <string, string>(); cond.Add("fsize", "186371"); cond.Add("putTime", "14899798962573916"); cond.Add("hash", "FiRxWzeeD6ofGTpwTZub5Fx1ozvi"); cond.Add("mime", "application/vnd.apple.mpegurl"); HttpResult ret = bucketManager.ChangeStatus(Bucket, "qiniu.png", 1, cond); if (ret.Code != (int)HttpCode.OK && !ret.Text.Contains("already disabled")) { Assert.Fail("change status error: " + ret.ToString()); } Console.WriteLine(ret.ToString()); }