public void UpdateParameterGroupMarshallTest()
        {
            var request    = InstantiateClassGenerator.Execute <UpdateParameterGroupRequest>();
            var marshaller = new UpdateParameterGroupRequestMarshaller();

            var internalRequest = marshaller.Marshall(request);
            var jsonRequest     = UTF8Encoding.UTF8.GetString(internalRequest.Content);

            Comparer.CompareObjectToJson <UpdateParameterGroupRequest>(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("UpdateParameterGroup").ResponseStructure).Execute();

            webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(jsonResponse).Length.ToString());
            UnmarshallerContext context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(jsonResponse), false, webResponse);
            var response = UpdateParameterGroupResponseUnmarshaller.Instance.Unmarshall(context)
                           as UpdateParameterGroupResponse;

            InstantiateClassGenerator.ValidateObjectFullyInstantiated(response);
        }
示例#2
0
        internal UpdateParameterGroupResponse UpdateParameterGroup(UpdateParameterGroupRequest request)
        {
            var marshaller   = new UpdateParameterGroupRequestMarshaller();
            var unmarshaller = UpdateParameterGroupResponseUnmarshaller.Instance;

            return(Invoke <UpdateParameterGroupRequest, UpdateParameterGroupResponse>(request, marshaller, unmarshaller));
        }
示例#3
0
        /// <summary>
        /// Initiates the asynchronous execution of the UpdateParameterGroup operation.
        /// </summary>
        ///
        /// <param name="request">Container for the necessary parameters to execute the UpdateParameterGroup 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>
        /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/dax-2017-04-19/UpdateParameterGroup">REST API Reference for UpdateParameterGroup Operation</seealso>
        public Task <UpdateParameterGroupResponse> UpdateParameterGroupAsync(UpdateParameterGroupRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var marshaller   = new UpdateParameterGroupRequestMarshaller();
            var unmarshaller = UpdateParameterGroupResponseUnmarshaller.Instance;

            return(InvokeAsync <UpdateParameterGroupRequest, UpdateParameterGroupResponse>(request, marshaller,
                                                                                           unmarshaller, cancellationToken));
        }