public void RegisterTargetsMarshallTest() { var operation = service_model.FindOperation("RegisterTargets"); var request = InstantiateClassGenerator.Execute <RegisterTargetsRequest>(); var marshaller = new RegisterTargetsRequestMarshaller(); 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 = RegisterTargetsResponseUnmarshaller.Instance.Unmarshall(context) as RegisterTargetsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
public void RegisterTargetsMarshallTest() { var operation = service_model.FindOperation("RegisterTargets"); var request = InstantiateClassGenerator.Execute<RegisterTargetsRequest>(); var marshaller = new RegisterTargetsRequestMarshaller(); 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 = RegisterTargetsResponseUnmarshaller.Instance.Unmarshall(context) as RegisterTargetsResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
/// <summary> /// Initiates the asynchronous execution of the RegisterTargets operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RegisterTargets 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<RegisterTargetsResponse> RegisterTargetsAsync(RegisterTargetsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new RegisterTargetsRequestMarshaller(); var unmarshaller = RegisterTargetsResponseUnmarshaller.Instance; return InvokeAsync<RegisterTargetsRequest,RegisterTargetsResponse>(request, marshaller, unmarshaller, cancellationToken); }
/// <summary> /// Registers the specified targets with the specified target group. /// /// /// <para> /// By default, the load balancer routes requests to registered targets using the protocol /// and port number for the target group. Alternatively, you can override the port for /// a target when you register it. /// </para> /// /// <para> /// The target must be in the virtual private cloud (VPC) that you specified for the target /// group. If the target is an EC2 instance, it can't be in the <code>stopped</code> or /// <code>running</code> state when you register it. /// </para> /// /// <para> /// To remove a target from a target group, use <a>DeregisterTargets</a>. /// </para> /// </summary> /// <param name="request">Container for the necessary parameters to execute the RegisterTargets service method.</param> /// /// <returns>The response from the RegisterTargets service method, as returned by ElasticLoadBalancingV2.</returns> /// <exception cref="Amazon.ElasticLoadBalancingV2.Model.InvalidTargetException"> /// The specified target does not exist or is not in the same VPC as the target group. /// </exception> /// <exception cref="Amazon.ElasticLoadBalancingV2.Model.TargetGroupNotFoundException"> /// The specified target group does not exist. /// </exception> /// <exception cref="Amazon.ElasticLoadBalancingV2.Model.TooManyRegistrationsForTargetIdException"> /// You've reached the limit on the number of times a target can be registered with a /// load balancer. /// </exception> /// <exception cref="Amazon.ElasticLoadBalancingV2.Model.TooManyTargetsException"> /// You've reached the limit on the number of targets. /// </exception> public RegisterTargetsResponse RegisterTargets(RegisterTargetsRequest request) { var marshaller = new RegisterTargetsRequestMarshaller(); var unmarshaller = RegisterTargetsResponseUnmarshaller.Instance; return Invoke<RegisterTargetsRequest,RegisterTargetsResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the RegisterTargets operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the RegisterTargets operation on AmazonElasticLoadBalancingV2Client.</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 EndRegisterTargets /// operation.</returns> public IAsyncResult BeginRegisterTargets(RegisterTargetsRequest request, AsyncCallback callback, object state) { var marshaller = new RegisterTargetsRequestMarshaller(); var unmarshaller = RegisterTargetsResponseUnmarshaller.Instance; return BeginInvoke<RegisterTargetsRequest>(request, marshaller, unmarshaller, callback, state); }