Exemplo n.º 1
0
        internal CreateHealthCheckResponse CreateHealthCheck(CreateHealthCheckRequest request)
        {
            var marshaller   = new CreateHealthCheckRequestMarshaller();
            var unmarshaller = CreateHealthCheckResponseUnmarshaller.Instance;

            return(Invoke <CreateHealthCheckRequest, CreateHealthCheckResponse>(request, marshaller, unmarshaller));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initiates the asynchronous execution of the CreateHealthCheck operation.
        /// <seealso cref="Amazon.Route53.IAmazonRoute53.CreateHealthCheck"/>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the CreateHealthCheck 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 <CreateHealthCheckResponse> CreateHealthCheckAsync(CreateHealthCheckRequest request, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new CreateHealthCheckRequestMarshaller();
            var unmarshaller = CreateHealthCheckResponseUnmarshaller.GetInstance();

            return(Invoke <IRequest, CreateHealthCheckRequest, CreateHealthCheckResponse>(request, marshaller, unmarshaller, signer, cancellationToken));
        }
        public void CreateHealthCheckMarshallTest()
        {
            var operation = service_model.FindOperation("CreateHealthCheck");

            var request    = InstantiateClassGenerator.Execute <CreateHealthCheckRequest>();
            var marshaller = new CreateHealthCheckRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);

            RequestValidator.Validate("CreateHealthCheck", request, internalRequest, service_model);

            var webResponse = new WebResponseData
            {
                Headers =
                {
                    { "Location",         "Location_Value"          },
                    { "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 = CreateHealthCheckResponseUnmarshaller.Instance;
            var response = unmarshaller.Unmarshall(context)
                           as CreateHealthCheckResponse;

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initiates the asynchronous execution of the CreateHealthCheck operation.
        /// <seealso cref="Amazon.Route53.IAmazonRoute53"/>
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the CreateHealthCheck 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 <CreateHealthCheckResponse> CreateHealthCheckAsync(CreateHealthCheckRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new CreateHealthCheckRequestMarshaller();
            var unmarshaller = CreateHealthCheckResponseUnmarshaller.Instance;

            return(InvokeAsync <CreateHealthCheckRequest, CreateHealthCheckResponse>(request, marshaller,
                                                                                     unmarshaller, cancellationToken));
        }
        /// <summary>
        /// <para> This action creates a new health check.</para> <para> To create a new health check, send a <c>POST</c> request to the
        /// <c>2013-04-01/healthcheck</c> resource. The request body must include an XML document with a <c>CreateHealthCheckRequest</c> element. The
        /// response returns the <c>CreateHealthCheckResponse</c> element that contains metadata about the health check.</para>
        /// </summary>
        /// 
        /// <param name="createHealthCheckRequest">Container for the necessary parameters to execute the CreateHealthCheck service method on
        /// AmazonRoute53.</param>
        /// 
        /// <returns>The response from the CreateHealthCheck service method, as returned by AmazonRoute53.</returns>
        /// 
        /// <exception cref="T:Amazon.Route53.Model.HealthCheckAlreadyExistsException" />
        /// <exception cref="T:Amazon.Route53.Model.InvalidInputException" />
        /// <exception cref="T:Amazon.Route53.Model.TooManyHealthChecksException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public Task<CreateHealthCheckResponse> CreateHealthCheckAsync(CreateHealthCheckRequest createHealthCheckRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new CreateHealthCheckRequestMarshaller();
            var unmarshaller = CreateHealthCheckResponseUnmarshaller.GetInstance();
            return Invoke<IRequest, CreateHealthCheckRequest, CreateHealthCheckResponse>(createHealthCheckRequest, marshaller, unmarshaller, signer, cancellationToken);
        }
Exemplo n.º 6
0
        /// <summary>
        /// <para> This action creates a new health check.</para> <para> To create a new health check, send a <c>POST</c> request to the
        /// <c>2012-12-12/healthcheck</c> resource. The request body must include an XML document with a <c>CreateHealthCheckRequest</c> element. The
        /// response returns the <c>CreateHealthCheckResponse</c> element that contains metadata about the health check.</para>
        /// </summary>
        /// 
        /// <param name="createHealthCheckRequest">Container for the necessary parameters to execute the CreateHealthCheck service method on
        /// AmazonRoute53.</param>
        /// 
        /// <returns>The response from the CreateHealthCheck service method, as returned by AmazonRoute53.</returns>
        /// 
        /// <exception cref="T:Amazon.Route53.Model.InvalidInputException" />
        /// <exception cref="T:Amazon.Route53.Model.HealthCheckAlreadyExistsException" />
        /// <exception cref="T:Amazon.Route53.Model.TooManyHealthChecksException" />
        /// <param name="cancellationToken">
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// </param>
		public async Task<CreateHealthCheckResponse> CreateHealthCheckAsync(CreateHealthCheckRequest createHealthCheckRequest, CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new CreateHealthCheckRequestMarshaller();
            var unmarshaller = CreateHealthCheckResponseUnmarshaller.GetInstance();
            var response = await Invoke<IRequest, CreateHealthCheckRequest, CreateHealthCheckResponse>(createHealthCheckRequest, marshaller, unmarshaller, signer, cancellationToken)
                .ConfigureAwait(continueOnCapturedContext: false);
            return response;
        }
        /// <summary>
        /// Initiates the asynchronous execution of the CreateHealthCheck operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateHealthCheck 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<CreateHealthCheckResponse> CreateHealthCheckAsync(CreateHealthCheckRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller = new CreateHealthCheckRequestMarshaller();
            var unmarshaller = CreateHealthCheckResponseUnmarshaller.Instance;

            return InvokeAsync<CreateHealthCheckRequest,CreateHealthCheckResponse>(request, marshaller, 
                unmarshaller, cancellationToken);
        }
        /// <summary>
        /// This action creates a new health check.
        /// 
        ///  
        /// <para>
        ///  To create a new health check, send a <code>POST</code> request to the <code>2013-04-01/healthcheck</code>
        /// resource. The request body must include an XML document with a <code>CreateHealthCheckRequest</code>
        /// element. The response returns the <code>CreateHealthCheckResponse</code> element that
        /// contains metadata about the health check.
        /// </para>
        /// </summary>
        /// <param name="request">Container for the necessary parameters to execute the CreateHealthCheck service method.</param>
        /// 
        /// <returns>The response from the CreateHealthCheck service method, as returned by Route53.</returns>
        /// <exception cref="Amazon.Route53.Model.HealthCheckAlreadyExistsException">
        /// The health check you are trying to create already exists. Route 53 returns this error
        /// when a health check has already been created with the specified <code>CallerReference</code>.
        /// </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.TooManyHealthChecksException">
        /// 
        /// </exception>
        public CreateHealthCheckResponse CreateHealthCheck(CreateHealthCheckRequest request)
        {
            var marshaller = new CreateHealthCheckRequestMarshaller();
            var unmarshaller = CreateHealthCheckResponseUnmarshaller.Instance;

            return Invoke<CreateHealthCheckRequest,CreateHealthCheckResponse>(request, marshaller, unmarshaller);
        }
        /// <summary>
        /// Initiates the asynchronous execution of the CreateHealthCheck operation.
        /// </summary>
        /// 
        /// <param name="request">Container for the necessary parameters to execute the CreateHealthCheck 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 EndCreateHealthCheck
        ///         operation.</returns>
        public IAsyncResult BeginCreateHealthCheck(CreateHealthCheckRequest request, AsyncCallback callback, object state)
        {
            var marshaller = new CreateHealthCheckRequestMarshaller();
            var unmarshaller = CreateHealthCheckResponseUnmarshaller.Instance;

            return BeginInvoke<CreateHealthCheckRequest>(request, marshaller, unmarshaller,
                callback, state);
        }
Exemplo n.º 10
0
 IAsyncResult invokeCreateHealthCheck(CreateHealthCheckRequest createHealthCheckRequest, AsyncCallback callback, object state, bool synchronized)
 {
     IRequest irequest = new CreateHealthCheckRequestMarshaller().Marshall(createHealthCheckRequest);
     var unmarshaller = CreateHealthCheckResponseUnmarshaller.GetInstance();
     AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller);
     Invoke(result);
     return result;
 }
Exemplo n.º 11
0
        public void CreateHealthCheckMarshallTest()
        {
            var operation = service_model.FindOperation("CreateHealthCheck");

            var request = InstantiateClassGenerator.Execute<CreateHealthCheckRequest>();
            var marshaller = new CreateHealthCheckRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);
            RequestValidator.Validate("CreateHealthCheck", request, internalRequest, service_model);            

            var webResponse = new WebResponseData
            {
                Headers = {
                    {"Location","Location_Value"},
                    {"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 = CreateHealthCheckResponseUnmarshaller.Instance;
            var response = unmarshaller.Unmarshall(context)
                as CreateHealthCheckResponse;   
            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);       
        }