/// <summary> /// Initiates the asynchronous execution of the UpdateTrafficPolicyInstance operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateTrafficPolicyInstance 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 EndUpdateTrafficPolicyInstance /// operation.</returns> public IAsyncResult BeginUpdateTrafficPolicyInstance(UpdateTrafficPolicyInstanceRequest request, AsyncCallback callback, object state) { var marshaller = new UpdateTrafficPolicyInstanceRequestMarshaller(); var unmarshaller = UpdateTrafficPolicyInstanceResponseUnmarshaller.Instance; return BeginInvoke<UpdateTrafficPolicyInstanceRequest>(request, marshaller, unmarshaller, callback, state); }
public void UpdateTrafficPolicyInstanceMarshallTest() { var operation = service_model.FindOperation("UpdateTrafficPolicyInstance"); var request = InstantiateClassGenerator.Execute<UpdateTrafficPolicyInstanceRequest>(); var marshaller = new UpdateTrafficPolicyInstanceRequestMarshaller(); var internalRequest = marshaller.Marshall(request); RequestValidator.Validate("UpdateTrafficPolicyInstance", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { {"x-amzn-RequestId", Guid.NewGuid().ToString()}, {"x-amz-crc32","0"} } }; var payloadResponse = new XmlSampleGenerator(service_model, operation).Execute(); var context = new XmlUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = UpdateTrafficPolicyInstanceResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as UpdateTrafficPolicyInstanceResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Updates the resource record sets in a specified hosted zone that were created based /// on the settings in a specified traffic policy version. /// /// /// <para> /// Send a <code>POST</code> request to the <code>/2013-04-01/trafficpolicyinstance/<i>traffic /// policy ID</i> </code> resource. The request body must include a document with an <code>UpdateTrafficPolicyInstanceRequest</code> /// element. /// </para> /// /// <para> /// When you update a traffic policy instance, Amazon Route 53 continues to respond to /// DNS queries for the root resource record set name (such as example.com) while it replaces /// one group of resource record sets with another. Amazon Route 53 performs the following /// operations: /// </para> /// <ol> <li> /// <para> /// Amazon Route 53 creates a new group of resource record sets based on the specified /// traffic policy. This is true regardless of how substantial the differences are between /// the existing resource record sets and the new resource record sets. /// </para> /// </li> <li> /// <para> /// When all of the new resource record sets have been created, Amazon Route 53 starts /// to respond to DNS queries for the root resource record set name (such as example.com) /// by using the new resource record sets. /// </para> /// </li> <li> /// <para> /// Amazon Route 53 deletes the old group of resource record sets that are associated /// with the root resource record set name. /// </para> /// </li> </ol> /// </summary> /// <param name="request">Container for the necessary parameters to execute the UpdateTrafficPolicyInstance service method.</param> /// /// <returns>The response from the UpdateTrafficPolicyInstance service method, as returned by Route53.</returns> /// <exception cref="Amazon.Route53.Model.ConflictingTypesException"> /// You tried to update a traffic policy instance by using a traffic policy version that /// has a different DNS type than the current type for the instance. You specified the /// type in the JSON document in the <code>CreateTrafficPolicy</code> or <code>CreateTrafficPolicyVersion</code>request. /// </exception> /// <exception cref="Amazon.Route53.Model.InvalidInputException"> /// The input is not valid. /// </exception> /// <exception cref="Amazon.Route53.Model.NoSuchTrafficPolicyException"> /// No traffic policy exists with the specified ID. /// </exception> /// <exception cref="Amazon.Route53.Model.NoSuchTrafficPolicyInstanceException"> /// No traffic policy instance exists with the specified ID. /// </exception> /// <exception cref="Amazon.Route53.Model.PriorRequestNotCompleteException"> /// If Amazon Route 53 can't process a request before the next request arrives, it will /// reject subsequent requests for the same hosted zone and return an <code>HTTP 400 error</code> /// (<code>Bad request</code>). If Amazon Route 53 returns this error repeatedly for the /// same request, we recommend that you wait, in intervals of increasing duration, before /// you try the request again. /// </exception> public UpdateTrafficPolicyInstanceResponse UpdateTrafficPolicyInstance(UpdateTrafficPolicyInstanceRequest request) { var marshaller = new UpdateTrafficPolicyInstanceRequestMarshaller(); var unmarshaller = UpdateTrafficPolicyInstanceResponseUnmarshaller.Instance; return Invoke<UpdateTrafficPolicyInstanceRequest,UpdateTrafficPolicyInstanceResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the UpdateTrafficPolicyInstance operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateTrafficPolicyInstance 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<UpdateTrafficPolicyInstanceResponse> UpdateTrafficPolicyInstanceAsync(UpdateTrafficPolicyInstanceRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateTrafficPolicyInstanceRequestMarshaller(); var unmarshaller = UpdateTrafficPolicyInstanceResponseUnmarshaller.Instance; return InvokeAsync<UpdateTrafficPolicyInstanceRequest,UpdateTrafficPolicyInstanceResponse>(request, marshaller, unmarshaller, cancellationToken); }