PutBucketDomainRequest.cs 794 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Text;
  3. using COSXML.Common;
  4. using COSXML.Model.Tag;
  5. using COSXML.Network;
  6. namespace COSXML.Model.Bucket
  7. {
  8. /// <summary>
  9. /// 检索 Bucket 是否存在
  10. /// <see href="https://cloud.tencent.com/document/product/436/7735"/>
  11. /// </summary>
  12. public sealed class PutBucketDomainRequest : BucketRequest
  13. {
  14. private DomainConfiguration domain;
  15. public PutBucketDomainRequest(string bucket, DomainConfiguration domain)
  16. : base(bucket)
  17. {
  18. this.method = CosRequestMethod.PUT;
  19. this.domain = domain;
  20. this.queryParameters.Add("domain", null);
  21. }
  22. public override Network.RequestBody GetRequestBody()
  23. {
  24. return GetXmlRequestBody(domain);
  25. }
  26. }
  27. }