/// <summary> /// Initiates the asynchronous execution of the PutUserPolicy operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the PutUserPolicy 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<PutUserPolicyResponse> PutUserPolicyAsync(PutUserPolicyRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new PutUserPolicyRequestMarshaller(); var unmarshaller = PutUserPolicyResponseUnmarshaller.Instance; return InvokeAsync<PutUserPolicyRequest,PutUserPolicyResponse>(request, marshaller, unmarshaller, cancellationToken); }
IAsyncResult invokePutUserPolicy(PutUserPolicyRequest putUserPolicyRequest, AsyncCallback callback, object state, bool synchronized) { IRequest irequest = new PutUserPolicyRequestMarshaller().Marshall(putUserPolicyRequest); var unmarshaller = PutUserPolicyResponseUnmarshaller.GetInstance(); AsyncResult result = new AsyncResult(irequest, callback, state, synchronized, signer, unmarshaller); Invoke(result); return result; }
internal PutUserPolicyResponse PutUserPolicy(PutUserPolicyRequest request) { var marshaller = new PutUserPolicyRequestMarshaller(); var unmarshaller = PutUserPolicyResponseUnmarshaller.Instance; return Invoke<PutUserPolicyRequest,PutUserPolicyResponse>(request, marshaller, unmarshaller); }
/// <summary> /// Initiates the asynchronous execution of the PutUserPolicy operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the PutUserPolicy 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 EndPutUserPolicy /// operation.</returns> public IAsyncResult BeginPutUserPolicy(PutUserPolicyRequest request, AsyncCallback callback, object state) { var marshaller = new PutUserPolicyRequestMarshaller(); var unmarshaller = PutUserPolicyResponseUnmarshaller.Instance; return BeginInvoke<PutUserPolicyRequest>(request, marshaller, unmarshaller, callback, state); }
public void PutUserPolicyMarshallTest() { var operation = service_model.FindOperation("PutUserPolicy"); var request = InstantiateClassGenerator.Execute<PutUserPolicyRequest>(); var marshaller = new PutUserPolicyRequestMarshaller(); var internalRequest = marshaller.Marshall(request); var validator = new AWSQueryValidator(internalRequest.Parameters, request, service_model, operation); validator.Validate(); }
/// <summary> /// <para>Adds (or updates) a policy document associated with the /// specified User. For information about how to write a policy, refer to /// Using AWS Identity and Access Management.</para> <para>For information /// about limits on the number of policies you can associate with a User, /// see Limitations on IAM Entities in Using AWS Identity and Access /// Management.</para> <para><b>NOTE:</b>Because policy documents can be /// large, you should use POST rather than GET when calling PutUserPolicy. /// For more information, see Using the Query API in Using AWS Identity /// and Access Management.</para> /// </summary> /// /// <param name="putUserPolicyRequest">Container for the necessary /// parameters to execute the PutUserPolicy service method on /// AmazonIdentityManagementService.</param> /// /// <exception cref="MalformedPolicyDocumentException"/> /// <exception cref="NoSuchEntityException"/> /// <exception cref="LimitExceededException"/> public PutUserPolicyResponse PutUserPolicy(PutUserPolicyRequest putUserPolicyRequest) { IRequest<PutUserPolicyRequest> request = new PutUserPolicyRequestMarshaller().Marshall(putUserPolicyRequest); PutUserPolicyResponse response = Invoke<PutUserPolicyRequest, PutUserPolicyResponse> (request, this.signer, PutUserPolicyResponseUnmarshaller.GetInstance()); return response; }
/// <summary> /// Initiates the asynchronous execution of the PutUserPolicy operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the PutUserPolicy 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 PutUserPolicyAsync(PutUserPolicyRequest request, AmazonServiceCallback<PutUserPolicyRequest, PutUserPolicyResponse> callback, AsyncOptions options = null) { options = options == null?new AsyncOptions():options; var marshaller = new PutUserPolicyRequestMarshaller(); var unmarshaller = PutUserPolicyResponseUnmarshaller.Instance; Action<AmazonWebServiceRequest, AmazonWebServiceResponse, Exception, AsyncOptions> callbackHelper = null; if(callback !=null ) callbackHelper = (AmazonWebServiceRequest req, AmazonWebServiceResponse res, Exception ex, AsyncOptions ao) => { AmazonServiceResult<PutUserPolicyRequest,PutUserPolicyResponse> responseObject = new AmazonServiceResult<PutUserPolicyRequest,PutUserPolicyResponse>((PutUserPolicyRequest)req, (PutUserPolicyResponse)res, ex , ao.State); callback(responseObject); }; BeginInvoke<PutUserPolicyRequest>(request, marshaller, unmarshaller, options, callbackHelper); }
/// <summary> /// Initiates the asynchronous execution of the PutUserPolicy operation. /// <seealso cref="Amazon.IdentityManagement.IAmazonIdentityManagementService.PutUserPolicy"/> /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the PutUserPolicy 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<PutUserPolicyResponse> PutUserPolicyAsync(PutUserPolicyRequest request, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new PutUserPolicyRequestMarshaller(); var unmarshaller = PutUserPolicyResponseUnmarshaller.GetInstance(); var response = await Invoke<IRequest, PutUserPolicyRequest, PutUserPolicyResponse>(request, marshaller, unmarshaller, signer, cancellationToken) .ConfigureAwait(continueOnCapturedContext: false); return response; }
/// <summary> /// <para>Adds (or updates) a policy document associated with the specified user. For information about policies, refer to <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/index.html?PoliciesOverview.html">Overview of Policies</a> in <i>Using AWS Identity /// and Access Management</i> .</para> <para>For information about limits on the number of policies you can associate with a user, see <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/index.html?LimitationsOnEntities.html">Limitations on IAM Entities</a> in <i>Using /// AWS Identity and Access Management</i> .</para> <para><b>NOTE:</b>Because policy documents can be large, you should use POST rather than GET /// when calling PutUserPolicy. For information about setting up signatures and authorization through the API, go to Signing AWS API Requests in /// the AWS General Reference. For general information about using the Query API with IAM, go to Making Query Requests in Using IAM.</para> /// </summary> /// /// <param name="putUserPolicyRequest">Container for the necessary parameters to execute the PutUserPolicy service method on /// AmazonIdentityManagementService.</param> /// /// <exception cref="T:Amazon.IdentityManagement.Model.MalformedPolicyDocumentException" /> /// <exception cref="T:Amazon.IdentityManagement.Model.NoSuchEntityException" /> /// <exception cref="T:Amazon.IdentityManagement.Model.LimitExceededException" /> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> public Task<PutUserPolicyResponse> PutUserPolicyAsync(PutUserPolicyRequest putUserPolicyRequest, CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = new PutUserPolicyRequestMarshaller(); var unmarshaller = PutUserPolicyResponseUnmarshaller.GetInstance(); return Invoke<IRequest, PutUserPolicyRequest, PutUserPolicyResponse>(putUserPolicyRequest, marshaller, unmarshaller, signer, cancellationToken); }
IAsyncResult invokePutUserPolicy(PutUserPolicyRequest request, AsyncCallback callback, object state, bool synchronized) { var marshaller = new PutUserPolicyRequestMarshaller(); var unmarshaller = PutUserPolicyResponseUnmarshaller.Instance; return Invoke(request, callback, state, synchronized, marshaller, unmarshaller, signer); }