/// <summary> /// Deletes a rule. You must remove all targets from a rule using <a>RemoveTargets</a> /// before you can delete the rule. /// /// /// <para> /// <b>Note:</b> When you delete a rule, incoming events might still continue to match /// to the deleted rule. Please allow a short period of time for changes to take effect. /// /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteRule service method.</param> /// /// <returns>The response from the DeleteRule service method, as returned by CloudWatchEvents.</returns> /// <exception cref="Amazon.CloudWatchEvents.Model.ConcurrentModificationException"> /// This exception occurs if there is concurrent modification on rule or target. /// </exception> /// <exception cref="Amazon.CloudWatchEvents.Model.InternalException"> /// This exception occurs due to unexpected causes. /// </exception> public DeleteRuleResponse DeleteRule(DeleteRuleRequest request) { var marshaller = new DeleteRuleRequestMarshaller(); var unmarshaller = DeleteRuleResponseUnmarshaller.Instance; return(Invoke <DeleteRuleRequest, DeleteRuleResponse>(request, marshaller, unmarshaller)); }
public void DeleteRuleMarshallTest() { var request = InstantiateClassGenerator.Execute <DeleteRuleRequest>(); var marshaller = new DeleteRuleRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <DeleteRuleRequest>(request, jsonRequest); var webResponse = new WebResponseData { Headers = { { "x-amzn-RequestId", Guid.NewGuid().ToString() }, { "x-amz-crc32", "0" } } }; var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("DeleteRule").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = DeleteRuleResponseUnmarshaller.Instance.Unmarshall(context) as DeleteRuleResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the DeleteRule operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteRule 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 <DeleteRuleResponse> DeleteRuleAsync(DeleteRuleRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteRuleRequestMarshaller(); var unmarshaller = DeleteRuleResponseUnmarshaller.Instance; return(InvokeAsync <DeleteRuleRequest, DeleteRuleResponse>(request, marshaller, unmarshaller, cancellationToken)); }
public void DeleteRuleMarshallTest() { var request = InstantiateClassGenerator.Execute<DeleteRuleRequest>(); var marshaller = new DeleteRuleRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson<DeleteRuleRequest>(request,jsonRequest); }
public void DeleteRuleMarshallTest() { var request = InstantiateClassGenerator.Execute <DeleteRuleRequest>(); var marshaller = new DeleteRuleRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson <DeleteRuleRequest>(request, jsonRequest); }
public void DeleteRuleMarshallTest() { var operation = service_model.FindOperation("DeleteRule"); var request = InstantiateClassGenerator.Execute <DeleteRuleRequest>(); var marshaller = new DeleteRuleRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = DeleteRuleResponseUnmarshaller.Instance.Unmarshall(context) as DeleteRuleResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the DeleteRule operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteRule operation on AmazonCloudWatchEventsClient.</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 EndDeleteRule /// operation.</returns> public IAsyncResult BeginDeleteRule(DeleteRuleRequest request, AsyncCallback callback, object state) { var marshaller = new DeleteRuleRequestMarshaller(); var unmarshaller = DeleteRuleResponseUnmarshaller.Instance; return BeginInvoke<DeleteRuleRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// Deletes a rule. You must remove all targets from a rule using <a>RemoveTargets</a> /// before you can delete the rule. /// /// /// <para> /// <b>Note:</b> When you delete a rule, incoming events might still continue to match /// to the deleted rule. Please allow a short period of time for changes to take effect. /// /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the DeleteRule service method.</param> /// /// <returns>The response from the DeleteRule service method, as returned by CloudWatchEvents.</returns> /// <exception cref="Amazon.CloudWatchEvents.Model.ConcurrentModificationException"> /// This exception occurs if there is concurrent modification on rule or target. /// </exception> /// <exception cref="Amazon.CloudWatchEvents.Model.InternalException"> /// This exception occurs due to unexpected causes. /// </exception> public DeleteRuleResponse DeleteRule(DeleteRuleRequest request) { var marshaller = new DeleteRuleRequestMarshaller(); var unmarshaller = DeleteRuleResponseUnmarshaller.Instance; return Invoke<DeleteRuleRequest,DeleteRuleResponse>(request, marshaller, unmarshaller); }
public void DeleteRuleMarshallTest() { var operation = service_model.FindOperation("DeleteRule"); var request = InstantiateClassGenerator.Execute<DeleteRuleRequest>(); var marshaller = new DeleteRuleRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, null); var response = DeleteRuleResponseUnmarshaller.Instance.Unmarshall(context) as DeleteRuleResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the DeleteRule operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the DeleteRule 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<DeleteRuleResponse> DeleteRuleAsync(DeleteRuleRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new DeleteRuleRequestMarshaller(); var unmarshaller = DeleteRuleResponseUnmarshaller.Instance; return InvokeAsync<DeleteRuleRequest,DeleteRuleResponse>(request, marshaller, unmarshaller, cancellationToken); }
public void DeleteRuleMarshallTest() { var request = InstantiateClassGenerator.Execute<DeleteRuleRequest>(); var marshaller = new DeleteRuleRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var jsonRequest = UTF8Encoding.UTF8.GetString(internalRequest.Content); Comparer.CompareObjectToJson<DeleteRuleRequest>(request,jsonRequest); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var jsonResponse = new JsonSampleGenerator(service_model, service_model.FindOperation("DeleteRule").ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString()); UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse); var response = DeleteRuleResponseUnmarshaller.Instance.Unmarshall(context) as DeleteRuleResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }