DeleteBucketLoggingCommand.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*
  2. * Copyright (C) Alibaba Cloud Computing
  3. * All rights reserved.
  4. *
  5. * 版权所有 (C)阿里云计算有限公司
  6. */
  7. using System;
  8. using Aliyun.OSS.Common.Communication;
  9. using Aliyun.OSS.Util;
  10. using System.Collections.Generic;
  11. namespace Aliyun.OSS.Commands
  12. {
  13. internal class DeleteBucketLoggingCommand : OssCommand
  14. {
  15. private readonly string _bucketName;
  16. protected override HttpMethod Method
  17. {
  18. get { return HttpMethod.Delete; }
  19. }
  20. protected override string Bucket
  21. {
  22. get { return _bucketName; }
  23. }
  24. private DeleteBucketLoggingCommand(IServiceClient client, Uri endpoint, ExecutionContext context,
  25. string bucketName)
  26. : base(client, endpoint, context)
  27. {
  28. OssUtils.CheckBucketName(bucketName);
  29. _bucketName = bucketName;
  30. }
  31. public static DeleteBucketLoggingCommand Create(IServiceClient client, Uri endpoint,
  32. ExecutionContext context,
  33. string bucketName)
  34. {
  35. return new DeleteBucketLoggingCommand(client, endpoint, context, bucketName);
  36. }
  37. protected override IDictionary<string, string> Parameters
  38. {
  39. get
  40. {
  41. return new Dictionary<string, string>()
  42. {
  43. { RequestParameters.SUBRESOURCE_LOGGING, null }
  44. };
  45. }
  46. }
  47. }
  48. }