/// <summary> /// Initiates the asynchronous execution of the DeleteHostedZone operation. /// <seealso cref="Amazon.Route53.IAmazonRoute53.DeleteHostedZone"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteHostedZone operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task <DeleteHostedZoneResponse> DeleteHostedZoneAsync(DeleteHostedZoneRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteHostedZoneRequestMarshaller(); var unmarshaller = DeleteHostedZoneResponseUnmarshaller.GetInstance(); return(Invoke <IRequest, DeleteHostedZoneRequest, DeleteHostedZoneResponse>(request, marshaller, unmarshaller, signer, cancellationToken)); }
internal DeleteHostedZoneResponse DeleteHostedZone(DeleteHostedZoneRequest request) { var marshaller = new DeleteHostedZoneRequestMarshaller(); var unmarshaller = DeleteHostedZoneResponseUnmarshaller.Instance; return(Invoke <DeleteHostedZoneRequest, DeleteHostedZoneResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Delete a hosted zone. /// </summary> /// <param name="hostedZoneId">The ID of the hosted zone that contains the resource record sets that you want to delete</param> /// <param name="settings">The <see cref="Route53Settings"/> required to connect to Route53.</param> /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> public async Task <bool> DeleteHostedZone(string hostedZoneId, Route53Settings settings, CancellationToken cancellationToken = default(CancellationToken)) { if (String.IsNullOrEmpty(hostedZoneId)) { throw new ArgumentNullException("hostedZoneId"); } DeleteHostedZoneRequest request = new DeleteHostedZoneRequest(hostedZoneId); AmazonRoute53Client client = this.GetClient(settings); DeleteHostedZoneResponse response = await client.DeleteHostedZoneAsync(request); if (response.HttpStatusCode == HttpStatusCode.OK) { await this.WaitForChange(client, response.ChangeInfo.Id, 10000, 60); _Log.Verbose("deleted hosted zone"); return(true); } else { _Log.Error("Could not delete hosted zone"); return(false); } }
/// <summary> /// Initiates the asynchronous execution of the DeleteHostedZone operation. /// <seealso cref="Amazon.Route53.IAmazonRoute53"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteHostedZone operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> public Task <DeleteHostedZoneResponse> DeleteHostedZoneAsync(DeleteHostedZoneRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteHostedZoneRequestMarshaller(); var unmarshaller = DeleteHostedZoneResponseUnmarshaller.Instance; return(InvokeAsync <DeleteHostedZoneRequest, DeleteHostedZoneResponse>(request, marshaller, unmarshaller, cancellationToken)); }
IAsyncResult invokeDeleteHostedZone(DeleteHostedZoneRequest deleteHostedZoneRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new DeleteHostedZoneRequestMarshaller().Marshall(deleteHostedZoneRequest); var unmarshaller = DeleteHostedZoneResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return(result); }
/// <summary> /// <para>This action deletes a hosted zone. To delete a hosted zone, send a <c>DELETE</c> request to the <c>2013-04-01/hostedzone/hosted zone /// ID </c> resource.</para> <para>For more information about deleting a hosted zone, see <a href="http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/DeleteHostedZone.html">Deleting a Hosted Zone</a> in the <i>Amazon Route 53 /// Developer Guide</i> .</para> <para><b>IMPORTANT:</b> You can delete a hosted zone only if there are no resource record sets other than the /// default SOA record and NS resource record sets. If your hosted zone contains other resource record sets, you must delete them before you can /// delete your hosted zone. If you try to delete a hosted zone that contains other resource record sets, Route 53 will deny your request with a /// HostedZoneNotEmpty error. For information about deleting records from your hosted zone, see ChangeResourceRecordSets.</para> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteHostedZone service method on /// AmazonRoute53.</param> /// /// <returns>The response from the DeleteHostedZone service method, as returned by AmazonRoute53.</returns> /// /// <exception cref="T:Amazon.Route53.Model.PriorRequestNotCompleteException" /> /// <exception cref="T:Amazon.Route53.Model.HostedZoneNotEmptyException" /> /// <exception cref="T:Amazon.Route53.Model.NoSuchHostedZoneException" /> /// <exception cref="T:Amazon.Route53.Model.InvalidInputException" /> public DeleteHostedZoneResponse DeleteHostedZone(DeleteHostedZoneRequest request) { var task = DeleteHostedZoneAsync(request); try { return(task.Result); } catch (AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return(null); } }
/// <summary> /// Initiates the asynchronous execution of the DeleteHostedZone operation. /// <seealso cref="Amazon.Route53.AmazonRoute53.DeleteHostedZone"/> /// </summary> /// /// <param name="deleteHostedZoneRequest">Container for the necessary parameters to execute the DeleteHostedZone operation on /// AmazonRoute53.</param> /// <param name="callback">An AsyncCallback delegate that is invoked when the operation completes.</param> /// <param name="state">A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property.</param> /// /// <returns>An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndDeleteHostedZone /// operation.</returns> public IAsyncResult BeginDeleteHostedZone(DeleteHostedZoneRequest deleteHostedZoneRequest, AsyncCallback callback, object state) { return(invokeDeleteHostedZone(deleteHostedZoneRequest, callback, state, false)); }
/// <summary> /// <para>This action deletes a hosted zone. To delete a hosted zone, send a <c>DELETE</c> request to the <c>2012-02-29/hostedzone/hosted zone /// ID </c> resource.</para> <para>For more information about deleting a hosted zone, see Deleting a Hosted Zone in the Amazon Route 53 /// Developer Guide.</para> <para><b>IMPORTANT:</b> You can delete a hosted zone only if there are no resource record sets other than the /// default SOA record and NS resource record sets. If your hosted zone contains other resource record sets, you must delete them before you can /// delete your hosted zone. If you try to delete a hosted zone that contains other resource record sets, Route 53 will deny your request with a /// HostedZoneNotEmpty error. For information about deleting records from your hosted zone, see ChangeResourceRecordSets.</para> /// </summary> /// /// <param name="deleteHostedZoneRequest">Container for the necessary parameters to execute the DeleteHostedZone service method on /// AmazonRoute53.</param> /// /// <returns>The response from the DeleteHostedZone service method, as returned by AmazonRoute53.</returns> /// /// <exception cref="HostedZoneNotEmptyException"/> /// <exception cref="NoSuchHostedZoneException"/> /// <exception cref="InvalidInputException"/> public DeleteHostedZoneResponse DeleteHostedZone(DeleteHostedZoneRequest deleteHostedZoneRequest) { IAsyncResult asyncResult = invokeDeleteHostedZone(deleteHostedZoneRequest, null, null, true); return(EndDeleteHostedZone(asyncResult)); }
public virtual Task <DeleteHostedZoneResponse> DeleteHostedZoneAsync(DeleteHostedZoneRequest request, CancellationToken cancellationToken = default(CancellationToken)) { throw new NotImplementedException(); }