Container for the parameters to the DeleteHealthCheck operation.

This action deletes a health check. To delete a health check, send a DELETE request to the 2012-12-12/healthcheck/health check ID resource.

IMPORTANT: You can delete a health check only if there are no resource record sets associated with this health check. If resource record sets are associated with this health check, you must disassociate them before you can delete your health check. If you try to delete a health check that is associated with resource record sets, Route 53 will deny your request with a HealthCheckInUse error. For information about disassociating the records from your health check, see ChangeResourceRecordSets.

상속: Amazon.Runtime.AmazonWebServiceRequest
예제 #1
0
        public object Execute(ExecutorContext context)
        {
            var cmdletContext = context as CmdletContext;
            // create request
            var request = new Amazon.Route53.Model.DeleteHealthCheckRequest();

            if (cmdletContext.HealthCheckId != null)
            {
                request.HealthCheckId = cmdletContext.HealthCheckId;
            }

            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 health check. To delete a health check, send a <c>DELETE</c> request to the <c>2013-04-01/healthcheck/health
        /// check ID </c> resource.</para> <para><b>IMPORTANT:</b> You can delete a health check only if there are no resource record sets associated
        /// with this health check. If resource record sets are associated with this health check, you must disassociate them before you can delete your
        /// health check. If you try to delete a health check that is associated with resource record sets, Route 53 will deny your request with a
        /// HealthCheckInUse error. For information about disassociating the records from your health check, see ChangeResourceRecordSets.</para>
        /// </summary>
        /// 
        /// <param name="deleteHealthCheckRequest">Container for the necessary parameters to execute the DeleteHealthCheck service method on
        /// AmazonRoute53.</param>
        /// 
        /// <returns>The response from the DeleteHealthCheck service method, as returned by AmazonRoute53.</returns>
        /// 
        /// <exception cref="T:Amazon.Route53.Model.NoSuchHealthCheckException" />
        /// <exception cref="T:Amazon.Route53.Model.HealthCheckInUseException" />
        /// <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<DeleteHealthCheckResponse> DeleteHealthCheckAsync(DeleteHealthCheckRequest deleteHealthCheckRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DeleteHealthCheckRequestMarshaller();
            var unmarshaller = DeleteHealthCheckResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, DeleteHealthCheckRequest, DeleteHealthCheckResponse>(deleteHealthCheckRequest, marshaller, unmarshaller, signer, cancellationToken);
        }
		internal DeleteHealthCheckResponse DeleteHealthCheck(DeleteHealthCheckRequest request)
        {
            var task = DeleteHealthCheckAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                ExceptionDispatchInfo.Capture(e.InnerException).Throw();
                return null;
            }
        }
예제 #4
0
        /// <summary>
        /// <para>This action deletes a health check. To delete a health check, send a <c>DELETE</c> request to the <c>2012-12-12/healthcheck/health
        /// check ID </c> resource.</para> <para><b>IMPORTANT:</b> You can delete a health check only if there are no resource record sets associated
        /// with this health check. If resource record sets are associated with this health check, you must disassociate them before you can delete your
        /// health check. If you try to delete a health check that is associated with resource record sets, Route 53 will deny your request with a
        /// HealthCheckInUse error. For information about disassociating the records from your health check, see ChangeResourceRecordSets.</para>
        /// </summary>
        /// 
        /// <param name="deleteHealthCheckRequest">Container for the necessary parameters to execute the DeleteHealthCheck service method on
        /// AmazonRoute53.</param>
        /// 
        /// <returns>The response from the DeleteHealthCheck service method, as returned by AmazonRoute53.</returns>
        /// 
        /// <exception cref="T:Amazon.Route53.Model.InvalidInputException" />
        /// <exception cref="T:Amazon.Route53.Model.HealthCheckInUseException" />
        /// <exception cref="T:Amazon.Route53.Model.NoSuchHealthCheckException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public async Task<DeleteHealthCheckResponse> DeleteHealthCheckAsync(DeleteHealthCheckRequest deleteHealthCheckRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DeleteHealthCheckRequestMarshaller();
            var unmarshaller = DeleteHealthCheckResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, DeleteHealthCheckRequest, DeleteHealthCheckResponse>(deleteHealthCheckRequest, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
예제 #5
0
		internal DeleteHealthCheckResponse DeleteHealthCheck(DeleteHealthCheckRequest request)
        {
            var task = DeleteHealthCheckAsync(request);
            try
            {
                return task.Result;
            }
            catch(AggregateException e)
            {
                throw e.InnerException;
            }
        }
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteHealthCheck operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DeleteHealthCheck 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<DeleteHealthCheckResponse> DeleteHealthCheckAsync(DeleteHealthCheckRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new DeleteHealthCheckRequestMarshaller();
            var unmarshaller = DeleteHealthCheckResponseUnmarshaller.Instance;

            return InvokeAsync<DeleteHealthCheckRequest,DeleteHealthCheckResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        /// <summary>
        /// This action deletes a health check. To delete a health check, send a <code>DELETE</code>
        /// request to the <code>2013-04-01/healthcheck/<i>health check ID</i></code> resource.
        /// 
        ///  <important> You can delete a health check only if there are no resource record sets
        /// associated with this health check. If resource record sets are associated with this
        /// health check, you must disassociate them before you can delete your health check.
        /// If you try to delete a health check that is associated with resource record sets,
        /// Route 53 will deny your request with a <code>HealthCheckInUse</code> error. For information
        /// about disassociating the records from your health check, see <a>ChangeResourceRecordSets</a>.</important>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the DeleteHealthCheck service method.</param>
        /// 
        /// <returns>The response from the DeleteHealthCheck service method, as returned by Route53.</returns>
        /// <exception cref="Amazon.Route53.Model.HealthCheckInUseException">
        /// There are resource records associated with this health check. Before you can delete
        /// the health check, you must disassociate it from the 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.NoSuchHealthCheckException">
        /// The health check you are trying to get or delete does not exist.
        /// </exception>
        public DeleteHealthCheckResponse DeleteHealthCheck(DeleteHealthCheckRequest request)
        {
            var marshaller = new DeleteHealthCheckRequestMarshaller();
            var unmarshaller = DeleteHealthCheckResponseUnmarshaller.Instance;

            return Invoke<DeleteHealthCheckRequest,DeleteHealthCheckResponse>(request, marshaller, unmarshaller);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the DeleteHealthCheck operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the DeleteHealthCheck 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 EndDeleteHealthCheck
        ///         operation.</returns>
        public IAsyncResult BeginDeleteHealthCheck(DeleteHealthCheckRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new DeleteHealthCheckRequestMarshaller();
            var unmarshaller = DeleteHealthCheckResponseUnmarshaller.Instance;

            return BeginInvoke<DeleteHealthCheckRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
예제 #9
0
 IAsyncResult invokeDeleteHealthCheck(DeleteHealthCheckRequest deleteHealthCheckRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new DeleteHealthCheckRequestMarshaller().Marshall(deleteHealthCheckRequest);
     var unmarshaller = DeleteHealthCheckResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
예제 #10
0
 /// <summary>
 /// Initiates the asynchronous execution of the DeleteHealthCheck operation.
 /// <seealso cref="Amazon.Route53.IAmazonRoute53.DeleteHealthCheck"/>
 /// </summary>
 /// 
 /// <param name="deleteHealthCheckRequest">Container for the necessary parameters to execute the DeleteHealthCheck 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 EndDeleteHealthCheck
 ///         operation.</returns>
 public IAsyncResult BeginDeleteHealthCheck(DeleteHealthCheckRequest deleteHealthCheckRequest, AsyncCallback callback, object state)
 {
     return invokeDeleteHealthCheck(deleteHealthCheckRequest, callback, state, false);
 }
예제 #11
0
 /// <summary>
 /// <para>This action deletes a health check. To delete a health check, send a <c>DELETE</c> request to the <c>2013-04-01/healthcheck/health
 /// check ID </c> resource.</para> <para><b>IMPORTANT:</b> You can delete a health check only if there are no resource record sets associated
 /// with this health check. If resource record sets are associated with this health check, you must disassociate them before you can delete your
 /// health check. If you try to delete a health check that is associated with resource record sets, Route 53 will deny your request with a
 /// HealthCheckInUse error. For information about disassociating the records from your health check, see ChangeResourceRecordSets.</para>
 /// </summary>
 /// 
 /// <param name="deleteHealthCheckRequest">Container for the necessary parameters to execute the DeleteHealthCheck service method on
 ///          AmazonRoute53.</param>
 /// 
 /// <returns>The response from the DeleteHealthCheck service method, as returned by AmazonRoute53.</returns>
 /// 
 /// <exception cref="NoSuchHealthCheckException"/>
 /// <exception cref="HealthCheckInUseException"/>
 /// <exception cref="InvalidInputException"/>
 public DeleteHealthCheckResponse DeleteHealthCheck(DeleteHealthCheckRequest deleteHealthCheckRequest)
 {
     IAsyncResult asyncResult = invokeDeleteHealthCheck(deleteHealthCheckRequest, null, null, true);
     return EndDeleteHealthCheck(asyncResult);
 }
예제 #12
0
 private Amazon.Route53.Model.DeleteHealthCheckResponse CallAWSServiceOperation(IAmazonRoute53 client, Amazon.Route53.Model.DeleteHealthCheckRequest request)
 {
     Utils.Common.WriteVerboseEndpointMessage(this, client.Config, "Amazon Route 53", "DeleteHealthCheck");
     try
     {
         #if DESKTOP
         return(client.DeleteHealthCheck(request));
         #elif CORECLR
         return(client.DeleteHealthCheckAsync(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;
     }
 }