public void UpdateUserMarshallTest() { var operation = service_model.FindOperation("UpdateUser"); var request = InstantiateClassGenerator.Execute <UpdateUserRequest>(); var marshaller = new UpdateUserRequestMarshaller(); var internalRequest = marshaller.Marshall(request); TestTools.RequestValidator.Validate("UpdateUser", request, internalRequest, service_model); var webResponse = new WebResponseData { Headers = { { "x-amzn-RequestId", Guid.NewGuid().ToString() }, { "x-amz-crc32", "0" } } }; var payloadResponse = new JsonSampleGenerator(service_model, operation.ResponseStructure).Execute(); webResponse.Headers.Add("Content-Length", UTF8Encoding.UTF8.GetBytes(payloadResponse).Length.ToString()); var context = new JsonUnmarshallerContext(Utils.CreateStreamFromString(payloadResponse), false, webResponse); ResponseUnmarshaller unmarshaller = UpdateUserResponseUnmarshaller.Instance; var response = unmarshaller.Unmarshall(context) as UpdateUserResponse; InstantiateClassGenerator.ValidateObjectFullyInstantiated(response); }
internal virtual UpdateUserResponse UpdateUser(UpdateUserRequest request) { var marshaller = new UpdateUserRequestMarshaller(); var unmarshaller = UpdateUserResponseUnmarshaller.Instance; return(Invoke <UpdateUserRequest, UpdateUserResponse>(request, marshaller, unmarshaller)); }
/// <summary> /// Initiates the asynchronous execution of the UpdateUser operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateUser 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/mq-2017-11-27/UpdateUser">REST API Reference for UpdateUser Operation</seealso> public virtual Task <UpdateUserResponse> UpdateUserAsync(UpdateUserRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateUserRequestMarshaller(); var unmarshaller = UpdateUserResponseUnmarshaller.Instance; return(InvokeAsync <UpdateUserRequest, UpdateUserResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the UpdateUser operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateUser 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<UpdateUserResponse> UpdateUserAsync(UpdateUserRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateUserRequestMarshaller(); var unmarshaller = UpdateUserResponseUnmarshaller.Instance; return InvokeAsync<UpdateUserRequest,UpdateUserResponse>(request, marshaller, unmarshaller, cancellationToken); }
internal UpdateUserResponse UpdateUser(UpdateUserRequest request) { var marshaller = new UpdateUserRequestMarshaller(); var unmarshaller = UpdateUserResponseUnmarshaller.Instance; return Invoke<UpdateUserRequest,UpdateUserResponse>(request, marshaller, unmarshaller); }
IAsyncResult invokeUpdateUser(UpdateUserRequest updateUserRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new UpdateUserRequestMarshaller().Marshall(updateUserRequest); var unmarshaller = UpdateUserResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
public void UpdateUserMarshallTest() { var operation = service_model.FindOperation("UpdateUser"); var request = InstantiateClassGenerator.Execute<UpdateUserRequest>(); var marshaller = new UpdateUserRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); }
/// <summary> /// Initiates the asynchronous execution of the UpdateUser operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateUser operation on AmazonIdentityManagementServiceClient.</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 EndUpdateUser /// operation.</returns> public IAsyncResult BeginUpdateUser(UpdateUserRequest request, AsyncCallback callback, object state) { var marshaller = new UpdateUserRequestMarshaller(); var unmarshaller = UpdateUserResponseUnmarshaller.Instance; return BeginInvoke<UpdateUserRequest>(request, marshaller, unmarshaller, callback, state); }
/// <summary> /// <para>Updates the name and/or the path of the specified User.</para> /// <para><b>IMPORTANT:</b> You should understand the implications of /// changing a User's path or name. For more information, see Renaming /// Users and Groups in Using AWS Identity and Access Management. </para> /// <para><b>NOTE:</b>To change a User name the requester must have /// appropriate permissions on both the source object and the target /// object. For example, to change Bob to Robert, the entity making the /// request must have permission on Bob and Robert, or must have /// permission on all (*). For more information about permissions, see /// Permissions and Policies. </para> /// </summary> /// /// <param name="updateUserRequest">Container for the necessary parameters /// to execute the UpdateUser service method on /// AmazonIdentityManagementService.</param> /// /// <exception cref="EntityTemporarilyUnmodifiableException"/> /// <exception cref="NoSuchEntityException"/> /// <exception cref="EntityAlreadyExistsException"/> public UpdateUserResponse UpdateUser(UpdateUserRequest updateUserRequest) { IRequest<UpdateUserRequest> request = new UpdateUserRequestMarshaller().Marshall(updateUserRequest); UpdateUserResponse response = Invoke<UpdateUserRequest, UpdateUserResponse> (request, this.signer, UpdateUserResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// Initiates the asynchronous execution of the UpdateUser operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateUser operation on AmazonIdentityManagementServiceClient.</param> /// <param name="callback">An Action delegate that is invoked when the operation completes.</param> /// <param name="options">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> public void UpdateUserAsync(UpdateUserRequest request, AmazonServiceCallback<UpdateUserRequest, UpdateUserResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new UpdateUserRequestMarshaller(); var unmarshaller = UpdateUserResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<UpdateUserRequest,UpdateUserResponse> responseObject = new AmazonServiceResult<UpdateUserRequest,UpdateUserResponse>((UpdateUserRequest)req, (UpdateUserResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<UpdateUserRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// Initiates the asynchronous execution of the UpdateUser operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService.UpdateUser"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateUser 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 async Task<UpdateUserResponse> UpdateUserAsync(UpdateUserRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateUserRequestMarshaller(); var unmarshaller = UpdateUserResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, UpdateUserRequest, UpdateUserResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// <para>Updates the name and/or the path of the specified user.</para> <para><b>IMPORTANT:</b> You should understand the implications of /// changing a user's path or name. For more information, see Renaming Users and Groups in Using AWS Identity and Access Management. </para> /// <para><b>NOTE:</b>To change a user name the requester must have appropriate permissions on both the source object and the target object. For /// example, to change Bob to Robert, the entity making the request must have permission on Bob and Robert, or must have permission on all (*). /// For more information about permissions, see Permissions and Policies. </para> /// </summary> /// /// <param name="updateUserRequest">Container for the necessary parameters to execute the UpdateUser service method on /// AmazonIdentityManagementService.</param> /// /// <exception cref="T:Amazon.IdentityManagement.Model.EntityTemporarilyUnmodifiableException" /> /// <exception cref="T:Amazon.IdentityManagement.Model.NoSuchEntityException" /> /// <exception cref="T:Amazon.IdentityManagement.Model.LimitExceededException" /> /// <exception cref="T:Amazon.IdentityManagement.Model.EntityAlreadyExistsException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<UpdateUserResponse> UpdateUserAsync(UpdateUserRequest updateUserRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new UpdateUserRequestMarshaller(); var unmarshaller = UpdateUserResponseUnmarshaller.GetInstance(); return Invoke<IRequest, UpdateUserRequest, UpdateUserResponse>(updateUserRequest, marshaller, unmarshaller, signer, cancellationToken); }
IAsyncResult invokeUpdateUser(UpdateUserRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new UpdateUserRequestMarshaller(); var unmarshaller = UpdateUserResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }