public object Execute(ExecutorContext context) { var cmdletContext = context as CmdletContext; // create request var request = new Amazon.Route53.Model.DeleteHostedZoneRequest(); if (cmdletContext.Id != null) { request.Id = cmdletContext.Id; } CmdletOutput output; // issue call var client = Client ?? CreateClient(_CurrentCredentials, _RegionEndpoint); try { var response = CallAWSServiceOperation(client, request); object pipelineOutput = null; pipelineOutput = cmdletContext.Select(response, this); output = new CmdletOutput { PipelineOutput = pipelineOutput, ServiceResponse = response }; } catch (Exception e) { output = new CmdletOutput { ErrorResponse = e }; } return(output); }
/// <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="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="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" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<DeleteHostedZoneResponse> DeleteHostedZoneAsync(DeleteHostedZoneRequest deleteHostedZoneRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteHostedZoneRequestMarshaller(); var unmarshaller = DeleteHostedZoneResponseUnmarshaller.GetInstance(); return Invoke<IRequest, DeleteHostedZoneRequest, DeleteHostedZoneResponse>(deleteHostedZoneRequest, marshaller, unmarshaller, signer, cancellationToken); }
internal DeleteHostedZoneResponse DeleteHostedZone(DeleteHostedZoneRequest request) { var task = DeleteHostedZoneAsync(request); try { return task.Result; } catch(AggregateException e) { ExceptionDispatchInfo.Capture(e.InnerException).Throw(); return null; } }
/// <summary> /// <para>This action deletes a hosted zone. To delete a hosted zone, send a <c>DELETE</c> request to the <c>2012-12-12/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="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="T:Amazon.Route53.Model.HostedZoneNotEmptyException" /> /// <exception cref="T:Amazon.Route53.Model.InvalidInputException" /> /// <exception cref="T:Amazon.Route53.Model.NoSuchHostedZoneException" /> /// <exception cref="T:Amazon.Route53.Model.PriorRequestNotCompleteException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public async Task<DeleteHostedZoneResponse> DeleteHostedZoneAsync(DeleteHostedZoneRequest deleteHostedZoneRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteHostedZoneRequestMarshaller(); var unmarshaller = DeleteHostedZoneResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, DeleteHostedZoneRequest, DeleteHostedZoneResponse>(deleteHostedZoneRequest, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
internal DeleteHostedZoneResponse DeleteHostedZone(DeleteHostedZoneRequest request) { var task = DeleteHostedZoneAsync(request); try { return task.Result; } catch(AggregateException e) { throw e.InnerException; } }
private Amazon.Route53.Model.DeleteHostedZoneResponse CallAWSServiceOperation(IAmazonRoute53 client, Amazon.Route53.Model.DeleteHostedZoneRequest request) { Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Route 53", "DeleteHostedZone"); try { #if DESKTOP return(client.DeleteHostedZone(request)); #elif CORECLR return(client.DeleteHostedZoneAsync(request).GetAwaiter().GetResult()); #else #error "Unknown build edition" #endif } catch (AmazonServiceException exc) { var webException = exc.InnerException as System.Net.WebException; if (webException != null) { throw new Exception(Utils.Common.FormatNameResolutionFailureMessage(client.Config, webException.Message), webException); } throw; } }
/// <summary> /// Initiates the asynchronous execution of the DeleteHostedZone operation. /// </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); }
/// <summary> /// This action deletes a hosted zone. To delete a hosted zone, send a <code>DELETE</code> /// request to the <code>2013-04-01/hostedzone/<i>hosted zone ID</i></code> resource. /// /// /// <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> /// <important> 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 <code>HostedZoneNotEmpty</code> error. /// For information about deleting records from your hosted zone, see <a>ChangeResourceRecordSets</a>.</important> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteHostedZone service method.</param> /// /// <returns>The response from the DeleteHostedZone service method, as returned by Route53.</returns> /// <exception cref="Amazon.Route53.Model.HostedZoneNotEmptyException"> /// The hosted zone contains resource record sets in addition to the default NS and SOA /// resource record sets. Before you can delete the hosted zone, you must delete the additional /// resource record sets. /// </exception> /// <exception cref="Amazon.Route53.Model.InvalidInputException"> /// Some value specified in the request is invalid or the XML document is malformed. /// </exception> /// <exception cref="Amazon.Route53.Model.NoSuchHostedZoneException"> /// /// </exception> /// <exception cref="Amazon.Route53.Model.PriorRequestNotCompleteException"> /// The request was rejected because Route 53 was still processing a prior request. /// </exception> public DeleteHostedZoneResponse DeleteHostedZone(DeleteHostedZoneRequest request) { var marshaller = new DeleteHostedZoneRequestMarshaller(); var unmarshaller = DeleteHostedZoneResponseUnmarshaller.Instance; return Invoke<DeleteHostedZoneRequest,DeleteHostedZoneResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the DeleteHostedZone operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteHostedZone operation on AmazonRoute53Client.</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 request, AsyncCallback callback, object state) { var marshaller = new DeleteHostedZoneRequestMarshaller(); var unmarshaller = DeleteHostedZoneResponseUnmarshaller.Instance; return BeginInvoke<DeleteHostedZoneRequest>(request, marshaller, unmarshaller, callback, state); }
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>2011-05-05/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="InvalidInputException"/> /// <exception cref="HostedZoneNotEmptyException"/> public DeleteHostedZoneResponse DeleteHostedZone(DeleteHostedZoneRequest deleteHostedZoneRequest) { IAsyncResult asyncResult = invokeDeleteHostedZone(deleteHostedZoneRequest, null, null, true); return EndDeleteHostedZone(asyncResult); }
/// <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); }