예제 #1
0
 public virtual Response <CdnCustomDomainResource> DisableCustomHttps(CancellationToken cancellationToken = default)
 {
     using var scope = _cdnCustomDomainClientDiagnostics.CreateScope("CdnCustomDomainResource.DisableCustomHttps");
     scope.Start();
     try
     {
         var response = _cdnCustomDomainRestClient.DisableCustomHttps(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken);
         return(Response.FromValue(new CdnCustomDomainResource(Client, response.Value), response.GetRawResponse()));
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }
예제 #2
0
 public virtual CdnCustomDomainDisableCustomHttpsOperation DisableCustomHttps(bool waitForCompletion, CancellationToken cancellationToken = default)
 {
     using var scope = _clientDiagnostics.CreateScope("CdnCustomDomain.DisableCustomHttps");
     scope.Start();
     try
     {
         var response  = _cdnCustomDomainsRestClient.DisableCustomHttps(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken);
         var operation = new CdnCustomDomainDisableCustomHttpsOperation(_clientDiagnostics, Pipeline, _cdnCustomDomainsRestClient.CreateDisableCustomHttpsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response);
         if (waitForCompletion)
         {
             operation.WaitForCompletion(cancellationToken);
         }
         return(operation);
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }
예제 #3
0
 public virtual ArmOperation <CdnCustomDomainResource> DisableCustomHttps(WaitUntil waitUntil, CancellationToken cancellationToken = default)
 {
     using var scope = _cdnCustomDomainClientDiagnostics.CreateScope("CdnCustomDomainResource.DisableCustomHttps");
     scope.Start();
     try
     {
         var response  = _cdnCustomDomainRestClient.DisableCustomHttps(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name, cancellationToken);
         var operation = new CdnArmOperation <CdnCustomDomainResource>(new CdnCustomDomainOperationSource(Client), _cdnCustomDomainClientDiagnostics, Pipeline, _cdnCustomDomainRestClient.CreateDisableCustomHttpsRequest(Id.SubscriptionId, Id.ResourceGroupName, Id.Parent.Parent.Name, Id.Parent.Name, Id.Name).Request, response, OperationFinalStateVia.Location);
         if (waitUntil == WaitUntil.Completed)
         {
             operation.WaitForCompletion(cancellationToken);
         }
         return(operation);
     }
     catch (Exception e)
     {
         scope.Failed(e);
         throw;
     }
 }